From SECO EVB to the Cloud: Free trial setup guide

This guide is designed to help you seamlessly prepare your device and start exploring the Clea free trial. By following the instructions provided, you will learn how to effectively set up your device using two sample SECO evaluation boards and connect it to Clea. This involves configuring everything properly in Astarte and Edgehog using your personal credentials. Once your setup is complete, you can dive right into the free trial and explore the capabilities of Clea. Let’s get started.

SBC-pITX-APL (formerly codenamed C41) is a Pico-ITX Single Board Computer featuring Intel® Atom® X Series, Intel® Celeron® J/N Series and Intel® Pentium® N Series Processors and integrated Intel® HD graphics 500 series controller. This board fits any application requiring multiple video displays, from edge computing and IoT to industrial control and info kiosks.

What you need in advance

  • SBC-pITX-APL (C41) board
  • Power Supply 12V
  • Monitor, mouse and keyboard
  • USB pen drive (min 4GB)
  • Host Linux PC required to create the bootable USB pen drive

Download

How to flash the SBC-pITX-APL (C41) board

Here below we report the instructions to create a bootable USB pen drive with Edgehog OS Things installed on it:

  • Insert the USB pen drive in one of the dedicated slots in the host PC.
  • Unpack the downloaded wic.bz2 format Edgehog OS Things image:
$ bzip2 -d <image>.wic.bz2
  • Flash the image on the USB (typically detected in a Linux-based OS as /dev/sdX). The command will need:

Please, be careful to select the correct USB device ID. Using an incorrect device identifier may cause data loss on other devices. The following command must be run with sudo or root privileges.

 

$ dd if=<image>.wic of=/dev/sdX conv=fsync bs=10M
  • Connect the USB pen drive to the SBC-pITX-APL board.
  • Connect the board to an HDMI and/or DP monitor.
  • Connect a mouse and a keyboard to the SBC-pITX-APL board.
  • Switch on the board by connecting a 12V power supply and pressing the ESC button to enter the BIOS setup menu.
  • Navigate to the Save & Exit tab and select the correct boot option. In particular, from the Boot Override sub-menu, the user shall select one of the two options to boot from the previously flashed USB pen drive:
UEFI: <USB Pen Drive>, Partition 1 UEFI: <USB Pen Drive>, Partition 2
  • Once one of the two options has been selected, the GRUB window will open with the SLOT A boot option selected by default. After a short timeout, the operating system will boot automatically.
  • After the board's boot you can work with a terminal using the keyboard connected. The user simply needs to log in as a root user.

SBC-3.5-MX8M-Mini (formerly codenamed C61) is a 3.5” SBC with the NXP i.MX 8M Mini Processors. It stands out for its connectivity, with up to 2x GbE, optional Wi-Fi, up to 2x RS-232 or RS-485 or CAN and opt modems with SIM slot or eSIM. GPU-wise, it mounts GC320 2D accelerator + GCNano Ultra 3D accelerator, and the memory consists of a soldered-down LPDDR4 memory, up to 4GB total. All these features make this SBC well-suited for Internet of Things applications, edge computing, multimedia devices and visual computing.

What you need in advance

  • SBC-3.5-MX8M-Mini (C61) board
  • Power Supply 12V
  • uSD (min 4GB)
  • Host Linux PC required to create the bootable uSD and connect in serial with the board
  • USB-to-Serial cable kit (e.g. the SECO CV-895/30 REVB cable can be used, connected to a standard TTL-to-USB adapter that works with 3V3 logic.)

Download

How to flash the SBC-3.5-MX8M-Mini (C61) board

Here below we report the instructions to create a bootable uSD card with Edgehog OS Things installed on it:

  • Insert the uSD card in the dedicated slot in the PC.
  • Unpack the downloaded wic.bz2 format Edgehog OS image:
$ bzip2 -d <image>.wic.bz2
  • Flash the image on the uSD card (typically detected in a Linux-based OS as /dev/sdX):

Please, be careful to select the correct USB device ID. Using an incorrect device identifier may cause data loss on other devices. The following command must be run with sudo or root privileges.

 

$ dd if=<image>.wic of=/dev/sdX conv=fsync bs=10M
  • Move the jumper on CN52 connector to position 2-3 to load the OS from the uSD card.
  • Insert the previously flashed uSD card inside CN56 uSD slot on the board.
  • Connect the debug UART to the dedicated CN6 connector on the board. Please refer to the SBC-3.5-MX8M-Mini HW manual for connector pinouts.
  • Open a debug UART session to access the boot log and access an OS terminal on the board. Here we report an example using minicom (typically detected in a Linux-based OS as /dev/ttyUSBX). The standard serial protocol configuration 115200 8N1 is used:
$ minicom -w -D /dev/ttyUSBX

The following steps will guide you through the manual configuration that should be performed to connect a new device to Clea. First, this section will show you how to manually register a device to Astarte (Astarte also supports a fully automated process that is explained in our documentation but not covered here), and how to configure the previously flashed device, using the credentials obtained during the registration process.

What you need in advance:

  • A previously flashed board with a suitable operating system image, as described here above
  • Astarte Dashboard URL
  • Edgehog Dashboard URL
  • API URL
  • Astarte Realm
  • Astarte Auth Token
  • Edgehog Auth Token 
  • Tenant Slug

2.1 Registering a Device

2.2 Configuring Astarte Message Hub

This guide will show how to configure the Astarte Message Hub service that will allow to connect multiple applications and system services using just one MQTTs connection to Astarte such as our Device Runtime application to manage the life-cycle and collect system information of the device.

Step 1: Edit the Astarte Message Hub config file using the vi editor. Run the command # vi /etc/message-hub/config.toml in the device and change the variable values according to the lines below:

 

##
# Required fields
#
realm = “<REALM>”
pairing_url = “<PAIRING_URL>”
grpc_socket_port = 50051 # Required, 0 is only a placeholder
##
# Optional fields
#
interfaces_directory = “/usr/share/edgehog/astarte-interfaces/”
# Device ID, if not provided it will be retrieved from `io.edgehog.Device` dbus-service
device_id = “<device_id>”
# Credential secret, if not provided the `pairing_token` is required
credentials_secret = “<credentials_secret>”
# Ignore SSL errors, defaults to false
astarte_ignore_ssl = false
# Path to store persistent data, defaults to “./”
store_directory = "/var/lib/edgehog/"

 

where credentials_secret and device_id are respectively the “Credentials secrets“ and “Device ID” created in the previous steps.

Step 2: Restart the Astarte and Edgehog platform-related services via the command

 

# systemctl restart edgehog-device-runtime.service edgehog-hardware-id.service astarte-message-hub.service

 

or reboot the board to connect the Astarte Message Hub to the Astarte Cloud instance.

2.3 Display your Device on Astarte Dashboard

2.4 Display your Device on Edgehog Dashboard