# FX30s - Using UART1 & 2 in legato app

**URL:** <https://forum.sierrawireless.com/t/fx30s-using-uart1-2-in-legato-app/16756>\
**Category:** FX30\
**Created:** [June 24, 2019, 2:35pm UTC](https://forum.sierrawireless.com/t/fx30s-using-uart1-2-in-legato-app/16756 "2019-06-24T14:35:48Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![bastien0530](https://avatars.discourse-cdn.com/v4/letter/b/43a26b/32.png) [@bastien0530](https://forum.sierrawireless.com/u/bastien0530)\
**Post date:** [June 24, 2019, 2:35pm UTC](https://forum.sierrawireless.com/t/fx30s-using-uart1-2-in-legato-app/16756/1 "2019-06-24T14:35:48Z")

</div>

Hi everyone !

I am a new user of the modem FX30s and the development platform legato.  
As an introduction, I already successfuly experiment some basics applications like HelloWorld or blinking debug led with timers.  
But now I would like to develop an application which use UART1 & 2. My project consist in developping the software who spy the AT command communication between a datalogger and the modem and send some of these on an IOT Lorawan card (UART2).

Actually I tried a simple echo on uart1 mode rs232 (!MAPUART=15,1). I can builded and installed the application on the FX30 but I can’t launch the app (Application ‘UART\_Test1’ is not installed. However when I check with app status, I can see the application with the state [stopped]. My software is the same as [https://forum.legato.io/t/legato-serial-communication-fx30s/3287/3](https://forum.legato.io/t/legato-serial-communication-fx30s/3287/3) , I just changed the component.cdef with [rw] /dev/ttyHS0 /dev/ttyHS0.

Secondly, I would like to know if there is a chance to perform AT commands with a legato app because of the requirements of my application.

Best Regards,

Bastien

---

<div class="post-metadata">

**Author:** ![cchenry](https://avatars.discourse-cdn.com/v4/letter/c/a183cd/32.png) [@cchenry](https://forum.sierrawireless.com/u/cchenry)\
**Post date:** [June 25, 2019, 2:20am UTC](https://forum.sierrawireless.com/t/fx30s-using-uart1-2-in-legato-app/16756/2 "2019-06-25T02:20:46Z")

</div>

Hi Bastien,  
Please monitor the log by typing “logread -f”

In a separate session, try starting your app:  
app start UART\_test1

Then you can see the logs why your app isn’t starting.

You can send AT commands from your app if you open /dev/ttyAT

BR,  
Chris

---

<div class="post-metadata">

**Author:** ![bastien0530](https://avatars.discourse-cdn.com/v4/letter/b/43a26b/32.png) [@bastien0530](https://forum.sierrawireless.com/u/bastien0530)\
**Post date:** [June 25, 2019, 9:17am UTC](https://forum.sierrawireless.com/t/fx30s-using-uart1-2-in-legato-app/16756/3 "2019-06-25T09:17:41Z")

</div>

Hi Chris,  
Thanks for your reply,

I had this log, it seems that the modem can’t find the tty file for HS0 :

Jun 25 09:07:04 fx30s user.err Legato: =ERR= | supervisor[524]/supervisor T=main | app.c GetDevID() 629 | Could not get file info for ‘/dev/ttyHS0’. No such file or directory.  
Jun 25 09:07:04 fx30s authpriv.info dropbear[3284]: Exit (root): Disconnect received

BR,  
Bastien

---

<div class="post-metadata">

**Author:** ![cchenry](https://avatars.discourse-cdn.com/v4/letter/c/a183cd/32.png) [@cchenry](https://forum.sierrawireless.com/u/cchenry)\
**Post date:** [June 26, 2019, 4:27am UTC](https://forum.sierrawireless.com/t/fx30s-using-uart1-2-in-legato-app/16756/4 "2019-06-26T04:27:35Z")

</div>

Hi Bastien,  
I assume you’re running R14.0.4.002.

Can you please check if the ttyHS0 device does indeed exist?

Did you reboot after the mapuart=15,1 command?

BR,  
Chris

---

<div class="post-metadata">

**Author:** ![bastien0530](https://avatars.discourse-cdn.com/v4/letter/b/43a26b/32.png) [@bastien0530](https://forum.sierrawireless.com/u/bastien0530)\
**Post date:** [June 26, 2019, 12:24pm UTC](https://forum.sierrawireless.com/t/fx30s-using-uart1-2-in-legato-app/16756/5 "2019-06-26T12:24:34Z")

</div>

Hi Chris,

Thanks for your help !  
Apparently the problem was my firmware, now it’s work.

I have a last question, Is there a way to communicate to the /dev/ttyHSL1 from the linux shell?  
I thought I should use

microcom -s BAUD\_RATE /dev/ttyHSL1

on the FX30S but that doesn’t work.

BR,  
Bastien

---

<div class="post-metadata">

**Author:** ![cchenry](https://avatars.discourse-cdn.com/v4/letter/c/a183cd/32.png) [@cchenry](https://forum.sierrawireless.com/u/cchenry)\
**Post date:** [June 28, 2019, 2:58pm UTC](https://forum.sierrawireless.com/t/fx30s-using-uart1-2-in-legato-app/16756/6 "2019-06-28T14:58:11Z")

</div>

Hi Bastien,  
You can try using “echo” or “cat” but I would recommend this only for testing or for a short script.  
BR,  
Chris
