Disable iMX8 onboard wifi card permanently

Hi, I’m the Toradex AI Assistant. The Toradex Support team will follow up with you shortly!

Did you like my answer?

:+1: :-1:


To disable the onboard Wi-Fi card on your iMX8QP permanently, you can follow these steps:

Method 1: Using Device Tree Overlay

  1. Create a Device Tree Overlay: You can create a device tree overlay to disable the Wi-Fi node. This involves modifying the device tree source (DTS) files.

  2. Edit the Device Tree: Locate the Wi-Fi node in the device tree and disable it by setting the status property to disabled.

    Example:

    &wifi {
        status = "disabled";
    };
    
  3. Compile the Device Tree Overlay: Use the Device Tree Compiler (DTC) to compile your DTS file into a DTBO file.

    dtc -I dts -O dtb -o my_overlay.dtbo my_overlay.dts
    
  4. Deploy the Overlay: Copy the compiled DTBO file to the overlays directory on your device, typically found at /boot/overlays/.

  5. Update Boot Configuration: Modify the boot configuration to apply the overlay. This can be done by editing the U-Boot environment or the bootloader configuration file to include your overlay.

    Example for U-Boot:

    setenv fdt_overlays my_overlay.dtbo
    saveenv
    

Method 2: Blacklisting the Wi-Fi Driver

  1. Identify the Wi-Fi Driver: Determine the kernel module responsible for the Wi-Fi card. This is typically a driver like brcmfmac for Broadcom-based Wi-Fi.

  2. Create a Blacklist File: Create a blacklist configuration file in /etc/modprobe.d/.

    Example:

    echo "blacklist brcmfmac" > /etc/modprobe.d/blacklist-wifi.conf
    
  3. Update Initramfs: If your system uses an initramfs, update it to include the new blacklist configuration.

    update-initramfs -u
    
  4. Reboot the System: Reboot your device to apply the changes.

Method 3: Disabling via Systemd

  1. Create a Systemd Service: Create a systemd service that disables the Wi-Fi interface at boot.

    Example:

    [Unit]
    Description=Disable Wi-Fi
    
    [Service]
    Type=oneshot
    ExecStart=/sbin/ip link set wlan0 down
    
    [Install]
    WantedBy=multi-user.target
    
  2. Deploy the Service: Save the above configuration to /etc/systemd/system/disable-wifi.service.

  3. Enable the Service: Enable the service to run at boot.

    systemctl enable disable-wifi.service
    
  4. Reboot the System: Reboot your device to apply the changes.

Conclusion

Choose the method that best fits your requirements. The device tree overlay method is more robust and ensures the Wi-Fi hardware is disabled at a low level, while blacklisting the driver or using a systemd service are simpler but effective methods for disabling the Wi-Fi functionality.

Please, also check if these links can help you solve your problem:

iMX8 Wifi module stops working in Toradex Embedded Linux Console Demo.