Re: [Gpsbabel-misc] gpsbabel and Ubuntu Maverick with eTrex Via Serial to USB
Brought to you by:
robertl
From: Robert L. <rob...@gp...> - 2010-11-22 00:45:22
|
On Sun, Nov 21, 2010 at 5:34 PM, Rob Walker <ro...@te...> wrote: > I've just run into the same issue since upgrading to maverick and I've got > a > workaround - run the following command before gpsbabel: > > stty -F /dev/ttyUSB0 clocal > > strace showed me that it was stuck in the open() call on /dev/ttyUSB0 and > I > could reproduce the same behaviour with python, so it's not just a gpsbabel > issue - This hangs in the same way: > > python -c 'print open("/dev/ttyUSB0", "rw")' > > googling around for "serial usb open hangs" gave me the following page: > > http://forum.nginx.org/read.php?30,135400,135554 > > Taking the hint from Alan Cox about carrier detect, I disabled it with: > > stty -F /dev/ttyUSB0 clocal > > And gpsbabel started working again! Should gpsbabel be setting this via > termios ? > No. They should provide consistent behavior in the kernel. You can't just change open on a device name between blocking and non-blocking. If you want to change the behavior, do it in a new device name on a new minor number. The last time we used the open without blocking flags, it was (taaa daaa) the Linux USB/serial tty drivers that broke because we could then start issuing reads and writes before the device had fully finished the open. If you can't get the Linux kernel guys to change their mind, see if you can figure out how to add the command above to your hotplug startup script. RJL > > I'm using a DIY cable, so have only got RX, TX and GND connected - I > haven't > tied off DCD, DTR, RTS, CTS etc. Maybe something in the kernel got a bit > stricter about the defaults for flow control... (although I still see the > problem if I install the 2.6.32 kernel from lucid, so maybe its somewher > else) > > Regards > > Rob > > > ------------------------------------------------------------------------------ > Beautiful is writing same markup. Internet Explorer 9 supports > standards for HTML5, CSS3, SVG 1.1, ECMAScript5, and DOM L2 & L3. > Spend less time writing and rewriting code and more time creating great > experiences on the web. Be a part of the beta today > http://p.sf.net/sfu/msIE9-sfdev2dev > _______________________________________________ > Gpsbabel-misc mailing list http://www.gpsbabel.org > Gps...@li... > To unsubscribe, change list options, or see archives, visit: > https://lists.sourceforge.net/lists/listinfo/gpsbabel-misc > |