In some of the Microsoft documentation for working with Azure IoT hubs, it mentions that it is possible to multiplex the communication of multiple devices under a single TLS connection (using the AMQP protocol) for scenarios where multiple simple devices talk to a local hub device that is powerful enough to communicate with the IoT Hub. Are there any examples of how one would implement this multiplexing? The DeviceClient library does not appear to support this (although I could be wrong). There have also been mentions of the IoT Gateway SDK for this scenario, but I haven't found a clear example of how to set multiplexing up using that either. Any advice or references to other material would be appreciated.
相关问题
- running headless chrome in an microsoft azure web
- Docker task in Azure devops won't accept "$(pw
- Register MicroServices in Azure Active Directory (
- Removing VHD's from Azure Resource Manager aft
- Cannot use the Knowledge academic API
相关文章
- 请问扫码夹娃娃机是用树莓派+连WIFI方式实现扫码投币功能吗?
- SQL Azure Reset autoincrement
- How to cast Azure DocumentDB Document class to my
- Can't get azure web role to run locally using
- Azure WebApp - Unable to auto-detect the runtime s
- How to change region for Azure WebSite
- Azure webjob vs cloud service
- Azure data transfer Identity Column Seed Jumped by
I think the Azure IoT Gateway is still in Beta which might explain an absence of examples.
Here's a couple of pages that offer a little more insight:
Introducing the Azure IoT Gateway SDK (posted April 2016)
https://azure.microsoft.com/en-gb/blog/introducing-the-azure-iot-gateway-sdk-beta/
Supporting additional protocols for IoT Hub (Updated August 2016)
https://azure.microsoft.com/en-gb/documentation/articles/iot-hub-protocol-gateway/
Finally the actual beta SDK on GitHub, but assume you already have this:
https://github.com/Azure/azure-iot-gateway-sdk
I'd be interested to know the output of this. Most architecture I've encountered so far just has the devices talking to the hub directly so not had a requirement for the gateway yet.
You may find this walkthrough useful: https://azure.microsoft.com/documentation/articles/iot-hub-linux-gateway-sdk-simulated-device/
It uses simulated devices to show how you can connect multiple devices through a gateway built using the Gateway SDK.
I've recently built such an architecture, maybe it will help you as a reference. Our players:
The Edge Sensor sends their telemetry to the Field Gateway. The Field Gateway maintains a connection to the IoT Hub and the only device that the IoT Hub knows is the Field Gateway.
Each telemetry that is being received in the Field Gateway from the Edge Sensors contains a unique id in the message payload.
When the message is being received in the IoT Hub, The IoT Hub knows only about the Field Gateway. But when the message is being processed by the Back End it takes the unique id from the payload and therefore knows which is the correct device that sent the telemetry.
So we have multiple devices that are all "riding" on one connection.
Hope it will help.
The C# DeviceClient does support multiplexing multiple devices using a single Amqp/TLS Connection. Here is a sample that connects three devices to IotHub using a single Amqp Connection: