txn2 / txwifi

Raspberry Pi (arm) wifi configuration container. Configure and control wifi connectivity with a JSON based REST api.
https://imti.co/iot-wifi/
MIT License
146 stars 60 forks source link

Doesn't seem to re-connect to configured wifi access point on restart (of container) or reboot of pi #25

Open sethwebster opened 4 years ago

sethwebster commented 4 years ago
  1. Follow instructions in the README.MD
  2. curl the api and set a wifi access point.
  3. ping external server to confirm working (ie google.com)
  4. stop the container
  5. restart the container
  6. ping external server, or ifconfig wlan0 and observe no ping is possible and no ip lease exists
sethwebster commented 4 years ago

🦗

adityat90 commented 4 years ago

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