This program is to monitor Wi-Fi connection status to the target access points in the radio range. For each access point, it tries to check the followings and stores the results per the AP.
- Whether the AP is in the radio range or not
- Whether the AP can be associated or not with given credentials
- Whether it can connect to the gateway or not via the associated AP
- Whether it can connect to the internet or not via the associated AP
The gathered status info. is presented onto the e-paper display and is also sent to the given email addresses periodically. This program has been tested on RPi3 b+ running Rasbian stretch lite.
wlan_monitor.py --configfile wifi.json --toaddrs recipients.json --interval interval_in_seconds
or,
systemctl start wlanmonitor wlanmonitor_controller
- Install Rasbian stretch lite from https://www.raspberrypi.org/downloads/raspbian/
- Clone this repository at /home/pi/work and run sudo ./install.sh
- Make sure the following configuration files are correctly given
- Refer to wifi.json for the list of APs and the credentials to connect to
- Refer to recipients.json for the email addresses to get the status report
- epaper dir. is with e-paper io modules. Find the details at https://github.com/waveshare/e-Paper
- Set up gmail relay. I followed the steps given at https://tecadmin.net/sendmail-to-relay-emails-through-gmail-stmp/
- Enable two services, by executing systemctl enable wlanmonitor wlanmonitor_controller
- It seems that bcmfmac does not correctly set some of the regulatory domains. raspberrypi/linux#2997
- Sometimes wireless extension can't be recovered into normal state without refreshing brcmfmac. And thus some work-arounds are there
- As of now, only WPA1/2 personal mode is supported. WPA enterprise and WEP mode are not supported.