Deploy New Wifi Configurations

Good Morning,

Is there a way to remotely deploy a new, additional, wifi configuration file to devices?

Thank you,

A.

Hi, do you mean you need to change the wifi configuration of the already deployed devices? or you want to deploy new apps remotely with different wifi config?

I have an existing [deployed] device with an existing WiFi configuration and I want to add a second WiFi configuration so that it will connect when it moves between locations.

Thanks for the super fast response!

A.

Hi, to add multiple wifi credentials you’ll need to ssh into the device and add the wifi config in the /system-connections/resin-wifi file. to read more on the network setup you can visit https://www.balena.io/docs/reference/OS/network/2.x/#wifi-setup.

Is there an automated approach to copying in a new file?

If I understand the documentation, I can add a new file, say resin-wifi-02 to a running device in /mnt/boot/system-connections, containing another network definition and the device will then know how to connect to a second WiFi network. Is that correct?

To automate, I could build a simple app that accomplishes the above and temporarily deploy it to all the devices that require this new network. Would that work?

Thanks,

A.

Hi, to automate this for new device, you can run balena-cli locally and generate an os file for your device with the extra files you need in system-connections. You can read more about the flag to select the connections file -c here https://www.balena.io/docs/reference/balena-cli/#-c---system-connection-system-connection.

Once the image is generated you can provision it like you normally do.