balena-cli init OS image with development version

Hi,

Its possible to flash the SD card on command line, with the correct parameters using:

balena device init --app YourAppName

https://www.balena.io/docs/reference/balena-cli/#device-init

It downloads and builds a production version by default, and ask for network support, asking Wifi SSID and passphrase.
It also registers the device in the app.

For a development version from command line, it doesn’t seems to work.

We can bring a menu for choosing the version:

balena device init --app workshop --os-version menu

Specifying the version should look like:

balena device init --app workshop --os-version 'v2.47.0+rev1.dev'

Both call ask for a storage to flash the configured image, and it won’t ask for Wifi.

The sdcard boot, but the device never get online in the app.

Any idea, how to get a working SD card with balenaOS in development version from command line?

Regards,
Sylvain.

Hi Sylvain thanks for your report. We are currently working on redesigning some of this workflow because there are inconsistencies and bugs. My guess is that when you are using the balena device init --app workshop --os-version 'v2.47.0+rev1.dev' fully describing the version, it is skipping the network option which is most likely a bug. ( I will check with the maintainers )

To validate this, can you run balena device init --app workshop --os-version 'v2.47.0+rev1.dev' and once its finished flashing the SD card, can you remount it and check if there are any files in /resin-boot/system-connections/ . In the working case it should put connection files into that folder.

As a workaround for now you would need to add the connection file to /resin-boot/system-connections/ manually, the documentation on doing that is here: https://www.balena.io/docs/reference/OS/network/2.x/#wifi-setup