# UART1 /dev/ttyHS0 No such file Error

**URL:** <https://mangoh.discourse.group/t/uart1-dev-ttyhs0-no-such-file-error/10063>\
**Category:** mangOH Yellow\
**Created:** [July 26, 2022, 3:24pm UTC](https://mangoh.discourse.group/t/uart1-dev-ttyhs0-no-such-file-error/10063 "2022-07-26T15:24:42Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![clementfumey](https://avatars.discourse-cdn.com/v4/letter/c/8baadc/32.png) [@clementfumey](https://mangoh.discourse.group/u/clementfumey)\
**Post date:** [July 26, 2022, 3:24pm UTC](https://mangoh.discourse.group/t/uart1-dev-ttyhs0-no-such-file-error/10063/1 "2022-07-26T15:24:42Z")

</div>

Hello,

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

and

> groups : dialout

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

```auto
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 ?

Regards

---

<div class="post-metadata">

**Author:** ![jyijyi](https://sea2.discourse-cdn.com/flex016/user_avatar/mangoh.discourse.group/jyijyi/32/997_2.png) [@jyijyi](https://mangoh.discourse.group/u/jyijyi)\
**Post date:** [July 26, 2022, 4:45pm UTC](https://mangoh.discourse.group/t/uart1-dev-ttyhs0-no-such-file-error/10063/2 "2022-07-26T16:45:26Z")

</div>

Does this help?

> **[Use legato API to open ttyUSB0 and got error](https://forum.sierrawireless.com/t/use-legato-api-to-open-ttyusb0-and-got-error/27512)**
>
> Hi, I want to use legato API to read ttyUSB0, but i can’t open ttyUSB0. #include “legato.h” #include “le\_tty.h” COMPONENT\_INIT { int SerialPortFd = -1; int ret = 0 , num\_ret = 0; char buf\[1024\] = {0}; SerialPortFd =...

---

<div class="post-metadata">

**Author:** ![clementfumey](https://avatars.discourse-cdn.com/v4/letter/c/8baadc/32.png) [@clementfumey](https://mangoh.discourse.group/u/clementfumey)\
**Post date:** [July 28, 2022, 6:36am UTC](https://mangoh.discourse.group/t/uart1-dev-ttyhs0-no-such-file-error/10063/3 "2022-07-28T06:36:27Z")

</div>

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 :

```auto
requires:
{
   device:
   {
        [rw] /dev/ttyHS0 /dev/
   }
}

```
