UART1 /dev/ttyHS0 No such file Error


I am using a mangOH yellow with a breakout IOT expansion and I am trying to activate uart1 on it.
Here the steps I have done so far :

  • On the mangOH board : uartMode set 1 app
  • On the mangOH board: ls -al /dev/ttyHS* and I have ttyHS0 and 1 as result
  • On my app I am using :

    le_tty_Open(“/dev/ttyHS0”, O_RDWR | O_NOCTTY | O_NDELAY);

-In my .adef file I have added :

[rw] /dev/ttyHS0 /dev/ttyHS0


groups : dialout

When I installed and lauched my app, I have the following error message in the logs :

swi-mdm9x28-wp user.emerg Legato: *EMR* | deviceCommunication[23112]/framework T=main | tty.c le_tty_Open() 231 | Error opening serial device '/dev/ttyHS0': No such file or directory

If I use the same code with ttyHS1le_tty_Open is working and I get a valid file descriptor to write to.

Any ideas of what I’m doing wrong ?


Does this help?

Thank you for your answer @jyijyi . It definitely helped me. I have chosen to had the requires section in .cdef which is, as I understood the best solution even if for now I don’t really know nor understand about sandboxing.

In my case, in the cdef I added :

        [rw]   /dev/ttyHS0       /dev/