txwifi
txwifi copied to clipboard
Doesn't seem to re-connect to configured wifi access point on restart (of container) or reboot of pi
-
I'm submitting a ...
- [X] bug report
-
What is the current behavior? Everything is up and running ok, and am able to get the wifi access point set. A
wpa_supplicant.conf
is created in/etc/wpa_supplicant/wpa_supplicant.conf
. If I stop the container, the wifi connection to the configured AP is terminated, which makes sense. However, should it use the previous configuration upon starting the container again? -
If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem
- Follow instructions in the README.MD
- curl the api and set a wifi access point.
- ping external server to confirm working (ie google.com)
- stop the container
- restart the container
- ping external server, or
ifconfig wlan0
and observe no ping is possible and no ip lease exists
-
What is the expected behavior? Previously configured wifi access point is used upon starting the container.
-
What is the motivation / use case for changing the behavior? Use to provide configuration of wifi access point to IOT device and have that configuration persist across restarts.
-
Please tell us about your environment:
- Device: RP 4B
- OS: raspbian buster
-
Other information (e.g. detailed explanation, stacktraces, related issues, suggestions how to fix, links for us to have context, eg. stackoverflow, gitter, etc)
🦗
I am an extreme novice when it comes to Docker, but I got it working like this You will need to mount the container with a volume.
docker volume create vol1
And then run the container like so
docker run -d --privileged --net host \
-v $(pwd)/wificfg.json:/cfg/wificfg.json \
--mount source=vol1,target=/etc/wpa_supplicant/ \
cjimti/iotwifi