Issue link: https://resources.mouser.com/i/1442841
28 / Concept to Creation: Practical Applications for Smart, Connected and Secure IoT Solutions Kit Window tab that looks like Figure 3. If it doesn't look like this, go back through the PIC-IoT user guide and MPLAB X installation documents to make sure all steps were followed. Also make sure your PIC-IoT board is connected when you start MPLAB X. Download and Open the Project Application Source Code Files Web browse to the GitHub repository and find the PICIoT_ MediumOne_1.0.0.zip file. Download that file to your computer and unzip it to create a directory named PICIoT_ MediumOne.X. Move that entire directory and place it in the MPLABXProjects folder on your PC. In MPLAB X, select File Open Project… then select PICIoT_ MediumOne.X from the list and click Open Project. Afterwards the Projects tab should look like Figure 4. We'll come back to the source code files later after setting up Medium One. Set Up the Medium One IoT Prototyping Sandbox Web browse to the Medium One IoT Prototyping Sandbox and log in. Then, you should see an initial dashboard resembling Figure 2. Click Setup Manage Users Add New User. Set Username to mydevice, create a password of your choosing and enter it in both password fields, then click Save. In the Manage API Users list, you should see a new user account having Login ID = mydevice and an auto-generated user MQTT ID like Figure 5. Click Setup MQTT and you should see a Project MQTT ID and a set of port numbers like Figure 6. Medium One uses MQTT usernames and passwords for authentication. The MQTT username is created by combining the Project MQTT ID, a forward slash, and the user MQTT ID. For example, if the Project MQTT ID is "ZHxxxxxxx0Y" and the user MQTT ID is "sTxxxxxxx8w" the corresponding MQTT username would be "ZHxxxxxxx0Y/sTxxxxxxx8w". Next, we'll create the MQTT password. Navigate to Setup Manage API Keys Add New API Key. Set the description to mydevice, make sure Enabled is check-marked, and click Save. The result should look like Figure 7. The MQTT password is created by combining the API Key, a forward slash, and the mydevice user password. For example, if the API Key is "PZxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxMBQ" and the mydevice user password is "AaaaBbbb3" the corresponding MQTT password would be "PZxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxMBQ/ AaaaBbbb3". The MQTT topic has the following format: "0/Project MQTT ID/User MQTT ID/Device ID". The Device ID field can be anything and we'll use the PIC-IoT's ATECC608A unique ID (18 hex digits obtained at runtime) as the Device ID. For example, if the Project MQTT ID is "ZHxxxxxxx0Y" and the user MQTT ID is "sTxxxxxxx8w" the corresponding MQTT topic would be "0/ZHxxxxxxx0Y/sTxxxxxxx8w/ NNNNNNNNNNNNNNNNNN" where NNN…NNN is the ATEC608A unique ID obtained at runtime. The MQTT username, MQTT password, and MQTT topic strings will get added to the project source code in the next step. Figure 3: MPLAB X IDE With PIC-IoT Board Detected. (Source: Mouser Electronics) Figure 4: Projects tab after opening the PICIOT_MediumOne Project in MPLAB X. (Source: Mouser Electronics)