Hello, everyone - I have an old Windows app - a ship navigation program - that needs to see GPS input on a serial port (it was written in the pre-USB days.) My laptop, however, has no serial ports - but this same program, when run on a friend's Windows box, can read the GPS info from the USB-connected GPS via the "USB-Serial Driver". This is one of the frustrating bits of this experience, since a "USB-Serial Driver" under Linux appears to mean a module which drives a serial-in/USB-out dongle - not at all related to what I need! I've got the GPS - two different ones, actually - being recognized by Linux; in fact, the appropriate modules are being loaded, the appropriate device (/dev/ttyUSB9) is being created, and the NMEA sentences are being read (as confirmed by "gpsd -D2 -nN /dev/ttyUSB9".) My /var/log/messages says: ------------------------------------------------------------------------- Dec 31 19:38:16 Tyr kernel: [23431.897090] /build/buildd/linux-2.6.24/drivers/usb/serial/usb-serial.c: USB Serial support registered for Garmin GPS usb/tty Dec 31 19:38:16 Tyr kernel: [23431.897112] garmin_gps 2-2:1.0: Garmin GPS usb/tty converter detected Dec 31 19:38:16 Tyr kernel: [23431.897215] usb 2-2: Garmin GPS usb/tty converter now attached to ttyUSB9 Dec 31 19:38:16 Tyr kernel: [23431.897226] usbcore: registered new interface driver garmin_gps Dec 31 19:38:16 Tyr kernel: [23431.897228] /build/buildd/linux-2.6.24/drivers/usb/serial/garmin_gps.c: garmin gps driver v0.31 ------------------------------------------------------------------------- ------------------------------------------------------------------------- Jan 9 13:38:51 Tyr kernel: [20080.693463] usb 1-2: new full speed USB device using ohci_hcd and address 3 Jan 9 13:38:51 Tyr kernel: [20080.900226] usb 1-2: configuration #1 chosen from 1 choice Jan 9 13:38:53 Tyr kernel: [20083.182714] /build/buildd/linux-2.6.24/drivers/usb/serial/usb-serial.c: USB Serial support registered for pl2303 Jan 9 13:38:53 Tyr kernel: [20083.183795] pl2303 1-2:1.0: pl2303 converter detected Jan 9 13:38:53 Tyr kernel: [20083.184503] usb 1-2: pl2303 converter now attached to ttyUSB9 Jan 9 13:38:53 Tyr kernel: [20083.185094] usbcore: registered new interface driver pl2303 Jan 9 13:38:53 Tyr kernel: [20083.185101] /build/buildd/linux-2.6.24/drivers/usb/serial/pl2303.c: Prolific PL2303 USB to serial adaptor driver ------------------------------------------------------------------------- As far as Wine goes, I've got a link in ~/.wine/dosdevices - in fact, I've created _all_ the com ports that the app recognizes (COM1 through COM9) and linked them to /dev/ttyUSB9. Unfortunately, there's no joy in Mudville: the app does not see the data. Even the nice little feature in its configurator which shows the raw input on any of the com ports is completely silent. What could I possibly be missing? Is there any way to troubleshoot those com ports from inside Wine (perhaps by listening to them with, I dunno, Hyperterm or something)? Am I mistaken in the whole concept of linking a USB device to a com port? Any and all suggestions would be highly appreciated; I've lost many, many hours to beating my head against this particular brick wall. -- * Ben Okopnik * Editor-in-Chief, Linux Gazette * http://LinuxGazette.NET *
Just create one Com-Port-Link: COM1 not more not less and why the hell its ttyUSB9 and not ttyUSB0 ???
try some kind of terminal inside wine to see if the data gets into wine but maybe not into your program
On Mon, Jan 12, 2009 at 2:49 PM, Ben Okopnik <ben at linuxgazette.net> wrote:> Hello, everyone - > > I have an old Windows app - a ship navigation program - that needs to > see GPS input on a serial port (it was written in the pre-USB days.) My > laptop, however, has no serial ports - but this same program, when run > on a friend's Windows box, can read the GPS info from the USB-connected > GPS via the "USB-Serial Driver". This is one of the frustrating bits of > this experience, since a "USB-Serial Driver" under Linux appears to mean > a module which drives a serial-in/USB-out dongle - not at all related to > what I need! > > I've got the GPS - two different ones, actually - being recognized by > Linux; in fact, the appropriate modules are being loaded, the > appropriate device (/dev/ttyUSB9) is being created, and the NMEA > sentences are being read (as confirmed by "gpsd -D2 -nN /dev/ttyUSB9".) > > My /var/log/messages says: > ------------------------------------------------------------------------- > Dec 31 19:38:16 Tyr kernel: [23431.897090] /build/buildd/linux-2.6.24/drivers/usb/serial/usb-serial.c: USB Serial support > registered for Garmin GPS usb/tty > Dec 31 19:38:16 Tyr kernel: [23431.897112] garmin_gps 2-2:1.0: Garmin GPS usb/tty converter detected > Dec 31 19:38:16 Tyr kernel: [23431.897215] usb 2-2: Garmin GPS usb/tty converter now attached to ttyUSB9 > Dec 31 19:38:16 Tyr kernel: [23431.897226] usbcore: registered new interface driver garmin_gps > Dec 31 19:38:16 Tyr kernel: [23431.897228] /build/buildd/linux-2.6.24/drivers/usb/serial/garmin_gps.c: garmin gps driver v0.31 > ------------------------------------------------------------------------- > > ------------------------------------------------------------------------- > Jan 9 13:38:51 Tyr kernel: [20080.693463] usb 1-2: new full speed USB device using ohci_hcd and address 3 > Jan 9 13:38:51 Tyr kernel: [20080.900226] usb 1-2: configuration #1 chosen from 1 choice > Jan 9 13:38:53 Tyr kernel: [20083.182714] /build/buildd/linux-2.6.24/drivers/usb/serial/usb-serial.c: USB Serial support > registered for pl2303 > Jan 9 13:38:53 Tyr kernel: [20083.183795] pl2303 1-2:1.0: pl2303 converter detected > Jan 9 13:38:53 Tyr kernel: [20083.184503] usb 1-2: pl2303 converter now attached to ttyUSB9 > Jan 9 13:38:53 Tyr kernel: [20083.185094] usbcore: registered new interface driver pl2303 > Jan 9 13:38:53 Tyr kernel: [20083.185101] /build/buildd/linux-2.6.24/drivers/usb/serial/pl2303.c: Prolific PL2303 USB to serial > adaptor driver > ------------------------------------------------------------------------- > > As far as Wine goes, I've got a link in ~/.wine/dosdevices - in fact, > I've created _all_ the com ports that the app recognizes (COM1 through > COM9) and linked them to /dev/ttyUSB9. Unfortunately, there's no joy in > Mudville: the app does not see the data. Even the nice little feature in > its configurator which shows the raw input on any of the com ports is > completely silent. > > What could I possibly be missing? Is there any way to troubleshoot those > com ports from inside Wine (perhaps by listening to them with, I dunno, > Hyperterm or something)? Am I mistaken in the whole concept of linking a > USB device to a com port? Any and all suggestions would be highly > appreciated; I've lost many, many hours to beating my head against this > particular brick wall. > > > -- > * Ben Okopnik * Editor-in-Chief, Linux Gazette * http://LinuxGazette.NET * > >Serial support in wine is pretty buggy: http://bugs.winehq.org/buglist.cgi?quicksearch=serial+port -- -Austin
Ben Okopnik wrote:> As far as Wine goes, I've got a link in ~/.wine/dosdevices - in fact, > I've created _all_ the com ports that the app recognizes (COM1 through > COM9) and linked them to /dev/ttyUSB9. Unfortunately, there's no joy in > Mudville: the app does not see the data. Even the nice little feature in > its configurator which shows the raw input on any of the com ports is > completely silent.Does your program sees a serial port at all? If not, you might need to add some registry keys. A google search will show you few locations in registry where some programs might look for available serial ports.
Hi again, all - So, I'm back home and can hook up my GPS again, so I can actually test stuff. :) As a recap, I'm running Ubuntu 8.04 and trying to get an old piece of Windows software to see my GPS. This works fine on Windows, even though the software can only read COM1:-COM10: and the GPS is USB-only. Here's what I've got so far: 1) I hook up the GPS and modprobe the 'garmin_gps' module; the log says: ------------------------------------------------------------------------- Jan 20 22:03:04 Tyr kernel: [ 6235.593930] usb 2-2: new full speed USB device using ohci_hcd and address 2 Jan 20 22:03:04 Tyr kernel: [ 6235.693948] usb 2-2: configuration #1 chosen from 1 choice Jan 20 22:03:37 Tyr kernel: [ 6251.991681] /build/buildd/linux-2.6.24/drivers/usb/serial/usb-serial.c: USB Serial support registered for Garmin GPS usb/tty Jan 20 22:03:37 Tyr kernel: [ 6251.992726] garmin_gps 2-2:1.0: Garmin GPS usb/tty converter detected Jan 20 22:03:37 Tyr kernel: [ 6251.993251] usb 2-2: Garmin GPS usb/tty converter now attached to ttyUSB9 Jan 20 22:03:37 Tyr kernel: [ 6251.993738] usbcore: registered new interface driver garmin_gps Jan 20 22:03:37 Tyr kernel: [ 6251.993742] /build/buildd/linux-2.6.24/drivers/usb/serial/garmin_gps.c: garmin gps driver v0.31 ------------------------------------------------------------------------- Testing the connection with 'gpsd -nND8 /dev/ttyUSB9' works fine (I see the position data being sent back by the GPS), and 'gpsdrive' shows that I'm getting a 3-D fix - i.e., the GPS and the connection both work fine. 2) I execute "ln -s /dev/ttyUSB9 ~/.wine/dosdevices/com1" and get a symlink; running Hyperterm, however, shows no available ports (just "TCP/IP (Winsock)"). 3) After doing a bunch of research and tweaking, I figure out that I need to add the following to my ~/.wine/system.reg: ------------------------------------------------------------------------- [Hardware\\Devicemap\\Serialcomm] 1231984861 @="" "Serial0"="COM1" "Serial1"="COM2" "Serial2"="COM3" "Serial3"="COM4" "Serial4"="COM5" "Serial5"="COM6" "Serial6"="COM7" "Serial7"="COM8" "Serial8"="COM9" ------------------------------------------------------------------------- The next time I run Hyperterm, it shows COM1-COM9 (hurrah!) - and choosing 'COM1' brings up the terminal window (this doesn't happen if I select an inactive port; I get "Unable to open COM2. Please check your port settings" as an error.) In theory, this says that Wine can see COM1 and it is indeed active. 4) Switching over to the directory with my legacy program, I run the port configurator (the gadget that tells the rest of the programs where to find the GPS.) The GPS data does not show up at any of the ports in the configurator; scanning for it produces no results. The console from which I launched it says: ------------------------------------------------------------------------- err:ole:CoGetClassObject class {7729cd04-cdff-11d1-bc22-0000b43866a1} not registered err:ole:CoGetClassObject no class object {7729cd04-cdff-11d1-bc22-0000b43866a1} could be created for context 0x1 fixme:comm:set_queue_size insize 2048 outsize 2048 unimplemented stub fixme:comm:set_queue_size insize 2048 outsize 2048 unimplemented stub fixme:comm:set_queue_size insize 2048 outsize 2048 unimplemented stub fixme:comm:set_queue_size insize 2048 outsize 2048 unimplemented stub fixme:comm:set_queue_size insize 2048 outsize 2048 unimplemented stub fixme:comm:set_queue_size insize 2048 outsize 2048 unimplemented stub fixme:comm:set_queue_size insize 2048 outsize 2048 unimplemented stub fixme:comm:set_queue_size insize 2048 outsize 2048 unimplemented stub ------------------------------------------------------------------------- ...with the last set of lines being incremented by two every couple of seconds until I close the program. 5) I got a copy of "serialui.dll" and put it into the current directory, then added it to "Libraries" in winecfg and set it as 'native'. The result of running the configurator is exactly the same as before. ====================================================================== At this point, I'm out of my depth, and would appreciate further help. -- * Ben Okopnik * Editor-in-Chief, Linux Gazette * http://LinuxGazette.NET *
Did you make sure you can access the serial port from Linux yet? See http://blog.mypapit.net/2008/05/how-to-use-usb-serial-port-converter-in-ubuntu.html for more info. Once that's working, maybe Wine will be happy.
Never mind, I see you did. Apologies.
mmh, you should even see some data when opening with the terminal-software, a gps-mouse sends always, doesnt it?
try: https://iftools.com/download/wxterm/0.6/wxterm.exe (open source) http://www.der-hammer.info/terminal/hterm.zip
Ben Okopnik wrote:> > Again, to recap: I have a Garmin GPS that's connected to /dev/ttyUSB9 > via the 'garmin_gps' module. I can see it fine in Linux; I can't see it > with anything in Wine. I've created a symlink (~/.wine/dosdevices/com2 > -> /dev/ttyUSB9) and added > *May the garmin_gps module is always connected over the serial channel and so no other connections can be opened?