Raspberry Pi 3: How To Disable the WiFi Transmitter

This post applies to the Raspberry Pi 3.

We turned our Raspberry Pi 3 into a WiFi hotspot, but extended exposure to WiFi can be harmful to health, so we created a simple way to disable the Raspberry Pi 3 WiFi transmitter when it's not in use.

Disable The Transmitter

We have tested the transmitter with an RF intensity meter to confirm that this method actually powers down the transmitter so it no longer emits RF energy.

This is the statement you need to use.

Code
sudo ifconfig wlan0 down

There is no known method to restart a powered-down transmitter at this time, so to enable WiFi again, you must reboot the Pi:

Code
sudo reboot


How To Put a One-Touch Button On the Taskbar To Disable WiFi

We wanted to make it as easy as possible for people to disable WiFi when it was not in use.

To create a button on your taskbar takes 3 easy steps.

STEP 1: Write a script to disable WiFi.

First, edit/create this file (in your home folder):
Code
sudo nano /home/pi/disable-wifi.sh


Paste this code into the file:
Code
#/usr/bin/sh

echo Shutting down WiFi...
sudo ifconfig wlan0 down
echo WiFi has been disabled.
sleep 3


Now, save the file and mark it as an executable:
Code
sudo chmod 700 /home/pi/disable-wifi.sh


Good, now we have a script that disables the WiFi transmitter.

You can run this from the command line if you want, but we want a button on the taskbar to make it easy to run the file with a mouse or touchscreen.

STEP 2: Prepare An Icon

We need an icon to display on the taskbar. This is important.

You can just download the icon below (or any icon of your choice), but it must be in this directory on your Pi 3, and it must be named as shown:
Code
/usr/share/icons/no-wifi.png


You can just grab the icon from our server if you like. Here is the procedure from the Pi 3 command line:
Code
cd /usr/share/icons/
wget orbisvitae.com/assets/images/misc/no-wifi.png


Here is the image in case you just want to download it using your Pi's browser:
[Linked Image]

STEP 3: Create the Taskbar Button

Now we need to create the file that actually displays a taskbar button, so edit/create the "desktop" file:
Code
sudo nano /home/pi/.local/share/applications/disable-wifi.desktop


Paste this code into the file:
Code
[Desktop Entry]
Name=Disable WiFi
Comment=Turn off the WiFi transmitter
Icon=/usr/share/icons/no-wifi.png
Exec=/home/pi/disable-wifi.sh
Type=Application
Encoding=UTF-8
Terminal=true
Categories=Utility;


Now, you may or may not need to reboot your Pi to see the new button, but usually the button will simply appear when the file is created and saved.

If you need to reboot, do this:
Code
sudo reboot


Now you will have a taskbar button that disables the WiFi transmitter on your Raspberry Pi 3.

If you found this post helpful, please share by copying and sharing the URL of this page.

Last edited by Russ; 10/23/16 04:09 AM.

The Captian
Today they call you "crazy". Tomorrow they call you "ahead of your time."
Global Skywatch Learn about Chemtrails - You're breathing them now!
OnlyTheBestHerbs.com World-class supplements
Mercury Talk Why you are sick.
OneUp Domains Domains, Hosting, Email
1-800-358-4278 (U.S. & Canada)