It’s not unsandboxed. I am able to read after using open(), also unsandboxed. However this always gives me garbled data on the first read. I thought I would try using le_tty_open() to see if this fixes the problem, however it doesn’t work at all.
I am including [rw] /dev/ttyHS0 /dev/ttyHS0 in the .cdef file, both configurations.
Calling le_tty_SetFraming(fd, ‘N’, 8, 1) after le_tty_SetBaudRate() makes no difference.
As for garbled data, it only happens on the first read after inactivity. Never during a sequence of reads. Also, if I take the rate down to 2400 bps, I find the first character drops rather than the data being garbled. I think it’s likely to be a sleep/wakeup issue. I am investigating this and if I can fix it I will just stick to the Posix calls.
Thanks for the tip, periodic calls to tcflow(fd1,TCION ) are effective in preventing lost data on UART using open()/read().
As for the le_tty_open()/read() issue, perhaps it has something to do with the event processing framework, but I don’t need to deal with it at this time.