Registering devices with Yocto image
These guidelines explain how to insert Connect agent into a Yocto image build, in order to deploy Connect on a big scale of devices at once.
- 1.Systemd or init.d + Cron. *It is recommended to use Systemd
DISTRO_FEATURES_append = " systemd"
VIRTUAL-RUNTIME_init_manager = "systemd"
DISTRO_FEATURES_BACKFILL_CONSIDERED = "sysvinit"
VIRTUAL-RUNTIME_initscripts = ""
CORE_IMAGE_EXTRA_INSTALL_append = " openssh"
Connect agent automatically recognizes new devices based on the "device_token" (generated by the Connect service) of the device. The next method can help you install Connect on a fleet of devices easily without the need to register each device separately.
This guide is specifically for building Yocto image with Connect agent inside:
- 2.Extract the zip file.
- 3.Open the file Connect -> service -> settings.json
- 4.Fill in the values of "user_token" and "project_name" (can be found by clicking on 'Register Device' inside Connect platform).
5. Save the file. Here is an example of a ready settings.json file:
*By default devices will register with a generated name - "New Device" to the group - "Production".
6. Copy the next files and directories to your Yocto file system:
After copying the files, the next paths need to exist: directory ->
As noted above, new devices will automatically be registered with "New Device" as the device name and will belong to the "Production" group. After adding the Connect agent to the file-system image, you might want to add a unique 'Device name' and 'Group' to each of the devices that register themselves. You can choose between 2 options.