uart buffer size

All ESP32 boards running MicroPython.
Target audience: MicroPython users with an ESP32 board.
Post Reply
User avatar
devnull
Posts: 473
Joined: Sat Jan 07, 2017 1:52 am
Location: Singapore / Cornwall
Contact:

uart buffer size

Post by devnull » Sat May 05, 2018 10:37 am

Hi;

What is the buffer size on the esp32 uart, it seems to be very small, somewhere around 260 bytes.

I am reading data from a GSM device and re loosing a whole chunk out of the middle of the data when reading the message list.

Any reason why this buffer could not be made user-configurable ?

User avatar
pythoncoder
Posts: 5956
Joined: Fri Jul 18, 2014 8:01 am
Location: UK
Contact:

A possible workround

Post by pythoncoder » Sun May 06, 2018 11:09 am

I appreciate this doesn't answer your question but I've been using the uasyncio StreamReader class. I tested this by running simultaneous UART I/O over a loopback with long line lengths. On the Pyboard the readline method can fail if the line length is longer than the buffer size and I was expecting to see the same on the ESP32. But I couldn't break it ;)

So in the absence of a fix you might like to try this approach. There is some sample code in my uasyncio tutorial.
Peter Hinch
Index to my micropython libraries.

Baeverell
Posts: 1
Joined: Tue May 11, 2021 11:08 am

Re: uart buffer size

Post by Baeverell » Tue May 11, 2021 11:13 am


Post Reply