Wifi Setup Balena Sound

Hello!

Ive set up my balena sound with ethernet connection. Now I want to add a wifi network so that when I dont have an ethernet cable left I can use my wifi. Which command do I need for adding a wifi network?

Hi there,
unfortunately we don’t have any direct commands to achieve this at the moment.
To add a WiFi network to your device, please have a look here: https://www.balena.io/docs/reference/OS/network/2.x/#changing-the-network-at-runtime

We highly recommend taking a look at the project listed in the documentation called wifi-connect

Otherwise manually speaking, just add the configuration file that you find in the documentation https://www.balena.io/docs/reference/OS/network/2.x/#wifi-setup, in one of the two directories:

  • /mnt/boot/system-connections/ (can only be changed manually)
  • /etc/NetworkManager/system-connections/ (can be edited either manually or via NM API)

(manual changes are applied only after device reboot)

We recommend NOT adding the config file in both directories as the file in /mnt/boot/system-connections/ would overwrite the file with the same name found in /etc/NetworkManager/system-connections/ at each reboot.

Manual example:

from the dashboard > device page (HOST OS terminal) we run these two commands:

  1. cd /mnt/boot/system-connection (hypothetical chosen location)

cat <<EOT >> resin-wifi
[connection]
id=balena-wifi
type=wifi

[wifi]
hidden=true
mode=infrastructure
ssid=My Awesome WiFi Ssid

[ipv4]
method=auto

[ipv6]
addr-gen-mode=stable-privacy
method=auto

[wifi-security]
auth-alg=open
key-mgmt=wpa-psk
psk=super_secret_wifi_password
EOT

(hypothetical Netwrok configuration)

Hi @hanno.lk,
a colleague pointed out to me that I previously forgot to mention nmcli that can also be used to create a connection profile, instead of editing or creating a text file.
Here you can find a some examples: https://developer.gnome.org/NetworkManager/stable/nmcli-examples.html