IOT Wifi (Raspberry Pi AP + Client)
IOT Wifi is a wifi management container for Raspberry Pi, allowing simultaneous station and AP modes to enable wifi configuration over wifi. Programmatically configure or bring your own user interface.
- http://pifi.imti.co/ for a Getting Started guide.
- https://github.com/cjimti/iotwifi for source code. Build your own container if this one is not suitable.
IOT Wifi sets up network interfaces, runs hostapd, wpa_supplicant and dnsmasq to run simultaneously. This allows a user (or another service) to connect to the Raspberry Pi via hostapd/dnsmasq and issue commands that configure and connect wpa_supplicant to another AP. IOT Wifi then exposes a small web server on the Pi and offers a JSON based REST API to configure Wifi. This allows you to build a custom Captive Portal web page or even programmatically connect from another device and use the exposed API to configure the target device.
Using wifi to configure a wifi connection is a natural requirement for consumer IOT devices. As Raspberry Pis are becoming a popular choice as an IOT platform, helps solve the frequent need to manage AP and Station modes.
Disable wpa_supplicant on host:
# prevent wpa_supplicant from starting on boot $ sudo systemctl mask wpa_supplicant.service # kill any running processes named wpa_supplicant $ sudo pkill wpa_supplicant
Get default configuration:
# Download the default confguration file $ wget https://raw.githubusercontent.com/cjimti/iotwifi/master/cfg/wificfg.json
$ docker run --rm --privileged --net host \ -v $(pwd)/wificfg.json:/cfg/wificfg.json \ cjimti/iotwifi
see http://pifi.imti.co/ for more detailed instructions and a Getting Started guide.