# AT Commands Server & UART

**URL:** <https://forum.legato.io/t/at-commands-server-uart/4747>\
**Category:** Uncategorized\
**Created:** [October 2, 2019, 1:08pm UTC](https://forum.legato.io/t/at-commands-server-uart/4747 "2019-10-02T13:08:14Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![AE\_1](https://avatars.discourse-cdn.com/v4/letter/a/a88e57/32.png) [@AE\_1](https://forum.legato.io/u/AE_1)\
**Post date:** [October 2, 2019, 1:08pm UTC](https://forum.legato.io/t/at-commands-server-uart/4747/1 "2019-10-02T13:08:14Z")

</div>

Hello all,

I am using AT Commands Server, for that I bind UART1 (!MAPUART=17,1). So I can send my own at commands to my application. It works well. But the issue is that UART1 goes into sleep mode after 5 s, even +KSLEEP is set 2. AT+KSLEEP=2 means Module never enters sleep mode.  
Using UART1 as at command interface (!MAPUART=1,1), Module never enters sleep mode.  
I using legato 19.07.0.  
Does anyone have an idea how the issue can be solved?

---

<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:** [October 2, 2019, 1:31pm UTC](https://forum.legato.io/t/at-commands-server-uart/4747/2 "2019-10-02T13:31:57Z")

</div>

How about this?

> **[Problem with Reading UART](https://forum.sierrawireless.com/t/problem-with-reading-uart/13322/2)**
>
> Which module are you using ? I remember in WP77 R8, the UART will go to sleep mode after some time. Maybe you can have a try on R9 FW. Or you can try using a timer to periodically wake up the UART; #define TIMER\_INTERVAL\_SEC 1 #define...

---

<div class="post-metadata">

**Author:** ![lazzox](https://avatars.discourse-cdn.com/v4/letter/l/b9bd4f/32.png) [@lazzox](https://forum.legato.io/u/lazzox)\
**Post date:** [October 2, 2019, 2:26pm UTC](https://forum.legato.io/t/at-commands-server-uart/4747/3 "2019-10-02T14:26:08Z")

</div>

Probably power saving is activated, you can install devmode as a quick/dirty fix. Or add calls to power manager in your application and disable power saving mode trough legato commands.

---

<div class="post-metadata">

**Author:** ![AE\_1](https://avatars.discourse-cdn.com/v4/letter/a/a88e57/32.png) [@AE\_1](https://forum.legato.io/u/AE_1)\
**Post date:** [October 2, 2019, 4:58pm UTC](https://forum.legato.io/t/at-commands-server-uart/4747/4 "2019-10-02T16:58:11Z")

</div>

Hello,  
the advice of jyijyi solved my issue.  
thanks.

---

<div class="post-metadata">

**Author:** ![mrjoso](https://avatars.discourse-cdn.com/v4/letter/m/9e8a1a/32.png) [@mrjoso](https://forum.legato.io/u/mrjoso)\
**Post date:** [May 21, 2020, 2:33pm UTC](https://forum.legato.io/t/at-commands-server-uart/4747/5 "2020-05-21T14:33:40Z")

</div>

In WP7702 the UART1 driver have the power management independent of system suspend/resume.  
UART1 wakeup can be triggered by RX or TX activity. But before it wakes up from RX, it loses several bits from the RX and then got out of sync.

The default auto suspend delay is 5 second.

root@swi-mdm9x28-wp:~# cat /sys/devices/platform/msm\_serial\_hs.0/power/autosuspend\_delay\_ms  
5000

There is a possiblility to increase this auto suspend by changing this value.  
E.g. change the suspend delay to 20 sec:

echo 20000 \> /sys/devices/platform/msm\_serial\_hs.0/power/autosuspend\_delay\_ms

Maybe there is a possiblility to disable the suspend completely.

---

<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:** [February 3, 2021, 6:17am UTC](https://forum.legato.io/t/at-commands-server-uart/4747/6 "2021-02-03T06:17:12Z")

</div>

To disable the UART auto suspend behavior, you can try the following command:

echo -1 \> /sys/devices/78b0000.uart/power/autosuspend\_delay\_ms

---

<div class="post-metadata">

**Author:** ![nilsa](https://avatars.discourse-cdn.com/v4/letter/n/cab0a1/32.png) [@nilsa](https://forum.legato.io/u/nilsa)\
**Post date:** [January 11, 2022, 10:34am UTC](https://forum.legato.io/t/at-commands-server-uart/4747/7 "2022-01-11T10:34:54Z")

</div>

👍  
And to disable auto suspend on UART2:

`echo -1 > /sys/devices/78af000.uart/power/autosuspend_delay_ms`
