MaJerle / lwcell

Lightweight cellular modem host AT library
MIT License
402 stars 152 forks source link

Support need for TCP : +RECEIVE missed event #50

Closed gxnt-samir closed 1 year ago

gxnt-samir commented 3 years ago

Hello @MaJerle,

I have send a request on TCP and expecting server to respond.

The server respond too but missed the first reveive to call the function callback. I have marked the breakpoint in the attached log.

For simulation when i send dummy data from server the 2nd time, it hit the marked breakpoint. I have tested manytimes and tried many approach. But it always miss the 1st response from the server.

Can you please support. In my real application the server is actually responding once. if missed the important data is lost. Can you suggest any alternatives to track this receive buffer by application?

Regards, Samir

Missed event breakpoint

MaJerle commented 3 years ago

Hi @gxnt-samir more info would be necessary. We need to see 2 things:

gxnt-samir commented 3 years ago

Hello @MaJerle ,

Thank you for your response.

I am attaching the actual MCU - Modem communication log. actual modem-mcu data

gxnt-samir commented 3 years ago

As you can see, the +RECEIVE has been received from Modem interface with the response data, but this received data didnot triggered the event.

MaJerle commented 3 years ago

Question is rather, did MCU really got these data from the modem? Or was there read data processing error? And is number of data received really 1460 bytes? Check all this first please

gxnt-samir commented 3 years ago

This print is executed by the MCU at just before passing to lwgsm_input_process API. You can see my iostream write API just before it.

Uart Print of receive

gxnt-samir commented 3 years ago

So, Yes the data is actually receiced by MCU, and its 1460 bytes. The image is croped so the data is not showing full. Do you have any way i can debug further. any specific function or value that can give me any clue.

MaJerle commented 3 years ago

It is super strange. Would be good to see if you go in to input_process function.