Cruisers Forum
 


Join CruisersForum Today

Reply
 
Thread Tools Rating: Thread Rating: 5 votes, 4.80 average. Display Modes
Old 04-11-2014, 12:32   #646
Registered User

Join Date: Nov 2012
Location: Orust Sweden
Boat: Najad 34
Posts: 1,645
Re: OpenCPN Radar Overlay PlugIn

Hans...
If you're in Win you can make a bat file for that.
You may want to edit mine to fit your environment:
Code:
ECHO OFF
REM Batch fil to copy files for OpenCPN Debug and Release in VC10 Win32
REM Run from dir OpenCPN.GIT or whatever root of the git files
rem Type C:\Builds\OpenCPN\CopyFiles.bat
ECHO ....................................................................
ECHO CopyFiles.bat
ECHO Batch file to copy files for OpenCPN Debug and Release in VC10 Win32
ECHO Run it from directory OpenCPN.GIT or whatever root of the source files
ECHO Only not existing or newer files will be copied.
ECHO ....................................................................
ECHO . 
Pause
ECHO ON
REM Debug files:
md build\gshhs
xcopy data\gshhs\*.* build\gshhs\ /D
md build\s57data
xcopy data\s57data\*.* build\s57data\ /D
md build\tcdata
xcopy data\tcdata\*.* build\tcdata\ /D
md build\uidata
xcopy src\bitmaps\toolicons*.* build\uidata\ /D
xcopy src\bitmaps\styles.xml build\uidata\ /D
REM Release
md build\Release
xcopy data\gshhs\*.* build\Release\gshhs\ /D
md build\s57data
xcopy data\s57data\*.* build\Release\s57data\ /D
md build\tcdata
xcopy data\tcdata\*.* build\Release\tcdata\ /D
xcopy buildwin\crashrpt\*.dll build\Release\ /D
xcopy buildwin\crashrpt\CrashSender1401.exe build\Release\ /D
xcopy buildwin\crashrpt\crashrpt_lang.ini build\Release\ /D
I named my file "copyfiles.bat"
Håkan
__________________

__________________
Hakan is offline   Reply With Quote
Old 04-11-2014, 17:47   #647
Registered User

Join Date: Feb 2013
Location: Gothenburg, Sweden
Boat: Allegro 33
Posts: 173
Re: OpenCPN Radar Overlay PlugIn

I am making some progress over here.
I can now debug the opencpn code without the gradar_pi plugin.
When I include the gradar code into my source tree I can compile but get an error from the linker.

LINK : fatal error LNK1104: cannot open file 'E:\opencpn_cmake2010\Debug\opencpn.lib'

I do not have a drive E: on my Win7 machine.

If I go looking for opencpn_cmake2010 I find it here

CMakeCache.txt

//Dependencies for the target
gradar_pi_LIB_DEPENDS:STATIC=general;E:/opencpn_cmake2010/$(Configuration)/opencpn.lib;debug

and here :

CMakeLists.txt

SET(OPENCPN_IMPORT_LIB "E:/opencpn_cmake2010/${CMAKE_CFG_INTDIR}/opencpn.lib")

If you go and look in :
https://github.com/bdbcat/gradar_pi/...CMakeLists.txt

you see the line above here on line 164

Is this correct ?

/Hans
__________________

__________________
hasse_A is offline   Reply With Quote
Old 04-11-2014, 20:40   #648
Registered User

Join Date: Feb 2010
Location: On the go. Not in Prague.
Posts: 3,906
Re: OpenCPN Radar Overlay PlugIn

Hans...
No, it is not, it's a bug in CMakeLists.txt - easy fix is to replace it with the path to opencpn.lib created when you built OpenCPN - it should be in the build/Debug directory if memory serves.
Then delete CMakeCache.txt in the plugin's build directory and run "cmake .." again.
Obviously not many people besides Dave ever built this plugin or were very lucky to have exactly the same disk layout

Pavel
__________________
nohal is online now   Reply With Quote
Old 06-11-2014, 00:30   #649
Registered User

Join Date: Feb 2013
Location: Gothenburg, Sweden
Boat: Allegro 33
Posts: 173
Re: OpenCPN Radar Overlay PlugIn

Now I can compile and link OpenCPN with the gradar plugin and I am able to single step through the program, set breakpoints and so on.

However, I have run into another problem.
When trying to configure the gradar plugin I found that there are no plugins in the menu, not even the dashboard or grib plugins.
I have sent in a post about this here: Development Debugging Environment - Setup Help

Dave
The execution does not stop when I put a breakpoint as you suggested here.
pic->m_cap_flag = pic->m_pplugin->Init();
Not even if I restart from program entry.

It looks like the plugins are not being initialized.

Håkan
Thanks for the bat-file. Much appreciated.

/Hans
__________________
hasse_A is offline   Reply With Quote
Old 06-11-2014, 01:19   #650
Registered User

Join Date: Nov 2012
Location: Orust Sweden
Boat: Najad 34
Posts: 1,645
Re: OpenCPN Radar Overlay PlugIn

Quote:
.....
Development Debugging Environment - Setup Help
................
It looks like the plugins are not being initialized.
........./Hans
See my attempt to contribute in the "debug" thread linked above
/Håkan
__________________
Hakan is offline   Reply With Quote
Old 06-11-2014, 04:03   #651
Registered User
 
rgleason's Avatar

Join Date: Mar 2012
Location: Boston, MA
Boat: 1981 Bristol 32 Sloop
Posts: 7,668
Re: OpenCPN Radar Overlay PlugIn

Congrats on your progress. Maybe you need to Settings - plugins - enable?

Sent from my SCH-I545 using Cruisers Sailing Forum mobile app
__________________
rgleason is offline   Reply With Quote
Old 06-11-2014, 06:01   #652
Registered User

Join Date: Feb 2013
Location: Gothenburg, Sweden
Boat: Allegro 33
Posts: 173
Re: OpenCPN Radar Overlay PlugIn

I am looking for a stimuli tool so I can resend Wireshark pcap files so I don't need the radar dome lying around.
Here is one : https://code.google.com/p/ostinato/
Has anyone used such a software and if so, what do you recommend ?

/Hans
__________________
hasse_A is offline   Reply With Quote
Old 06-11-2014, 06:25   #653
Registered User

Join Date: Feb 2010
Location: On the go. Not in Prague.
Posts: 3,906
Re: OpenCPN Radar Overlay PlugIn

Hans...
It should probably work. I personally use Tcpreplay - Pcap editing and replaying utilities and netcat/ncat (Ncat - Netcat for the 21st Century) for this kind of stuff.

Pavel
__________________
nohal is online now   Reply With Quote
Old 06-11-2014, 06:44   #654
Registered User
 
NahanniV's Avatar

Join Date: Mar 2011
Location: On the Boat
Boat: Finnsailer 38
Posts: 1,027
Re: OpenCPN Radar Overlay PlugIn

I can't see how you will be able to do any debugging of the code if the packets are not being received.

It looks to me like the first packet received by the Multicast receive thread should trigger a "first packet" message in the Gradar log window.

Your screen capture is not showing that message.

Perhaps I am making some mistake, but, if so I'd like to hear what it is.

Cheers,
JM.
__________________
NahanniV is offline   Reply With Quote
Old 06-11-2014, 06:44   #655
Registered User

Join Date: Nov 2012
Location: Orust Sweden
Boat: Najad 34
Posts: 1,645
Re: OpenCPN Radar Overlay PlugIn

Quote:
Originally Posted by hasse_A View Post
I am looking for a stimuli tool so I can resend Wireshark pcap files so I don't need the radar dome lying around.
Here is one : https://code.google.com/p/ostinato/
Has anyone used such a software and if so, what do you recommend ?

/Hans
Nice...! I'll have close look to that/Håkan
__________________
Hakan is offline   Reply With Quote
Old 06-11-2014, 07:11   #656
Registered User

Join Date: Feb 2013
Location: Gothenburg, Sweden
Boat: Allegro 33
Posts: 173
Re: OpenCPN Radar Overlay PlugIn

Quote:
Originally Posted by NahanniV View Post
I can't see how you will be able to do any debugging of the code if the packets are not being received.

It looks to me like the first packet received by the Multicast receive thread should trigger a "first packet" message in the Gradar log window.

Your screen capture is not showing that message.

Perhaps I am making some mistake, but, if so I'd like to hear what it is.

Cheers,
JM.
Hi JM!

Have you looked at post 644 ? There is a pcap file attached where I have logged the messages from the radar from start.
I don't know if there is a start message as I don't know what that looks like. At the moment I am just trying to get the environment working taking one problem at a time as they appear.
I will surly need your advise concerning this later on when I have the debugging up and running.
I don'n know how much has to be backward engineered to get the xHD working. One would assume most of the protocol would be the same with only minor changes. If that is the case, help from people with your knowledge will make a huge difference.
If it is needed I will get a Garmin 721 plotter and record data on the link.

Thanks for your support/concern. Any comment is appreciated.

/Hans
__________________
hasse_A is offline   Reply With Quote
Old 06-11-2014, 09:05   #657
Registered User
 
NahanniV's Avatar

Join Date: Mar 2011
Location: On the Boat
Boat: Finnsailer 38
Posts: 1,027
Re: OpenCPN Radar Overlay PlugIn

Quote:
Originally Posted by hasse_A View Post
Hi JM!

Have you looked at post 644 ? There is a pcap file attached where I have logged the messages from the radar from start.
I don't know if there is a start message as I don't know what that looks like. At the moment I am just trying to get the environment working taking one problem at a time as they appear.
I will surly need your advise concerning this later on when I have the debugging up and running.
I don'n know how much has to be backward engineered to get the xHD working. One would assume most of the protocol would be the same with only minor changes. If that is the case, help from people with your knowledge will make a huge difference.
If it is needed I will get a Garmin 721 plotter and record data on the link.

Thanks for your support/concern. Any comment is appreciated.

/Hans
Hi Hans,

Yes I looked at your wireshark capture.
It shows packets that should be being received by the plugin if your network settings are correct; Are you sure there is no Win7 firewall configured ? See the posts and documents by Helmsmatt regarding the Win7 Firewall. Again: you need to get to the point of seeing the "first Packet" message in the gradar log window.

I also compared your capture to other captures from Helmsmatt and Seconcat.
Helmsmatt eventually got his working.
Secondcat did not.
Unfortunately, your wireshark capture is like the one from Secondcat:
Even though there are packets from the RADAR that should be received by the plugin, there are none that are understood by the plugin code.

The plugin is looking for a Garmin Packet type in the first four bytes of the user data: There are only three that are understood: the first one is x02A5(status) it will look like "a5 02 00 00" at the beginning of the packet data field.

There are other messages in all the capture files that I don't understand: with unknown Garmin packet type, and to other multicast addresses with different port numbers.

Good luck with this.
Cheers,
JM.
__________________
NahanniV is offline   Reply With Quote
Old 06-11-2014, 16:48   #658
Registered User

Join Date: Feb 2013
Location: Gothenburg, Sweden
Boat: Allegro 33
Posts: 173
Re: OpenCPN Radar Overlay PlugIn

Yes JM you are right. The xHD and the HD have different protocols.
So, to get the xHD working will take some effort.
There seem to be a lot more message types for the xHD.
How much is known about the older HD radar ?
Dave obviously was able to backward engineer the protocol for that one.
I see he's been off line for a couple of days. Do you know his strategy ?
If you have a plotter, would it not be possible to feed it recorded data
and then manipulate bit by bit in a packet to determine what that bit/byte
is ? Then connect the plotter to the scanner and record/monitor the
packets going to the scanner. Just some thoughts.

/Hans
__________________
hasse_A is offline   Reply With Quote
Old 06-11-2014, 17:33   #659
Registered User

Join Date: Feb 2010
Location: On the go. Not in Prague.
Posts: 3,906
Re: OpenCPN Radar Overlay PlugIn

Hans...
There is quite some juice, even not directly connected to Netzob on Netzob: Reverse Engineering Communication Protocols

Pavel
__________________
nohal is online now   Reply With Quote
Old 06-11-2014, 22:52   #660
Registered User

Join Date: Feb 2013
Location: Gothenburg, Sweden
Boat: Allegro 33
Posts: 173
Re: OpenCPN Radar Overlay PlugIn

Thanks Pavel!

I think I have to do some reading ..........

/Hans
__________________

__________________
hasse_A is offline   Reply With Quote
Reply

Tags
opencpn, paracelle, radar

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
OpenCpn for Navigation gpshephe Marine Electronics 10 30-12-2013 10:33
What Do You Think of Selling OpenCPN? esan6 OpenCPN 25 23-10-2013 09:35
Help with OpenCPN Sailorman375 Navigation 3 11-08-2013 21:58
For Sale: Radar Mount sailorman14 Classifieds Archive 5 23-04-2012 21:50
OpenCPN Version 2.6 Beta Build 1524 bdbcat OpenCPN 115 09-04-2012 12:10


Our Communities

Our communities encompass many different hobbies and interests, but each one is built on friendly, intelligent membership.

» More about our Communities

Automotive Communities

Our Automotive communities encompass many different makes and models. From U.S. domestics to European Saloons.

» More about our Automotive Communities

Marine Communities

Our Marine websites focus on Cruising and Sailing Vessels, including forums and the largest cruising Wiki project on the web today.

» More about our Marine Communities


Copyright 2002- Social Knowledge, LLC All Rights Reserved.

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


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

ShowCase vBulletin Plugins by Drive Thru Online, Inc.