AT commands Quectel MC60

I've just started working with the Quectel MC60 and I am having some issues:

About HTTP GET method, I make the following commands:

AT+QIFGCNT=0
AT+QICSGP=1,"my_apn"
AT+QIREGAPP
AT+QIACT
AT+QSSLCFG="https",1
AT+QHTTPURL=39,40
my_url_39_bytes_long
AT+QHTTPGET=60
AT+QHTTPREAD=30
AT+QIDEACT

When using the QCOM software, I make a script running all the above commands sequentially. When it comes to the AT+QHTTPREAD command, the response is always "+CME ERROR: 3822" (HTTP response failed). What can it be? I'm sure the HTTP server is working properly.

Upvotes: 3

Views: 6158

Answers (1)

The answer is that it is necessary to configure the request header

AT+QIFGCNT=0
AT+QICSGP=1,"my_apn"
AT+QIREGAPP
AT+QIACT
AT+QHTTPURL=39,40
my_url_39_bytes_long
AT+QHTTPCFG="requestheader",1
AT+QHTTPPOST=77   
GET path HTTP/1.1
User-Agent: Fiddler
Host: www.my_host.com


AT+QHTTPREAD=30
AT+QIDEACT

NOTE: in AT+HTTPPOST=77, 77 is the size of the POST message (last two \r\n are required and count)

NOTE2: after GET you're supposed to write the path to the url inserted in AT+QHTTPURL. For example, if you specified your URL as https://www.my_host.com/debug/main/port, your AT+HTTPPOST request should look like this (don't forget the last two \r\n):

GET /debug/main/port HTTP/1.1
User-Agent: Fiddler
Host: www.my_host.com

Upvotes: 1

Related Questions