By running the solution from VS, all events would happen in sequences. Solution is pointing to a IoT hub created in azure subscription. Sequence are mentioned below.
- CreateDeviceIdentity.proj => A console program for device registration.
- SimulatedDevice.proj => A console program to send data from Device to IoT Hub
- ReadDeviceToCloudMessages.proj => A console program to receive Data sent by device from IoT Hub (Service bound) and stream data to SignalR hub
- SendCloudToDevice.proj => A console program to send data from cloud to device (device bound) and process the same data in device side
- StreamingHub.proj => A console program to host a SignalR hub for real-time data streaming (self-hosting – OWIN, capable of CORS)
- JavascriptClient.csproj => A JavaScript client (ASP.NET project) to represent live streaming of device data
- Create IOT HUB in Azure Subscription
- Copy IOT HUB HOST Name from Azure and paste that in Program.cs file of SimulatedDevice.proj as instructed there.
- Copy IOT HUB Connection string from Azure and paste that in Program.cs file of CreateDeviceIdentity.proj, ReadDeviceToCloudMessages.proj and SendCloudToDevice.proj
- First time run project CreateDeviceIdentity.proj and check the console output to get the device key.
- Copy this key and paste in Program.cs file of SimulatedDevice.proj as instructed there.
- Stop the program.
- Now onwards run all projects simultaneously and see things in action.