ThankYou2215
ThankYou2215

Reputation: 13

How can I connect a real device only accepting MQTT / TCP connection to azure IoT hub?

Context:

I have a real device that only uses MQTT and only accepts a TCP connection (The only things I can modify in the real device are the cloud address, cloud ID (username), cloud password, machine cloud ID and cloud port).

Question: How can I connect this device to the azure IoT hub? Can I use azure IoT edge runtime w/ transparent gateway?

Upvotes: 1

Views: 412

Answers (2)

Karthik Balaguru
Karthik Balaguru

Reputation: 7822

In case if you want to try connectivity with IoT hub and if there is no feasibility for usage of device SDK in your device, you can try the option of using MQTT protocol directly (as a device), using which the device can still connect to the public device endpoints using the MQTT protocol on port 8883.

However, for using the MQTT protocol directly, the device must connect over TLS/SSL. Since your device has constraints in using TLS/SSL or installing certificate, the best option is usage of gateway.

In a typical IoT system, gateways are used to overcome the limitations of device capabilities. You may need to decide the suitable deployment type based on these three patterns of using IoT Edge device as a gateway as per your device capabilities and requirement in hand.

Upvotes: 1

Matthijs van der Veer
Matthijs van der Veer

Reputation: 4085

There is a scenario where you don't have to use the device SDK and connect your MQTT device directly to the IoT Hub. It is documented here. Azure IoT Hub is not a full-featured MQTT broker though, so results may vary. As per your suggestion, yes you can use a transparent gateway for this if you don't want your device to connect directly to the IoT Hub. But it's not a prerequisite.

In the case that your device needs more MQTT features than IoT Hub (or Edge for that matter) can offer, you can also consider creating an Edge module with an MQTT broker inside.

Upvotes: 0

Related Questions