DEV Community

ATony07
ATony07

Posted on

HOW TO CONNECT AN IOT FIELD DEVICE (RASPBERRY PI SIMULATOR) FROM THE FIELD TO AN AZURE CLOUD IOT HUB FOR COMMUNICATION AND DATA

What is IOT?
Internet of Things (IoT) Central in Microsoft Azure is a managed IoT application platform that enables users to build, manage, and operate IoT solutions with ease. It provides a comprehensive and scalable environment for connecting, monitoring, and managing IoT devices, simplifying the deployment and management of IoT applications.
What is Raspberry PI Simulator?
Raspberry Pi Simulator is a powerful tool for prototyping, testing, and learning about Raspberry Pi projects and IoT applications, providing a virtual platform that mimics the functionality of a physical Raspberry Pi.
However, it allows users to simulate a Raspberry Pi with various sensors, interact with Azure services, and build IoT applications in a virtual environment.
Here’s a step-by-step guide on how to do this.
Step:1: Log on to Microsoft Azure account and search for IOT Hub

Image description

Step:2: Click on the Create Icon

Image description

Step:3: Fill the necessary details such as; Resource group, IOT hub name, Region, Tier, Daily message limit

Image description

Step:4: Click Review+Create

Image description

Step:5: Click Create

Image description

Step:6: Wait for deployment to be completed

Image description

Step:7: Go to resource after deployment is completed

Image description

Step:8: You must create a device for it. Click on devices icon.

Image description

Step:9: Click on Add device

Image description

Step:10: Create (Device name, select “Symmetric key” and Enable) and save.

Image description

Step:11: Click on the device created

Image description

Step: 12: Copy “Primary connection string” and make sure Enable connection to IOT Hub is Enabled

Image description

Step:13: Initiate https://azure-samples.github.io/raspberry-pi-web-simulator/ on a web browser , insert or paste the “primary connection string “ from the IOT device portal on Azure into “Line 15” on the Raspberry PI Simulator and click on RUN

Image description

Step:14: Raspberry starts blinking Red hence, communicating to the IOT Device in Microsoft Azure portal and recording data or messages as seen below.

Image description

Step:15: Go back to IOT Hub overview to show the messages received

Image description

Top comments (0)