# Legato serial Communication FX30S

**URL:** <https://forum.legato.io/t/legato-serial-communication-fx30s/3287>\
**Category:** Uncategorized\
**Created:** [May 18, 2018, 7:19am UTC](https://forum.legato.io/t/legato-serial-communication-fx30s/3287 "2018-05-18T07:19:36Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![baiticpruebas](https://avatars.discourse-cdn.com/v4/letter/b/f475e1/32.png) [@baiticpruebas](https://forum.legato.io/u/baiticpruebas)\
**Post date:** [May 18, 2018, 7:19am UTC](https://forum.legato.io/t/legato-serial-communication-fx30s/3287/1 "2018-05-18T07:19:36Z")

</div>

Hello!

Is it any chance of create a legato app that permits serial communication? We have already created a program with le\_tty functions (le\_tty\_open, le\_tty\_close,…) but we cannot use the ports ttyHS0 or ttyHSL1 properly. The app runs and the port seems to be opened correctly, but on a Windows with hyperterminal we are not receiving the message.

Regards,

Pablo

---

<div class="post-metadata">

**Author:** ![jyijyi](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.legato.io/jyijyi/32/822_2.png) [@jyijyi](https://forum.legato.io/u/jyijyi)\
**Post date:** [May 18, 2018, 8:28am UTC](https://forum.legato.io/t/legato-serial-communication-fx30s/3287/2 "2018-05-18T08:28:50Z")

</div>

did you set AT!MAPUART correctly?

---

<div class="post-metadata">

**Author:** ![baiticpruebas](https://avatars.discourse-cdn.com/v4/letter/b/f475e1/32.png) [@baiticpruebas](https://forum.legato.io/u/baiticpruebas)\
**Post date:** [May 18, 2018, 9:06am UTC](https://forum.legato.io/t/legato-serial-communication-fx30s/3287/3 "2018-05-18T09:06:11Z")

</div>

I think so.  
The output of the AT!MAPUART? command is this:  
"  
AT!MAPUART?  
!MAPUART: 17,17  
OK  
"

As i see in other topics, this is the correct output that permits the use of the ttyHS0 port. Is this correct?

---

<div class="post-metadata">

**Author:** ![jyijyi](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.legato.io/jyijyi/32/822_2.png) [@jyijyi](https://forum.legato.io/u/jyijyi)\
**Post date:** [May 18, 2018, 9:27am UTC](https://forum.legato.io/t/legato-serial-communication-fx30s/3287/4 "2018-05-18T09:27:30Z")

</div>

I don’t have FX30S, instead I try attached UART echo application on UART2 on my MangOH green board, it is working fine. Maybe you can have a try.[UART\_Test1.rar](https://forum.legato.io/uploads/short-url/7GAe5TKCqNh9ba8LjyLBlQbn1KK.rar) (77.2 KB)

I am using legato 16.10.4.

---

<div class="post-metadata">

**Author:** ![baiticpruebas](https://avatars.discourse-cdn.com/v4/letter/b/f475e1/32.png) [@baiticpruebas](https://forum.legato.io/u/baiticpruebas)\
**Post date:** [May 18, 2018, 11:57am UTC](https://forum.legato.io/t/legato-serial-communication-fx30s/3287/5 "2018-05-18T11:57:27Z")

</div>

Thanks a lot! I tried with that application in my FX30S (after migrating to a Legato application), but it doesnt work. It seems like the program read once (but i dont wrote nothing) and then gets freezed waiting for new bytes to read:

May 18 11:51:02 | prueba[1219]/pruebaComponent T=main | pruebaComponent.c \_pruebaComponent\_COMPONENT\_INIT() 118 | UART\_TEST  
May 18 11:51:02 | prueba[1219]/pruebaComponent T=main | pruebaComponent.c echo\_test() 33 | before read()  
May 18 11:51:02 | prueba[1219]/pruebaComponent T=main | pruebaComponent.c echo\_test() 38 | read 1 bytes ==  
May 18 11:51:02 | prueba[1219]/pruebaComponent T=main | pruebaComponent.c echo\_test() 33 | before read()

I am also using that version of legato.

---

<div class="post-metadata">

**Author:** ![jyijyi](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.legato.io/jyijyi/32/822_2.png) [@jyijyi](https://forum.legato.io/u/jyijyi)\
**Post date:** [May 18, 2018, 2:10pm UTC](https://forum.legato.io/t/legato-serial-communication-fx30s/3287/6 "2018-05-18T14:10:20Z")

</div>

Yes, you need to type something on uart2 with buad rate 115200 and see if the application can receive the data.

I am not quite sure if fx30s is using uart1 ot uart2.

---

<div class="post-metadata">

**Author:** ![baiticpruebas](https://avatars.discourse-cdn.com/v4/letter/b/f475e1/32.png) [@baiticpruebas](https://forum.legato.io/u/baiticpruebas)\
**Post date:** [May 21, 2018, 8:24am UTC](https://forum.legato.io/t/legato-serial-communication-fx30s/3287/7 "2018-05-21T08:24:07Z")

</div>

Hi again! It seems that the error is solved. Your code is totally correct. The problem was that I updated de FX30S firmware wrong. Now, with the firmware obtained from [https://source.sierrawireless.com/resources/airlink/software\_downloads/fx30-firmware/fx30-firmware/](https://source.sierrawireless.com/resources/airlink/software_downloads/fx30-firmware/fx30-firmware/), i can see the ttyHSL0 port and then is possible to use it in your program. Now works like a charm. Thanks a lot!
