I am creating a new project where I am willing to use M66 for the GSM/GPRS part. The HTTP Application Note document is not quite clear and I have few questions. The major 2 questions are
- Do we need to have the carriage return (\r) character at the end of the URL?
- If we need to include the \r character at the end of the URL, then do we count that while calculating size of URL?
Right now I have \r appended at the end of the URL like below
char url[ ] = "**************************\r";
sprintf(cmd, "AT+QHTTPURL=%d\r", sizeof(url)-1);
I have also tried with the following
char url[ ] = "***********************";
sprintf(cmd, "AT+QHTTPURL=%d\r", sizeof(url));
The result is same…
Here is the AT Log. After HTTPPOST, it does not get any response from device and timeouts (I have a 5s timeout)
Initializing GSM
[AT START]
Command => AT
Response[9 bytes] =>
ATOK
[AT END: T => 42 ms][AT START]
Command => ATE0
Response[11 bytes] =>
ATE0OK
[AT END: T => 44 ms][AT START]
Command => AT+CPIN?
Response[22 bytes] =>+CPIN: READY
OK
[AT END: T => 46 ms][AT START]
Command => AT+GSN
Response[25 bytes] =>860657058408150
OK
[AT END: T => 48 ms][AT START]
Command => AT+CMGF=1
Response[6 bytes] =>OK
[AT END: T => 44 ms][AT START]
Command => AT+CREG?
Response[20 bytes] =>+CREG: 0,1
OK
[AT END: T => 46 ms][AT START]
Command => AT+COPS?
Response[29 bytes] =>+COPS: 0,0,“airtel”
OK
[AT END: T => 47 ms][AT START]
Command => AT+QISTAT
Response [27 bytes] =>OK
STATE: IP INITIAL
[AT END: T => 47 ms]IP Status => IP INITIAL
[AT START]
Command => AT+QISTAT
Response [27 bytes] =>OK
STATE: IP INITIAL
[AT END: T => 47 ms]IP Status => IP INITIAL
[AT START]
Command => AT+CGATT?
Response[19 bytes] =>+CGATT: 1
OK
[AT END: T => 46 ms][AT START]
Command => AT+QIFGCNT=0
Response[6 bytes] =>OK
[AT END: T => 44 ms][AT START]
Command => AT+QICSGP=1,“airtelgprs.com”
Response[6 bytes] =>OK
[AT END: T => 51 ms][AT START]
Command => AT+QIREGAPP
Response[6 bytes] =>OK
[AT END: T => 43 ms][AT START]
Command => AT+QISTAT
Response [25 bytes] =>OK
STATE: IP START
[AT END: T => 48 ms]IP Status => IP START
GPRS Status 0[AT START]
Command => AT+QISTAT
Response [25 bytes] =>OK
STATE: IP START
[AT END: T => 47 ms]IP Status => IP START
Activating PDP Context[AT START]
Command => AT+QIACT
Response[6 bytes] =>OK
[AT END: T => 544 ms][AT START]
Command => AT+QISTAT
Response [27 bytes] =>OK
STATE: IP GPRSACT
[AT END: T => 49 ms][AT START]
Command => AT+QHTTPURL=32
Response [11 bytes] =>CONNECT
[AT END: T => 46 ms][AT START]
Command => http://vltgw.trakomatic.in:9140
Response [6 bytes] =>OK
[AT END: T => 48 ms][AT START]
Command => AT+QHTTPPOST=14
Timeout receiving AT response for command => AT+QHTTPPOST=14
[AT END: T => 5011 ms]
Also, when I try to initate a new transaction, the HTTPURL fails as below
[AT START]
Command => AT+QHTTPURL=31
Response [9 bytes] =>ERROR
[AT END: T => 47 ms]
It seems the earlier HTTP Transaction did not finish. How can I terminate / end a transaction without deactivating the PDP?