Go to advanced search

by zoalsay
Thu Sep 06, 2018 1:43 pm
Forum: C/C++
Topic: How to increase the serial recieve buffer size in C linux
Replies: 5
Views: 1575

Re: How to increase the serial recieve buffer size in C linux

Not found one. Which is odd! Seems to, on the whole, default to PAGE_SIZE which is 4096. A better way of dealing with this is to have your own buffer, and transfer data from the serial buffer to that using another thread. That way you can have whatever buffer size you need and can leave the serial ...
by zoalsay
Thu Sep 06, 2018 1:40 pm
Forum: C/C++
Topic: How to increase the serial recieve buffer size in C linux
Replies: 5
Views: 1575

Re: How to increase the serial recieve buffer size in C linux

joan wrote:
Thu Sep 06, 2018 1:25 pm
Do you know what the size defaults to on Linux? I always assumed it was a 16k bytes buffer but that may just be a faulty memory.
I am checking the available bytes in buffer using:
ioctl(hCom, FIONREAD, &avaialble_bytes);
It never exceeds 4095, I understood it is 4095 bytes.
by zoalsay
Thu Sep 06, 2018 1:01 pm
Forum: C/C++
Topic: How to increase the serial recieve buffer size in C linux
Replies: 5
Views: 1575

How to increase the serial recieve buffer size in C linux

Hi All, I am attaching a sensor( recognized as: /dev/ttyUSB0) that continuously send data to raspberry pi 3 B. I want to increase the UART (serial) USB receive input buffer to be able to store data more than the current (4095); is there anyway to do this in C under Linux? I used to do it in C under ...

Go to advanced search