Programming the serial port under Linux

Programming the serial port under Linux

Post by Jan Krau » Wed, 06 Nov 1996 04:00:00



Hi,
I'm trying to program the serial port under Linux.
I actually can write something to it (and it works),
but i have a problem in reading data from the port.
I just got on line of data (up to the \n) and the next
read-call returns a one-char-string with the "end-of-line-char".
Following read-calls return these two lines in a toggle.
Anyone out there who can help me ?

btw i need it two program a monitor prog for the 68hc11
microcontroller.

--

  Gruss, Jan


       Technische Fakultaet  -  Universitaet Bielefeld

 
 
 

Programming the serial port under Linux

Post by Sam Y » Mon, 11 Nov 1996 04:00:00



Quote:>Hi,
>I'm trying to program the serial port under Linux.
>I actually can write something to it (and it works),
>but i have a problem in reading data from the port.
>I just got on line of data (up to the \n) and the next
>read-call returns a one-char-string with the "end-of-line-char".
>Following read-calls return these two lines in a toggle.
>Anyone out there who can help me ?

Set the file descriptor to raw mode (using either ioctl() or fcntl()) and
reads will terminate when at least one character is read.

-sam

 
 
 

1. HOW TO program the serial port on linux

I am working in Linux for first time and I need routines
about serial port, I need comunication between two PC's, but
I don't undertand How to begin the comunication, in other
words, I need to stablish the protocolo for comunication,
acces to buffer and send and receive information, I preten
to creat files whit de infoirmation contains in the buffer.

I need routines about manage of serial port, How to create
this routines and How to work.

Tank you.

Raqueld

* Sent from AltaVista http://www.altavista.com Where you can also find related Web Pages, Images, Audios, Videos, News, and Shopping.  Smart is Beautiful

2. successive kfree() calls fail

3. Parallel Port programming question, was "Serial Port Programming"

4. Installing

5. How to set up serial port when programming serial communication

6. make not recognising Makefile ??

7. Maple V

8. Linux serial port programming

9. Serial port programming for linux

10. Example Programs using the Parallel/Serial Port (Linux)

11. Linux Serial Port Programming problem - ioctl -