Cruisers Forum
 


Join CruisersForum Today

Reply
 
Thread Tools Rate Thread Display Modes
Old 26-10-2013, 08:27   #1
Long Range Cruiser
 
MarkJ's Avatar

Cruisers Forum Supporter

Join Date: Dec 2007
Location: Australian living on "Sea Life" currently in England.
Boat: Beneteau 393 "Sea Life"
Posts: 12,828
Images: 25
USB Port software to alert when port closes.

Hi Folks.

This query isn't really about Opencpn, but about coms ports.

I am using the latest Beta Opencpn on Windows 7 with a Raymarine AIS supplying GPS.

My problem is that often when I put power on to charge the battery it cuts off the USB port to the AIS which causes it to stop operating, or stop sending data to the computer.

It can also happen when the laptop is at 100% and the power pack turns itself off and then a little while laters turns itself on.

I have no way of knowing, at sea, when my AIS is working whilst I am using Opencpn, so I want to look at getting some software to warn when the port closes, or keep it open.

One thing about computers that I am not good at, and always confused, is coms ports and the like. Nor do programs like Francine (?) work on my computer.

So some advice would be welcome


Mark
__________________

__________________
Notes on a Circumnavigation.
OurLifeAtSea.com

Somalia Pirates and our Convoy
MarkJ is offline   Reply With Quote
Old 26-10-2013, 08:59   #2
Registered User

Join Date: May 2011
Location: Toronto
Boat: Sandpiper 565
Posts: 2,941
Re: USB Port software to alert when port closes.

A bit confused here - what is the GPS data 'supplier' and is it powered by USB, or is the GPS supplier separately powered, with serial out and you have a serial to USB adaptor? What exactly is stopping - GPS position data, or the AIS data? A small diagram would help.

If, while the laptop is on and running, the USB ports shut down or their power is interrupted... that sounds like a laptop issue.

OpenCPN has that icon indicating GPS status... isn't that sufficient, or are you looking for some sort of extra alarm?

One long-term solution would be to have a small 'industrial' computer (even a Raspberry Pi) on full-time, taking the GPS signal and serving it up using gpsd, which makes the GPS data available over the boat ethernet/wifi network to any computer, including a laptop running OpenCPN. Kind of overkill though.
__________________

__________________
Lake-Effect is offline   Reply With Quote
Old 26-10-2013, 10:48   #3
Long Range Cruiser
 
MarkJ's Avatar

Cruisers Forum Supporter

Join Date: Dec 2007
Location: Australian living on "Sea Life" currently in England.
Boat: Beneteau 393 "Sea Life"
Posts: 12,828
Images: 25
Re: USB Port software to alert when port closes.

Thanks for replying

Quote:
Originally Posted by Lake-Effect View Post
A bit confused here - what is the GPS data 'supplier' and is it powered by USB, or is the GPS supplier separately powered, with serial out and you have a serial to USB adaptor?
The GPS and AIS Data Supplier is the one integrated unit Raymarine AIS 650 with its own connection to the boats 12 volt power. The data comes direct from that unit to a normal USB cable to the USB port. There is no seriel adapter.


Quote:
Originally Posted by Lake-Effect View Post

What exactly is stopping - GPS position data, or the AIS data? A small diagram would help.
The GPS and AIS data stops but there is no warning to it stopping.

It doesnt happen every time the power comes on to charge the laptop battery.

Quote:
Originally Posted by Lake-Effect View Post
If, while the laptop is on and running, the USB ports shut down or their power is interrupted... that sounds like a laptop issue.

OpenCPN has that icon indicating GPS status... isn't that sufficient, or are you looking for some sort of extra alarm?
I dont know if its a laptop issue or not. But its a critical safety issue because I sail solo and if it turns off in my 20 minutes sleeps I could get killed by a ship.

The OpenCpn screen can appear to be correct for a fair amount of time before it becomes obvious theres a problem.

As I am running a pretty new Sony top end laptop it woould be a shame to have to buy a new computer.

I don't know type of solution there could be... thats why I sound a bit lame in my request


Mark
__________________
Notes on a Circumnavigation.
OurLifeAtSea.com

Somalia Pirates and our Convoy
MarkJ is offline   Reply With Quote
Old 26-10-2013, 10:57   #4
Registered User

Join Date: Jan 2010
Location: Port Ludlow Wa
Boat: Makela,Ingrid38,Idora
Posts: 1,973
Re: USB Port software to alert when port closes.

Try going into your power manager on the Sony and set it to never sleep. This sounds like a sleep/wakeup problem in the lappy. It is normal to see internet connections and peripherals dropped when the laptop is in standby. Prevents drive by hacking when the laptop is sitting in a hotel for instance.
__________________
IdoraKeeper is offline   Reply With Quote
Old 26-10-2013, 11:02   #5
Long Range Cruiser
 
MarkJ's Avatar

Cruisers Forum Supporter

Join Date: Dec 2007
Location: Australian living on "Sea Life" currently in England.
Boat: Beneteau 393 "Sea Life"
Posts: 12,828
Images: 25
Re: USB Port software to alert when port closes.

Quote:
Originally Posted by IdoraKeeper View Post
It is normal to see internet connections and peripherals dropped when the laptop is in standby. .
Thanks, but thats not the problem. Tested that
__________________
Notes on a Circumnavigation.
OurLifeAtSea.com

Somalia Pirates and our Convoy
MarkJ is offline   Reply With Quote
Old 26-10-2013, 11:33   #6
Registered User

Join Date: May 2011
Location: Toronto
Boat: Sandpiper 565
Posts: 2,941
Re: USB Port software to alert when port closes.

Darn. I thought IdoraKeeper had it.

I assume you installed the USB driver that came with the 650... does it provide any configuration options or utilities?

At this point I think you might be bumping up to yet another limitation of pressing general computing equipment into service as dedicated marine safety system. I don't think Raymarine intended the USB port to be a 24/7 data connection, that's sort of why it's behind that flappy thing.

off the top of my head, I would try picking up the low-speed NMEA0183 serial data output of the 650, and running that through a serial to USB adaptor, because I think the serial-USB drivers are more generic and just plain dumber, therefore more likely to come up correctly every time the laptop starts up.

Re alarming - the above suggestion would also be easier to monitor at certain points. For starters, it's very easy to whip up a test circuit that would squawk if the 0183 signal drops. Second, by using the more generic serial-USB route, you can use gpsd or similar on the laptop to expose the GPS feed to other applications as well as OpenCpn, so there could be a small background service running that would squawk if the GPS stream drops or if it reports losing the GPS satellites.

Ain't technology a blast?
__________________
Lake-Effect is offline   Reply With Quote
Old 26-10-2013, 12:46   #7
Registered User

Join Date: Apr 2009
Location: Marina Del Rey
Boat: Hylas 44
Posts: 387
Re: USB Port software to alert when port closes.

Mark

Here is something to try.

Go to Control Panel > Power Options > Edit Plan Settings > Change Advanced Power Settings > USB Settings > USB selective suspend setting

Ensure that the setting is "Disabled" for both On Battery: and Plugged in:.

There are 3 different Power Plans so do the above for your selected plan.

These instructions apply to Vista. Maybe Windows 7 is similar.

Chuck
__________________
ChuckSK is offline   Reply With Quote
Old 26-10-2013, 14:20   #8
Long Range Cruiser
 
MarkJ's Avatar

Cruisers Forum Supporter

Join Date: Dec 2007
Location: Australian living on "Sea Life" currently in England.
Boat: Beneteau 393 "Sea Life"
Posts: 12,828
Images: 25
Re: USB Port software to alert when port closes.

Quote:
Originally Posted by ChuckSK View Post
Mark

Here is something to try.

Go to Control Panel > Power Options > Edit Plan Settings > Change Advanced Power Settings > USB Settings > USB selective suspend setting

Chuck
Hi Chuck,

Thanks for that. I have been through thses power options a zillion tiimes, but I dont remember that option. They were all set to "enabled" so I have changed them and will see what happens.

Googling I find
Quote:
Do I turn it on or off?

Keep it enabled! This setting is a big electricity saver! The only time you would not want this setting on is if you were using a USB device that required full-power at all times and didnít have the necessary drivers to direct that information properly to Windows.
And my AIS link I certainly want working all the time.

So, Thanks Chuck, I hope its this. A simple fix but needs a brainy person to know about it


Mark
__________________
Notes on a Circumnavigation.
OurLifeAtSea.com

Somalia Pirates and our Convoy
MarkJ is offline   Reply With Quote
Old 26-10-2013, 14:54   #9
Registered User
 
LeaseOnLife's Avatar

Join Date: Apr 2008
Location: out cruising again
Boat: Sailboat
Posts: 1,046
Re: USB Port software to alert when port closes.

Mark

In the past, I used a program called NavMonPc to collect data from several sources and configure alarms, including missing GPS data. NavMonPc is able to multiplex the source data and feed them to OpenCPN.

There is a plug-in for OpenCPN which implements several similar alarms, called Watchman.

Give it a try, it allows for an alarm when no GPS data have been received for a time period:

New Watchman Plugin

Dirk
__________________
LeaseOnLife is offline   Reply With Quote
Old 26-10-2013, 15:32   #10
Registered User
 
Tx J's Avatar

Join Date: Jan 2013
Location: South Texas
Boat: Newport 28 & Robalo 20
Posts: 363
Re: USB Port software to alert when port closes.

Quote:
Originally Posted by MarkJ View Post
Thanks, but thats not the problem. Tested that

Have you looked at each individual USB component in 'control panel-hardware devices--'. Those USB sub-pieces also have a power management tab that allows "always on" or not.

I haven't used my OpenCPN lately, but like SeaClear, it should have an option to observe the raw USB com port traffic in a separate app window/popup.
Watching that might give an indication of what is happening. There might even be an NMEA string announcing the shutoff of the datastream (of course then you have to get into reading NMEA strings, arrrggg).

Might the Ray VHF/AIS output be the culprit?
__________________
Tx J is offline   Reply With Quote
Old 26-10-2013, 15:47   #11
Long Range Cruiser
 
MarkJ's Avatar

Cruisers Forum Supporter

Join Date: Dec 2007
Location: Australian living on "Sea Life" currently in England.
Boat: Beneteau 393 "Sea Life"
Posts: 12,828
Images: 25
Re: USB Port software to alert when port closes.

Quote:
Originally Posted by LeaseOnLife View Post
There is a plug-in for OpenCPN which implements several similar alarms, called Watchman.

New Watchman Plugin

Dirk
Thanks Dirk,
Thats far beyond me.
I have downloaded Navmoon and Watchman (thats wasnt easy to do LOL)

Let me play with it
__________________
Notes on a Circumnavigation.
OurLifeAtSea.com

Somalia Pirates and our Convoy
MarkJ is offline   Reply With Quote
Old 06-11-2013, 09:56   #12
Long Range Cruiser
 
MarkJ's Avatar

Cruisers Forum Supporter

Join Date: Dec 2007
Location: Australian living on "Sea Life" currently in England.
Boat: Beneteau 393 "Sea Life"
Posts: 12,828
Images: 25
Re: USB Port software to alert when port closes.

Quote:
Originally Posted by ChuckSK View Post
Mark

Here is something to try.

Go to Control Panel > Power Options > Edit Plan Settings > Change Advanced Power Settings > USB Settings > USB selective suspend setting

Ensure that the setting is "Disabled" for both On Battery: and Plugged in:.

There are 3 different Power Plans so do the above for your selected plan.

These instructions apply to Vista. Maybe Windows 7 is similar.

Chuck
Hi Chuck, and others, this solution has been the one that's fixed the problem.

I have just done a three day passage and had no problems so I am very happy.

Thnks for your help!



Mark
__________________

__________________
Notes on a Circumnavigation.
OurLifeAtSea.com

Somalia Pirates and our Convoy
MarkJ is offline   Reply With Quote
Reply

Tags
software

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 23:47.


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.