Cruisers Forum
 

Go Back   Cruisers & Sailing Forums > Seamanship, Navigation & Boat Handling > OpenCPN
Cruiser Wiki Click Here to Login
Register Vendors FAQ Community Calendar Today's Posts Log in

Reply
  This discussion is proudly sponsored by:
Please support our sponsors and let them know you heard about their products on Cruisers Forums. Advertise Here
 
Thread Tools Search this Thread Rate Thread Display Modes
Old 27-05-2013, 10:24   #16
Marine Service Provider
 
bdbcat's Avatar

Join Date: Mar 2008
Posts: 7,401
Re: Multiple Instances doesn't work in 3.2.2

Rick....

Wireshark sees everything in the network stack, and uses filters to manage the volume of packets. It should see localhost traffic just fine.

Dave
bdbcat is offline   Reply With Quote
Old 27-05-2013, 10:51   #17
bcn
Registered User

Join Date: May 2011
Location: underway whenever possible
Boat: Rangeboat 39
Posts: 4,740
Re: Multiple Instances doesn't work in 3.2.2

And there is a portable version of wireshark as well that comes very handy in some cases..
bcn is offline   Reply With Quote
Old 24-12-2013, 05:43   #18
Registered User

Join Date: Jan 2011
Posts: 670
Re: Multiple Instances doesn't work in 3.2.2

Quote:
Originally Posted by bdbcat View Post
...So, we start (A), try (B) and find trouble. Start Wireshark and look at the data stream, looking for UDP packets from (A) with no receiver.

This would be useful information.

Make sense?
Dave,

I got busy sailing last summer and never actually had time to run Wireshark to diagnose this problem. I continued having problems getting the second instance of O to pick up the UDP data that the first instance was putting onto UDP. NMEA debug window showed the first instance putting it out, but NMEA debug window for the second instance of O was blank.

As a rule, I was able to get the feature to work if I waited 20 minutes or so before launching the second instance of O. And once I had it working, it was stable that I could run for a couple weeks, putting the computer to sleep in between uses, without re-launching. So I lived with it.

I'm reviving this thread because I've installed 3.3.1117 on another laptop (as described in this thread) for purposes of testing a different Bluetooth dongle. And while the Bluetooth test was successful, I am having the exact same problem using UDP to pass data between the two instances of O. So it may be worth further diagnosis, and I'll try to get Wireshark running this winter.

By the way, on of the reasons I run two instances of O is that wide-screen laptops waste so much screen space off to the sides. If I switch to a tablet, running O in portrait orientation eliminates that inefficiency, so I might just run once instance. Only problem is that a new tablet might not be able to use the Toshiba Bluetooth stack, which I have found to be so important for making the Bluetooth SPP work properly.
RhythmDoctor is offline   Reply With Quote
Old 25-12-2013, 06:08   #19
Registered User

Join Date: Nov 2012
Location: Orust Sweden
Boat: Najad 34
Posts: 4,147
Re: Multiple Instances doesn't work in 3.2.2

RD at all...
For info on Win32 using 3.2.2 and 3.3.1117: I've been running two instances using one master OCPN and one portable during the last year. O for detailed view and the Portable fore overview. I use the local host set up as of my screen shots below.(This example from home PC though) The left is the Portable.
To pretend to much echoing in to the sender, e.g. master OCPN, the filter is used to sort it out. This is not a very elegant method but I do want to avoid having a network running for just this purpose. My track savings are done by the Portable instance and my last track was some 3000 N during close to 5 months.
The ini files settings are:
Code:
Master:
[Settings/NMEADataSource]
DataConnections=0;0;;0;0;COM4;4800;1;1;0;;0;ECRMB,ECRMC,VWR,MWV;2;0;1;0;0|1;1;192.168.x.x;10110;0;;4800;1;1;1;HDM,HDG,HDT,RMB,RMC,WPL,RTE,GLL,VTG,GSV,GGA,GPwpl,APB,AIVDM,AIVDO,FRPOS,CD;0;;0;
Portable:
Settings/NMEADataSource]
DataConnections=1;1;;10110;0;;4800;0;0;0;;1;;0;0;1;0;1|0;1;;10110;0;COM10;38400;1;0;0;;0;;1;0;1;0;0
Håkan
Attached Thumbnails
Click image for larger version

Name:	Portable_Standard_com.jpg
Views:	121
Size:	326.9 KB
ID:	72699  
Hakan is offline   Reply With Quote
Old 25-12-2013, 15:04   #20
Registered User
 
Gilletarom's Avatar

Join Date: Mar 2010
Location: France
Boat: 10.50 mètres
Posts: 2,988
Re: Multiple Instances doesn't work in 3.2.2

Hello Dave,

If the second instance is a portable install on USB key, the problem is it the same that with two instances in two saparate folders as describe in this thread ?

B.R. Gilletarom.
Gilletarom is offline   Reply With Quote
Old 25-12-2013, 21:14   #21
Registered User

Join Date: Jan 2011
Posts: 670
Re: Multiple Instances doesn't work in 3.2.2

Quote:
Originally Posted by Gilletarom View Post
Hello Dave,

If the second instance is a portable install on USB key, the problem is it the same that with two instances in two saparate folders as describe in this thread ?

B.R. Gilletarom.
The problem that I described above was a protection issue in the Windows Programs folder. Since then I have moved all the folders out into a non-protected area.
Quote:
Originally Posted by Hakan View Post
RD at all...
For info on Win32 using 3.2.2 and 3.3.1117: I've been running two instances using one master OCPN and one portable during the last year. O for detailed view and the Portable fore overview. I use the local host set up as of my screen shots below.(This example from home PC though) The left is the Portable.
To pretend to much echoing in to the sender, e.g. master OCPN, the filter is used to sort it out. This is not a very elegant method but I do want to avoid having a network running for just this purpose. My track savings are done by the Portable instance and my last track was some 3000 N during close to 5 months.
The ini files settings are:
Code:
Master:
[Settings/NMEADataSource]
DataConnections=0;0;;0;0;COM4;4800;1;1;0;;0;ECRMB,ECRMC,VWR,MWV;2;0;1;0;0|1;1;192.168.x.x;10110;0;;4800;1;1;1;HDM,HDG,HDT,RMB,RMC,WPL,RTE,GLL,VTG,GSV,GGA,GPwpl,APB,AIVDM,AIVDO,FRPOS,CD;0;;0;
Portable:
Settings/NMEADataSource]
DataConnections=1;1;;10110;0;;4800;0;0;0;;1;;0;0;1;0;1|0;1;;10110;0;COM10;38400;1;0;0;;0;;1;0;1;0;0
Håkan
Your fix worked! I had entered "localhost" into the address field of both instances. Using your parameter of 192.168.x.x made it work immediately. I'll have to go back to the documentation files and see where I went wrong.

I've also done a lot of other testing one different computers at home. Previously I had to be at the boat (where my Bluetooth GPS is permanently mounted), but I got software that sends my cell phone's GPS out by Bluetooth, which enables me to do more testing at home. It's too late now, but I'll posts some more learnings about driver and device issues tomorrow.
RhythmDoctor is offline   Reply With Quote
Old 26-12-2013, 02:27   #22
Registered User

Join Date: Nov 2012
Location: Orust Sweden
Boat: Najad 34
Posts: 4,147
Re: Multiple Instances doesn't work in 3.2.2

RD...
Nice to hear/read. Two more experiences:
- As you probably noticed, reading your comments, on Win7 and above the Portable folder has not to be placed in the "Program files" folder due to user write protections. The ini and log files will not be updated - without notice! I'd to place the Portable folders in either "Application data" or "Documents".
- If you happens to start OCPN and the Portable by an auto start function be sure to init the master before the portable and preferably with some kind of delay in between. It's only the portable function that's allowed to start with an other instance running. If the portable is already running the master won't start even if the other instance is a portable one.
Håkan
Hakan is offline   Reply With Quote
Old 26-12-2013, 13:23   #23
Registered User
 
Gilletarom's Avatar

Join Date: Mar 2010
Location: France
Boat: 10.50 mètres
Posts: 2,988
Re: Multiple Instances doesn't work in 3.2.2

Hello Dave,

I read that it is not possible to run 2 parallels instances of 3.3.1117 ...

This is not completely ok.

If I run a portable instance, Ok it is not possible to run the normal hard disk instance
But if I run the normal hard disk instance, then it is possible to run a portable instance.

See screen copy.

B.R.

Gilletarom
Gilletarom is offline   Reply With Quote
Old 26-12-2013, 13:48   #24
Registered User

Join Date: Nov 2012
Location: Orust Sweden
Boat: Najad 34
Posts: 4,147
Re: Multiple Instances doesn't work in 3.2.2

Gille..
Sorry to interfere but you're right. The code says if OCPN is started as Portable, e.g. the -p switch, an already running OCPN will not hinder a start up. So if you aim to screw up your system I think you can run as many Portable you want. And if you only have each portable instance in its own folder each log and ini files will be updated by its own relative.
Hakan is offline   Reply With Quote
Old 26-12-2013, 13:55   #25
Registered User
 
Gilletarom's Avatar

Join Date: Mar 2010
Location: France
Boat: 10.50 mètres
Posts: 2,988
Re: Multiple Instances doesn't work in 3.2.2

Here the screen copy that I forgot in my previous post
Attached Thumbnails
Click image for larger version

Name:	2013-12-26_2_parallel_instances.jpg
Views:	125
Size:	85.9 KB
ID:	72760  
Gilletarom is offline   Reply With Quote
Old 26-12-2013, 14:03   #26
Registered User

Join Date: Jan 2011
Posts: 670
Re: Multiple Instances doesn't work in 3.2.2

Quote:
Originally Posted by Gilletarom View Post
Hello Dave,

I read that it is not possible to run 2 parallels instances of 3.3.1117 ...

This is not completely ok.

If I run a portable instance, Ok it is not possible to run the normal hard disk instance
But if I run the normal hard disk instance, then it is possible to run a portable instance.

See screen copy.

B.R.

Gilletarom
The answer to this is to set up as many portable instances as you want, and only run portable. Then you can launch in any order you want.

I still always launch my master first (the one that puts GPS/AIS info on the UDP port), and then the slave (which picks up GPS/AIS off the UDP port). But sometimes the master crashes after a few hours. In this scenario, if master is portable, you can just re-launch it while the slave continues to run. But if the master is not portable, you need to quit out of the slave and reopen both in the proper order. This makes it much more flexible to run only portable versions.

Another note: Although this requires multiple copies of the program and associated support files, I keep only ONE copy of the charts in a separate folder, and each instance of O points to that same chart directory.
RhythmDoctor is offline   Reply With Quote
Old 26-12-2013, 14:03   #27
Registered User

Join Date: Nov 2012
Location: Orust Sweden
Boat: Najad 34
Posts: 4,147
Re: Multiple Instances doesn't work in 3.2.2

Gille...Yeah, it's great isn't it? And a 1/3 screen vertical strip viewing the overview beside a 2/3 vertical detailed view both showing the boat live symbols gives you a fantastic feeling of control. That's at least how I use it.

RD.. That's my trick with the charts as well

Another funny trick: Use the launcher_pi plugin in the Master O and make a button starting the portable.
Hakan is offline   Reply With Quote
Old 26-12-2013, 15:35   #28
Registered User

Join Date: Jan 2011
Posts: 670
Re: Multiple Instances doesn't work in 3.2.2

To follow up on my prior post, I've had problems for the past year getting two instances of O to pass data over UDP. I was using "localhost" in the address field with a port number of 10110. Usually it would work, but could take up to an hour to start working. This problem was duplicated on three different computers running Win XP and Win 7. I believe it is unrelated to the problems I've been having connecting to COM port with various adapter/software/computer combinations. Whenever I get a good connection on Bluetooth, I would still have problems passing the information to the second instance of O using the UDP bus.

The documentation page shows the configuration screen with "localhost" entered, but it is a Linux dialog. Perhaps Windows doesn't like this terminology so much.

So I tried Hakan's configuration with address of 192.168.x.x in the master, and address left blank in the slave. That worked immediately. I do not know what the "x.x" wildcards do, and would appreciate a brief description. Also, since I was concerned with dumping data out onto my home network, I also tried 127.0.x.x in the address of the master instance, and that worked too. Then I tried 127.0.0.1, and that had some problems. So it might appear that the .x.x wildcards are important here, but that's beyond my knowledge.

Any ideas why this went wrong? I'm glad to have it fixed, even though I don't fully understand it.
RhythmDoctor is offline   Reply With Quote
Old 26-12-2013, 21:06   #29
Registered User

Join Date: Nov 2012
Location: Orust Sweden
Boat: Najad 34
Posts: 4,147
Re: Multiple Instances doesn't work in 3.2.2

RD...
The use of local host and any type of "broadcasting" inside one Win-PC seems to be a somewhat grey area in terms of distinct and clear knowledge. This was rather deeply discussed in earlier threads, see http://www.cruisersforum.com/forums/...ml#post1135394 for example. I've also tried to find for me understandable explanations but without complete success. But I feel the revised multiplexer in 3.3.xxx beta have made the contact more reliable and not less the initiating process is now more direct. In earlier O versions I often had to "convince" the system to establish a connection by repeatedly stop and start.
My conclusions are that at least Dave and the team have "done it" again and I've to accept that I (once again?) don't fully understand. But I'm pleased with a better functionality and can enjoy being a grateful OCPN user.
Hakan is offline   Reply With Quote
Old 27-12-2013, 14:46   #30
Registered User

Join Date: Jan 2011
Posts: 670
Re: Multiple Instances doesn't work in 3.2.2

Thanks for the link. I was not following that thread. It looks like what was discussed there is pretty much the same as what I've experienced. Repeatedly stopping and starting is pretty much what I had to do all summer to get my slave O to receive UDP. Using "127.0.x.x" instead of "localhost" immediately fixed that. But I will have to disconnect my computers from my home network and see if UDP still works with the various IP addresses, since I have no local WiFi network on the boat. Alternatively, I could set up an ad hoc network from my netbook, or consider a ZyXEL MWR102, which has relatively low power consumption.
RhythmDoctor is offline   Reply With Quote
Reply


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


Advertise Here


All times are GMT -7. The time now is 11:31.


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

ShowCase vBulletin Plugins by Drive Thru Online, Inc.