Unable to login to Azure IoT Hub with cellular MQTT AT command

I’m using a u-Blox SARA-R422M8S cellular module trying to connect to Azure Iot Hub with the MQTT AT commands. The module supports MQTT 3.1.1. The login request fails with “Broker connection refused, not authorized“. Using the same credidentials in the python example at Microsoft Azure documention, the login succeeds and I can publish. I’ve uploaded the Baltimore root cert and activated the TLS for the socket, so this seems ok as well as I get another errorcode elsewise.

Anyone experienced similar?

PS, here are the AT commands used:

AT+USECPRF=0

AT+USECPRF=0,0,1

AT+USECPRF=0,3,”root_ca”

AT+UPSD=0,0,0

AT+UPSD=0,100,1

AT+UMQTT=11,1,0

AT+UMQTT=2,”.azure-devices.net”,8883

AT+UMQTT=4,”myhub.azure-devices.net/mydev/?api-version=2018-06-30″,”mysas“”

Read more here: Source link