BG96 HTTP works but HTTPS does not work

Hello everyone

I am using a device with the BG96 chip on it.
I want to do httpget and post to a https site but I always get an error 701 (unknow error)
If I do a get request to a http site it works fine

Can someone give me som advice?

Kind regards
Lennert

Hi Lenner, what mobile network provider are you using? have you uploaded TLS cert to the modem?

Hi i am from belgium i am using the Proximus netork provider and i dont have uploaded TLS cert how do i do that I have nothing seen in the manuals about that

See https://www.quectel.com/UploadImage/Downlad/Quectel_BG96_SSL_AT_Commands_Manual_V1.0.pdf and https://www.quectel.com/UploadImage/Downlad/Quectel_BG96_FILE_AT_Commands_Manual_V1.1.pdf

You can use AT+QFUPL to upload a CA certificate to “RAM:cacert” and configure that file in the SSL context.

Or just configure the SSL context “seclevel” to 0, as that does not need a certificate.

Other reasons for failure could be the supported ciphersuites and SSL/TLS version, both in the server and in the client.

Try first a check with https://www.howsmyssl.com/s/api.html and see what the server reply is. That might give you some hints. I mean to do the request with your modem, not the browser. :wink:

1 Like

i have configured the seclevel to 0.
also i have tried the config to support all ssl versions and ciphersuites and also the specific ssl version and ciphersuite of my https server.
I always get error 701 (unkown error).

Hi Lennert,

You solve that problem ??

Because i am facing same problem, if you find any solution then share with us.

https://forums.quectel.com/t/getting-701-unknown-error-https-post-request/2627

Please share solution if any.

Thanks,
Hardik

Same problem faced here. Has anyone got this working yet? @Hardik_Pokar - I can’t see the forum post at the link you included in your comment so not sure if you got it working.

Hi shughes,

I am facing same issue
Are you try with same command ?..

I am posting data via HTTPS using quectel EC20. i am giving command in below order.

  1. I am uploading all certificate to RAM.
    AT+QFUPL=“RAM:cacert.pem”,2166,10
    AT+QFUPL=“RAM:clientcert.pem”,2172,10
    AT+QFUPL=“RAM:clientkey.pem”,1730,10
  2. PDP Setting
    AT+QICSGP=1
    AT+QIACT=1
    AT+QIACT?
  3. SSL SettingAT+QSSLCFG=“sslversion”,1,4
    AT+QSSLCFG=“ciphersuite”,1,0XFFFF
    AT+QSSLCFG=“seclevel”,1,2
    AT+QSSLCFG=“cacert”,1,"RAM:cacert.pem
    AT+QSSLCFG=“clientcert”,1,“RAM:clientcert.pem”
    AT+QSSLCFG=“clientkey”,1,“RAM:clientkey.pem”
  4. HTTP Setting
    AT+QHTTPCFG=“sslctxid”,1
    AT+QHTTPCFG=“contextid”,1
    AT+QHTTPCFG=“requestheader”,1
    AT+QHTTPURL=37,80
    AT+QHTTPPOST=179,80,80
    +CME ERROR: 701

Here i am getting this error.
when i tried with ssl opening that time same error

     AT+QSSLOPEN=1,1,4,"***.********.**",443,0 
     ok

   **+QSSLOPEN: 4,550**

Hi Lennert,

Http error 701 means http connection fail ,

so ,pls check your network register status first .

pls send the below at to check:

at+cereg?;+cgreg?;+cops?;+qcsq;+qnwinfo

AT+QIACT?

for the response value ,pls refer to AT cmd doc of BG96 , thanks

Dear stephen,

I check all the network related command and it’s looking fine.

and 701 is not network error , it’s unknown error.

Thanks,
Hardik

All our network connection state is fine too, as in the same session we can do HTTP POST to httpbin.org, PING and also do DNS lookups. It’s just the HTTPS we can’t do!

Tried on an EC21 we had to hand this morning, get different error (730), which means over the modems there’s a missing command or step somewhere which we’re not aware of. @stephen.li Any pointers?

Dear shughes,

Error 730 Means you are not passing Certificate properly or your certificate is invalid ,

And also if you are passing certificate with uart then make sure you are adding \r\n after every line.

Thanks. I’ll take a look at this when back in the office on Monday.