# UART communication issue

**URL:** <https://mangoh.discourse.group/t/uart-communication-issue/83>\
**Category:** mangOH Green\
**Created:** [May 25, 2016, 2:20pm UTC](https://mangoh.discourse.group/t/uart-communication-issue/83 "2016-05-25T14:20:25Z")\
**Posts on this page:** 14\
**Page:** 2

<div class="post-metadata">

**Author:** ![tadera](https://avatars.discourse-cdn.com/v4/letter/t/f14d63/32.png) [@tadera](https://mangoh.discourse.group/u/tadera)\
**Post date:** [October 15, 2020, 11:02am UTC](https://mangoh.discourse.group/t/uart-communication-issue/83/21 "2020-10-15T11:02:20Z")

</div>

I just tried to get it running but I get the following error:

> Oct 15 12:46:20 swi-mdm9x28-wp user.info Legato: INFO | supervisor[842]/supervisor T=main | app.c app\_Start() 3420 | Starting app ‘UART’  
> Oct 15 12:46:20 swi-mdm9x28-wp user.err Legato: =ERR= | supervisor[842]/supervisor T=main | app.c GetDevID() 670 | Could not get file info for ‘/dev/ttyHSL0’. No such file or directory.  
> Oct 15 12:46:20 swi-mdm9x28-wp user.err Legato: =ERR= | supervisor[842]/supervisor T=main | app.c SetCfgDevicePermissions() 775 | Failed to set permissions (rw) for app ‘UART’ on device ‘/dev/ttyHSL0’.  
> Oct 15 12:46:20 swi-mdm9x28-wp user.err Legato: =ERR= | supervisor[842]/supervisor T=main | app.c app\_Start() 3452 | Failed to set Smack rules or set up app area.

The cdef file looks like this:

```
sources:
{
uart.cpp
}

requires:
{
   device:
{
    [rw] /dev/ttyHSL0		
    [rw] /dev/ttyHS0      
}
}

```

My setup looks like this:  
I inserted the IoT Breakout Board into the IoT0 slot and connected the Tx/Rx pins of the board to the Rx/Tx pins of a UART USB dongle.

I want to send a test message from the module to Putty using UART1.

---

<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:** [October 15, 2020, 12:38pm UTC](https://mangoh.discourse.group/t/uart-communication-issue/83/22 "2020-10-15T12:38:03Z")

</div>

What is the return of at!mapuart?  
What is the return in console “ls /dev/ttyHS\*”

---

<div class="post-metadata">

**Author:** ![tadera](https://avatars.discourse-cdn.com/v4/letter/t/f14d63/32.png) [@tadera](https://mangoh.discourse.group/u/tadera)\
**Post date:** [October 15, 2020, 1:15pm UTC](https://mangoh.discourse.group/t/uart-communication-issue/83/23 "2020-10-15T13:15:40Z")

</div>

root@swi-mdm9x28-wp:~# ls /dev/ttyHS\*  
/dev/ttyHS0 /dev/ttyHSL1

```
at!mapuart?
!MAPUART: 1,16

```

I already removed this line in the cdef file:

```
/dev/ttyHSL0

```

I also ran the following command:

```
root@swi-mdm9x28-wp:~# stty -F /dev/ttyHS0 -a

```

resulting in:

```
speed 0 baud;stty: /dev/ttyHS0
line = 0;
intr = ^C; quit = ^\; erase = ^?; kill = ^U; eof = ^D; eol = <undef>; 
eol2 = <undef>; swtch = <undef>; start = ^Q; stop = ^S; susp = ^Z; rprnt = ^R;
werase = ^W; lnext = ^V; flush = ^O; min = 1; time = 0;
-parenb -parodd cs8 hupcl -cstopb cread clocal crtscts
-ignbrk -brkint -ignpar -parmrk -inpck -istrip -inlcr -igncr -icrnl -ixon
-ixoff -iuclc -ixany -imaxbel -iutf8
-opost -olcuc -ocrnl onlcr -onocr -onlret -ofill -ofdel nl0 cr0 tab0 bs0 vt0
ff0
-isig -icanon -iexten -echo echoe echok -echonl -noflsh -xcase -tostop -echoprt
echoctl echoke

```

> Oct 15 15:11:51 swi-mdm9x28-wp user.info Legato: INFO | supervisor[842]/supervisor T=main | app.c app\_Start() 3420 | Starting app ‘UART’  
> Oct 15 15:11:51 swi-mdm9x28-wp user.info Legato: INFO | supervisor[842]/supervisor T=main | app.c CreateFileLink() 2034 | Skipping file link ‘/dev/log’ to ‘/legato/systems/current/appsWriteable/UART/dev/log’: Already exists  
> Oct 15 15:11:51 swi-mdm9x28-wp user.info Legato: INFO | supervisor[842]/supervisor T=main | app.c CreateFileLink() 2034 | Skipping file link ‘/dev/null’ to ‘/legato/systems/current/appsWriteable/UART/dev/null’: Already exists  
> Oct 15 15:11:51 swi-mdm9x28-wp user.info Legato: INFO | supervisor[842]/supervisor T=main | app.c CreateFileLink() 2034 | Skipping file link ‘/dev/zero’ to ‘/legato/systems/current/appsWriteable/UART/dev/zero’: Already exists  
> Oct 15 15:11:51 swi-mdm9x28-wp user.info Legato: INFO | supervisor[842]/supervisor T=main | app.c CreateFileLink() 2034 | Skipping file link ‘/legato/systems/current/lib/liblegato.so’ to ‘/legato/systems/current/appsWriteable/UART/lib/liblegato.so’: Already exists  
> Oct 15 15:11:51 swi-mdm9x28-wp user.info Legato: INFO | supervisor[842]/supervisor T=main | app.c CreateFileLink() 2034 | Skipping file link ‘/lib/ld-linux.so.3’ to ‘/legato/systems/current/appsWriteable/UART/lib/ld-linux.so.3’: Already exists  
> Oct 15 15:11:51 swi-mdm9x28-wp user.info Legato: INFO | supervisor[842]/supervisor T=main | app.c CreateFileLink() 2034 | Skipping file link ‘/lib/libc.so.6’ to ‘/legato/systems/current/appsWriteable/UART/lib/libc.so.6’: Already exists  
> Oct 15 15:11:51 swi-mdm9x28-wp user.info Legato: INFO | supervisor[842]/supervisor T=main | app.c CreateFileLink() 2034 | Skipping file link ‘/lib/libpthread.so.0’ to ‘/legato/systems/current/appsWriteable/UART/lib/libpthread.so.0’: Already exists  
> Oct 15 15:11:51 swi-mdm9x28-wp user.info Legato: INFO | supervisor[842]/supervisor T=main | app.c CreateFileLink() 2034 | Skipping file link ‘/lib/librt.so.1’ to ‘/legato/systems/current/appsWriteable/UART/lib/librt.so.1’: Already exists  
> Oct 15 15:11:51 swi-mdm9x28-wp user.info Legato: INFO | supervisor[842]/supervisor T=main | app.c CreateFileLink() 2034 | Skipping file link ‘/lib/libdl.so.2’ to ‘/legato/systems/current/appsWriteable/UART/lib/libdl.so.2’: Already exists  
> Oct 15 15:11:51 swi-mdm9x28-wp user.info Legato: INFO | supervisor[842]/supervisor T=main | app.c CreateFileLink() 2034 | Skipping file link ‘/lib/libgcc\_s.so.1’ to ‘/legato/systems/current/appsWriteable/UART/lib/libgcc\_s.so.1’: Already exists  
> Oct 15 15:11:51 swi-mdm9x28-wp user.info Legato: INFO | supervisor[842]/supervisor T=main | app.c CreateFileLink() 2034 | Skipping file link ‘/lib/libm.so.6’ to ‘/legato/systems/current/appsWriteable/UART/lib/libm.so.6’: Already exists  
> Oct 15 15:11:51 swi-mdm9x28-wp user.info Legato: INFO | supervisor[842]/supervisor T=main | app.c CreateFileLink() 2034 | Skipping file link ‘/usr/lib/libstdc++.so.6’ to ‘/legato/systems/current/appsWriteable/UART/lib/libstdc++.so.6’: Already exists  
> Oct 15 15:11:51 swi-mdm9x28-wp user.info Legato: INFO | supervisor[842]/supervisor T=main | app.c CreateFileLink() 2034 | Skipping file link ‘/legato/systems/current/apps/UART/read-only/lib/libComponent\_UARTComp.so’ to '/legato/systems/current/appsWriteable/UART/lib/libCompo  
> Oct 15 15:11:51 swi-mdm9x28-wp user.info Legato: INFO | supervisor[842]/supervisor T=main | app.c CreateFileLink() 2034 | Skipping file link ‘/legato/systems/current/apps/UART/read-only/bin/UART’ to ‘/legato/systems/current/appsWriteable/UART/bin/UART’: Already exists  
> Oct 15 15:11:51 swi-mdm9x28-wp user.info Legato: INFO | supervisor[842]/supervisor T=main | app.c CreateFileLink() 2034 | Skipping file link ‘/dev/ttyHS0’ to ‘/legato/systems/current/appsWriteable/UART/dev/ttyHS0’: Already exists  
> Oct 15 15:11:51 swi-mdm9x28-wp user.info Legato: INFO | supervisor[842]/supervisor T=main | app.c CreateTmpFs() 1738 | Mounted tmpfs at /legato/systems/current/appsWriteable/UART/tmp.  
> Oct 15 15:11:51 swi-mdm9x28-wp user.info Legato: INFO | supervisor[842]/supervisor T=main | app.c CreateFileLink() 2104 | Created file link ‘/tmp/legato/serviceDirectoryServer’ to ‘/legato/systems/current/appsWriteable/UART/tmp/legato/serviceDirectoryServer’.  
> Oct 15 15:11:51 swi-mdm9x28-wp user.info Legato: INFO | supervisor[842]/supervisor T=main | app.c CreateFileLink() 2104 | Created file link ‘/tmp/legato/serviceDirectoryClient’ to ‘/legato/systems/current/appsWriteable/UART/tmp/legato/serviceDirectoryClient’.  
> Oct 15 15:11:51 swi-mdm9x28-wp user.info Legato: INFO | supervisor[842]/supervisor T=main | resourceLimits.c SetRLimitValue() 282 | Setting resource limit maxCoreDumpFileBytes to value 102400.  
> Oct 15 15:11:51 swi-mdm9x28-wp user.info Legato: INFO | supervisor[842]/supervisor T=main | resourceLimits.c SetRLimitValue() 282 | Setting resource limit maxFileBytes to value 102400.  
> Oct 15 15:11:51 swi-mdm9x28-wp user.info Legato: INFO | supervisor[842]/supervisor T=main | resourceLimits.c SetRLimitValue() 282 | Setting resource limit maxLockedMemoryBytes to value 8192.  
> Oct 15 15:11:51 swi-mdm9x28-wp user.info Legato: INFO | supervisor[842]/supervisor T=main | resourceLimits.c SetRLimitValue() 282 | Setting resource limit maxFileDescriptors to value 256.  
> Oct 15 15:11:51 swi-mdm9x28-wp user.info Legato: INFO | supervisor[842]/supervisor T=main | resourceLimits.c SetRLimitValue() 282 | Setting resource limit maxMQueueBytes to value 512.  
> Oct 15 15:11:51 swi-mdm9x28-wp user.info Legato: INFO | supervisor[842]/supervisor T=main | resourceLimits.c SetRLimitValue() 282 | Setting resource limit maxThreads to value 20.  
> Oct 15 15:11:51 swi-mdm9x28-wp user.info Legato: INFO | supervisor[842]/supervisor T=main | resourceLimits.c SetRLimitValue() 282 | Setting resource limit maxQueuedSignals to value 100.  
> Oct 15 15:11:51 swi-mdm9x28-wp user.info Legato: INFO | supervisor[842]/supervisor T=main | proc.c proc\_Start() 1390 | Starting process ‘UART’ with pid 21296  
> Oct 15 15:11:51 swi-mdm9x28-wp user.info Legato: INFO | supervisor[21296]/supervisor T=main | proc.c proc\_Start() 1355 | Execing ‘UART’  
> Oct 15 13:11:51 swi-mdm9x28-wp user.debug Legato: DBUG | _UNKNOWN_[21296]/framework T=unknown | LE\_FILENAME InitPool() 295 | Memory pool name ‘framework.hashMap\_refPathIteratorMap’ is truncated to ‘framework.hashMap\_refPathIterat’  
> Oct 15 13:11:51 swi-mdm9x28-wp user.debug Legato: DBUG | _UNKNOWN_[21296]/framework T=main | LE\_FILENAME InitPool() 295 | Memory pool name ‘framework.hashMap\_refEventHandlers’ is truncated to ‘framework.hashMap\_refEventHandl’  
> Oct 15 13:11:51 swi-mdm9x28-wp user.debug Legato: DBUG | _UNKNOWN_[21296]/framework T=main | LE\_FILENAME InitPool() 295 | Memory pool name ‘framework.hashMap\_refDefault Timer SafeRe’ is truncated to ‘framework.hashMap\_refDefault Ti’  
> Oct 15 13:11:51 swi-mdm9x28-wp user.debug Legato: DBUG | _UNKNOWN_[21296]/framework T=main | LE\_FILENAME InitPool() 295 | Memory pool name ‘framework.MessagingClientInterfaces’ is truncated to ‘framework.MessagingClientInterf’  
> Oct 15 13:11:51 swi-mdm9x28-wp user.debug Legato: DBUG | _UNKNOWN_[21296]/framework T=main | LE\_FILENAME InitPool() 295 | Memory pool name ‘framework.hashMap\_refHandlersRef’ is truncated to ‘framework.hashMap\_refHandlersRe’  
> Oct 15 13:11:51 swi-mdm9x28-wp user.debug Legato: DBUG | _UNKNOWN_[21296]/framework T=main | LE\_FILENAME InitPool() 295 | Memory pool name ‘framework.hashMap\_MessagingServices’ is truncated to ‘framework.hashMap\_MessagingServ’  
> Oct 15 13:11:51 swi-mdm9x28-wp user.debug Legato: DBUG | _UNKNOWN_[21296]/framework T=main | LE\_FILENAME InitPool() 295 | Memory pool name ‘framework.hashMap\_MessagingClients’ is truncated to ‘framework.hashMap\_MessagingClie’  
> Oct 15 13:11:51 swi-mdm9x28-wp user.debug Legato: DBUG | _UNKNOWN_[21296]/framework T=main | LE\_FILENAME InitPool() 295 | Memory pool name ‘framework.PipelineSIGCHLD-reports’ is truncated to ‘framework.PipelineSIGCHLD-repor’  
> Oct 15 13:11:51 swi-mdm9x28-wp user.debug Legato: DBUG | _UNKNOWN_[21296]/framework T=main | LE\_FILENAME fs\_Init() 840 | FS prefix path “/data/le\_fs/”  
> Oct 15 13:11:51 swi-mdm9x28-wp user.debug Legato: DBUG | _UNKNOWN_[21296]/framework T=main | LE\_FILENAME InitPool() 295 | Memory pool name ‘framework.hashMap\_refFsFileRefMap’ is truncated to ‘framework.hashMap\_refFsFileRefM’  
> Oct 15 13:11:51 swi-mdm9x28-wp user.debug Legato: DBUG | _UNKNOWN_[21296]/framework T=main | LE\_FILENAME rand\_Init() 71 | getrandom function: 0xb6d58150  
> Oct 15 13:11:51 swi-mdm9x28-wp user.debug Legato: DBUG | _UNKNOWN_[21296]/framework T=main | LE\_FILENAME le\_mem\_ForceAlloc() 833 | Memory pool ‘framework.DestructorObjs’ overflowed. Expanded to 1 blocks.  
> Oct 15 13:11:51 swi-mdm9x28-wp user.debug Legato: DBUG | _UNKNOWN_[21296]/ T=main | \_componentMain.c \_UARTComp\_Init() 26 | Initializing UARTComp component library.  
> Oct 15 13:11:51 swi-mdm9x28-wp user.debug Legato: DBUG | UART[21296]/framework T=main | LE\_FILENAME InitPool() 295 | Memory pool name ‘framework.msgs-LogControlProtocol’ is truncated to ‘framework.msgs-LogControlProtoc’  
> Oct 15 13:11:51 swi-mdm9x28-wp user.debug Legato: DBUG | UART[21296]/framework T=main | LE\_FILENAME le\_mem\_ForceAlloc() 833 | Memory pool ‘framework.SigMonitor’ overflowed. Expanded to 1 blocks.  
> Oct 15 13:11:51 swi-mdm9x28-wp user.debug Legato: DBUG | UART[21296]/framework T=main | LE\_FILENAME le\_mem\_ForceAlloc() 833 | Memory pool ‘framework.SigHandler’ overflowed. Expanded to 1 blocks.  
> Oct 15 13:11:51 swi-mdm9x28-wp user.debug Legato: DBUG | UART[21296]/UART\_exe T=main | \_main.c main() 60 | == Starting Event Processing Loop ==  
> Oct 15 13:11:51 swi-mdm9x28-wp user.info Legato: INFO | UART[21296]/UARTComp T=main | uart.cpp \_UARTComp\_COMPONENT\_INIT() 173 | app runProc UART\_TCP\_Demo1 UART\_TCP\_Demo1 --exe=uart –   
> Oct 15 13:11:51 swi-mdm9x28-wp user.info Legato: INFO | UART[21296]/UARTComp T=main | uart.cpp \_UARTComp\_COMPONENT\_INIT() 174 | : /dev/HSL1 /dev/HS0  
> Oct 15 13:11:51 swi-mdm9x28-wp user.info Legato: INFO | UART[21296]/UARTComp T=main | uart.cpp \_UARTComp\_COMPONENT\_INIT() 175 | : 4800, 9600, 19200, 115200

The last couple of lines of the logread tell me that, in the sample you’ve shared here, the condition:

```
COMPONENT_INIT{
   if (le_arg_NumArgs() >= 4){ 
    ... }

```

is never met.

---

<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:** [October 15, 2020, 1:47pm UTC](https://mangoh.discourse.group/t/uart-communication-issue/83/24 "2020-10-15T13:47:19Z")

</div>

You need to set

At!mapuart=17,1

And then “at!reset” to reset the module.

After reboot, you should use /dev/ttyHS0 for uart1 as data mode.

---

<div class="post-metadata">

**Author:** ![tadera](https://avatars.discourse-cdn.com/v4/letter/t/f14d63/32.png) [@tadera](https://mangoh.discourse.group/u/tadera)\
**Post date:** [October 15, 2020, 2:02pm UTC](https://mangoh.discourse.group/t/uart-communication-issue/83/25 "2020-10-15T14:02:13Z")

</div>

After I did what you supposed this is the output:

```
root@swi-mdm9x28-wp:~# microcom /dev/ttyAT
at!mapuart?
!MAPUART: 17,16
```

---

<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:** [October 15, 2020, 2:02pm UTC](https://mangoh.discourse.group/t/uart-communication-issue/83/26 "2020-10-15T14:02:51Z")

</div>

Yes, 17 means uart1 in data mode

---

<div class="post-metadata">

**Author:** ![tadera](https://avatars.discourse-cdn.com/v4/letter/t/f14d63/32.png) [@tadera](https://mangoh.discourse.group/u/tadera)\
**Post date:** [October 15, 2020, 2:09pm UTC](https://mangoh.discourse.group/t/uart-communication-issue/83/27 "2020-10-15T14:09:31Z")

</div>

But it’s not the same output as you suggested (17,1)

The log still looks like the one before.

> Oct 15 16:07:19 swi-mdm9x28-wp user.info Legato: INFO | supervisor[837]/supervisor T=main | app.c app\_Start() 3420 | Starting app ‘UART’  
> Oct 15 16:07:19 swi-mdm9x28-wp user.info Legato: INFO | supervisor[837]/supervisor T=main | app.c CreateFileLink() 2034 | Skipping file link ‘/dev/log’ to ‘/legato/systems/current/appsWriteable/UART/dev/log’: Already exists  
> Oct 15 16:07:19 swi-mdm9x28-wp user.info Legato: INFO | supervisor[837]/supervisor T=main | app.c CreateFileLink() 2034 | Skipping file link ‘/dev/null’ to ‘/legato/systems/current/appsWriteable/UART/dev/null’: Already exists  
> Oct 15 16:07:19 swi-mdm9x28-wp user.info Legato: INFO | supervisor[837]/supervisor T=main | app.c CreateFileLink() 2034 | Skipping file link ‘/dev/zero’ to ‘/legato/systems/current/appsWriteable/UART/dev/zero’: Already exists  
> Oct 15 16:07:19 swi-mdm9x28-wp user.info Legato: INFO | supervisor[837]/supervisor T=main | app.c CreateFileLink() 2034 | Skipping file link ‘/legato/systems/current/lib/liblegato.so’ to ‘/legato/systems/current/appsWriteable/UART/lib/liblegato.so’: Already exists  
> Oct 15 16:07:19 swi-mdm9x28-wp user.info Legato: INFO | supervisor[837]/supervisor T=main | app.c CreateFileLink() 2034 | Skipping file link ‘/lib/ld-linux.so.3’ to ‘/legato/systems/current/appsWriteable/UART/lib/ld-linux.so.3’: Already exists  
> Oct 15 16:07:19 swi-mdm9x28-wp user.info Legato: INFO | supervisor[837]/supervisor T=main | app.c CreateFileLink() 2034 | Skipping file link ‘/lib/libc.so.6’ to ‘/legato/systems/current/appsWriteable/UART/lib/libc.so.6’: Already exists  
> Oct 15 16:07:19 swi-mdm9x28-wp user.info Legato: INFO | supervisor[837]/supervisor T=main | app.c CreateFileLink() 2034 | Skipping file link ‘/lib/libpthread.so.0’ to ‘/legato/systems/current/appsWriteable/UART/lib/libpthread.so.0’: Already exists  
> Oct 15 16:07:19 swi-mdm9x28-wp user.info Legato: INFO | supervisor[837]/supervisor T=main | app.c CreateFileLink() 2034 | Skipping file link ‘/lib/librt.so.1’ to ‘/legato/systems/current/appsWriteable/UART/lib/librt.so.1’: Already exists  
> Oct 15 16:07:19 swi-mdm9x28-wp user.info Legato: INFO | supervisor[837]/supervisor T=main | app.c CreateFileLink() 2034 | Skipping file link ‘/lib/libdl.so.2’ to ‘/legato/systems/current/appsWriteable/UART/lib/libdl.so.2’: Already exists  
> Oct 15 16:07:19 swi-mdm9x28-wp user.info Legato: INFO | supervisor[837]/supervisor T=main | app.c CreateFileLink() 2034 | Skipping file link ‘/lib/libgcc\_s.so.1’ to ‘/legato/systems/current/appsWriteable/UART/lib/libgcc\_s.so.1’: Already exists  
> Oct 15 16:07:19 swi-mdm9x28-wp user.info Legato: INFO | supervisor[837]/supervisor T=main | app.c CreateFileLink() 2034 | Skipping file link ‘/lib/libm.so.6’ to ‘/legato/systems/current/appsWriteable/UART/lib/libm.so.6’: Already exists  
> Oct 15 16:07:19 swi-mdm9x28-wp user.info Legato: INFO | supervisor[837]/supervisor T=main | app.c CreateFileLink() 2034 | Skipping file link ‘/usr/lib/libstdc++.so.6’ to ‘/legato/systems/current/appsWriteable/UART/lib/libstdc++.so.6’: Already exists  
> Oct 15 16:07:19 swi-mdm9x28-wp user.info Legato: INFO | supervisor[837]/supervisor T=main | app.c CreateFileLink() 2034 | Skipping file link ‘/legato/systems/current/apps/UART/read-only/lib/libComponent\_UARTComp.so’ to '/legato/systems/current/appsWriteable/UART/lib/libCompo  
> Oct 15 16:07:19 swi-mdm9x28-wp user.info Legato: INFO | supervisor[837]/supervisor T=main | app.c CreateFileLink() 2034 | Skipping file link ‘/legato/systems/current/apps/UART/read-only/bin/UART’ to ‘/legato/systems/current/appsWriteable/UART/bin/UART’: Already exists  
> Oct 15 16:07:19 swi-mdm9x28-wp user.info Legato: INFO | supervisor[837]/supervisor T=main | app.c CreateFileLink() 2034 | Skipping file link ‘/dev/ttyHS0’ to ‘/legato/systems/current/appsWriteable/UART/dev/ttyHS0’: Already exists  
> Oct 15 16:07:19 swi-mdm9x28-wp user.info Legato: INFO | supervisor[837]/supervisor T=main | app.c CreateTmpFs() 1738 | Mounted tmpfs at /legato/systems/current/appsWriteable/UART/tmp.  
> Oct 15 16:07:19 swi-mdm9x28-wp user.info Legato: INFO | supervisor[837]/supervisor T=main | app.c CreateFileLink() 2104 | Created file link ‘/tmp/legato/serviceDirectoryServer’ to ‘/legato/systems/current/appsWriteable/UART/tmp/legato/serviceDirectoryServer’.  
> Oct 15 16:07:19 swi-mdm9x28-wp user.info Legato: INFO | supervisor[837]/supervisor T=main | app.c CreateFileLink() 2104 | Created file link ‘/tmp/legato/serviceDirectoryClient’ to ‘/legato/systems/current/appsWriteable/UART/tmp/legato/serviceDirectoryClient’.  
> Oct 15 16:07:19 swi-mdm9x28-wp user.info Legato: INFO | supervisor[837]/supervisor T=main | resourceLimits.c SetRLimitValue() 282 | Setting resource limit maxCoreDumpFileBytes to value 102400.  
> Oct 15 16:07:19 swi-mdm9x28-wp user.info Legato: INFO | supervisor[837]/supervisor T=main | resourceLimits.c SetRLimitValue() 282 | Setting resource limit maxFileBytes to value 102400.  
> Oct 15 16:07:19 swi-mdm9x28-wp user.info Legato: INFO | supervisor[837]/supervisor T=main | resourceLimits.c SetRLimitValue() 282 | Setting resource limit maxLockedMemoryBytes to value 8192.  
> Oct 15 16:07:19 swi-mdm9x28-wp user.info Legato: INFO | supervisor[837]/supervisor T=main | resourceLimits.c SetRLimitValue() 282 | Setting resource limit maxFileDescriptors to value 256.  
> Oct 15 16:07:19 swi-mdm9x28-wp user.info Legato: INFO | supervisor[837]/supervisor T=main | resourceLimits.c SetRLimitValue() 282 | Setting resource limit maxMQueueBytes to value 512.  
> Oct 15 16:07:19 swi-mdm9x28-wp user.info Legato: INFO | supervisor[837]/supervisor T=main | resourceLimits.c SetRLimitValue() 282 | Setting resource limit maxThreads to value 20.  
> Oct 15 16:07:19 swi-mdm9x28-wp user.info Legato: INFO | supervisor[837]/supervisor T=main | resourceLimits.c SetRLimitValue() 282 | Setting resource limit maxQueuedSignals to value 100.  
> Oct 15 16:07:19 swi-mdm9x28-wp user.info Legato: INFO | supervisor[837]/supervisor T=main | proc.c proc\_Start() 1390 | Starting process ‘UART’ with pid 2595  
> Oct 15 16:07:19 swi-mdm9x28-wp user.info Legato: INFO | supervisor[2595]/supervisor T=main | proc.c proc\_Start() 1355 | Execing ‘UART’  
> Oct 15 14:07:19 swi-mdm9x28-wp user.debug Legato: DBUG | _UNKNOWN_[2595]/framework T=unknown | LE\_FILENAME InitPool() 295 | Memory pool name ‘framework.hashMap\_refPathIteratorMap’ is truncated to ‘framework.hashMap\_refPathIterat’  
> Oct 15 14:07:19 swi-mdm9x28-wp user.debug Legato: DBUG | _UNKNOWN_[2595]/framework T=main | LE\_FILENAME InitPool() 295 | Memory pool name ‘framework.hashMap\_refEventHandlers’ is truncated to ‘framework.hashMap\_refEventHandl’  
> Oct 15 14:07:19 swi-mdm9x28-wp user.debug Legato: DBUG | _UNKNOWN_[2595]/framework T=main | LE\_FILENAME InitPool() 295 | Memory pool name ‘framework.hashMap\_refDefault Timer SafeRe’ is truncated to ‘framework.hashMap\_refDefault Ti’  
> Oct 15 14:07:19 swi-mdm9x28-wp user.debug Legato: DBUG | _UNKNOWN_[2595]/framework T=main | LE\_FILENAME InitPool() 295 | Memory pool name ‘framework.MessagingClientInterfaces’ is truncated to ‘framework.MessagingClientInterf’  
> Oct 15 14:07:19 swi-mdm9x28-wp user.debug Legato: DBUG | _UNKNOWN_[2595]/framework T=main | LE\_FILENAME InitPool() 295 | Memory pool name ‘framework.hashMap\_refHandlersRef’ is truncated to ‘framework.hashMap\_refHandlersRe’  
> Oct 15 14:07:19 swi-mdm9x28-wp user.debug Legato: DBUG | _UNKNOWN_[2595]/framework T=main | LE\_FILENAME InitPool() 295 | Memory pool name ‘framework.hashMap\_MessagingServices’ is truncated to ‘framework.hashMap\_MessagingServ’  
> Oct 15 14:07:19 swi-mdm9x28-wp user.debug Legato: DBUG | _UNKNOWN_[2595]/framework T=main | LE\_FILENAME InitPool() 295 | Memory pool name ‘framework.hashMap\_MessagingClients’ is truncated to ‘framework.hashMap\_MessagingClie’  
> Oct 15 14:07:19 swi-mdm9x28-wp user.debug Legato: DBUG | _UNKNOWN_[2595]/framework T=main | LE\_FILENAME InitPool() 295 | Memory pool name ‘framework.PipelineSIGCHLD-reports’ is truncated to ‘framework.PipelineSIGCHLD-repor’  
> Oct 15 14:07:19 swi-mdm9x28-wp user.debug Legato: DBUG | _UNKNOWN_[2595]/framework T=main | LE\_FILENAME fs\_Init() 840 | FS prefix path “/data/le\_fs/”  
> Oct 15 14:07:19 swi-mdm9x28-wp user.debug Legato: DBUG | _UNKNOWN_[2595]/framework T=main | LE\_FILENAME InitPool() 295 | Memory pool name ‘framework.hashMap\_refFsFileRefMap’ is truncated to ‘framework.hashMap\_refFsFileRefM’  
> Oct 15 14:07:19 swi-mdm9x28-wp user.debug Legato: DBUG | _UNKNOWN_[2595]/framework T=main | LE\_FILENAME rand\_Init() 71 | getrandom function: 0xb6c7a150  
> Oct 15 14:07:19 swi-mdm9x28-wp user.debug Legato: DBUG | _UNKNOWN_[2595]/framework T=main | LE\_FILENAME le\_mem\_ForceAlloc() 833 | Memory pool ‘framework.DestructorObjs’ overflowed. Expanded to 1 blocks.  
> Oct 15 14:07:19 swi-mdm9x28-wp user.debug Legato: DBUG | _UNKNOWN_[2595]/ T=main | \_componentMain.c \_UARTComp\_Init() 26 | Initializing UARTComp component library.  
> Oct 15 14:07:19 swi-mdm9x28-wp user.debug Legato: DBUG | UART[2595]/framework T=main | LE\_FILENAME InitPool() 295 | Memory pool name ‘framework.msgs-LogControlProtocol’ is truncated to ‘framework.msgs-LogControlProtoc’  
> Oct 15 14:07:19 swi-mdm9x28-wp user.debug Legato: DBUG | UART[2595]/framework T=main | LE\_FILENAME le\_mem\_ForceAlloc() 833 | Memory pool ‘framework.SigMonitor’ overflowed. Expanded to 1 blocks.  
> Oct 15 14:07:19 swi-mdm9x28-wp user.debug Legato: DBUG | UART[2595]/framework T=main | LE\_FILENAME le\_mem\_ForceAlloc() 833 | Memory pool ‘framework.SigHandler’ overflowed. Expanded to 1 blocks.  
> Oct 15 14:07:19 swi-mdm9x28-wp user.debug Legato: DBUG | UART[2595]/UART\_exe T=main | \_main.c main() 60 | == Starting Event Processing Loop ==  
> Oct 15 14:07:19 swi-mdm9x28-wp user.info Legato: INFO | UART[2595]/UARTComp T=main | uart.cpp \_UARTComp\_COMPONENT\_INIT() 173 | app runProc UART\_TCP\_Demo1 UART\_TCP\_Demo1 --exe=uart –   
> Oct 15 14:07:19 swi-mdm9x28-wp user.info Legato: INFO | UART[2595]/UARTComp T=main | uart.cpp \_UARTComp\_COMPONENT\_INIT() 174 | : /dev/HSL1 /dev/HS0  
> Oct 15 14:07:19 swi-mdm9x28-wp user.info Legato: INFO | UART[2595]/UARTComp T=main | uart.cpp \_UARTComp\_COMPONENT\_INIT() 175 | : 4800, 9600, 19200, 115200

---

<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:** [October 15, 2020, 2:14pm UTC](https://mangoh.discourse.group/t/uart-communication-issue/83/28 "2020-10-15T14:14:05Z")

</div>

Please download the AT commadlnd user guide and read at!mapuart.

Btw, how do you start the application?

---

<div class="post-metadata">

**Author:** ![tadera](https://avatars.discourse-cdn.com/v4/letter/t/f14d63/32.png) [@tadera](https://mangoh.discourse.group/u/tadera)\
**Post date:** [October 15, 2020, 2:18pm UTC](https://mangoh.discourse.group/t/uart-communication-issue/83/29 "2020-10-15T14:18:32Z")

</div>

I already did that.  
Nonetheless, it’s not working.

```
Usage:
• Execution: AT!MAPUART=<service>[,<uart>]
Response: OK
Purpose: Map the specified <service> to the specified <uart> (if no <uart> isspecified, UART1 is used).
• Query: AT!MAPUART?
Response: !MAPUART: <service (UART1)>[, <service (UART2)>]
OK
Purpose: Report the current mappings for both UARTs.
•Query List: AT!MAPUART=?
Purpose: Return the command format and the supported parameter values.
Parameters:
<service> (Service to map to a UART)
• 0—UART disabled
• 1—AT command service (Note: Not available for UART2)
• 2–3—Reserved
• 4—NMEA service
• 5–15—Reserved
• 16—Linux Console
• 17—Customer Linux application
<uart> (Physical UART)
• 1—UART1 (Default)
• 2—UART2

```

How can it be 17,16 when I run

```
AT!MAPUART=17,1
OK

```

I start the app like this:

```
root@swi-mdm9x28-wp:~# app start UART
```

---

<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:** [October 15, 2020, 2:23pm UTC](https://mangoh.discourse.group/t/uart-communication-issue/83/30 "2020-10-15T14:23:54Z")

</div>

If you want 17,16 for at!mapuart, you need to type  
At!mapuart=17,1  
At!mapuart=16,2

Also, you shoud not use “app start”  
Please read the document in the app note

---

<div class="post-metadata">

**Author:** ![tadera](https://avatars.discourse-cdn.com/v4/letter/t/f14d63/32.png) [@tadera](https://mangoh.discourse.group/u/tadera)\
**Post date:** [October 15, 2020, 2:29pm UTC](https://mangoh.discourse.group/t/uart-communication-issue/83/31 "2020-10-15T14:29:17Z")

</div>

I don’t want 17,16.  
I just ran “AT!MAPUART=17,1” on end up with what you recommended .

Can you be a little bit more concrete about how to set it to 17.1 and why I should not use app start?

---

<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:** [October 15, 2020, 2:31pm UTC](https://mangoh.discourse.group/t/uart-communication-issue/83/32 "2020-10-15T14:31:13Z")

</div>

Query and execution are different

• Execution: AT!MAPUART=[,]  
Response: OK  
Purpose: Map the specified to the specified (if no isspecified, UART1 is used).  
• Query: AT!MAPUART?  
Response: !MAPUART: \<service (UART1)\>[, \<service (UART2)\>]  
OK

---

<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:** [October 15, 2020, 2:33pm UTC](https://mangoh.discourse.group/t/uart-communication-issue/83/33 "2020-10-15T14:33:11Z")

</div>

If you use app start, you cannot pass argument to it.

Did you really read the document inside the app?

---

<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:** [October 15, 2020, 2:35pm UTC](https://mangoh.discourse.group/t/uart-communication-issue/83/34 "2020-10-15T14:35:08Z")

</div>

Here is another example on how to use uart

> **[Legato serial Communication FX30S](https://forum.legato.io/t/legato-serial-communication-fx30s/3287/4)**
>
> 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 (77.2 KB) I am using legato 16.10.4.

[Previous page](https://mangoh.discourse.group/t/uart-communication-issue/83.md?page=1)
