Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Using TLS with SIM7080 (SIM7000) AT commands. How to deal with certificates

I have a module with a sim7080 chip. I want to use NBIoT to send data via mqtt to my server. But as a first step I wanted to start with http.

Sending HTTP Requests works pretty well. The problem occurs if using TLS.

OK
AT+CSSLCFG="convert",2,"mycert.crt"
OK
AT+SHSSL=1,"mycert.crt"
OK
AT+SHCONF="URL","https://test.test.eu"
OK
AT+SHCONF="BODYLEN",1024
OK
AT+SHCONF="HEADERLEN",350
OK
AT+SHCONN
ERROR

Is there a verbose mode to get more information what caused AT+SHCONN not to connect? HTTP is working fine. Maybe it is the format of the certificate? I downloaded the root ca of the website with Chrome as der certificate. Is this correct? May the windows \r\n be the problem?

I set header and bodylength to the value from the examples. Probably I have to change here later to the real size of the header and body (how to figure that out?)

Maybe so of you has a hint.

Best regards

like image 389
emch2 Avatar asked Sep 05 '25 02:09

emch2


1 Answers

You must upload your certificate to the module first (one time) before calling AT+CSSLCFG="convert",2,"mycert.crt"

At least the .pem format works.

AT+CMEE=2 gives verbose errors, but I am not sure if you get more information on this error

The header and body length are max lengths, so those are not the cause of your issue.

like image 129
Jeroen Avatar answered Sep 07 '25 22:09

Jeroen