Toradex VSCode Extension UART2 on ApalisiMX8 can write but cannot read

I have followed the termios code at the following link to configure the UART2 on ApalisiMX8 on the Ixora board.

Within the Toradex extension in VSCode, I have added /dev/ttyLP3 to devices (for UART2) and in buildcommands have added RUN usermod -a -G dialout torizon.
Refer link:

I am able to write to the UART2 and have observed the behaviour using both Kitty and Tera Term that a write is successful.

However, when I try to type anything in Tera Term or Kitty, for a read on UART2, I am getting the error “Error reading: resource temporarily unavailable”.
Code reference:

See attached.
UART2-ApalisiMX8.cpp (1.2 KB)

Please can you let me know why a read is not happening

Greetings @SJ_BHD,

The error you’re experiencing here sounds similar to the issue in this past thread: UART /dev/ttyLP1 resource temporarily unavailable on read()

Could you try the solution that worked for this user and see if it helps your situation as well.

Best Regards,