Re: linux serial buffer question

From: Grant Edwards (grante_at_visi.com)
Date: 11/30/04


Date: 30 Nov 2004 17:10:02 GMT

On 2004-11-30, Eric Spaulding <elsNOSPAM24@cornell.edu> wrote:

> Is there an easy way to increase my receive serial buffer in linux?

You'd have to rebuild the kernel after modifying the sources to
the tty line discipline module.

> It looks like it's currently set at 4096 bytes.

Right. The last time I looked it's set to one page. On IA32
that's 4K.

> I'm using pyserial + python and would like to read larger
> chunks than this at one time.

Why not wrap the read() method in three lines of python to keep
calling read() until you get the desired amount of data? Just
subclass the serial port object, override the read() method
with a loop that calls the super's read.

-- 
Grant Edwards                   grante             Yow!  I'd like some JUNK
                                  at               FOOD... and then I want to
                               visi.com            be ALONE --


Relevant Pages

  • mmap vs mtime in 2.6.26
    ... It has some literature, most notably kernel bug #2645, but that's ... http://lkml.org/lkml/2008/1/22/370 is present in my kernel. ... Not modifying junk... ... Flushing data using msync... ...
    (Linux-Kernel)
  • Re: mtx_lock_do_what_i_mean()
    ... kernel from anything to which we have a TTY attached. ... at printf() as a means to write to the message buffer only. ... and 2) something you can do by going through the TTY ... The fact that currently the console is used by both does ...
    (freebsd-arch)
  • Re: [OT] Re: writing tsr in c
    ... TSRs were often ... sort of dynamic-loaded kernel extension. ... and "tty". ... ordinary OS services in ordinary ways, rather than special services ...
    (comp.programming)
  • Re: Does anybody have samples about replacing kernel functions via a LKM?
    ... >> I don't want to modify the kernel. ... >> can intercept the kmalloc and then replace it with my own function. ... modifying kmalloc for ALL the kernel and modifying it for just his ... And then you load a module first which provides xmalloc, ...
    (comp.os.linux.development.system)
  • Re: Running Process + Disk Image
    ... > simpler and safer than modifying the original binary program image. ... kernel code is there too, ... If you're unsure of what's Possible, ... do if your employer gave you this software spec to implement: ...
    (comp.unix.programmer)