atClientDaemon RxParser losing bytes

Hi, I have recently encountered an issue when using the unsollicited response parser from the Legato AT client.

When reading the debug logs I see the following:

Jun  9 15:35:00 swi-mdm9x28-wp user.debug Legato:  DBUG | atClientDaemon[888]/atClient T=atCommandClient-7 | le_atClient.c CheckUnsolicited() 397 | Start checking unsolicited
Jun  9 15:35:00 swi-mdm9x28-wp user.debug Legato:  DBUG | atClientDaemon[888]/atClient T=atCommandClient-7 | le_atClient.c CheckUnsolicited() 411 | unsol found
Jun  9 15:35:00 swi-mdm9x28-wp user.debug Legato:  DBUG | atClientDaemon[888]/atClient T=atCommandClient-7 | le_atClient.c CheckUnsolicited() 447 | Stop checking unsolicited
Jun  9 15:35:00 swi-mdm9x28-wp user.debug Legato:  DBUG | atClientDaemon[888]/atClient T=atCommandClient-7 | le_atClient.c ResetRxBuffer() 565 | 36 sizeToCopy 2 from 34
Jun  9 15:35:00 swi-mdm9x28-wp user.debug Legato:  DBUG | atClientDaemon[888]/atClient T=atCommandClient-7 | le_atClient.c ResetRxBuffer() 577 | new idx 2, startLine 2
Jun  9 15:35:00 swi-mdm9x28-wp user.debug Legato:  DBUG | atClientDaemon[888]/atClient T=atCommandClient-7 | le_atClient.c RxNewData() 653 | read finished
Jun  9 15:35:00 swi-mdm9x28-wp user.debug Legato:  DBUG | atClientDaemon[888]/atClient T=atCommandClient-7 | le_atClient.c RxNewData() 627 | Start read
Jun  9 15:35:00 swi-mdm9x28-wp user.info Legato:  INFO | atClientDaemon[888]/atClient T=atCommandClient-7 | le_dev.c le_dev_Read() 293 | /proc/888/fd/13, /legato/systems/current/appsWriteable/MyApp/dev/ttyHS0 [248, 0], (u: appMyApp, g: ap
Jun  9 15:35:00 swi-mdm9x28-wp user.debug Legato:  DBUG | atClientDaemon[888]/atClient T=atCommandClient-7 | le_dev.c PrintBuffer() 216 | '/legato/systems/current/appsWriteable/MyApp/dev/ttyHS0' -> +INDICATE:0,5,1,13,^Fn^A��^G^D^X	'^B<CR><LF>
Jun  9 15:35:00 swi-mdm9x28-wp user.debug Legato:  DBUG | atClientDaemon[888]/atClient T=atCommandClient-7 | le_atClient.c RxNewData() 643 | Parsing received data: ^M +INDICATE:0,5,1,13,^Fn^A

The le_dev_c PrintBuffer() function reports the correct string. RxNewData() only parses 22 bytes, the rest are all lost. This issue only occurs with this specific command. It also appears it is not due to size, since bigger responses are parsed successfully.

Is there a known issue with characters that are not readable? Could it be something else?

Hello @langestefan,

PrintBuffer() prints +INDICATE:0,5,1,13, and the RxNewData() parses the same +INDICATE:0,5,1,13,

What is wrong in this? Can you please provide the command which you are trying to execute from you application Myapp and also complete logs.

If possible provide your application also.

Regards,
Murallidhara N.

Hi, thx for your response (5 months later).
As you can see in my post the response is:

+INDICATE:0,5,1,13,^Fn^A��^G^D^X '^B + CRLF

Everything after “+INDICATE:0,5,1,13,” is lost. "^Fn^A��^G^D^X '^B " contains my data. As this issue was blocking me 5 months ago I do not have any logs anymore and also don’t remember if I solved it.

Greetings

Hello @langestefan,

Please provide the application you have used for testing or at-least provide that specific command with which you see the issue.

We will try to verify that specific command on our side and see whether we see the same issue or not.

Regards,
Muralidhara N.

Hello @langestefan,

FYI, When we analysed function RxNewData() in the source file le_atClient.c, We see that below print is in-fact before the parsing the command, it is not the print after parsing the command.

Jun 9 15:35:00 swi-mdm9x28-wp user.debug Legato: DBUG | atClientDaemon[888]/atClient T=atCommandClient-7 | le_atClient.c RxNewData() 643 | Parsing received data: ^M +INDICATE:0,5,1,13,^Fn^A

Below is the snippet of the code for your reference:
LE_DEBUG(“Parsing received data: %s”, interfacePtr->rxParser.rxData.buffer);
ParseRxBuffer(&interfacePtr->rxParser);
ResetRxBuffer(&interfacePtr->rxParser);

If you still not satisfied with the answer, Please provide the application you have used for testing and provide that specific command with which you see the issue. We will try to reproduce the issue.
When we tried with few commands using the application, We didn’t see any issue. In-fact the issue which you are reported is not an issue at all.

Regards,
Muralidhara N.