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.
-
Download and install MQTT.fx client from the link below.
-
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.
-
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.
-
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.
-
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.
-
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.
-
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.
-
The device simulator is ready. Click on the Disconnect button to disconnect the device and close the MQTT.fx client.
-
In the next task, we will configure an AWS IoT rule to store all inbound device messages in a Amazon S3 bucket.