You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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?
The text was updated successfully, but these errors were encountered:
@langestefan I realize I'm responding to a post that is a year old but I recently ran into the exact same problem and thought the info might be helpful to others.
The Problem
The issue with unsolicited messages on the UART's is that the Linux OS is putting the UART interfaces into a suspended state (I'm guessing to save power) and the UART is not ready to receive data. The incoming data does wake up the UART but the first few bytes of data get garbled while the interface is waking up.
I found two solutions for this:
Option 1
If you control the code/firmware of the device sending the unsolicited data you can send two CR+LF's before you send the real data. It's a little clunky but it does work reliably.
\r\n
\r\n
This is the data I don't want garbled\r\n
Option 2
This option is a little cleaner and works for devices that can't be changed to send the extra CR+LF's. It involves disabling the autosuspend setting for the UART interface.
In the /sys/devices file system there are files that used to configure settings for the UART's. The autosuspend_delay_ms setting is the one we care about. On my system, I have these two:
The autosuspend_delay_ms option controls how long before the device goes back into suspend mode after going idle. The default is 5000ms (5 seconds). To completely disable autosuspend you write a -1 to this file.
At startup on my system I'm doing this:
I spent many, many hours figuring this out. The garbled data made me think there was something wrong electrically but the logic analyzer showed the data was correct on the wire. The kernel docs for USB power management were especially helpful in figuring this out.
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:
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?
The text was updated successfully, but these errors were encountered: