From: Dennis Borgmann <dennis.borgmann@googlemail.com>
To: linux-serial@vger.kernel.org
Subject: Reading more than 255 bytes at once
Date: Tue, 25 Jan 2011 15:52:47 +0100 [thread overview]
Message-ID: <4D3EE3BF.80703@googlemail.com> (raw)
Hello linux-serial list!
I am using termios to process data on a /dev/ttyUSB*-port. Data is
coming in on one of these ports in burst of over 500bytes. I am doing
this with kernel 2.6.33.7, which contains FTDI-driver in Version 1.5.0.
My serial-hardware is a FT4232 and I am using non-canonical input.
My problem is, that I can only read bursts of up to 255 bytes, since the
array of control characters within the kernel named c_cc represents only
an unsigned char. So, if I set a value higher than 255 to c_cc[VMIN], it
won't be set the way I want within the kernel.
How would it be possible to read bursts of over 255 bytes? Right now I
am doing a workaround, which checks for data within the buffer (ioctl
SIOCINQ) of the serial driver and as soon as it gets above a wanted
value (let's say 501 bytes), I read the buffer and flush it.
I would rather like to do this with select(2) in combination with
read(2), which only returns after 501 bytes are available.
I already sent this question on ftdi-usb-sio-devel and privately to the
developers of the FTDI-driver in use without any success.
Is there a way to do this?
Very kind regards,
Dennis
reply other threads:[~2011-01-25 14:52 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4D3EE3BF.80703@googlemail.com \
--to=dennis.borgmann@googlemail.com \
--cc=linux-serial@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.