Unable to connect to wifi on RPi3

I have installed BalenaOS 2.29.2 rev2 dev and for some reason despite all the details being configured correctly in the boot partition I am unable to join my wireless network. The interface is not coming up as running indicating that wpa_supplicant has probably failed.

If I manually create wpa_supplicant.conf with the same SSID and PSK, stop wpa_supplicant using systemctl and start it using the created config I am able to connect via wifi successfully and get a dhcp address.

When viewing /etc/wpa_supplicant.conf it doesn’t seem to have the network configured at all. I am not overly familiar with NetworkManager so I am not sure where else to look.

Hi @phoenixmage,

We use NetworkManager to connect to wifi networks so it’s not advised to create your own wpa_supplicant configuration.

So in order to help you, we need you to download a vanilla RPi3 image from the dashboard where you will type your wifi credentials.

If wifi still doesn’t work we will need the output of:
journalctl -u NetworkManager --no-pager
and
ifconfig

Regards!

Hi @phoenixmage,
We use NetworkManager to connect to wifi networks so it’s not advised to create your own wpa_supplicant configuration.
So in order to help you, we need you to download a vanilla RPi3 image from the dashboard where you will type your wifi credentials.
If wifi still doesn’t work we will need the output of:
journalctl -u NetworkManager --no-pager
and
ifconfig
Regards!

Hi @spanceac

I am currently running the stock image other than running ‘balena local configure’ and entering the correct SSID and PSK.

Output from ‘journalctl -u NetworkManager --no-pager’
https://pastebin.com/jTSXe705

root@balena:~# ifconfig -a
balena0   Link encap:Ethernet  HWaddr 02:42:B5:3D:84:9E
          inet addr:10.114.101.1  Bcast:10.114.101.255  Mask:255.255.255.0
          inet6 addr: fe80::42:b5ff:fe3d:849e/64 Scope:Link
          UP BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:381629 errors:0 dropped:0 overruns:0 frame:0
          TX packets:972867 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:26695869 (25.4 MiB)  TX bytes:1422667054 (1.3 GiB)

br-72ad3c2dd8ee Link encap:Ethernet  HWaddr 02:42:36:BB:48:6C
          inet addr:172.18.0.1  Bcast:172.18.255.255  Mask:255.255.0.0
          UP BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

eth0      Link encap:Ethernet  HWaddr B8:27:EB:16:83:85
          inet addr:172.16.37.108  Bcast:172.16.37.255  Mask:255.255.255.0
          inet6 addr: fe80::1719:85f0:58:2c2f/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:1698180 errors:0 dropped:0 overruns:0 frame:0
          TX packets:519266 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:2469633279 (2.2 GiB)  TX bytes:53572157 (51.0 MiB)

lo        Link encap:Local Loopback
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:65536  Metric:1
          RX packets:7946 errors:0 dropped:0 overruns:0 frame:0
          TX packets:7946 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:595077 (581.1 KiB)  TX bytes:595077 (581.1 KiB)

resin-dns Link encap:Ethernet  HWaddr AA:C8:64:F3:B7:85
          inet addr:10.114.102.1  Bcast:0.0.0.0  Mask:255.255.255.0
          inet6 addr: fe80::a8c8:64ff:fef3:b785/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:24442 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:0 (0.0 B)  TX bytes:3339351 (3.1 MiB)

supervisor0 Link encap:Ethernet  HWaddr 02:42:5F:C9:33:EF
          inet addr:172.17.0.1  Bcast:172.17.255.255  Mask:255.255.0.0
          UP BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

wlan0     Link encap:Ethernet  HWaddr EA:03:00:E9:A9:70
          UP BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

Hi @phoenixmage,

Could you also paste the output of cat /mnt/boot/system-connections/resin-wifi-01 with the psk field deleted.

Also output of nmcli con would be usefull.

Hi @spanceac,

I have no resin-wifi-01 only resin-wifi which contains

cat /mnt/boot/system-connections/resin-wifi
[connection]
id=resin-sample
type=wifi

[wifi]
hidden=true
mode=infrastructure
ssid=Lungo

[wifi-security]
auth-alg=open
key-mgmt=wpa-psk
psk="PSK"

[ipv4]
method=auto

[ipv6]
addr-gen-mode=stable-privacy
nmcli con
NAME                UUID                                  TYPE      DEVICE
Wired connection 1  5d8d502d-8d9d-3b63-b30d-c37fa3a6d13f  ethernet  eth0
supervisor0         52a52e20-6f15-4a01-bc0f-125df7a435ea  bridge    supervisor0
resin-sample        1669d9b1-30a7-3d20-87ec-aad518cd9e8f  wifi      --

Hi @phoenixmage,

Looking through your connection file, it seems fine.

You said that you used balena local configure command so this makes me think that there could be something wrong with the local mode.

Could you please download the same image version from the dashboard where you will also put your WiFi credentials and see if it works?

Dashboard link:
https://dashboard.balena-cloud.com

Thank you!

Hi @phoenixmage,
Looking through your connection file, it seems fine.
You said that you used balena local configure command so this makes me think that there could be something wrong with the local mode.
Could you please download the same image version from the dashboard where you will also put your WiFi credentials and see if it works?
Dashboard link:
https://dashboard.balena-cloud.com
Thank you!

Hi @spanceac,

Same issue occurs when I use the balina-cli to an instance of openBalena and use balena os configure.

I assume openBalena and Balena Cloud use the same mechanism to generate images?

Cheers

Hi @phoenixmage,

The openBalena and Balena Cloud images are the same.

When you say the same issue occurs when you

are you referring to the image downloaded from the dashboard?

Regards!

Hi @spanceac

You seem to be double posting…

I downloaded the dev image for Rpi3 and ran balena os configure ~/balena-images/BalenaOS-2.29.2+rev2-dev.img --app ha-balena

I flashed the image to SD card and then booted the Pi from that with the same issue, Wifi never connects.

Hi @phoenixmage,

There is indeed a small issue where a post appears twice. I will erase the extra one.

If you download an image from the dashboard where you will also insert your WiFi credentials, there is no balena os configure step necessary.

In your dashboard application click on Add device, select the Development version and Wifi + Ethernet. Type your wifi credentials and click on Download balenaOS.

Then flash the image as you downloaded it without any other intervention on the image.

Please let us know how it goes.