Skip to content
This repository has been archived by the owner on Feb 11, 2022. It is now read-only.

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

Open
1 task done
sethwebster opened this issue Aug 4, 2020 · 2 comments

Comments

@sethwebster
Copy link

  • I'm submitting a ...

    • 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

  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
  • 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)

@sethwebster
Copy link
Author

🦗

@adityat90
Copy link

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

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants