Controls managed wifi and AP hotspot separately with a simple API.
- You'll need a wifi dongle.
Quoting txwifi sums this project up:
This project is intended to aid in developing “configure wifi over wifi” solutions for IOT projects using the Raspberry Pi [Zero W]. The main use case for this project is to reproduce functionality common to devices like Nest or Echo, where the user turns on the device, connects to it and configures it for wifi.
Very similar to txwifi, but you can safely disable the hotspot without interrupting managed.
Tested on a Raspberry Pi Zero W with Hypriot
Due to unexpected behavior with Pi Zero W onboard wifi chipset when using both the managed wifi and the ap hotspot. Examples:
- The hotspot must be enabled before managed or the hotspot won't come up at all
- The hotspot will drop momentarily when you bring up managed (interrupts captive portal)
- If you want to disable the hotspot after connecting managed you must turn them both down and turn managed up again.
Not the most elegant solution, but it works. If you know how to fix the unexpected behavior with the onboard chipset please open an issue
It seems that to control dongles from inside a Docker container the drivers must be installed with dkms. I'm not sure why, but if you do please share.
You can find cheap dongles on Ebay and they may require some searching for the driver.
Here's some wifi dongle drivers:
- rtl8188fu
- rtl8812au (go down to DKMS in README)
- rtl8188eus (run the included dkms-install.sh)
- rtl8723au
If drivers need a Makefile in /usr/src/<kernel-ver>/arch/armv6l
you can link it to the arm folder
You'll need to convert USB to micro if you're using a Zero, here's a few sources:
Or you can use this, which is great for development:
curl http://localhost:5000/apup
curl http://localhost:5000/apdown
curl http://localhost:5000/scan
curl http://localhost:5000/connect \
-d '{"ssid":"network", "psk":"password"}' \
-H "Content-Type: application/json"
curl http://localhost:5000/connected
Interacting with either wifi chip from the host machine could interfere with the functionality of ygwifi.
For best results disable host wifi:
sudo systemctl mask wpa_supplicant.service
sudo mv /sbin/wpa_supplicant /sbin/no_wpa_supplicant
sudo pkill wpa_supplicant
sudo ifdown --force wlan0 wlan1
Run ygwifi:
docker run -d --name ygwifi ryazbeck/ygwifi:latest