Connecting devices at scale

How to register devices at scale

Upswift agent automatically recognizes new hardware based on the MAC addresses of the device. The next 2 methods can help you install Upswift on a fleet of devices easily without the need to register each device separately.

  1. Register devices by duplicating an existing OS image that has the Upswift Agent installed inside it.

    • Install Upswift agent on 1 device and make sure the device has been registered at Upswift dashboard.

    • Duplicate this device image, and burn it on other SD cards or emmc flashes.

    • Boot a new device with the duplicated image, Upswift agent will automatically recognize that it is running on new hardware and will register that device as a new device.

  2. Register devices by coping Upswift agent to the build of your custom OS (mainly for Yocto, Buildroot, Debian based images).

    1. Copy the Installation command and run it on one of your device's terminal.

    2. Copy the next files/directories to the offline device file system:

      1. /etc/upswift

      2. Depends if you have Systemd or SysV For Systemd:

        • /etc/systemd/system/upswift.service

        For SysV:

        • /etc/init.d/upswift

        • /etc/crontab

    3. Paste those files at the same paths on the build of the OS file-system. *In case of using Systemd, please also paste upswift.service in:

      • /etc/systemd/system/multi-user.target.wants/

    4. Boot a new device

Explanation of the identification algorithm

Upswift is capable of registering new devices by duplicating an image that has Upswift agent installed inside it. Upswift device registration algorithm depends on the MAC addresses of the devices. Every device has at least 1 MAC address. There are devices that have several MAC addresses, but at least 1 of them is unique and persistent across reboots. There might be situations when some of the MAC addresses are changing after a reboot. You can find out if this is the situation with your devices by checking your MAC addresses, reboot the device, and check them again.

If you are going to register new devices by duplicating an image, you have to check the checkbox that you are using this method and enter the number of the persistent MAC addresses your devices have at the Account Settings. This will adopt the new devices registration algorithm for your account to work with the type of your devices.

Examples

  1. You have 5 devices, all of them have 1 MAC address each. In that case, you will enter the number 1 at the persistent MAC addresses input.

  2. You have 5 devices, all of them have 3 MAC addresses each. If so, you have to check how many of those MAC addresses are persistent across reboots. Let's say, 2 of them are persistent (meaning they are not changing when you reboot the device) and 1 of them changes every reboot. In that case, you will enter the number 2 at the persistent MAC addresses input.

  3. You have 5 devices, some of them have 3 MAC addresses and others have 2 MAC addresses. In that case, you have to check how many of those MAC addresses are persistent across reboots for both types of devices. Let's say that 1 MAC address is persistent on the devices that have 2 MAC addresses in total, and 2 MAC addresses are persistent on the devices that have 3 MAC addresses in total, then you will enter the lower number of them at the persistent MAC addresses input, which is 1 in this case.