From owner-freebsd-hackers@FreeBSD.ORG Tue Mar 8 22:04:52 2005 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id A6D1716A4CE for ; Tue, 8 Mar 2005 22:04:52 +0000 (GMT) Received: from pony2pub.arc.nasa.gov (pony2pub.arc.nasa.gov [128.102.31.42]) by mx1.FreeBSD.org (Postfix) with ESMTP id 73BF743D2D for ; Tue, 8 Mar 2005 22:04:52 +0000 (GMT) (envelope-from jtoung@arc.nasa.gov) Received: from mrcrab.nas.nasa.gov ([129.99.139.47] verified) by pony2pub.arc.nasa.gov (CommuniGate Pro SMTP 4.2.6) with ESMTP id 17518966 for freebsd-hackers@freebsd.org; Tue, 08 Mar 2005 14:04:49 -0800 From: Jerry Toung To: hackers Date: Tue, 8 Mar 2005 14:04:39 -0800 User-Agent: KMail/1.5.4 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200503081404.39320.jtoung@arc.nasa.gov> Subject: send data to serial port from kernel code X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: jtoung@arc.nasa.gov List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 08 Mar 2005 22:04:52 -0000 Good afternoon list, I am looking for a way to write data to the serial interface (/dev/cuaa0) from a kernel module and also read /dev/ttyd0 still from that same kernel module. Any pointers to doing that will be great. I want on exchange IP traffic from FreeBSD to another host with different OS via serial cable (null modem). So instead of making a call the NIC driver, I want to use the serial port as may physical layer. Any other ideas for doing this is welcome as well. I know the basics of serial programming from a regular C application: #include fd = open("/dev/cuaa0", O_RDWR|O_NDELAY) tcsetattr and tcgetattr etc etc. but that's not what I am looking for. Thank you. Jerry