Hi all,
I am receiving a
+KTCP_NOTIF: 1,8
after transmitting TCP data. (Data sending is OK but +KTCPSND was waiting for more or less characters). Because of this, I do not know how many bytes the server is sending back to me, because I don’t get a +KTCP_DATA response.
Using BHL7800-M.2.5.6.1.20190412.
BHL78xx.2.5.6.1.RK_02_01_01_00_41.20190412
Legato RTOS: 18.09.2.ALT1250.rc5 2019/04/04 14:02:47
Sending 13866
bytes of data to a server using TCP. I have 3 data components concatenated together:
TCP Header, some pre-data, and data:
POST <IP-ADDRESS-ENDPOINT> HTTP/1.1<CR><LF>
Host: <IP-ADDRESS><CR><LF>
Content-Length: 13750<CR><LF> (NOTE: Total Size - TCP header size)
Content-Type: application/octet-stream<CR><LF>
<CR><LF>
[object][data]--EOF--Pattern--
The total size of this data (up to but not including --EOF--Pattern--
) in this example is 13866
bytes.
My general connection flow is as follows:
AT+K3
AT+CGDCONT=1,"IPV4V6","internet.sierrawireless.com" --> Receive OK
AT+KCNXCFG=1,"GPRS","internet.sierrawireless.com" --> Receive OK
AT+KTCPCFG=1,0,"<IP_ADDRESS>",80 --> Receive +KTCPCFG: 1
AT+KTCPCNX=1
--> Receive +KCNX_IND: 1,1,0 (Connecting...)
--> Receive +KTCP_IND: 1,1 (Connected)
Each command has 200 msec of delay after receiving a response, and before transmitting the next command. After receiving connect
KTCP_IND: 1,1
, I issueAT+KTCPSND=1,13866
200 msec later. I then wait for “CONNECT
”. After receiving “CONNECT
”, I start sending data to the UART.
AT+KTCPSND=1,13866
[200 msec delay]
--> Receive CONNECT
[Immediately transmit 13866
bytes of data] (Have also tried with additional delays after CONNECT
).
- I verify with a logic analyzer that after “
CONNECT
”, the EXACT number of bytes (13866
) are sent to the radio afterCONNECT
and up to but not including--EOF--Pattern--
.- I verify the baud rate is correct (115200 +/- 1%)
- Hardware flow control is enabled, and TX data (into the module) is being properly delayed when CTS is asserted.
- I continue to run this example, and on occasion, the radio will respond with “+KTCP_DATA: 1,<bytes_to_receive>”
Any ideas how I should approach this? Is there a way to query the module for how many bytes it received?
Appreciate any feedback anyone may have.
Thank you
Other threads I have read: