Protocol Specification

Once the identity has been generated and assigned to a sensorspot instance, the user can start transmitting data.

You can check below a chart with the different steps that an IoT device must follow to send data to the broker:

Steps

  1. The client first verifies if it already has credentials to access (device_key and password).

    1. In case the client does not have any device_key associated, you need to first set up one and link it to device. Please, go to Identity creation first.

    2. If the client already has an identity linked to it, it is time to request a password to the broker. Please. go to step 2 in the first level of the hierarchy of this numbered list.

  2. The client now needs to verify if it has a password available for connection.

    1. If no password is ready, follow these steps:

      1. Connect to broker at broker.airtrace.io:1883 (no authentication required).

      2. Subscribe to <admin/provider/device_key> topic.

      3. Send device_key to <admin/provider> topic.

    2. If a password was already collected, got to step 3 in the first level of the hierarchy of this numbered list.

  3. Before sending data to the broker, the client will authenticate using device_key and password to broker.airtrace.io:1884.

    1. If connection is not possible, go again to step 2 in the first level of the hierarchy of this numbered list.

    2. If connection is ok, the client must continue to step 4.

  4. Once the client has connected, the client will start sending data to </admin/data/device_key> in a continuous fashion.

    1. If there is a problem in the communication, the client can retry as many times as desired (5 times recommended). In case of recurrent connection failure, the client can:

      1. Go to to Step 2 in the first level of the hierarchy of this numbered list and retrieve a new password.

      2. Stop communicating data, and enter standby state.

    2. If the client decides to stop sending, communication to the broker will be closed.

Current version of the protocol does not include SSL (Secure Socket Layer) encryption. It will be supported in short.

Last updated