# Problem with Reading UART

**URL:** <https://forum.sierrawireless.com/t/problem-with-reading-uart/13322>\
**Category:** WP Series\
**Created:** [July 31, 2018, 4:21am UTC](https://forum.sierrawireless.com/t/problem-with-reading-uart/13322 "2018-07-31T04:21:26Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![jyijyi](https://sea1.discourse-cdn.com/flex025/user_avatar/forum.sierrawireless.com/jyijyi/32/4766_2.png) [@jyijyi](https://forum.sierrawireless.com/u/jyijyi)\
**Post date:** [July 31, 2018, 4:46am UTC](https://forum.sierrawireless.com/t/problem-with-reading-uart/13322/2 "2018-07-31T04:46:20Z")

</div>

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 TIMER\_INTERVAL\_uSEC 100000  
int fd1;  
static void tmrHandler(le\_timer\_Ref\_t timerRef) {  
//LE\_INFO(“INSIDE TIMER”);  
tcflow(fd1,TCION );

}  
COMPONENT\_INIT  
{

```
	fd1=OpenPort("/dev/ttyHS0");

	le_clk_Time_t clk = { .sec = TIMER_INTERVAL_SEC, .usec = TIMER_INTERVAL_uSEC };
	    le_timer_Ref_t adxlPollingTimer = le_timer_Create("ADXL_TIMER");
	    le_timer_SetRepeat(adxlPollingTimer, 1000);
	    le_timer_SetInterval(adxlPollingTimer, clk);
	    le_timer_SetHandler(adxlPollingTimer, tmrHandler);
	    le_timer_Start(adxlPollingTimer);
```

---

_[View the full topic](https://forum.sierrawireless.com/t/problem-with-reading-uart/13322)._
