Centiloc Service Documentation
Toggle Dark/Light/Auto mode Toggle Dark/Light/Auto mode Toggle Dark/Light/Auto mode Back to homepage

Connection Status

Boards have two simple states CONNECTED and DISCONNECTED. This section describes how to move from one to another, depending on Board’s connectivity. This may help you to understand the information returned by the Data Platform.

More than a simple connection status, this status provides the information that the Board is healthy and is capable of running as expected.

This includes network performance, supply stability, Wi-Fi bandwidth…

1. Network Connection (Wi-Fi or Ethernet)

💡 A Board is indicated as CONNECTED as soon as it has published a Hello message to the Centiloc Data Platform.

To reach this state, the Board follows the same basic sequence, regardless of the connection type:

flowchart LR

classDef class_blue fill:#00aec2,color:#fff,stroke-width:0px;
classDef class_success fill:#a2c617,color:#fff,stroke:#4a4a49,stroke-width:2px;

A("1. Connect to NTP Server"):::class_blue --> B("2. Connect to Network (Wi-Fi or Ethernet)"):::class_blue --> C("3. Connect to MQTT Broker"):::class_blue --> D("4. Publish Hello"):::class_success

If any of these steps fail, the Board remains in the DISCONNECTED state.

1.1. Network connection details

Both Wi-Fi and Ethernet provide access to the Data Platform, with a few differences:

Network type Requirements Notes
Wi-Fi 2.4 GHz network, password required. Password must be configured before deployment.
Ethernet Physical connection to a switch or router. DHCP automatically assigns an IP address.
If Ethernet is connected but fails, the Board automatically tries to connect via Wi-Fi (unless Wi-Fi has been disabled when ordering).

1.2. NTP server connection

The Board attemps to connect to UDP port 123 of either:

  • Standard ntp fr server pools
  • Host Data Platform (⬅️ important in case on OnPremise disconnected from internet)

1.3. MQTT broker connection

Depending on its configuration, all these steps must be successful to complete MQTT Broker connection:

  • The Board connects using User and Password

v5+ Boards:

  • The Board attempts to establish SSL handshake
    • Check Server certificate validity and signature by Centiloc CA
    • Presents its Certificate, signed by Centiloc CA
  • The Board connects using User and Password

v4- Boards:

  • The Board attempts to establish SSL handshake
    • Check Server certificate validity and signature by Let’s Encrypt CA
  • The Board connects using User and Password

v5+ Boards:

  • The Board attempts to establish SSL handshake
    • Skip check of Server certificate validity and signature
    • Presents its Certificate, signed by Centiloc CA
  • The Board connects using User and Password

🚫 v4- Boards: not supported

1.4. Publish “Hello”

Finally, the Board attempts to publish a “Hello” message on a specific topic.

  • The Board must have the authorization to publish.
  • The message must be correctly formatted.

1.5. Disconnection

There are some conditions that could make the Board turns to DISCONNECTED status.

1.5.1. Transport Layer disconnection

MQTT manages to check the good connection of its registered clients by standard KeepAlive exchanges.

In case the Board disconnects from MQTT Broker (because of Wi-Fi or ethernet…), and doesn’t answer KeepAlive procedure, the Board will turn into DISCONNECTED status (internally, a LastWill is generated).

🕰 This only happens at the end of the KeepAlive procedure (which includes timeouts and retries), which takes few minutes (up to 4 minutes worse case).

1.5.2. Application Layer disconnection

In addition to this MQTT timeout, the Data Platform checks the connection of Boards which sound inactive.

To do so, it automatically pings every mute Boards at regular period (🕰 approximately 10 minutes).

If a Board doesn’t answer Ping, it will be turned into DISCONNECTED status.

2. Serial Connection

💡 A Board is indicated as CONNECTED as soon as the gateway it is connected to publishs a Hello message to Centiloc Data Platform and the Board answers a Ping.

Indeed, in the schema, the Gateway is responsible of the connection of the Board with the Data Platform which tracks its Board Connection status.

Therefore, the Gateway must first manage its own Connection Status (the same way as a Wi-Fi Board). Then it can transmit Data Platform pings to its connected Boards, on demand of the Data Platform (See Gateway documentation).

In other words, the Connection Status of Serial Board is only updated after Pings, whether they are automatic or generated by users.

3. User Ping

User can check a Board connection by pinging it. The Board doesn’t need to be CONNECTED to send a ping.

  • If the Board’s status is DISCONNECTED and the Board answers to the ping, its status will be automatically updated to CONNECTED.
  • The opposite is the same, if the Board’s status is SCONNECTED and the Board doesn’t answer to the ping, its status will be automatically updated to DISCONNECTED.