Problem connecting to wifi network

Hi, so I entered the proper credentials for my 5Ghz WiFi network into Balena cloud the first time around, and my raspberry pi 4 would not connect to wifi during its boot process. I tried redoing the image by entering in the proper credentials for my 2.4Ghz network. That did not work either, but everything works just fine when I plug the Rpi4 in via ethernet. When I look at the troubleshoot page, I see that I could look at the “system-connections/resin-wifi” in the SD image to see what is there that could be causing an issue. I got this as a result, can you help me figure out what the issue is with connectivity?
Thanks.

Hello, Are you sure that’s the contents of the file? There’s a sample of what it should contain here:
https://www.balena.io/docs/reference/OS/network/2.x/#wifi-setup
There’s also a template file resin-sample.ignore in the system-connections directory.
Would you also be able to paste the directory listing of the files you see in system-connections?
Thank you

Here is a screenshot of the resin-sample.ignore template looks like.

Hi, indeed the resin-wifi file in the system connections should have that structure. Could you log into your device and share the listing on the directory /mnt/boot/system-connections to see if it matches the one on the volume?

You can log to the device using the web dashboard on the device summary > Terminal > Host OS or by using the CLI as in these instructions

Once in there, you can use the command ls /mnt/boot/system-connections to see the configuration files actually loaded into the device.

Yes, the data seems to be loaded onto the SD card successfully. I tried reflashing the SD card as a new device, but I still got the same error that there was no network connection. I plugged the device in via ethernet and that allowed me to access it via the dashboard. I know that my Rpi4’s wireless radios work b.c I used to have raspbian os running on it for a different project and I had no issues there.

Hey, can you verify that the OS is seeing the pi radios? Try running ifconfig on the HostOS as described before and look for wlan entries.

Also, we created a project to change wifi settings easily, perhaps it could be of use: https://github.com/balena-io/wifi-connect/

Hi, also please make sure the connections file does not contain erroneous new line chars due to bad pasting.

I see a wlan0 entry at the very bottom, does the attached image reveal any new information that I am not seeing? It seems that the fact that a wlan entry came up means that balenaOS is seeing the wifi radios, correct?

I will take a look at that posting. thanks!

When I did the reflashing of the SD card, I did not manually edit the connection file, so im assuming that there should be no issues with it since it would have been automatically generated.

Can you also share the uuid of the device, share it with us and enable support access for that device so we can login remotely and try to diagnose?

UUID: 74999731ecd3e3b79940fdebd9e2f23a
1 week support access granted.

Hi, just checked your device and saw you had the credentials there for the 5 GHz network. I believe you need to set the requlatory domain as described here: https://www.balena.io/docs/reference/OS/network/2.x/#regulatory-domain
Give that a test and let us know

I looked in the config.json file and I see nothing there that allows me to specify a country. All I see is…

{"apiEndpoint":"https://api.balena-cloud.com","appUpdatePollInterval":900000,"applicationId":"****","deltaEndpoint":"https://delta.balena-cloud.com","deviceApiKey":"****","deviceApiKeys":{"api.balena-cloud.com":"****"},"deviceType":"raspberrypi4-64","listenPort":"48484","mixpanelToken":"9ef939ea64cb6cd8bbc96af72345d70d","registryEndpoint":"registry2.balena-cloud.com","userId":"****","vpnEndpoint":"vpn.balena-cloud.com","vpnPort":"443","uuid":"74999731ecd3e3b79940fdebd9e2f23a","registered_at":1592249331413,"deviceId":****}

Hey @thomas.cullen, never blindly paste text on public forums. The config.json you pasted above contained the device API key, among other stuff, which I’ve edited out.

1 Like

hey @thomas.cullen you should just be able to add it to the end of the json file so just include it inside the last } as "country":"GB" and that should work.

Thank you! it seems to have fixed the problem.