Azure IoT Hub UDP Implementation (NB-IoT)

Started by aademir 5 years ago3 replieslatest reply 5 years ago2776 views
Hi guys,

We are working on a NB-IoT project that uses a GSM/GPRS module. This module supports IPv4, UDP and CoAP protocols. We want to monitor the data, which is coming from NB-IoT module, on Azure IoT Hub. But, Azure IoT Hub only supports AMQP, MQTT and HTTP protocols. On the other hand, Azure IoT Hub provide an opportunity to use Azure IoT Edge or Azure IoT Protocol Gateway to implement your own protocol. But, there is not any example for that and we don't have enough experience on communication protocols. So, it seems difficult for us.

How can we implement the protocols(IPv4, UDP, CoAP) that supported by NB-IoT module to Azure IoT Hub? Which tool or library can we use? We are open to all suggestions.

Thanks in advance for your interest.
[ - ]
Reply by MatthewEshlemanJuly 19, 2017

There are many options here. I've worked with several GSM modules, which one is this?

For example, MQTT is very light weight and requires a TCP socket, so might be possible to add MQTT support to your microcontroller that is using the GSM module. Does the GSM module support a TCP socket? That is pretty common, I'm not sure I have seen a module that does not support a TCP socket.

Also, what about security? Is the data sensitive?

As a side note: might want to check out an article I wrote last year on working with GSM/cellular modules.

Best regards,


[ - ]
Reply by aademirJuly 19, 2017

Actually, it is a NB-IoT module that provided by Quectel (LTE BC95 NB-IoT Module). For NB-IoT modules, power consumption is very important. Because of that, NB-IoT modules doesn't support TCP.

Thanks for your reply.


[ - ]
Reply by MatthewEshlemanJuly 19, 2017

Interesting, thanks. NB-IoT is supposed to achieve most of its power savings from the "narrow band LTE" physical/cell layer, it seems strange to restrict support for TCP as well. But it is what it is.

Sadly, to help further, we really need more details. Selecting an appropriate protocol is very much dependent upon system details, such as how critical the data being sent is, how sensitive, authentication, and other system level security concerns (Denial of Service attack, etc). For example, with MQTT your end point devices can also receive messages from the backend/servers. Is this a requirement? Or are the devices just one way data sources? What about firmware updates? etc. etc.

Normally a system level engineer would have ensured coordination of the system components. If the system required the use of Azure's IoT hub, then the device IoT end point should have considered this requirement before selecting a cellular module that does not support TCP. Personally I would avoid adding yet another gateway or translation component to the system, as that adds yet more complexity and points of failure. 

That being said, it probably would not be too difficult to create your own UDP server that translates a custom UDP based protocol specific to your service/system to something supported by Azure's IoT hub. Then you might need to be concerned with scaling on your custom UDP server, etc, as is always a concern with backend services. I would assume the same is possible with CoAP, but I have not used CoAP before. Probably would not be too difficult to spin up a Node.js based server to handle either of these, and then write your own custom translation code. The key would be to design the UDP based protocol to easily translate to whichever Azure IoT hub protocol is selected. 

Steps I see:

* Gather and understand system level requirements (security, robustness, power usage, costs, scaling, etc, etc)

* Analyze system components to ensure they meet the requirements

* If needed, select/design/build new components to meet requirements

FWIW: recently attended a brief training on Azure IoT hub. It seemed quite nice!

Good luck!