IoT ExpressLink 2 Click Example.
Description
This example demonstrates the use of IoT ExpressLink 2 click board by connecting to the selected AWS account's data endpoint and showcasing the messaging topic model through sending and receiving messages to/from AWS IoT console.
The demo application is composed of two sections :
Application Init
Initializes the driver and logger, powers up the device, reads and displays the vendor model, thing name, and the PEM certificate of the device. It then sets the SIM APN and device endpoint, and attempts to connect to AWS network. Finally, it configures the topic name and number and subscribes to it.
Application Task
Sends a desired message on the configured topic and retrieves the next two pending messages from the same topic approximately every 10 seconds. The sent message is also added to the receive queue because the same topic is used for both sending and receiving.
Additional Function
- static void iotexpresslink2_clear_app_buf ( void )
- static err_t iotexpresslink2_process ( iotexpresslink2_t *ctx )
- static err_t iotexpresslink2_read_response ( iotexpresslink2_t *ctx, uint32_t timeout )
- Note
- Steps for the very first connection attempt:
- During the initial connection attempt, the device responds with: "ERR14 UNABLE TO CONNECT
Certificate generation completed. Proceed to register device with AWS cloud and then try
to connect again".
- At this point, you should restart the system and proceed with registering the device with the AWS Cloud using device's thing name and PEM certificate displayed in the logger. Detailed steps for registering device are described in the module's application development guide.
- After registering the device with your AWS account, restart the system, and it should now successfully connect to the cloud.
- Author
- Stefan Filipovic