I’m familiar with the Resin dashboard “Add a new device” flow for my application which allows me to download the resinOS image for my application and to create a device.
And I’m familiar with the steps of flashing the USB key and provisioning the device.
I see the Resin CLI Preload command which allows me to then update the image to the latest build of my application.
But I haven’t yet found how to create multiple devices at once for shipping from the factory. Does the provision step work if I provision multiple physical devices with the same image? Does the resin server automatically add all of the devices to the application dashboard?
TL;DR: the image is configured with a generic provisioning key for your application, which each device trades for a device-specific API key on first boot.
Before first boot when the image is flashed, it appears that the device pops up as “Not-Provisioned” with a UUID already assigned.
So there doesn’t appear to be a simple way to just not boot up the hard drive once it is flashes, copy it to multiple drives, and then run the “first boot”. I might be wrong though but that is just what I experienced during my flashing.
@jason10 to create multiple devices in the factory, you can take a resinOS image, use the preloader to add your latest code, then flash that .img on to hundreds of SD cards or eMMC, when the devices boot up, they will do the key exchange and provision in the application. The registration will either happen in the os here or in the supervisor as a redundancy here
Thanks @shaunmulligan - after I’d gone a few steps away from the “getting started” flow of
using the resin dashboard to create a new app and device
using the resin dashboard to download the initial resinOS image
using git or the resin cli to make changes to my app and deploy them to the device
it wasn’t clear how to get an image that could be flashed on new devices. After trying the resin preload command I see now how it takes prompts for the application name and release tag (with options presented) and can take the original resinOS.img that I had downloaded and update it to the latest version of my app.