lkml.org 
[lkml]   [2002]   [Apr]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: Read Data from Serial Port
On Thu, Apr 11, 2002 at 05:08:15PM +0500, Anil Kumar wrote:
> I am new to Linux .
> I am looking for provisions in linux Kernel or Linux User Space through
> which i can read data directly from
> serial port (A device is Connected to Serial Port).

open("/dev/ttyS0"), see "man open".

> I read the literature regarding Raw Sockets but could not figure out
> how to read data from serial port.

A serial port is a device file in /dev. Sockets are for networking.

> If there is any URL where i can find information regarding this please
> mail me that also.

You can read the Serial-Programming-HOWTO. There is also a lot of
information in the book "Advanced programming in the UNIX environment"
by W. Richard Stevens. The book is expensive, but worth its price.


Erik

PS: this kind of userland questions is off-topic for this list. Next
time use the linux-c-programming mailing list, see
http://lists.linux.org.au/listinfo/linuxcprogramming

--
J.A.K. (Erik) Mouw, Information and Communication Theory Group, Faculty
of Information Technology and Systems, Delft University of Technology,
PO BOX 5031, 2600 GA Delft, The Netherlands Phone: +31-15-2783635
Fax: +31-15-2781843 Email: J.A.K.Mouw@its.tudelft.nl
WWW: http://www-ict.its.tudelft.nl/~erik/
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:25    [W:0.039 / U:0.012 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site