Quectel M66 HTTPS custom header request Cme 3818

Hello,
I’m working with AT commands. I’ve read related topics about custom https header request on this forum:

Since I cannot utilize AT+QHTTPGET=30 (it throws an error), I’ve tried using custom header format. However, I’m getting “https socket closed” error when I try to make a get request as instructed. Here is what I did:

(I’m sending another </CR/> manually at the end of the command sequence to match the instruction length of 164 bytes in total.)

Then I’ve tried another url to make a get request without customizing the header and it returns me the desired result:

input: https://doctorapp-b8180.firebaseio.com/app.json AT+QHTTPGET=30
get output:

{
    "-MqIbplgIqbpKO0PNZBO": {
        "name": "facebook"
    },
    "-MqIpnGbpyXKaw483LTM": {
        "namedddddddddddddddddddddd": "facebook"
    }
}

Next I’ve tried customizing the header for this link in particular, too. Whenever I use custom header format, it returns HTTP socket closed error (Cme 3818). I’ve double checked my custom header content to make sure host, username etc. were all appropriately set. Yet, it returns this error after a minute.

Any suggestions on how to get data from these links using custom or other methods?

I would like to learn how AT+QHTTPGET=30 works and what request is being sent during query if possbile.

Saved log:

[2023-10-10_14:08:29:215]AT+QHTTPURL=74


[2023-10-10_14:08:29:231]CONNECT

[2023-10-10_14:08:29:727]

[2023-10-10_14:08:29:727]OK

[2023-10-10_14:08:30:222]AT+QHTTPGET=150,164,60


[2023-10-10_14:09:34:127]+CME ERROR: 3818


Thanks in advance

Yusuf

I’m sharing my commands in text format just in case:

AT+QHTTPURL=74<CR>
CONNECT
https://gsmprojectdb-default-rtdb.europe-west1.firebasedatabase.app/1.json

OK
AT+QHTTPGET=150,164,60<CR>
Connection: close<CR>
range: bytes=0-<CR>
user-agent: QUECTEL_MODULE<CR>
Host: gsmprojectdb-default-rtdb.europe-west1.firebasedatabase.app<CR>
Accept: */*<CR>
Cache-Control: no-cache<CR>
<CR>
+CME ERROR: 3818

Yusuf

Your url is https, pls config parameter for https server, use AT+QHTTPCFG

This is my configuration. Same error. Is there something missing?

[2023-10-11_09:16:02:905]at+cops=1, 2, “28602”

[2023-10-11_09:16:02:905]OK
[2023-10-11_09:16:16:245]AT+CGATT=1

[2023-10-11_09:16:16:245]OK
[2023-10-11_09:16:22:171]AT+CREG=1

[2023-10-11_09:16:22:171]OK
[2023-10-11_09:16:26:436]AT+QIREGAPP

[2023-10-11_09:16:26:436]OK
[2023-10-11_09:16:29:645]AT+QIACT

[2023-10-11_09:16:30:076]OK
[2023-10-11_09:18:11:123]AT+QHTTPCFG=“requestheader”,1

[2023-10-11_09:18:11:123]OK

Yusuf

You have not configured parameters for https. Read this document
Quectel_GSM_HTTPS_Application_Note_V3.2.pdf (909.3 KB)

Thanks for replying. Are we talking about the get example instructions on the application notes? If so, I’ve tried using different ssl versions and the shown certificates word by word. I don’t know which cipher suite is applicable to my case so I’ve selected a random cipher suite that complies with the ssl 1.2. It didn’t work either. I’ll provide an event log for that case in a brief moment. I can see my local ip address on the interface, too. Plus, I can make a get request to this link without any custom parameters involved: https://www.google.com/

Yusuf

This works with google:

[2023-10-11_11:19:42:005]AT+QSSLCFG=“sslversion”,1,2

[2023-10-11_11:19:42:005]OK
[2023-10-11_11:19:42:996]AT+QSSLCFG=“seclevel”,1,2

[2023-10-11_11:19:43:012]OK
[2023-10-11_11:19:44:003]AT+QSSLCFG=“ciphersuite”,1,“0X0035”

[2023-10-11_11:19:44:003]OK
[2023-10-11_11:19:45:010]AT+QSSLCFG=“cacert”,1,“RAM:ca_cert.pem”

[2023-10-11_11:19:45:010]OK
[2023-10-11_11:19:46:001]AT+QSSLCFG=“clientcert”,1,“RAM:client_cert.pem”

[2023-10-11_11:19:46:001]OK
[2023-10-11_11:19:47:008]AT+QSSLCFG=“clientkey”,1,“RAM:client_key.pem”

[2023-10-11_11:19:47:008]OK
[2023-10-11_11:19:47:999]AT+QSSLCFG=“ignorertctime”,1

[2023-10-11_11:19:47:999]OK
[2023-10-11_11:19:49:006]AT+QSSLCFG=“https”,1

[2023-10-11_11:19:49:006]OK
[2023-10-11_11:19:49:997]AT+QSSLCFG=“httpsctxi”,2

[2023-10-11_11:19:50:013]OK
[2023-10-11_11:20:04:153]AT+QHTTPURL=23,60

[2023-10-11_11:20:04:153]CONNECT
[2023-10-11_11:20:05:160]
[2023-10-11_11:20:05:160]OK
[2023-10-11_11:20:12:667]AT+QHTTPGET=100

[2023-10-11_11:20:16:343]OK
[2023-10-11_11:20:22:206]AT+QHTTPREAD=120

[2023-10-11_11:20:22:206]CONNECT
[2023-10-11_11:20:22:206]Google(function(){var _g={kEI:‘uFomZfXvEJOUxc8P9ouOkAs’,kEXPI:‘0,1365468,206,4804,2316,383,246,5,1129120,1197723,678,380089,16112,28687,22431,1361,284,12035,4745,12835,4998,17075,38444,2872,2891,3926,7828,606,60690,16105,230,20583,4,42765,16852,4437,22583,6654,7596,1,42154,2,39761,5679,1021,31121,4569,6258,23418,1252,33064,2,2,1,26632,8155,8860,14490,873,19634,7,1922,9779,42459,20198,20137,14,82,7651,11753,802,8377,8048,5081,5831,280,298,4825,2368,662,6610,11010,13806,13286,6005,2171,5250,6564,342,134,1158,26700,7768,146,7653,10501,5206801,6822,108,2,195,473,102,47,5,5992934,1208,97,2803118,3311,141,795,28699,807,3,8,26,2,2,10,8855542,15085468,579,4043528,1007,13291,2374,39458,1447,1541,12,1425,3,703,1406,3,817,1393125,23759270,12799,8408,2879,2684,4192,1148,2619,1015,163,1965,4371,3646,3115,298,77,5943,877,3,2817,159,3604,3117,3999,1879,1523,1713,302,2827,2500,2,4636,1608,2,977,149,4319,1636,728,460,1011,1320,4916,40,521,2385,352,615,377,2,76,1639,430,1071,1072,603,3,1058,630,965,2,528,195,362,27,6,5,15,313,2112,917,1193,119,453,689,4,872,856,116,894,215,571,219,2443,24,369,567,659,417,1,174,529,106,559,91,743,235,673,56,91,38,92,54,2736,38,14,217,2,46,8,612,14,408,49,39,697,554,466,428,408,65,2,3,44,125,2,245,127,636,3,118,3,479,850,810,727,3,2,2,2,198,305,168,662,1377,42,65,1060,780,476,63,100,481,97,390,1,317,10,63,579,228,727,2882,4’,kBL:‘KNFY’,kOPI:89978449};(function(){var a;(null==(a=window.google)?0:a.stvsc)?google.kEI=_g.kEI:window.google=_g;}).call(this);})();(function(){google.sn=‘webhp’;google.kHL=‘tr’;})();(function(){
[2023-10-11_11:20:22:557]var h=this||self;function l(){return void 0!==window.google&&void 0!==window.google.kOPI&&0!==window.google.kOPI?window.google.kOPI:null};var m,n=;function p(a){for(var b;a&&(!a.getAttribute||!(b=a.getAttribute(“eid”)));)a=a.parentNode;return b||m}function q(a){for(var b=null;a&&(!a.getAttribute||!(b=a.getAttribute(“leid”)));)a=a.parentNode;return b}function r(a){/^http:/i.test(a)&&“https:”===window.location.protocol&&(google.ml&&google.ml(Error(“a”),!1,{src:a,glmm:1}),a=“”);return a}…

However, here’s how it gives an error with firebase link
(https://gsmprojectdb-default-rtdb.europe-west1.firebasedatabase.app/1.json):

[2023-10-11_11:22:29:578]AT+QHTTPURL=74

[2023-10-11_11:22:29:578]CONNECT
[2023-10-11_11:22:32:661]
[2023-10-11_11:22:32:661]OK
[2023-10-11_11:22:37:773]AT+QHTTPGET=100

[2023-10-11_11:22:42:983]+CME ERROR: 3822

Try adding custom request header: User-Agent and Host. Hope it will work.

Tried it. Same result.
Funnily enough, I’ve made another account on Firebase with a different domain name called firebaseio and I can make a get request on the data: https://app2data-default-rtdb.firebaseio.com/basket.json which returns the value 25. SO how am I not able to make requests to the gsmprojectdb-default-rtdb.europe-west1.firebasedatabase.app domain instead? Is there anyone from the Quectel support team to confirm? How is this possible?