Hello.
I am currently integrating Quectel modules with my application using AT commands. I have to send some POST data and parse the corresponding server response. Depending on the POST, the server may respond with a defined content-length or responde in chunks of data.
First of all, I was able to perform a POST request using Buffer access mode and Direct push mode, setting <access_mode> in AT+QSSLOPEN to ‘0’ and ‘1’, respectively. In both modes, the Quectel modem correctly transmitted data through UART, both when the responde came complete and when it came in chunks of data.
However, when I try to use Transparent Mode(<access_mode> = 2), after I send the POST request, the Modem appears to output through UART just the first chunk. Below I will share what I am doing, which is sending two POSTs requests sequentially:
SEND>>AT+QHTTPCFG=“contextid”,1
RECEIVED<< ok
SEND>>AT+QHTTPCFG=“responseheader”,1
RECEIVED<< ok
SEND>>AT+QICSGP=1,1,“”,“”,“”,1
RECEIVED<< ok
SEND>>AT+QIACT=1
RECEIVED<< ok
SEND>>AT+QIACT?
RECEIVED<< +qiact: 1,1,1,“xxx.xxx.xxx.xxx”
ok
SEND>>AT+QHTTPCFG=“sslctxid”,1
RECEIVED<< ok
SEND>>AT+QSSLCFG=“sslversion”,1,4
RECEIVED<< ok
SEND>>AT+QSSLCFG=“ciphersuite”,1,0xFFFF
RECEIVED<< ok
SEND>>AT+QSSLCFG=“seclevel”,1,0
RECEIVED<< ok
SEND>>AT+QSSLOPEN=1,0,0,“myServer.com”,443,2
RECEIVED<< connect
SEND>> POST /myAPI HTTP/1.1
host:myServer.com
User-Agent:XX
Accept: /
Content-Type:application/json
Content-Length:00xxx
{“MyJSONData”:“data”}
RECEIVED<<http/1.1 200 ok
date: tue, xx xxx 20xx xx:xx:xx xxx
server: xxx/x.x.xx (xxxx)
cache-control: no-cache, private
x-ratelimit-limit: xx
x-ratelimit-remaining: xx
transfer-encoding: chunked
content-type: application/json
34
{“ServerJSONPayload”:“field”}
SEND>> POST /myAPI HTTP/1.1
host:myServer.com
User-Agent:XX
Accept: /
Content-Type:application/json
Content-Length:00xxx
{“MyJSONData”:“data”}
RECEIVED<<0\r\n\r\nhttp/1.1 400 bad request\r\ndate: tue, 08 oct 2024 19:17:05 gmt\r\nserver: apache/2.4.41 (ubuntu)\r\ncontent-length: 303\r\nconnection: close\r\ncontent-type: text/html; charset=iso-8859-1\r\n\r\n\r\n
\r\n400 bad request\r\n\r\nbad request
\r\nyour browser sent a request that this server could not understand.
\r\n
\r\napache/2.4.41 (ubuntu) server at 172.17.0.3 port 443\r\n\r\n
no carrier
Please, note that there is a delay of 5 seconds between receiving the “200 OK” response and sending the next POST request.
Also, please refer to the “0\r\n\r\n” in the beginning of the second POST response. That refers to the last chunk of the previous response.
This behaviour occurs in EC25-AUX(ec25auxgar08a13m1g) and EC200A(ec200aauhar01a11m16).
Is there any configuration that is preventing the module to send the full response to UART? Am I missing something?
Thanks in advance.