Hi,
I’m using the raspberry pi 3 in combination with the RAK831 : I followed the tutorial ( https://www.thethingsnetwork.org/docs/gateways/rak831/ ) => the gateway is working fine … But is it possible to reconfigure the pi so i can use WIFI connection instead of wire ?
Hi @ON8TLR, great that you are building stuff with balena!
To use the wifi connection, you can choose “wifi” and add your credentials there when you are “adding a device” in the dashboard, see the bottom of this screenshot:
Thanks for the reply => if i’m correct there’s no other way then to re-download and rewrite the image to the SD-card. (with the changes made of course) => found in “wifi setup” (this is found in the boot partition of your image).
Or is there a workaround? Mybe via the “terminal”?
Thanks
if you only have remote access, then connect to the host OS in the web terminal or balena ssh (using the CLI), navigate to /mnt/boot/system-connections and add your connection file there (using the vi editor that is in the host OS, or some other way), and then reboot the device (so that the settings take effect). This is a bit more unusual but would work in general.
Future, more advanced stuff
For the future, if you are making other projects, we would also recommend looking at the the wifi-connect project.
This is possible to run on your device next to your application, and can set things up such that your device might be able to bring up an access point, where you can change the wifi settings. But this needs code changes to the project you use, and either you or the maintainer would need to do that.
Mostly mentioning this so you can be aware of this tool, and use it some time if you see it fit.
I flashed the OS into sd card. Then edited resin-wifi with the settings above. But I cannot connect to the internet and the terminal keeps showing me this (as below) in few minutes time interval.
wlan0: link is not ready
brcmfmac: power management disabled
okay thanks for the info. If you have a connection into the hostOS of the device could you pull the logs fro NetworkManager. Basically can you run journalctl -u NetworkManager --no-pager in the hostOS and attach those logs here. Hopefully that will point to where the issue is.
Hi, additionally you may try running our WiFi Connect project as it has basic Eduroam support as well - https://github.com/balena-io/wifi-connect
Also just in case to ask: you did replace all the three necessary fields there, and rebooted the device, right?
Thanks,
Zahari
@shaunmulligan I try if I can save it to thumbdrive or other external storage. I am using development version so should be ok to locally access.
@majorz ok. I will try on the wifi-connect project.
Yes. I replaced with my ssid, identity and password.
Tested with and without “” also no luck for me.
I try if I can save it to thumbdrive or other external storage. I am using development version so should be ok to locally access.
@Shuuri, in case you find it easier, as you are using a development image, if you have a Windows or Mac laptop, you could enable internet connection sharing on the laptop (docs for Windows, docs for Mac) and connect the RPi to the laptop with an Ethernet cable (in addition to the WiFi configuration). The device will then probably show up on balena’s web dashboard, accessing the internet via the laptop. Then you can ssh to the RPi with a command like:
$ ssh -p 22222 root@X.X.X.X
… replacing X.X.X.X with the device’s IP address, shown on the web dashboard.
Then you can run the journalctl command mentioned by Shaun, in the ssh session, and copy-and-paste it. Even though the device will be connected to the internet via Ethernet, the logs should still include WiFi errors.
A sudden question pops in my head.
Will special characters affecting the credential authentication? There are special characters in the secret key. Do I need to use any method to input the special characters such as ~!@#$%^&*()-_?
I followed the guide from @shaunmulligan which ran the command journalctl -u NetworkManager --no-pager in the hostOS. Attached is the log retrieved.networkmanager.log (51.3 KB)
I noticed that the connection initially established successfully. But, it later triggered <warn> [1568725945.5272] sup-iface[0xf682a0,wlan0]: connection disconnected (reason -15). Then, got disconnected.
Hi @Shuuri, there could be a number of reasons for why it is failing like this. This needs to be narrowed down more.
First possibility is that some Eduroam networks could be configured slightly differently. Do you have access to some documentation about the configuration settings of the network you are connecting to? Usually the network admins publish it on the University websites.
Second option is to try to connect to the network with a WiFi dongle. This will differentiate whether it is a problem with the WiFi chipset/driver.
Third option is to try out a different wpa_supplicant version. This is also a possibility for the origin of the problem. In balenaOS v2.45 we upgraded the version of wpa_supplicant. It is currently not released, but should appear very soon for download on https://dashboard.balena-staging.com/. Afterwards it will be released for production as well. Once it appears on staging you may download the new OS version and try it out.
First possibility – I don’t have any access to the documentation. I just have the wpa_suppliant configuration when using on Raspbian official OS.
Okay, I will check with WiFi dongle. As I know, WiFi chipset/driver shouldn’t have any problem since it working fine when I changed sd card which contains Raspbian official OS.