On Sat, Aug 14, 2010 at 5:03 PM, Paul Thornton <p...@prt.org> wrote: > Ed Schouten wrote: >> * Paul Thornton <p...@prt.org> wrote: >>> I'm using 8.0-RELEASE with uftdi and ucom driving the serial port. >> >> Somewhat unrelated question: have you ever tried running the this code >> on 7.x? If so, did it work? > > I've just tried this on 7.2-RELEASE (that was the only 7.x CD I could > find lurking about my desk). > > Something is clearly quite different between 7 and 8 here: > > On 7.2, it doesn't like my tcsetattr: > > [r...@test1 /usr/local/src]# ./dmxrx2 > Opened /dev/cuaU0 on file handle 3 > before: c_iflag=2106 c_oflag=3 c_cflag=cf00 c_lflag=400 > tcsetattr: Invalid argument > > No amount of fiddling with the options would make it work, so I used > stty to set the paramaters of /dev/cuaU0.init to what I wanted: > > stty -f /dev/cuaU0.init speed 250000 -icanon -isig -echo cs8 clocal > cstopb cread ignpar -ixany -ixon -ixoff -ignbrk brkint -imaxbel -icrnl > > ... and re-ran with some more debug ... > > [r...@test1 /usr/local/src]# ./dmxrx2 > Opened /dev/cuaU0 on file handle 3 > before: c_iflag=6 c_oflag=3 c_cflag=cf00 c_lflag=400 > tcsetattr: Invalid argument > after: c_iflag=6 c_oflag=3 c_cflag=8f00 c_lflag=400 > calling read with 513 bytes to go > ^CCaught a signal: 2 > > So I now hang in a blocked read(). > > A quick and dirty test of "hd /dev/cuaU0" gives one line of zeros and > then hangs. Under 8.0, this continually dumps the data coming in as you > might expect it to. > > Were there any significant serial changes between 7.x and 8.0 which > might explain this? I don't have enough understanding of how FreeBSD's > serial internals should work to debug this on my own, but am more than > happy to try all suggestions made.
Bits of syscons were largely rewritten between 7.x and 8.x. That's the reason why Ed ask the question :) (he did the rewriting). -Garrett _______________________________________________ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to "freebsd-hackers-unsubscr...@freebsd.org"