grevedan
Posts: 3
Joined: Sun Apr 15, 2007 9:29 am
Location: USA

Virtual Ports v. Physical Ports

Sun Apr 15, 2007 9:37 am

GPS, comm folks, and of course Johan,

Apparently adding a virtual serial port to the windows device manager has stumped Johan for quite some time from reading older posts...

I'm trying to get WinGPS (http://www.stentec.com/software/gpsfreeware.html) to talk to a an HP IPAQ 6510 on a Dell Latitude, but WinGPS is only enumerating the physical ports.


I wonder what's the difference between a virtual and physical serial port in Windows XP, other than the obvious. I.E. how are virtual ports enumerated vs. physical, are the Win32 API calls any different for sending and receiving data....? I'll be reading into this...

I think GPSGate could be used in many more applications if this problem can be solved, so i'll be doing a little research, and will come back if I find a good solution.

-- dan greve
-- software engineer
-- palm bay, fl

User avatar
johan
GpsGate
Posts: 14660
Joined: Wed Aug 04, 2004 10:40 pm
Location: Sweden
Contact: Website

RE: Virtual Ports v. Physical Ports

Sun Apr 15, 2007 1:32 pm

The virtual ports created by GpsGate are not displyed in the Device Manager. That is the only difference. This means this is is a enumeration problem.

If WinGPS enumarates the ports found under
HKEY_LOCAL_MACHINE\Hardware\DeviceMap\SerialComm
it will be able to connect to the virtual ports created by GpsGate.

Another solution would be if WinGPS allowed you to manually enter a COM port. Once connected there is no differense. Same Win32 API calls.

If you contact WinGPS support they might do something about it. It is very simple, and would take them no more than an hour. They are also welcome to contact us if they need any assistance.

Regards,
Johan

Franson Support

grevedan
Posts: 3
Joined: Sun Apr 15, 2007 9:29 am
Location: USA

RE: Virtual Ports v. Physical Ports

Sun Apr 15, 2007 7:33 pm

Thanks for the quick Reply Johan,

Both ideas are excellent suggestions i hope the Stentec developers implement in their software. Sounds like a simple fix for them to greatly increase their softwares capabilities.

-- dan greve
-- software engineer
-- palm bay, fl

yachtolivia
Posts: 1
Joined: Mon Apr 16, 2007 2:01 pm

RE: Virtual Ports v. Physical Ports

Mon Apr 16, 2007 2:09 pm

This is a workaround to solve the "not showing up in the device manager" problem.

Run the Add hardware wizard from the Control Panel
click Next
check "Yes, I have already connected the hardware"
click Next
Select "Add a new hardware device" (end of list)
click Next
check "Install the hardware that I manually select from a list"
click Next
select "Ports (COM & LPT)"
click Next
In "(Standard port types) select "Communications Port"
Click Next
Click Next
Click Finish

The new port will now show up in Device Manager with a yellow exclamation mark indicating a problem ("Windows cannot determine the settings for this device....").
But, functioning or not, a new port number is allocated.

The new port will show up in apps that use the device manager for retrieving information about existing ports.

Note the port number, and add a virtual port in GPSgate using this new com port number.
Any app set to use this port number will now in fact connect to GPSgate

I have tested this with MaxSea and Shipplotter for retrieving and sharing GPS and AIS data, and it works fine.
Another feature is that other devices that use com ports for input, and use the device manager information for self configuration, are stopped from allocating ports already in use by GPSgate (that was initially my problem and is not an uncommon behavior of mobile phones and Bluetooth adapters).

/mats

User avatar
johan
GpsGate
Posts: 14660
Joined: Wed Aug 04, 2004 10:40 pm
Location: Sweden
Contact: Website

RE: Virtual Ports v. Physical Ports

Mon Apr 16, 2007 3:45 pm

Thanks mats for the info!

There is actually one more step that needs to be done. By following the steps above the COM port added in the Device Manager will have an arbitrary number. Not necessarily the same number you created in GpsGate.

To address this problem, follow those steps:
1. Note which number the Virtual COM port in GpsGate has. E.g. COM4. You see that in the "Output" tab in the "Settings" dialog of GpsGate.
2. Open the Control Panel
3. Double click on "System"
4. Click on the tab "Hardware"
5. Click on the "Device Manager" button

Under "Port (COM & LPT) you see the added port with yellow exclamation mark. Now, this port might have a different number than the one found in GpsGate.

To fix this you either remove the Virtual Port in GpsGate, and recreate it with the COM port number found in the Device Manager.

Or:

6. Right click on the COM port with yellow exclamation mark in Device Manager. Select "Properties".
7. Click on "Port Settings" tab
8. Click on "Advanced..." button
9. Select the matching "COM Port Number" in the drop down with the same name.
10. Click OK on both dialogs.

OK! Your GpsGate virtual port is now matching the "phony" port created in the Device Manager, and application that only enumerates ports in the DM can see the port.

The COM port number is not updated in the Device Manager until you re-open it.

Regards,
Johan

Franson Support

richardhula
Posts: 96
Joined: Sun Jul 17, 2005 6:33 pm

RE: Virtual Ports v. Physical Ports

Mon Apr 16, 2007 9:33 pm

Mats suggestion worked fine for me. A couple of caveats though:

1) You have to repeat the add hardware sequence for each virtual port that GpsGate has installed.

2) Windows will probably allocate a port number other than the one originally installed by GpsGate. Suggest the best way to overcome this is to use Johan's second method, selecting the COM port originally used by GpsGate.

In my case Windows allocated a COM port already in use by my Edgeport USB/COM port hub. It required a re-boot to get everything sorted after changing COM port number.

Richard

grevedan
Posts: 3
Joined: Sun Apr 15, 2007 9:29 am
Location: USA

RE: Virtual Ports v. Physical Ports

Sat Apr 21, 2007 11:07 pm

Interesting Workaround, forcing a '!' device in the Windows Device Manager. I'll play around with that today.

By the way, here's the response from the developer over at Stentec. I believe it says he used to use SerialComm registry, but now uses the SetupDi API, but the next version will check both.

-- dan

<snip>
Hello,

Since the beginning of 2007 WinGPS 4 uses a different method to enumerate the installed comports on Windows 2000, XP and Vista (by using the SetupDi API). This offers more information for the enumerated ports than using the method where the ports are enumerated by reading the SerialComm registry key. WinGPS 4 used to enumerate the ports by reading the SerialComm key in previous versions, and on Windows 98 and ME, WinGPS 4 still uses this method.

After a while it became clear that not all ports could be found using this method, especially virtual comports (like GPSGate) and null-modems, as well as some bluetooth devices.

To fix this problem, future versions (starting with the next update) of WinGPS will first enumerate the ports using the SetupDi API. The ports that cannot be found with this method will be enumerated by the SerialComm key. This way all installed ports should be available in WinGPS.

Ramon Beiboer
Stentec Software
</snip>

timfitch
Posts: 6
Joined: Tue Nov 20, 2007 7:40 pm

RE: Virtual Ports v. Physical Ports

Mon Nov 26, 2007 10:21 am

I am trying to use GPS Gate with 2 applications. I have purchased the "express" license therefore should have the ability to run the 2 applications on one GPS (bluetooth). When I run the Setup Wizard it creates 4 Output Virtual Ports (2 are available because of my license). The ports are Virtual Com 1,2, 4, and 5. One of my applications allows me to select Com1. No Problem! The other application has for selection Com6, Com7, Com13, and so on. If I try deleting 2, 4, and 5 from the Output box of GPS Gate and add Com6, I get and error saying "(80) Failed to connect Virtual Serial Port". I have been trying to get this to work for over a week with no results. Please help. I am using Windows XP Tablet.


Originally posted by johan

Thanks mats for the info!

There is actually one more step that needs to be done. By following the steps above the COM port added in the Device Manager will have an arbitrary number. Not necessarily the same number you created in GpsGate.

To address this problem, follow those steps:
1. Note which number the Virtual COM port in GpsGate has. E.g. COM4. You see that in the "Output" tab in the "Settings" dialog of GpsGate.
2. Open the Control Panel
3. Double click on "System"
4. Click on the tab "Hardware"
5. Click on the "Device Manager" button

Under "Port (COM & LPT) you see the added port with yellow exclamation mark. Now, this port might have a different number than the one found in GpsGate.

To fix this you either remove the Virtual Port in GpsGate, and recreate it with the COM port number found in the Device Manager.

Or:

6. Right click on the COM port with yellow exclamation mark in Device Manager. Select "Properties".
7. Click on "Port Settings" tab
8. Click on "Advanced..." button
9. Select the matching "COM Port Number" in the drop down with the same name.
10. Click OK on both dialogs.

OK! Your GpsGate virtual port is now matching the "phony" port created in the Device Manager, and application that only enumerates ports in the DM can see the port.

The COM port number is not updated in the Device Manager until you re-open it.

Regards,
Johan

Franson Support

User avatar
johan
GpsGate
Posts: 14660
Joined: Wed Aug 04, 2004 10:40 pm
Location: Sweden
Contact: Website

RE: Virtual Ports v. Physical Ports

Mon Nov 26, 2007 11:15 am

You cannot add a port that already exists on your computer. If COM6 already exists you cannot add COM6.

If your application cannot see the Virtual Port you create in GpsGate, please read this:
http://franson.com/forum/topic.asp?TOPIC_ID=5202

Regards,
Johan

Franson Support

Marty
Posts: 7
Joined: Tue Oct 19, 2004 1:32 am
Location: USA

RE: Virtual Ports v. Physical Ports

Mon Dec 31, 2007 4:41 am

Here's a new one.

I have an IBM Thinkpad X61 Tablet PC with the following installed:
GPSGate 2.6 (292 build)
FlightMap 9.3
JeppView 3.5
Jeppesen FlightDeck v3.0.3
Microsoft Streets and Trips 2008
Street Atlas 2008

On my desktop machine, I run Flight Simulator X (SP2) with FSUIPC 4.2 (latest version which includes GPSout).

On the laptop,I installed WideFSClient to talk to the GPSOut module on the desktop via TCP/IP.

I used GPSGate to create a virtual input COM8 and then I set the WideFS client on the laptop to output the GPS data it received from the desktop via TCP/IP on that virtual COM8.
I then used GPSGate to create output virtual com ports 1, 2, 10, 11 and 12.

Here's where it gets weird. Both Streets and Trips and Street Atlas recognize all of the virtual com ports created by GPSGate. BUT, while both FlightMap and FlightDeck reported seeing all the ports, neither one could open 10, 11 or 12 yet both worked perfectly with COM1 and COM2!!!!!

To make things even stranger, none of the these ports appear in Device Manager. Device Manager reports only 5, 6, 7 and 9.

The piece de resistance is that all the virtual com ports set up by
GPSGate appear in HKEY_LOCAL-MACHINE\Hardware\DeviceMap\SERIALCOMM with the following key values:
Device\biz\Serial1 REG_SZ COM1
Device\biz\Serial2 REG_SZ COM2
Device\biz\Serial8 REG_SZ COM8
Device\biz\Serial10 REG_SZ COM10
Device\biz\Serial11 REG_SZ COM11
Device\biz\Serial12 REG_SZ COM12

Why would an application which is able to see virtual ports created by GPSGate which do not appear in Device Manager, be able to open some and not others?

Finally, although GPSGate gives you a remove button for output ports, it does not provide any way of cleaning up input ports. Is there any way to do that?

User avatar
johan
GpsGate
Posts: 14660
Joined: Wed Aug 04, 2004 10:40 pm
Location: Sweden
Contact: Website

RE: Virtual Ports v. Physical Ports

Mon Dec 31, 2007 2:05 pm

Follow this guide to have your virtual port displayed in the device manager:
http://franson.com/forum/topic.asp?TOPIC_ID=5202

Here's where it gets weird. Both Streets and Trips and Street Atlas recognize all of the virtual com ports created by GPSGate. BUT, while both FlightMap and FlightDeck reported seeing all the ports, neither one could open 10, 11 or 12 yet both worked perfectly with COM1 and COM2!!!!!

This is a limitation in Street Atlas and S&T, they cannot handle a port number greater than COM9, that is a bug in those application and has nothing to do with GpsGate.

Use a lower port number for them. You can also report those errors to the technical support of respective product.

If you find applications that does not work with GpsGate as you expect, it is always good to report it to us, and post it in this forum. It is also recommended that you contact the support of the product in question and inform them that the product does not work properly with GpsGate. We will help them to work out the technical details.

Finally, although GPSGate gives you a remove button for output ports, it does not provide any way of cleaning up input ports. Is there any way to do that?

This is just a history list, so you fast can set an old input back. To delete history you can remove the folder "c:\program files\franson\gpsgate 2.0\HistoryInput". But it will do no harm to keep it. There is currently no way top disable the history feature.

Regards,
Johan

Franson Support

andres_barbero
Posts: 1
Joined: Mon Feb 25, 2008 1:34 am
Location: Brazil

RE: Virtual Ports v. Physical Ports

Mon Feb 25, 2008 2:20 am

Hello,
I have a simple problem, but I no solve it until now. I use a a map software, like Microsoft Steets&Trips. The name os the software is Destinator. WhenI turn on destinator and gpsgate clinet in my pocket PC, two aplications stops. I think there is some problems with COM ports...Can someone halp to solve the problem??

Thanks in advance.

Pablo

Andres Pablo Lopez Barbero

MickeyTheMan
Posts: 5
Joined: Fri Mar 09, 2007 5:46 pm

RE: Virtual Ports v. Physical Ports

Thu Sep 04, 2008 8:51 am

I'm trying to add Truck miles version 8. It only recognizes port 4 which is already used by gpsgate.

bobelon
Posts: 4
Joined: Sat Jan 23, 2010 3:25 pm

RE: Virtual Ports v. Physical Ports

Sun Jan 24, 2010 10:20 pm

You all are talking WAY over my head. Could someone please summerize all this and give clear steps to get my computer to "hear" my Garmin GPS dongle? I really don't need to know why just how.

richardhula
Posts: 96
Joined: Sun Jul 17, 2005 6:33 pm

RE: Virtual Ports v. Physical Ports

Mon Jan 25, 2010 4:46 pm

Basically there are two places Windows registers COM ports, whether virtual or physical. Most well written software will check both but some don't as in your case, checking only Device Manager entry. You therefore need to manually add the virtual COM port(s) you created with GpsGate to the Windows Device Manager.

The clear instructions above from yachtolivia relate I believe to Windows XP. For Vista/Windows 7 follow these similar instructions:

Go to Control Panel>Device Manager

Select (highlight) "Ports (COM & LPT)"

On Menu at top of Window select Action>Add legacy hardware

Click Next select "Add the hardware that I manually select from a list" then Next

Scroll down list to Ports (COM & LPT) & highlight then Next

A window will appear with Manufacturer & Make columns, these should be already set to (Standard Port Types) & Communication Port respectively - ensure they are & press Next & Next again to confirm

This will add device with next available COM number. Change this to match the COM port number you created in GpsGate that you also wish to use with your software. An alternative is to leave the COM port number as is & create virtual port with GpsGate to match.

Repeat all of above for any additional COM ports that need to be listed under Device Manager.

All this sounds onerous but takes less than a minute.

Richard

There no place like 127.0.0.1

Return to “GpsGate Splitter - How to setup and use”