ublox sara-r410m

I’m using ESP32-D0WD connected to uBlox SARA-R410M-02B module through UART connection.

It’s a custom board similar to ESP32-WROOM development board. The hardware flow control of uBlox SARA-R410M-02B (firmware version L0.0.00.00.05.08 [Apr 17 2019 19:34:02]) is not in use in our board. DTR pin is shorted to GND (device is always ready).

We have developed a code and uploaded to ESP32 for AWS connection through wi-fi connection. I used Amazon FreeRTOS installed on ESP32. I have registered a thing in AWS and then crated a certificate which I’ve copied into Amazon FreeRTOS aws_clientcredential_keys.h library appropriate field. Then configured all required fields into aws_clientcredental.h (thing, broker end point, wi-fi SSID and password and etc.). Then configured access key ID, secret key and etc. according to the instruction .
After the build, it published data to the appropriate AWS server perfectly.

Then I switched to uBLOX module and tried to send the same data to the same AWS cloud. I configure the uBlox module for AWS connection through Hologram cellular platform, connected to the network and kept the connection.

I’ve created header file .h, make a buffer and inserted the same certificate into this file.

The I executed the following commands

AT+USECMNG=0,0,“ROOT_CERT”,1187

-----BEGIN CERTIFICATE-----

xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

-----END CERTIFICATE-----

+USECMNG: 0,0,“ROOT_CERT”,“xxxxxxxxxxxxxxxxxxxxxx”

OK

AT+USECPRF=0,3,“ROOT_CERT”

OK

AT+USECMNG=0,1,“CLIENT_CERT”,1223

-----BEGIN CERTIFICATE-----

xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

-----END CERTIFICATE-----

+USECMNG: 0,1,“CLIENT_CERT”,“xxxxxxxxxxxxxxxxxxxxxxx”

OK

AT+USECPRF=0,5,“CLIENT_CERT”

OK

AT+USECMNG=0,2,“PRIVATE_KEY”,1674

-----BEGIN RSA PRIVATE KEY-----

xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

-----END RSA PRIVATE KEY-----

+USECMNG: 0,2,“PRIVATE_KEY”,“xxxxxxxxxxxxxxxxxxxxxx”

OK

AT+USECPRF=0,6,“PRIVATE_KEY”

OK

AT+USECPRF=0,0,1

OK

AT+USECPRF=0,1,0

OK

AT+USECMNG=3

“CA”,“ROOT_CERT”,“Amazon Root CA 1”,“2038/01/17 00:00:00”

“CC”,“CLIENT_CERT”,“AWS IoT Certificate”,“2049/12/31 23:59:59”

“PK”,“PRIVATE_KEY”

OK

AT+UDCONF=1,1

OK

AT+USOCR=6

+USOCR: 0

OK

AT+USOCO=0,“xxxxxxxxxxxxxxxx.iot.us-east-2.amazonaws.com”,8883"

OK

AT+USOWR=0,43,“102900044D5154540482000A00076D79657370333200143F53444B3D432656657273696F6E3D332E302E31”

+USOWR: 0,43

OK

AT+USOWR=0,15,“820D000200086D6573736167657300”

+USOWR: 0,15

OK

AT+USOWR=0,17,“300F00086D6573736167657368656C6C6F”

+USOWR: 0,17

OK

AT+USOCL=0

After execution of these commands I can’t see data in AWS.

But when I’m trying to send the same data with the same structure to the public broker broker.hivemq.com I can see the data.

Could you please help me to find out what is wrong?

Is it possible to apply certificate using ublox hardware and send data by socket?