2
votes

I'm attempting to connect a Quectel BG96 cellular modem to Azure IoT Hub using MQTT directly (no SDK), but keep getting disconnected immediately after attempting to connect.

I've tested:

  • Connecting to my IoT Hub using a python paho MQTT script.
  • Connecting from my cellular modem to a Mosquitto server using SSL encryption and username and password.

Both of which work.

When I try to connect to IoT Hub I can open the connection but when I try and connect to the MQTT server I immediately get disconnected.

Are there any caveats when using MQTT in IoT Hub. Also, is there an easy way to get access to the connection logs in IoT Hub?

1
Our MQTT support is documented here: docs.microsoft.com/en-us/azure/iot-hub/iot-hub-mqtt-support. Please note that IoT Hub is not a true MQTT broker. More information on IoT Hub diagnostics can be found here: docs.microsoft.com/en-us/azure/iot-hub/….Yi Zhong - MSFT

1 Answers

0
votes

I had the same problem here with BG96 and Azure IoTHub. My solution with this modem is to force the MQTT version to "v4", according to the AT MQTT Manual. Try using AT+QMTCFG="version",<"yourtcpconnectionid">,4 then open the connection and authenticate.