[Wine] USB and serial

Ben Okopnik ben at linuxgazette.net
Tue Jan 20 22:02:49 CST 2009


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 *



More information about the wine-users mailing list