How Can We Help?

< All Topics
Print

LE Client

An algorithm for encoding and sending messages, resync execution. 

Points’ description: 

  1. The python module is implemented as a part of client software installed on the IoT device.
  2. Each time a client wants to send telemetry data it must be passed (as either string or byte array) to the appropriate route in the LE client module
  3. A copy of the current LE state is created and saved as a backup buffer. The library encrypts the data using the provided secret key. As a result of encryption, the MAC is generated
  4. The message sent to the gateway consists of fields: caller id, payload, MAC.
  5. The program checks if the response has been received
  6. If there is a problem with the connection or the response has not been received, we revert the LE state to its previous iteration using the backup buffer, initialized in point 3.
  7. If the response is received, the header type of the message is checked. It could be either ‘data’. meaning that everything went smoothly, or ‘reset’ meaning that the hard reset is necessary
  8. In case of receiving the ‘data’ header, we check if the payload matches the established message sent by the gateway. If it’s not we revert back to the previous key, as described in point 6.
  9. If the received header is ‘reset’, the hard-reset mechanism is employed and the process is repeated.
Previous High-level flow
Next LE Server
Table of Contents