Understanding Device to AWS IoT Core Communication

   Go back to the Task List

  [« Register the Device ]    [Create IoT Rule »]

Setup the Device Client

In the absence of the real device, you will use MQTT.fx client to simulate the device. The client uses certificates for the authentication and uses MQTT protocol based message exchange which means it works similar to how an actual device works.

  1. Download and install MQTT.fx client from the link below.

    Download MQTT.fx

  2. The lab uses MQTT.fx version 1.7.1 installed on Microsoft windows 10. Open the MQTT.fx client and click on Edit Connections Profiles option under Extras menu.

  3. On Edit Connections Profiles popup screen, enter dojodeviceprofile as the Profile Name, select MQTT Broker as the Profile Type, enter (Broker Address) noted from the previous task in the field Broker Address, type in 8883 as the Broker Port and dojodevice1 as the Client ID.

    Profile

  4. You will need the certificates downloaded in the previous task for the next set of configuration which allows the MQTT client to use certificate to authenticate with AWS IoT Core.

  5. Click on the SSL/TLS tab. Select Enabel SSL/TLS checkbox. Select Self signed certificates option. Select AmazonRootCA1.pem file for the CA File field. Select xxxxxxxxxx-certificate.pem.crt.txt name format file for the Client Certificate File field. Select xxxxxxxxxx-private.pem.key name format file for the Client Key File field. Select PEM Formatted checkbox. Finally Click on the Apply and then OK buttons.

    SSL

  6. The connection profile is created. Select the dojodeviceprofile profile on MQTT client and click on the Connect button to test the MQTT connection with AWS IoT Core.

    Connect

  7. Wait for the green connection status. If it does not turn green and/or throws error, it means there is something wrong in the configuration. You might want to revisit the profile configuration again.

    Connect

  8. The device simulator is ready. Click on the Disconnect button to disconnect the device and close the MQTT.fx client.

  9. In the next task, we will configure an AWS IoT rule to store all inbound device messages in a Amazon S3 bucket.