From owner-freebsd-hackers@FreeBSD.ORG Tue Mar 8 22:26:08 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 E543916A4CE for ; Tue, 8 Mar 2005 22:26:08 +0000 (GMT) Received: from duchess.speedfactory.net (duchess.speedfactory.net [66.23.201.84]) by mx1.FreeBSD.org (Postfix) with SMTP id 46C9143D39 for ; Tue, 8 Mar 2005 22:26:08 +0000 (GMT) (envelope-from ups@tree.com) Received: (qmail 11261 invoked by uid 89); 8 Mar 2005 22:26:06 -0000 Received: from duchess.speedfactory.net (66.23.201.84) by duchess.speedfactory.net with SMTP; 8 Mar 2005 22:26:06 -0000 Received: (qmail 11226 invoked by uid 89); 8 Mar 2005 22:26:06 -0000 Received: from unknown (HELO palm.tree.com) (66.23.216.49) by duchess.speedfactory.net with SMTP; 8 Mar 2005 22:26:06 -0000 Received: from [127.0.0.1] (localhost.tree.com [127.0.0.1]) by palm.tree.com (8.12.10/8.12.10) with ESMTP id j28MQ5w6047275; Tue, 8 Mar 2005 17:26:05 -0500 (EST) (envelope-from ups@tree.com) From: Stephan Uphoff To: jtoung@arc.nasa.gov In-Reply-To: <200503081404.39320.jtoung@arc.nasa.gov> References: <200503081404.39320.jtoung@arc.nasa.gov> Content-Type: text/plain Message-Id: <1110320765.29804.7607.camel@palm> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.4.6 Date: Tue, 08 Mar 2005 17:26:05 -0500 Content-Transfer-Encoding: 7bit cc: hackers Subject: Re: send data to serial port from kernel code X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list 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:26:09 -0000 On Tue, 2005-03-08 at 17:04, Jerry Toung wrote: > 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 What is wrong with just using PPP ? Stephan