2

I'm using Raspberry Pi Zero 2W on an FPV quad controlled via ELRS working on the same frequency (2,4 GHZ) as WiFi.

To reduce any possible interference I'd like to turn off WiFi on my Pi entirely until the next reboot.

What is the most reliable way to implement this?

3 Answers3

3

No idea what a "FPV quad controlled via ELRS" is, but I'd use rfkill for turning off WiFi (and/or Bluetooth if that's needed):

Do this in two steps:

Step 1: get rf device list:

$ sudo rfkill
ID TYPE      DEVICE      SOFT      HARD
 0 bluetooth hci0   unblocked unblocked
 1 wlan      phy0   unblocked unblocked

Step 2: kill the desired device (wlan on your case):

$ sudo rfkill block 1

where '1' is the ID value from Step 1

Rebooting will clear the rfkill block, but if (for example) you've got a serial hookup to your Zero 2W you can remove the block as follows:

$ sudo rfkill unblock 1

Also if you want to schedule a block or an unblock, you can add a line to your root crontab to do that; e.g. schedule an unblock each hour:

0 * * * * /usr/sbin/rfkill unblock 1
Seamus
  • 23,558
  • 5
  • 42
  • 83
3

If your aim is "To reduce any possible 2.4 GHz interference" you should also block Bluetooth even though it is low power.

rfkill block 1 && rfkill block 0

Milliways
  • 62,573
  • 32
  • 113
  • 225
2

I believe

sudo dtoverlay disable-wifi
sudo dtoverlay disable-bt

will do what you need

Bravo
  • 290
  • 3
  • 9