[BUG] RN2483 hangs on read
Description / Steps to reproduce the issue
The RN2483 with the rn2xx3 driver hangs on read
The following is the problematic part, situated in rn2xx3_read()
ret = file_read(&priv->uart, &hex_byte, 2);
if (ret < 2)
{
goto early_ret;
}
The device seems to always return 1 byte of data instead of 2, thus hanging the system
Switching to a double single byte read fixed the issue
ret = file_read(&priv->uart, &hex_byte, 1);
if (ret < 1)
{
goto early_ret;
}
ret = file_read(&priv->uart, &hex_byte[1], 1);
if (ret < 1)
{
goto early_ret;
}
I do not find this to be an elegant solution, is there a different read function that could wait until the buffer is full?
On which OS does this issue occur?
[OS: Mac]
What is the version of your OS?
MacOS 15.6.1
NuttX Version
releases/12.12
Issue Architecture
[Arch: arm64]
Issue Area
[Area: Drivers]
Host information
No response
Verification
- [x] I have verified before submitting the report.
@bskdany did you talk with @linguini1 about this issue? Since he implemented the driver, maybe he has some idea about this issue.
Yeah, I may have a patch for this to improve its behavior and performance.
In this case, the UART interface is being read so fast that there is an odd number of characters in the UART buffer (not enough to read two chars).