EC20: Unable to customize get request header

Hi

I have been using an EC20 module to send get requests to the AWS API gateway. I also wan to send the customized GET request header and have been trying to configure the setting as per the datasheet.

First I set AT+QHTTPCFG=“requestheader”,1
Even after this, the AT+QHTTPGET=80,126,80 command always throws +CME ERROR: invalid parameter

But when I set AT+QHTTPCFG=“requestheader”,0 the command AT+QHTTPGET=80 works but the server is not able to accept the default header generated from EC20 module.

Could any one please help me in getting the customize header command work

here is the log:

[2020-07-29 16:22:20:977_R:] Quectel
[2020-07-29 16:22:20:977_R:] EC20F
[2020-07-29 16:22:20:977_R:] Revision: EC20CEFAGR06A15M4G

[2020-07-29 16:22:36:200_S:] AT+QICSGP=1,1,“jionet”,"","",0
[2020-07-29 16:22:36:200_R:] AT+QICSGP=1,1,“jionet”,"","",0

[2020-07-29 16:22:36:200_R:] OK
[2020-07-29 16:22:39:380_S:] AT+QICSGP=1
[2020-07-29 16:22:39:380_R:] AT+QICSGP=1

[2020-07-29 16:22:39:380_R:] +QICSGP: 1,“jionet”,"","",0

[2020-07-29 16:22:39:380_R:] OK
[2020-07-29 16:22:41:900_S:] AT+QIACT=1
[2020-07-29 16:22:41:916_R:] AT+QIACT=1

[2020-07-29 16:22:41:947_R:] OK
[2020-07-29 16:22:45:003_S:] AT+QSSLCFG=“sslversion”,1,1
[2020-07-29 16:22:45:003_R:] AT+QSSLCFG=“sslversion”,1,1

[2020-07-29 16:22:45:003_R:] OK
[2020-07-29 16:22:47:464_S:] AT+QSSLCFG=“ciphersuite”,1,0xFFFF
[2020-07-29 16:22:47:468_R:] AT+QSSLCFG=“ciphersuite”,1,0xFFFF

[2020-07-29 16:22:47:468_R:] OK
[2020-07-29 16:22:49:258_S:] AT+QSSLCFG=“clientcert”,1,“UFS:AmazonRootCA1.pem”
[2020-07-29 16:22:49:258_R:] AT+QSSLCFG=“clientcert”,1,“UFS:AmazonRootCA1.pem”

[2020-07-29 16:22:49:258_R:] OK
[2020-07-29 16:22:51:360_S:] AT+QSSLCFG=“seclevel”,1,1
[2020-07-29 16:22:51:360_R:] AT+QSSLCFG=“seclevel”,1,1

[2020-07-29 16:22:51:360_R:] OK
[2020-07-29 16:22:56:040_S:] AT+QHTTPCFG=“contextid”,1
[2020-07-29 16:22:56:040_R:] AT+QHTTPCFG=“contextid”,1

[2020-07-29 16:22:56:040_R:] OK
[2020-07-29 16:23:02:594_S:] AT+QHTTPCFG=“sslctxid”,1
[2020-07-29 16:23:02:598_R:] AT+QHTTPCFG=“sslctxid”,1

[2020-07-29 16:23:02:602_R:] OK
[2020-07-29 16:23:12:360_S:] AT+QHTTPCFG=“requestheader”,1
[2020-07-29 16:23:12:360_R:] AT+QHTTPCFG=“requestheader”,1

[2020-07-29 16:23:12:360_R:] OK
[2020-07-29 16:23:16:101_S:] AT+QHTTPURL=65,80
[2020-07-29 16:23:16:101_R:] AT+QHTTPURL=65,80

[2020-07-29 16:23:16:101_R:] CONNECT

[2020-07-29 16:23:16:117_R:] DSR:0 CTS:0 RI:0 (DCD:1)
[2020-07-29 16:23:18:136_S:] https://6ciuz9m5kk.execute-api.us-west-2.amazonaws.com/Test2Stage

[2020-07-29 16:23:18:136_R:] OK

[2020-07-29 16:23:18:151_R:] DSR:0 CTS:0 RI:0 (DCD:0)
[2020-07-29 16:23:55:473_S:] AT+QHTTPGET=80,126,80
[2020-07-29 16:23:55:477_R:] AT+QHTTPGET=80,126,80

[2020-07-29 16:23:59:024_R:] +CME ERROR: invalid parameter
[2020-07-29 16:24:47:465_S:] AT+QHTTPGET=80,126,5
[2020-07-29 16:24:47:471_R:] AT+QHTTPGET=80,126,5

[2020-07-29 16:24:47:946_R:] +CME ERROR: invalid parameter
[2020-07-29 16:24:56:342_S:] AT+QHTTPGET=80
[2020-07-29 16:24:56:342_R:] AT+QHTTPGET=80

[2020-07-29 16:24:56:342_R:] +CME ERROR: invalid parameter
[2020-07-29 16:25:06:657_S:] AT+QHTTPCFG=“requestheader”,0
[2020-07-29 16:25:06:662_R:] AT+QHTTPCFG=“requestheader”,0

[2020-07-29 16:25:06:668_R:] OK
[2020-07-29 16:25:08:753_S:] AT+QHTTPGET=80
[2020-07-29 16:25:08:758_R:] AT+QHTTPGET=80

[2020-07-29 16:25:08:758_R:] OK

[2020-07-29 16:25:09:733_R:] +QHTTPGET: Invalid parameter

[2020-07-29 16:25:09:733_R:] DSR:0 CTS:0 (RI:1) DCD:0

[2020-07-29 16:25:09:857_R:] DSR:0 CTS:0 (RI:0) DCD:0
[2020-07-29 16:27:09:782_S:] AT+QHTTPGET=80
[2020-07-29 16:27:09:782_R:] AT+QHTTPGET=80

[2020-07-29 16:27:09:782_R:] OK

[2020-07-29 16:27:10:407_R:] +QHTTPGET: Invalid parameter

[2020-07-29 16:27:10:407_R:] DSR:0 CTS:0 (RI:1) DCD:0

[2020-07-29 16:27:10:531_R:] DSR:0 CTS:0 (RI:0) DCD:0

Dear Sir,
Thanks for your inquiry in Quectel forum.
Please check whether thr URL is correct, when i use the browser to open the URL, i got nothing. then please double check whether the parameters you use in command AT+QHTTPGET is correct.


image
Please pay attention to that. Thanks!

The following example just for your reference. Thanks!

image

Hi Kyson,

You are correct, the url is actually: https://6ciuz9m5kk.execute-api.us-west-2.amazonaws.com/Test2Stage/

I missed the extra “/” at the end.

Now, the get command does not gives me back a CME error.

Thank You!

Dear Kyson,

The HTTPCFG command in the module has more parameters than what are described in the datasheet. There are more parameters like “windowsize”, “customs_header”, “auth” etc.

Can you please provide me documentation for these parameters also?

image

Dear Manuj,
Sorry that the latest HTTP document still under checking, have not achieved now. You can just check the following document. Thanks!
Quectel_LTE_Standard_HTTP(S)_Application_Note_V1.1.pdf (394.7 KB)

I’m using EC25. I am facing an issue regarding the GET header. I have been trying to fetch a get request using the token, but it seems to return me with some 702 code error; which is referred to as timeout error as per the Application Note. The following is the order:

AT+QHTTPCFG="requestheader",1
OK
AT+QHTTPCFG="responseheader",1
OK
AT+QHTTPURL=116,80
CONNECT

OK
AT+QHTTPGET=10,650,10
CONNECT

OK

+QHTTPGET: 702

The header: 

GET /v1/telemetry/getunlockotp?bikeid=12345678&requestor=telemetry HTTP/1.1
Host:rishapp-staging.ap-south-1.elasticbeanstalk.com
Accept:application/json
User-Agent:QUECTEL_MODULE
Connection:Keep-Alive
Authorization:Bearer eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJhY2Nlc3NUeXBlcyI6W10sImlhdCI6MTY5MjYxMjU5NiwiZXhwIjoxNjkyNjE2MTk2fQ.ahQ-bXsMmkHjNHP4tbgy7w0-UeGQLnMxEOAJh6EVB3tf0HlLQPirQPXWz4J4iZrGQPhpb711GUZ1dIQXUtaWIEtgRPme0wdpccs5Rt-D1iAPLQ9Y2kn8BYGgndB6giPdOmWzu89y0yhJDpaG6HSQNhTBuar9L0-8ixLg55T9yx0swtx2Q8URa0mDR6pRm-zV0PgyKVk8VNrEN-m0KLomwqiJ1moROOLWL0L02TDl0wFV8LX-rRTA3RDVBLObd0Z79ervTZrhUxO8ubmgHOKg7zETohs39HTTglsa1ZsMvLXUiKtjpDJNwZA4dTC_u9n6M8gh_vAbVKzu7ZOiwtVbNg

Could anyone please help me in getting the customize header command work.