Resin-wifi-connect setup issues

raspberrypi3

#1

I’m currently trying to get resin-wifi-connect to work within a container on a RaspberryPi 3.

I have got to the stage where running wifi-connect gives: “Error: Cannot find a WiFi device”
Is there anything else I need to enable that I might have overlooked?

Output of ls -al /etc/NetworkManager/system-connections/ on hostOS shows me resin-wifi-01. Within the other service it returns nothing.

One additional change that I needed to make to get wifi-connect to work at all was to set:

DBUS_SYSTEM_BUS_ADDRESS=unix:path=**/var/**run/dbus/system_bus_socket

rather than:

DBUS_SYSTEM_BUS_ADDRESS=unix:path=**/host/**run/dbus/system_bus_socket

I am not sure whether this is by design.

ifconfig in hostOS shows wlan0 whereas in the container it does not.

Edit: may need to add net:host in docker-compose.yml I suspect


#4

OK - my last change to docker-compose.yml resolved it.
network_mode: “host”


#5

@WillFG The correct D-Bus address for running WiFi Connect in a container should be unix:path=/host/run/dbus/system_bus_socket on resinOS.

Are you installing the network-manager package inside your container? Inside a container WiFi Connect is not able to run with the default D-Bus address (/var/run/dbus/system_bus_socket).

The docker-compose.yml additionally needs (in case you have not specified it):

    labels:
      io.resin.features.dbus: '1'
```

#7

Thanks, it’s now connecting on the specified path.
I have not got it to work fully, beyond showing the UI and sometimes available networks, but I’ll research that some more before asking any further questions.


#8

No problem with that as your input is valuable for making WiFi Connect better. Please do not hesitate to ping me if you encounter any issues or have questions.


#10

I am still encountering reliability problems.

  • Often I can curl a request from the Host OS but not from my desktop.
  • In addition, I often get “request error = Header” when accessing the form.

See my current docker-compose.yml:

resin-wifi-connect:
build:
context: ./resin-wifi-connect
args:
- BASEIMAGE_BUILD=resin/raspberrypi3-debian:stretch
environment:
DBUS_SYSTEM_BUS_ADDRESS: “unix:path=/host/run/dbus/system_bus_socket”
restart: always
privileged: true
network_mode: “host”
ports:
- 80:80/tcp
labels:
io.resin.features.dbus: ‘1’

Is there anything obviously wrong?
Edit: I will look at masking the network manager service as this was suggested in another thread.


#11

Here is a sample repository with running WiFi Connect in a multicontainer environment:

You may check the docker-compose.yml and the Dockerfiles. I tried to make it as simple as possible


#12

Thanks, I put systemctl mask NetworkManager.service into my Dockerfile and that seems to have fixed it, in that resin-wifi-connect is now giving me “Internet connectivity established”. The Header errors seem to be a bit of a red herring.
Additionally I removed 80:80/tcp from docker-compose.yml as this was not in the examples.


#13

Are you using nmcli inside the container? If not, most probably you do not need to install NetworkManager inside the container.


#14

It was indeed installed; I’ll remove it.