Hello,
I have a custom board with an HL7812 modem running FW HL7812.5.7.2.0
My application is connected to a TCP server. I have a problem where it looks like the data sent by the TCP server is stuck inside the modem until the server closes the connection and the app receives the +KTCP_NOTIF URC.
The server sends 3443 bytes to the client.
The client first gets a notification for 1629 bytes available and reads them in small chunks:
[ 315.735000] +KTCP_DATA: 1,1629
[ 315.736000] AT+KTCPRCV=1,2
[ 315.798000] +KTCP_DATA: 1,1627
[ 315.799000] AT+KTCPRCV=1,1
[ 315.861000] +KTCP_DATA: 1,1626
[ 315.862000] AT+KTCPRCV=1,2
[ 315.924000] +KTCP_DATA: 1,1624
[ 315.924000] AT+KTCPRCV=1,50
[ 315.987000] +KTCP_DATA: 1,1574
[ 315.988000] AT+KTCPRCV=1,1500
[ 316.202000] +KTCP_DATA: 1,74
[ 316.202000] AT+KTCPRCV=1,74
Then nothing happens, the client does not receive any more +KTCP_DATA URCs.
The AT+KTCPSTAT command shows that there is no pending data to read in the socket:
[ 472.215000] AT+KTCPSTAT
[ 472.215000] +KTCPSTAT: 1,3,-1,0,0
Finally 206 seconds later, the application receives the remaining bytes together with the URC showing that the remote has closed the connection:
[ 522.611000] +KTCP_DATA: 1,1629
[ 522.612000] AT+KTCPRCV=1,1500
[ 522.826000] +KTCP_DATA: 1,129
[ 522.826000] AT+KTCPRCV=1,129
[ 522.889000] +KTCP_DATA: 1,185
[ 522.952000] +KTCP_NOTIF: 1,4
The problem is repeatable and the first +KTCP_DATA URC always gives 1629 bytes.
I tried another board with a different modem connected to the same TCP server and this problem does not happen.
Is that a known issue? Is there something special about this 1629 number?
Thanks!