Legacy mqtt vs nx client #324
Replies: 5 comments 8 replies
-
Hi @karimelhammady, The MQTT client hand-crafts the MQTT messages to authenticate and communicate with Azure DPS and IoT Hub. The NX client utilizes the new Azure RTOS middleware C SDK to connect with Azure IoT. The MQTT client was created before we had a dedicated SDK for connecting an Azure RTOS application to Azure IoT. It's marked legacy as now we have the dedicated SDK, it is no longer the recommended way to connect, as the new SDK provides much more features, optimised memory used and increased stability. You can read more on the middleware here: |
Beta Was this translation helpful? Give feedback.
-
Hello @ryanwinter , Thanks for your respond. That makes sense. I tried to switch to the nx_client; however, I faced some issues while trying to connect to the IoT hub, during the TCP handshake. After the certificates exchange, it shows an error message " Encryption alert". Any thoughts what would be the reason for that? Also, if I want to use the Device update Agent, I found a way with using "IoT plug and play", is there any other way to do it while using the nx_client? |
Beta Was this translation helpful? Give feedback.
-
Hi, So for the connection issue, are you using SAS tokens for connection? I dont think the original MQTT sample supported x509 certs so I'm assuming you are. Are you connecting via DPS? If so, then I'm assuming the DPS auth step is correct? Where are you seeing the "Encryption alert" error message, is this on the serial output? The areas I have seen authentication problems kind of like you are seeing above, are either one of the stack sizes is too small, and seeing some corruption, or perhaps a problem with the ethernet memory pool, either it's too small or something is just not lining up right. Are you able to share more on the project? Like the device you are targeting, or if there is source code I could look at? On the ADU front, the team is actively working on ADU integration directly into netxduo, however this is currently in preview and is quite old. It should be possible to continue using your existing method along side using the SDK, as you could intercept the existing PNP topics though. |
Beta Was this translation helpful? Give feedback.
-
This is coming up with: So this indicates that the CONACK message is returning this specific code from the server. I'm unsure why the server would be responding with unavailable, let me dig in a little more. |
Beta Was this translation helpful? Give feedback.
-
I can see you have a parallel thread in Q&A, cross-linking that here for reference: |
Beta Was this translation helpful? Give feedback.
-
What is the difference between the legacy mqtt client and the nx client? What will be the benefits for me to switch to the nx client instead of the legacy mqtt?
Beta Was this translation helpful? Give feedback.
All reactions