Device setup and management

Device setup

Smart Spots have a pre-configured WiFi settings so they connect to the Internet the first time they are turned on. Therefore, once they are connected to the Internet, the Smart Spots access to Homard and perform the device provisioning. This means all relevant device configuration must be setup in Homard first so the device can download it and be configured according to the customer needs.

The Access Point (AP) where the Smart Spots must connect to can be easily setup from a smartphone hotspot or a WiFi Router. The default configuration is:

  • SSID name: defaultSSAP
  • Password: defaultSSAP1234
How to setup the WiFi Access Point

Once the Access Point is established, it is possible to turn on the Smart Spot device so it will search and try to connect to the WiFi network with the mentioned SSID and password. Thus the device will connect automatically to Homard platform and it will be visible in the corresponding dashboard.

Device profile in Homard

Device management

LwM2M for device management

Open Mobile Alliance (OMA) Lightweight M2M (LwM2M) is a protocol from the Open Mobile Alliance for M2M for IoT device management and service enablement. It defines the application layer communication between an LwM2M Server and an LwM2M Client, offering device management capabilities such as bootstrap, basic operations (reboot, etc.), network configuration, and remote diagnostics, reporting or firmware upgrade, among others. It also defines a strong and standardised semantic for the endpoints or resources used for the previously mentioned capabilities to improve the portability between systems. The protocol security relays mainly on the usage of DTLS or TLS protocols.

The organisation of the data model is based on a tree with a maximum depth of 4 levels. These levels are respectively: Objects, Object Instances, Resources and Resource Instances, where each level is embedded inside of the previous one and can exist more than one sublevel in a level (instances).

Data model hierarchy

In the 4th level, the resources correspond with the direct interaction with the device, while the previous one provides organisation to the Data Model. These resources allow from one to a combination of the following operations:

  • Read (e.g., read a configuration parameter).
  • Write (e.g., write a configuration parameter such as a reading interval).
  • Execute (e.g., execute a remote device reboot).
  • Observe (e.g., receive each new measurement automatically on the backend).

Object instances are usually related to a group of resources which can appear two or more times on the device. For example, there could be more than one WLAN Connectivity OMA Object Instance. Each instance defines a WiFi access point that the device can use to achieve global connectivity. There could also be several sensors of the same type at the same time on a device, such as the internal temperature sensor for health monitoring and an external peripheral sensor for ambient measurements.

What is Homard?

Homard is the Smart Spot devices management platform. It is based on the OMA LwM2M protocol. The platform offers different functionalities such as remote maintenance, firmware upgrade and open/standard APIs for information reporting.

SmartSpot implements a LwM2M Client which is always connected to a LwM2M Server host in the Libelium Cloud. And Homard is the graphical tool which permits the user to manage the LwM2M server and therefore interact with the device.

LwM2M client-server for device management

Connection to third party platforms is available thanks to the configuration of other protocols such as MQTT, Sentilo, etc. All of them can be configured by the user from the Homard device management platform.

Access to Homard

You can access to Homard Platform. Then you can login with your User and Password that is provided by Libelium.

Homard login

Access to the device profile

It is possible to browse your different Smart Spot devices and access to each profile by clicking in the corresponding device identification:

Access to Device Management

Then you will be able to see the device profile:

Device profile in Homard

Configure WiFi/Cellular connectivity (Easy Connect)

Besides the default WiFi settings (which should be used for the first setup only), there are two other connectiviy ways that should be configured in the device for permanent connection:

  • WiFi Connectivity
  • APN Connectivity (SIM Card for 2G, 4G or NB-IoT)

Note 1: If you have one or more WIFI networks enabled and they are turned on, you will connect to one of them instead of doing it by SIM.

Note 2: Regarding security issues, once you set your well-known access method, it is possible to disable the default access point.

The Homard's Easy Connect section allows the user to easily configure all this settings. Please access to Easy Connect section and choose the connectivity to be configured:

Access to "Easy Connect"

Select Connectivity option

Add a WiFi network

  • Step 1: Enable WiFi connection
Enable WiFi connection
  • Step 2: Set WiFi ESSID name
Set WiFi ESSID name
  • Step 3: Set WiFi Password
Set WiFi Password
  • Step 4: Validate the new WiFi configuration
Validate the new WiFi configuration

Configure SIM card

  • Step 1: Set the SIM card APN
Set the SIM card APN
  • Step 2: Enable Cellular connection
Enable Cellular connection
  • Step 3: Set APN User
Set APN User
  • Step 4: Set APN Password
Set APN Password
  • Step 5: Set SIM card PIN
Set SIM card PIN
  • Step 6: Validate the new Cellular configuration
Validate the new Cellular configuration

Main device configurations

Through the usage of Homard device management platform it's possible to configure several parameters of the SmartSpot and carry out actions and checkings. The following tables illustrates the most common resources uses for device management.

Object: OMA: Device

Resource Description
Reboot (/3/0/4) Reboot the device (commonly used after apply configurations)

Object: OMA: Connectivity Monitoring

Resource Description
Network Bearer (/4/0/0) Specifies the current connectivity of the device (0=2G, 6=4G, 7=NB-IoT, 21=WiFi

Object: OMA: Location

Resource Description
Latitude (/6/0/0) Latitude position of the device retrieved from GPS or specified on 'HOP: General Configurations'
Longitude (/6/0/1) Longitude position of the device retrieved from GPS or specified on 'HOP: General Configurations'
Altitude (/6/0/2) Altitude position of the device retrieved from GPS or specified on 'HOP: General Configurations'

Object: HOP: General Configurations

Resource Description
General: Device mode (/4491/0/64) Configures the device behabiour (0=M2M 1=M2M+LoRAWAN 2=LoRAWAN Sleeper)
General: Interval (/4491/0/65) Configures in mode 0 and 1 the interval to report information throgh any protocol and the sleep interval for reporting in mode 2
Location: Report specified (/4491/0/57) Enables the use of a fixed latitude/longitude/altitude for the device to use instead of GPS data
Location: Latitude (/4491/0/58) Configures the specific latitude
Location: Longitude (/4491/0/59) Configures the specific longitude
Location: Altitude (/4491/0/67) Configures the specific altitude

Other information such as device information or sensor data can be found through the LwM2M objects present on the device in Homard.

Device connectivity behaviour

Depending on the selected configuration mode in the 'General: Device mode' resource of the 'HOP: General Configurations' object in Homard, the device adjusts its behavior regarding connectivity as described below.

Mode Description
0 (M2M mode) To allow M2M data savings (when M2M connectivity is inteded to be a backup connectivity method) and due to the need of availability of an known source for configuration purposes(default WiFi access point for configuration), the firmware of the SmartSpot device first attempts connectivity through the WiFi interface. If this is not possible because the WiFi access point has no internet or is unavailable, the device proceeds to establish connectivity through the M2M interface (2G/NB-IoT/4G)
1 (M2M+LoRAWAN mode) The device follows the same procedure described in the previous point, but additionally, it tries to connect and transmit data through LoRaWAN. This is the preferred mode for validating LoRAWAN configuration if working with the sleep mode of LoRAWAN.
2 (LoRAWAN Sleeper) The device performs the same procedure described in the first point every time it powers on or is restarted, allowing it to be configured through Homard if necessary. After 2 minutes, the device will automatically start alternating between sleep and wake cycles to send data through the configured LoRAWAN network.

Device connectivity requirements

As an IoT device, the Smart Spot has the capability to connect to information systems or services through an Internet connection for a specific or undefined time. This Internet connection can be achieved through several communication protocols such as Ethernet, WiFi, GPRS, NB-IoT, ... depending on the use case or the client requirements. Due to the architecture or configuration of a network, in some cases the presence of gateways or firewalls can obstruct the connections of the device.

In case of WiFi connectivity, take in account that the SmartSpot is not capable to manage application layer identification from captive portals or similar, so keep their connection (MAC/IP) out of the these applications.

The Application Note 10: Connection Requirements document specifies the connections that the Smart Spot can require to use (depending of its hardware configuration) during its functionality. In order to guarantee the correct functionality of the device, check your network configuration and keep the specified ports available for the device.

Device geolocation

Additionally to the presence of the GPS, is a common practice to fix the latitude and longitude parameters to specific values in order to avoid issues related with GNSS accuracy, displacements caused by the GNSS or lack of GNSS coverage, as these values would be used to define the position of the device in a map. The Application Note 121: Geolocation parameters configuration document will help you to address this procedure using Homard remote device management platform.