Re: Help serial port communication

1998-01-29 Thread Carey Evans
Jens B. Jorgensen [EMAIL PROTECTED] writes: Carey Evans wrote: [...] I think it's generally necessary to do O_RDWR|O_NONBLOCK to open a disconnected serial port, then set CLOCAL with termios, and finally turn off O_NONBLOCK with fcntl. Of course, for just setting the speed it should

Re: Help serial port communication

1998-01-29 Thread Jens B. Jorgensen
Carey Evans wrote: Jens B. Jorgensen [EMAIL PROTECTED] writes: Carey Evans wrote: [...] I think it's generally necessary to do O_RDWR|O_NONBLOCK to open a disconnected serial port, then set CLOCAL with termios, and finally turn off O_NONBLOCK with fcntl. Of course, for just

Re: Help serial port communication

1998-01-28 Thread Carey Evans
Jens B. Jorgensen [EMAIL PROTECTED] writes: Here's some code you can build on: struct termios ti; int modem; modem = open(/dev/ttyS1, O_RDWR, 0); I think it's generally necessary to do O_RDWR|O_NONBLOCK to open a disconnected serial port, then set

Re: Help serial port communication

1998-01-28 Thread Jens B. Jorgensen
Carey Evans wrote: Jens B. Jorgensen [EMAIL PROTECTED] writes: Here's some code you can build on: struct termios ti; int modem; modem = open(/dev/ttyS1, O_RDWR, 0); I think it's generally necessary to do O_RDWR|O_NONBLOCK to open a

Re: Help serial port communication

1998-01-28 Thread C.J.LAWSON
Thanks to every one who responded to my message the help is very much appreciated ... Jonathan -- TO UNSUBSCRIBE FROM THIS MAILING LIST: e-mail the word unsubscribe to [EMAIL PROTECTED] . Trouble? e-mail to [EMAIL PROTECTED] .

Help serial port communication

1998-01-27 Thread C.J.LAWSON
Hi, I am trying to set the baud rate of one of my serial ports I am writing and application for and I am really at a loss. I have even tried to use the setserial package, however I cannot get it to work (probably because I do not understand the documentation). Does anyone have/know of any code

Re: Help serial port communication

1998-01-27 Thread Ben Pfaff
I am trying to set the baud rate of one of my serial ports I am writing and application for and I am really at a loss. I have even tried to use the setserial package, however I cannot get it to work (probably because I do not understand the documentation). Does anyone have/know of

Re: Help serial port communication

1998-01-27 Thread Jens B. Jorgensen
Here's some code you can build on: struct termios ti; int modem; modem = open(/dev/ttyS1, O_RDWR, 0); ioctl(modem, TCGETS, ti); /* fill the termios struct with the current settings */ cfsetispeed(ti, B9600); /* set input speed to 9600, could