Disable iMX8 onboard wifi card permanently

Hi,
I would like to disable the iMX8QP onboard wifi card permanently. How can i do that with minimal effort?
Thanks in advance.

iMX8QP 2GB WB
Ixora V1.3A
Torizon 6.7.0

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.

Hi @qojote

Can you elaborate on what is your final goal? Why do you want to disable the wifi permanently?

There’s no easy way to disable the wifi permanently.
You can as the bot suggested disable the wifi on the device tree, but this is not permanently, you can enable it back at any time.

https://git.toradex.com/cgit/linux-toradex.git/tree/arch/arm64/boot/dts/freescale/imx8-apalis-v1.1.dtsi?h=toradex_5.15-2.2.x-imx#n832

/* On-module Wi-Fi */
&pcieb {
	pinctrl-names = "default";
	pinctrl-0 = <&pinctrl_pcieb &pinctrl_wifi>;
	ext_osc = <1>;
	fsl,max-link-speed = <1>;
	reset-gpio = <&lsio_gpio5 0 GPIO_ACTIVE_LOW>;
	vpcie-supply = <&reg_module_wifi>;
	status = "disabled";
};

Please note that we also sell the PN: 00491103, which is the version of Apalis iMX8 QuadPlus 2GB Wi-Fi / Bluetooth without the wifi card.

Hi @allan.tx ,
I would like to use the onboard Wifi card but however this issue prevents me from doing so. That is why i am temporarily using an additional wifi card via thie miniPCIe slot (and this card does not crash).
BR

Hi @qojote

I see, thanks for providing the context.

So, does this solution works for you?