RE: [gtk-list] GTK+, Text Widget & Modem

Try messing with ioctl settings on ttyS1

read man pages on ioctl and termio to see how to use it, but what you
need to do is to set non-canonical mode for that device.  You also have
to mess with the timeout and min_chars fields of the ioctl structure to
get it working cleanly.

It has been a long time (8+ years) since I have had to write low level
UNIX serial control stuff in C, so I am quite rusty in that area.How
nice it is that such ancient knowledge is still relevant today ! Compare
that with using Win 2.1 API code on a 'modern' NT box ... urgh !

> 1)  I'm using gdk_input_add() to monitor an opened canonical file
> descriptor to /dev/ttyS1.  My routine simply adds the text grabbed
> here
> to the text window.  But it always waits for a CR before it sends it.
> How can I get a character by character screen update?  Should I use
> GTK's idle functions and constantly read the file descriptor?

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]