Cruisers Forum
 


Join CruisersForum Today

Reply
 
Thread Tools Rate Thread Display Modes
Old 19-01-2014, 20:37   #76
Marine Service Provider
 
bdbcat's Avatar

Join Date: Mar 2008
Posts: 4,884
Re: OpenCPN not recognising Virtual COM port

RD....

Thanks for the logs.

The first log:
OCPN tries to open the COM port in a secondary thread. Windows does not stall, since O continues on in the primary thread. However, 3 seconds later, Windows comes back to the secondary thread and says the COM3 cannot be opened, ERROR is 1168. The 1168 seems to be bogus, since the official Windows error text says "ERROR_NOT_FOUND" Maybe they mean the BT slave was not found? Who knows? There is some google juice on this, related to BT stacks....homework for me.

Anyway, O assumes the port has not been opened, has no valid handle, and so does not close it physically. O quits normally, evidently leaving the port open....

Which, of course, causes the second log report: Invalid handle for COM3. In cryptic Win-speak, this means usually that the port is owned by some other application, namely the previous instance of OCPN.

When you reset the slave, Win drops the BT link, and reinitializes COM3 for the next application.

So, at least the 2nd log is understood.
Also, we know that from O's perspective, the link was never established.

Next, am I clear on this: You have a BT GPS phone that works with MS stack on Win8.1 with exactly the same OCPN version?

Hmmm...



What makes you think this:

Code:
And it looks like the Windows stack monitors whether any data is passing  through the connection, and closes the BT port if there's no data -  EVEN IF THE PROGRAM STILL HAS THE COM PORT OPEN.
Well, maybe we are getting smarter by collaborating...

Thanks for your patience.
Dave
__________________

__________________
bdbcat is offline   Reply With Quote
Old 21-01-2014, 15:00   #77
Registered User

Join Date: Jan 2011
Posts: 571
Re: OpenCPN not recognising Virtual COM port

Quote:
Originally Posted by bdbcat View Post
Next, am I clear on this: You have a BT GPS phone that works with MS stack on Win8.1 with exactly the same OCPN version?...
Yes, but I need to clarify. I tried several Android apps that send GPS data out by Bluetooth, and only the one ("GPS over BT") worked. The others failed to connect. I had attributed the failure to lousy freeware, but maybe that freeware would work with other programs (like PolarCOM) and fail with OpenCPN for similar reasons as my Bluetooth transmitters. I don't want to go back and reinstall all those tests, because I don't ever intend to use my cell phone with OpenCPN now that I found a tablet with built-in GPS instead. I want to use my boat's GPS/AIS nav system (via Bluetooth) when I'm on my boat, and the tablet's internal GPS when I'm on someone else's boat.

Quote:
Originally Posted by bdbcat View Post
...What makes you think this:

Code:
And it looks like the Windows stack monitors whether any data is  passing  through the connection, and closes the BT port if there's no  data -  EVEN IF THE PROGRAM STILL HAS THE COM PORT OPEN.
I may need to retract that statement. Previously I though I had confirmed that shutting off the data to my Bluetooth transmitter caused the Bluetooth connection to drop (as evidenced by a blinking blue LED on the transmitter). But when I repeated this test yesterday, the BT connection continued (solid blue LED). I don't know why I saw different results.
__________________

__________________
RhythmDoctor is offline   Reply With Quote
Old 21-01-2014, 16:28   #78
Registered User

Join Date: Jan 2011
Posts: 571
Re: OpenCPN not recognising Virtual COM port

Quote:
Originally Posted by LifePart2 View Post
Just a thought: since PolarCom, and some other utilities, have obviously figured this out, would it be worth while tracking down the guys behind that and see if they can help sort this out? After all, if you keep doing what you have always done and expect different results, it is time to check you in somewhere nice and cosy.

No, seriously, maybe one or other of the O developers could email or phone some of the PolarCom guys. Probably in not a lot of time this could then get resolved.

Just a suggestion.
Maybe my mind is just too corrupted by the greedy corporate world where I try to eek out a modest living, but I would be surprised if PolarNavy would be willing to help. My cynical imagination envisions the conversation going something like this:

Quote:
Dave: "Hi, I'm the developer of a free chartplotter program that does the same thing as your $50 PolarView program - only better, with a cleaner, easier to use interface. But my users are complaining of a problem connecting to virtual COM ports via Bluetooth, which your PolarCOM module seems to do much better. Could you help out a friendly competitor with some hints? Oh, and did I mention that my program is free?"

PolarNavy: "Uh, no."
Intellectual property is a valuable thing, and companies rarely give it away. Maybe I'm wrong about this, and software developers are more chummy. But no from what my son (a software engineer) tells me. IP usually needs to be bought, though sometimes for a modest price. I read somewhere (can't find the link now now) that Greg at CuriousTech has stopped upgrading XPort because voluntary donations have slowed to nothing. (I donated 3 years ago when I first started using it.) Maybe he'd be willing to part with the source code for some beer money.

But I wouldn't imagine PolarNavy giving up their competitive advantage for free, unless some of O's developers are chummy with them.
__________________
RhythmDoctor is offline   Reply With Quote
Old 21-01-2014, 17:31   #79
Marine Service Provider
 
LifePart2's Avatar

Join Date: Sep 2010
Location: ex Canada - now on the boat
Boat: Leopard 42 catamaran
Posts: 125
Re: OpenCPN not recognising Virtual COM port

Quote:
Intellectual property is a valuable thing, and companies rarely give it away.
Absolutely right, of course. To be honest, I didn't know that PolarNavy charged for other stuff, as I downloaded the PolarCom for free.

But maybe there are some other people who have figured this out already. the OpenSource world is pretty big and usually very cooperative.

As I said, just a thought.

Noel
__________________
Noel Swanson

Life is too short to live in ugly places.
LifePart2 is offline   Reply With Quote
Old 22-01-2014, 02:32   #80
bcn
Registered User

Join Date: May 2011
Location: underway whenever possible
Boat: Rangeboat 39
Posts: 2,761
Re: OpenCPN not recognising Virtual COM port

Quote:
Originally Posted by RhythmDoctor View Post
I read somewhere (can't find the link now now) that Greg at CuriousTech has stopped upgrading XPort because voluntary donations have slowed to nothing. (I donated 3 years ago when I first started using it.) Maybe he'd be willing to part with the source code for some beer money.

But I wouldn't imagine PolarNavy giving up their competitive advantage for free, unless some of O's developers are chummy with them.
RD,

and if you try to contact PolarNavy and Greg? We need Dave for coding

You have a lot of information and gained some insight..

Just a thought...

Hubert
__________________
bcn is offline   Reply With Quote
Old 22-01-2014, 11:38   #81
Marine Service Provider
 
LifePart2's Avatar

Join Date: Sep 2010
Location: ex Canada - now on the boat
Boat: Leopard 42 catamaran
Posts: 125
Re: OpenCPN not recognising Virtual COM port

I am sure that chartplotters are not the only software trying to access virtual ports, and I am equally sure that someone else out there has figured this problem out.

All I am suggesting is that we try to find and ask them, for example through fora such as stackoverflow and similar. Though, to be fair, probably Dave has already done that.

I do a bit of PHP programming, but don't know the first thing about the kind of stuff the O is programmed in, so I can't offer any more help than that. But when I am programming I spend a fair bit of my time on Google trying to figure out how to solve this or that problem. Often someone out there has already answered it.

Then, after I have been bashing my head against a wall for too long I read something sideways-related and suddenly it all becomes clear.

Anyway, since I don't have anything any more constructive than that, I will shut up now!

Good luck with it, and THANKS SO MUCH for all the efforts on coding O - it is far and away the best chartplotter.

Noel
__________________
Noel Swanson

Life is too short to live in ugly places.
LifePart2 is offline   Reply With Quote
Old 24-01-2014, 17:56   #82
Marine Service Provider
 
KASHMIR's Avatar

Join Date: Mar 2010
Location: Melbourne OZ
Boat: Phantom 40
Posts: 68
Re: OpenCPN not recognising Virtual COM port

I have read right through this thread and looked for others but cannot find the answer to my problem with openCPN. I have a HP mini running win 7 home and a USB GPS. I can get the sentences to come through from the GPS using a program called GPS viewer I can see the sentences with the com1 and a baud rate of 9600. However for the life of me I cannot get OpenCPN to work on any settings, I have tried rebooting the computer and OpenCPN many times but all to no avail, I wonder if anybody can help me please?
Peter
__________________
KASHMIR is offline   Reply With Quote
Old 24-01-2014, 17:59   #83
Marine Service Provider
 
KASHMIR's Avatar

Join Date: Mar 2010
Location: Melbourne OZ
Boat: Phantom 40
Posts: 68
Re: OpenCPN not recognising Virtual COM port

oooh! I don't know what I did but I just got it to work, sorry to trouble you all.
I think I got it to work by closing the GPS viewer program, then the sentences could be seen on the NMEA debug window.
Peter
__________________
KASHMIR is offline   Reply With Quote
Old 24-01-2014, 19:03   #84
Marine Service Provider
 
bdbcat's Avatar

Join Date: Mar 2008
Posts: 4,884
Re: OpenCPN not recognising Virtual COM port

RD...

Just so I can be accurate, is this the device you are using?

Bluetooth Serial Adapter RS232

Dave
__________________
bdbcat is offline   Reply With Quote
Old 24-01-2014, 23:42   #85
Registered User

Join Date: Jan 2011
Posts: 571
Re: OpenCPN not recognising Virtual COM port

Quote:
Originally Posted by bdbcat View Post
RD...

Just so I can be accurate, is this the device you are using?

Bluetooth Serial Adapter RS232

Dave
Not quite. I have USConverters' BT433, and industrial version with external antenna. And it's been discontinued and replaced by this one. I do not know if there have been any hardware/firmware changes that would make the new model perform better (or worse) with OpenCPN.
__________________
RhythmDoctor is offline   Reply With Quote
Old 30-01-2014, 07:22   #86
Marine Service Provider
 
bdbcat's Avatar

Join Date: Mar 2008
Posts: 4,884
Re: OpenCPN not recognising Virtual COM port

RhythmDoctor...

If you have the time, I would appreciate a fresh test of 3.3.1328 with your Bluetooth serial adapter. I made some changes here.

Code:
189.  Add more temporary debug messages to Windows Serial port error handler.
It might actually work now. If not, we will at least get some more debug information.

Thanks
Dave
__________________
bdbcat is offline   Reply With Quote
Old 31-01-2014, 23:05   #87
Registered User

Join Date: Jan 2011
Posts: 571
Re: OpenCPN not recognising Virtual COM port

Quote:
Originally Posted by bdbcat View Post
RhythmDoctor...

If you have the time, I would appreciate a fresh test of 3.3.1328 with your Bluetooth serial adapter. I made some changes here.

Code:
189.  Add more temporary debug messages to Windows Serial port error handler.
It might actually work now. If not, we will at least get some more debug information.

Thanks
Dave
Unfortunately it did not work
Code:
00:53:23: 2014-02-01
00:53:23:  ------- Starting OpenCPN -------
00:53:23: Version 3.3.1328 Build 2014-01-28
00:53:23: wxWidgets version: wxWidgets 2.8.12
00:53:23: MemoryStatus:  mem_total: 1931 mb,  mem_initial: 8 mb
00:53:23: SData_Locn is E:\Sailboat\OpenCPN-Test\
00:53:23: Using existing Config_File: E:\Sailboat\OpenCPN-Test\opencpn.ini
00:53:23: Styles loading from E:\Sailboat\OpenCPN-Test\uidata\styles.xml
00:53:23: No styles found at: E:\Sailboat\OpenCPN-Test\
00:53:23: No styles found at: E:\Sailboat\OpenCPN-Test\.opencpn\
00:53:23: Setting Viewpoint Lat/Lon 39.871, -75.2356
00:53:23: Setting Ownship Lat/Lon 39.8585, -75.2941
00:53:26: System default Language:  en_US
12:53:26 AM: Opencpn language set to:  en_US
12:53:28 AM: ChartSymbols loaded from .\s57data\chartsymbols.xml
12:53:28 AM: Using s57data in .\s57data
12:53:28 AM: Setting Viewpoint Lat/Lon 39.871, -75.2356
12:53:28 AM: Setting Ownship Lat/Lon 39.8585, -75.2941
12:53:28 AM: Opening NMEA Datastream Serial:COM3
12:53:29 AM: Creating glChartCanvas
12:53:30 AM: PlugInManager searching for PlugIns in location E:\Sailboat\OpenCPN-Test\plugins
12:53:30 AM: PlugInManager: Loading PlugIn: E:\Sailboat\OpenCPN-Test\plugins\dashboard_pi.dll
12:53:30 AM:   E:\Sailboat\OpenCPN-Test\plugins\dashboard_pi.dll Version detected: 106
12:53:30 AM: PlugInManager: Loading PlugIn: E:\Sailboat\OpenCPN-Test\plugins\grib_pi.dll
12:53:30 AM:   E:\Sailboat\OpenCPN-Test\plugins\grib_pi.dll Version detected: 107
12:53:30 AM: PlugInManager: Loading PlugIn: E:\Sailboat\OpenCPN-Test\plugins\ocpndebugger_win32_pi18_v01_pi.dll
12:53:30 AM:   E:\Sailboat\OpenCPN-Test\plugins\ocpndebugger_win32_pi18_v01_pi.dll Version detected: 108
12:53:30 AM: PlugInManager: Loading PlugIn: E:\Sailboat\OpenCPN-Test\plugins\vdr_win32_pi16_v03_pi.dll
12:53:30 AM:   E:\Sailboat\OpenCPN-Test\plugins\vdr_win32_pi16_v03_pi.dll Version detected: 106
12:53:30 AM: OpenGL-> Renderer String: Intel(R) HD Graphics
12:53:30 AM: OpenGL-> Detected Intel renderer, disabling stencil buffer
12:53:30 AM: OpenGL-> Detected Intel renderer, disabling FBO
12:53:30 AM: OpenGL-> Framebuffer Objects unavailable
12:53:30 AM: OpenGL-> Using Depth buffer clipping
12:53:30 AM: OpenGL-> Estimated Max Resident Textures: 98
12:53:30 AM: ChartDB Cache policy:  Application target is 965 MBytes
12:53:30 AM: Loading chart db version: V017
12:53:30 AM: Chartdb: Chart directory list follows
12:53:30 AM:   Chart directory #0: E:\Sailboat\NOAA Nautical Charts\03-04Local_RNCs
12:53:30 AM:   Chart directory #1: E:\Sailboat\NOAA Nautical Charts\03-04Distant_RNCs
12:53:30 AM:   Chart directory #2: E:\Sailboat\NOAA Nautical Charts\03-04Local_ENCs
12:53:30 AM:   Chart directory #3: E:\Sailboat\NOAA Nautical Charts\03-04Distant_ENCs
12:53:30 AM:   Chart directory #4: E:\Sailboat\NOAA Nautical Charts\NGA Charts of BVI
12:53:30 AM:   Chart directory #5: E:\Sailboat\NOAA Nautical Charts\02Region_RNCs
12:53:30 AM:   Chart directory #6: E:\Sailboat\NOAA Nautical Charts\15Region_RNCs
12:53:31 AM: GPS Watchdog Timeout is: 6 sec.
12:53:31 AM: Error:Invalid Handle
12:53:31 AM: NMEA input device open failed: COM3...GetLastError():  1168
12:53:31 AM: Initializing Chart E:\Sailboat\NOAA Nautical Charts\03-04Local_RNCs\12312\12312_1.KAP
12:53:31 AM: Initializing Chart E:\Sailboat\NOAA Nautical Charts\03-04Local_RNCs\12313\12313_1.KAP
12:53:32 AM: Initializing Chart E:\Sailboat\NOAA Nautical Charts\03-04Local_RNCs\13003\13003_1.KAP
12:53:46 AM: EnumerateSerialPorts() Found Garmin USB Driver.
12:54:10 AM: PlugInManager: Deactivating PlugIn: E:\Sailboat\OpenCPN-Test\plugins\dashboard_pi.dll
12:54:10 AM: PlugInManager: Deactivating PlugIn: E:\Sailboat\OpenCPN-Test\plugins\vdr_win32_pi16_v03_pi.dll
12:54:10 AM: opencpn::MyFrame exiting cleanly.
12:54:10 AM: Closing NMEA Datastream Serial:COM3
12:54:11 AM: Chart cache purge
12:54:11 AM: PlugInManager: UnLoading PlugIn: E:\Sailboat\OpenCPN-Test\plugins\dashboard_pi.dll
12:54:11 AM: PlugInManager: UnLoading PlugIn: E:\Sailboat\OpenCPN-Test\plugins\grib_pi.dll
12:54:11 AM: PlugInManager: UnLoading PlugIn: E:\Sailboat\OpenCPN-Test\plugins\ocpndebugger_win32_pi18_v01_pi.dll
12:54:11 AM: PlugInManager: UnLoading PlugIn: E:\Sailboat\OpenCPN-Test\plugins\vdr_win32_pi16_v03_pi.dll
12:54:11 AM: Chart cache purge
12:54:11 AM: LOGBOOK:  2014-02-01 05:54:11 UTC OFF: Lat   39.85850 Lon  -75.29410
12:54:11 AM: opencpn::MyApp exiting cleanly...
Immediately after this I launched XPort, which immediately made a Bluetooth connection (solid blue LED on my transmitter) and grabbed COM3.

One interesting thing to note. I must launch XPort as Administrator for it to work properly. Could there be a similar requirement for OpenCPN to grab COM3 and/or Bluetooth connection? I tried launching OpenCPN.exe as administrator, and it completely erased all my settings in opencpn.ini (which I had fortunately backed up).

I am happy to continue testing if you need the information, but for now I do have an adequate workaround with XPort handling GPS @ 4800 bps, and PolerCOM handling AIS @ 38400 bps.
__________________
RhythmDoctor is offline   Reply With Quote
Old 06-03-2014, 08:20   #88
Registered User

Join Date: Jan 2011
Posts: 571
Re: OpenCPN not recognising Virtual COM port

Dave - Did you get any useful information from my prior trial? Should I re-try with the newer 1419 beta?
__________________
RhythmDoctor is offline   Reply With Quote
Old 19-04-2014, 02:49   #89
Registered User
 
dansken's Avatar

Join Date: Nov 2010
Location: Norway
Boat: Lansart 47
Posts: 23
Re: OpenCPN not recognising Virtual COM port

A late update from me: I have now had a chance to try the Shipmodul Bluetooth With the newest OpenCPN beta Version - and it works!
Big thanks to Dave for persistently persuing and correcting this problem. I am impressed and greatful.
Dansken
__________________
dansken is offline   Reply With Quote
Old 19-04-2014, 19:01   #90
Marine Service Provider
 
bdbcat's Avatar

Join Date: Mar 2008
Posts: 4,884
Re: OpenCPN not recognising Virtual COM port

dansken....

Thanks for the report.

I understand that 3.3.1606 works with Bluetooth in your configuration. That's good.

Now, can you recall and name the latest version of OCPN that did not work for you?

Reason I ask: I have been fussing with this for some time, and I would like to understand exactly what the "silver bullet" is, and what change in the code actually fixed the problem....

Thanks
Dave
__________________

__________________
bdbcat is offline   Reply With Quote
Reply

Tags
opencpn, paracelle

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off




Copyright 2002- Social Knowledge, LLC All Rights Reserved.

All times are GMT -7. The time now is 04:15.


Google+
Powered by vBulletin® Version 3.8.8 Beta 1
Copyright ©2000 - 2017, vBulletin Solutions, Inc.
Social Knowledge Networks
Powered by vBulletin® Version 3.8.8 Beta 1
Copyright ©2000 - 2017, vBulletin Solutions, Inc.

ShowCase vBulletin Plugins by Drive Thru Online, Inc.