BC95-G connect to Azure IoT hub

Hello, I’m new to the quectel world. But I have been trying for a long time to connect a BC95-G that sits on an arduino. To get a connection to my Azure IoT hub or to send a message. Now to my questions: Is that possible with the module because I have not found anything how to activate a certificate or something similar to get a connection to Azure. Only establish an mqtt connection is acknowledged with the error: + QMTOPEN: 0, -1. The whole thing should run through Narrow Band and mqtt. I would be very grateful for any help.

Hi,chriss:
Please refer to the following documents. If you have any difficulties, we will keep communicating.Quectel_BC66&BC66-NA_MQTT_Application_Note_V2.0.pdf (3.7 MB)

Hello @herbert.pan-Q , Thank you for your feedback, I already know this document. I went through chapter 3 up to the point 3.5 Use BC66 / BC66-NA as MQTT client. (I skipped 3.4 because I don’t want to use an extra tool and it’s just an optional variant, I think). The problems start here at 3.5.1 that these AT commands do not work with the BC95-g module and nothing can be found in the documentation for BC95-g about adding a CA or sleep mode.I can connect to the IoT hub myself, but not to my device.
AT+QMTOPEN=0,"Hub.azure-devices.net",8883
OK
+QMTOPEN: 0,0
AT+QMTCONN=0,"device_id","Hub.azure-devices.net/device_id"//I also tried attaching a sas token
OK
+QMTSTAT: 0,1
+QMTCONN: 0,2
I think it’s because I can’t execute the commands before:
AT+QSCLK=0
AT+QSSLCFG=1,5,"seclevel"
AT+QSSLCFG=1,5,"cacert"
AT+QSSLCFG=1,5,"clientcert"
AT+QSSLCFG=1,5,"clientkey"
AT+QMTCFG="ssl",3,1,1,5
on the BC95-g (not includet in the manual), so i probably have no rights to connect the device

This All device communication with IoT Hub must be secured using TLS/SSL. is from the Microsoft homepage for Mqtt. How can I set up a tls / ssl connection with the bc95-g module, is that possible at all?

Thank you for answering and for the answer already given.

@Support-team
Anyone of you have an idea or can help me. I have to do it somehow. Thanks for the help and I’m sorry for the disturbance.

hi,chriss:

+QMTCONN: 0,2 //MQTT is connecting

If it appears as below, your connection is correct:

+QMTCONN: 0,2 //MQTT is connected

I think you have made some mistakes, such as “Create an IoT Hub Resource” and “Communicate with Azure via X.509 self-signed Certificate”.
Due to the strict authentication and authentication of access devices on Azure platform, the overall process is complicated. Therefore, you need to read this manual carefully to ensure that every step is correct, and you can first test whether the connection to Azure platform is normal via MQTT.fx tool.You should not rush to connect the device to Azure through AT Command. Please make sure that the Azure platform is configured correctly and that CA is imported correctly.
I hope you can re-run the operation and test successfully!

hello @herbert.pan , thank you very much for the answer.
So to understand, if it can be seen in the picture, is the connection ok?
Unbenannt
The main problem I see is that the commands I highlighted in red return errors. I cannot find these commands in the documentation for the BC95-g either. Are these even possible, should they also work with the module?


The resource and the certificate are ok.
I cannot execute these commands in the red line.