May 2, 2023, 6:18am
There seems to be a limit when I try to send data over TCP to an HL7800 modem. After sending a certain amount of bytes, the +KTCP_DATA urc always returns
+KTCP_DATA: 1,1629 and the EOF pattern is printed prematurely, so there is a limit. The number 1629 is not always consistent either, as I sometimes get less than that. Trough Wireshark I can see that the right amount of bytes is being sent.
data_mode is not supported so the 1500 byte limit should not be there.
do you find problem in +KTCPSTART?
May 2, 2023, 6:43am
The problem occurs when sending data to the device while the TCP connection is already established.
It’s established with AT+KTCPCNX
you can still use +KTCPSTART
May 2, 2023, 6:47am
So there is a bug somewhere? Is that bug known?
I can’t just change the command into production.
if no problem is found in +KTCPSTART, may need to investigate if this is server problem
May 2, 2023, 6:53am
The server transmits correctly, as I noted wireshark shows the correct amount of bytes sent.
Does using KTCPSTART make any difference? Why would that be?
Does KTCPSTART return the same replies as TCPCNX does?
actually what is the problem then if it send correct amount of data?
do you mean you don’t want the EOF?
May 2, 2023, 6:56am
Server sends correct amount but modem reads less bytes
then if you don’t see problem in +KTCPSTART, that means it is network issue, right?
May 2, 2023, 6:59am
I haven’t tried KTCPSTART yet. What is the difference with KTCPCNX?
it is different command to +KTCPCNX
you can see AT command user guide
Here also says how to capture wireshark log in HL7800 to verify if this is network problem:
notification of the following received packet is sent only when the current +KTCP_DATA has been read with a +KTCPRCV command.
My understanding is that after transmission, received data unsolicited indication should appear after dropping back to command mode. Once this message is received, you then issue AT+KTCPRSV=,. If is less than the first , then you will continue to receive +KTCP_DATA notifications until all data is read.
However, this indication needs to be received aft…
May 2, 2023, 7:06am
Ok, so could it be that multiple KTCPDATA messages appear and the payload is split into different packets?
you need to capture the wireshark on module side to understand this
May 2, 2023, 7:08am
Ok, will get back on this. Thanks
you might need to also try with +KTCPSTART to get more clue
May 2, 2023, 7:11am
I just realized that what’s happening is the payload is split into packets and I have to continue sending KTCPRCV command to get the whole payload. That’s tricky to manage. Is that something the modem itself is doing, just for reference?
probably yes, might also depends on how fast the host reads the data