# RTL8720DN Serial receive data not realtime?

**URL:** <https://forum.amebaiot.com/t/rtl8720dn-serial-receive-data-not-realtime/531>\
**Category:** Peripherals\
**Tags:** evb-bw16, rtl872xd\
**Created:** [May 13, 2021, 8:31am UTC](https://forum.amebaiot.com/t/rtl8720dn-serial-receive-data-not-realtime/531 "2021-05-13T08:31:11Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Alphi\_Jiang](https://sea2.discourse-cdn.com/flex016/user_avatar/forum.amebaiot.com/alphi_jiang/32/379_2.png) [@Alphi\_Jiang](https://forum.amebaiot.com/u/Alphi_Jiang)\
**Post date:** [May 13, 2021, 8:31am UTC](https://forum.amebaiot.com/t/rtl8720dn-serial-receive-data-not-realtime/531/1 "2021-05-13T08:31:11Z")

</div>

When I use BW16 UART to receive data from other modules, it often takes several seconds to receive it. Use the logic analyzer to capture UART signals from other modules and make sure they have been sent.. It seems that the UART is placed inside the Queue but I don’t know why not got Serial. available() is not fetched.

I guess is ring buffer, I trace source code now

the condition as below  
Serial1 → Debug log output (LOG\_UART)  
baudrate: 115200  
Serial → UART communications interface (LP\_UART)  
baudrate: 9600

void loop()  
{  
…  
parseData();  
…  
websocket.loop();  
}

void parseData() {  
while ( Serial.available() \> 0) {  
char ch = Serial.read();  
…  
}  
}

---

<div class="post-metadata">

**Author:** ![Alphi\_Jiang](https://sea2.discourse-cdn.com/flex016/user_avatar/forum.amebaiot.com/alphi_jiang/32/379_2.png) [@Alphi\_Jiang](https://forum.amebaiot.com/u/Alphi_Jiang)\
**Post date:** [May 14, 2021, 9:31am UTC](https://forum.amebaiot.com/t/rtl8720dn-serial-receive-data-not-realtime/531/2 "2021-05-14T09:31:14Z")

</div>

I find the reason it seems when send Websock SSL TCP packet Task is busy. uart data not post event to OS. and call Serial1.println is to long 77bytes . cause this issue

I porting Links2004 ArduinoWebsocket to RTL8720DN

now is work well

---

<div class="post-metadata">

**Author:** ![xidameng](https://sea2.discourse-cdn.com/flex016/user_avatar/forum.amebaiot.com/xidameng/32/18_2.png) [@xidameng](https://forum.amebaiot.com/u/xidameng)\
**Post date:** [May 17, 2021, 1:05am UTC](https://forum.amebaiot.com/t/rtl8720dn-serial-receive-data-not-realtime/531/3 "2021-05-17T01:05:20Z")

</div>

Congratulations！ 🙂 👍
