M66 in TCP/IP transparent mode combines websocket control and data packets to one TCP/IP frame

There is 200ms time before send in transparent mode (AT+QITCFG=3,2,512,1) and sometimes i have to send Websocket PONG response to server and next want to send websocket data packet (after less than 200ms). M66 combines it in one TCP/IP frame that is incorrect for server due to set FIN bit in each websocket packet. When i’m sending PONG control packet, i don’t know when i will send data packet (and if it will be combined or not). If it is for less than 200ms, data packet is discarted on server side (only PONG is maintained). Any idea (excluding timeouts after sending PONG and data packets)?

Hi Jacek:
Could you please tell me your detailed AT steps about the issue?
You can send me screenshots of your steps.

Hi Winni
It is not AT dependent issue but general. I have transparent connection so i don’t use any AT commands while this issue happens. All data sended by module commes to server, but sometimes PONG and data comes in one TCP/IP packet, that is in accordance with M66 specification in transparent mode, when module sends after 200ms silence at the port (configured with AT+QITCFG=3,2,512,1). But server side doesn’t accept that packet, since there are 2 websocket frames (control frame PONG and data frame) in one TCP. I suppose that it is due to FIN bit = 1 in both frames. Server side is processing first (PONG) frame only.
Now i implemented 250ms delay between control and data packets, so M66 doesn’t combines them and everything works good.
It could be better that M66 could have some escape sequence that force immediate sending in transparent mode. It would be safe for transparent mode if this sequence was also transmitted as data. When sequence apeears in data, it is still transmitted, the only effect is that next data are sended in next packet, that is irrelevant for server side, but it fixing issue. This sequence should be configurable.

Or meaby this is server issue and it should correctly process both WebSocket frames sended in one TCP packet?

Hi Jacek:
About this issue,If need to more assistance,pls reach to support@quectel.com.