Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 29 Jun 2001 09:15:16 -0400
From:      Jason Andresen <jandrese@mitre.org>
To:        Jason Borkowsky <jcborkow@tcpns.com>
Cc:        freebsd-hackers@freebsd.org
Subject:   Re: Serial port control
Message-ID:  <3B3C7F64.A4C5D7F0@mitre.org>
References:  <Pine.BSF.4.21.0106282024030.23341-100000@bemused.tcpns.com>

next in thread | previous in thread | raw e-mail | index | archive | help
Jason Borkowsky wrote:
> 
> > > I am looking to find a simple way to control a serial port through BSD
> > > (such as raising and lowering DTR for a specified duration). I thought I
> > > had it using ioctl() and wrote a simple program to test it, but it seems I
> > > don't have a full understanding of ioctl(). Does anyone know of any
> > > pre-written utilities I can use? Or where to get some really detailed
> > > information about ioctl()? Thanks!
> 
> After several responses, I thought I had it. From a software point of
> view, my program, included below, works fine. But from a hardware point of
> view, the signals I am trying to lower, RTS and DTR, are staying
> high. Can anyone try to compile the below program and do a serial port
> test with an RS-232 tester and see if anyone actually sees RTS and DTR
> going low? Sorry for bothering everyone with this again, but this is
> driving me nuts and I can't figure out the problem now. Thanks!
 
<Nausicaa/p0> (77 ~): gcc -o serialioctl serialioctl.c
<Nausicaa/p0> (78 ~): sudo ./serialioctl
Password:
Current Serial Settings: Ring  RTS  DTR  DSR
Current Serial Settings: Ring  DSR
<Nausicaa/p0> (79 ~): uname -a
FreeBSD Nausicaa.mitre.org 4.3-RC FreeBSD 4.3-RC #2: Tue Apr 10 10:50:19
EDT 2001     root@Nausicaa.mitre.org:/usr/obj/usr/src/sys/NAUSICAA  i386

Seems to work for me.

-- 
  \  |_ _|__ __|_ \ __| Jason Andresen        jandrese@mitre.org
 |\/ |  |    |    / _|  Network and Distributed Systems Engineer
_|  _|___|  _| _|_\___| Office: 703-883-7755


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-hackers" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3B3C7F64.A4C5D7F0>