Cruisers Forum
 


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 04-10-2019, 12:41   #136
Registered User

Join Date: Mar 2011
Posts: 725
Re: Twocan - a new Plugin

The errors referring to unresolved external symbols means that the linker can't find those function calls in the external libraries, in this case the CAN Abstraction Layer (canal) libraries.

My guess is either the canal libraries are missing (for some reason not copied over when you cloned the twocan plugin drivers from github), or as I'm fearing, that one day this would come back to bite me, a 64bit issue.

Can you confirm whether canal32.lib &canal32.dll are indeed in the Toucan/lib folder ?

If so, then I think your 64bit build is looking for the 64 bit libraries. I have just copied these two files canal64.lib and canal64.dll up to github and also made a change to the Toucan CMakeLists.txt file to hopefully link your code with the 64 bit version of the canal libraries. A git pull should be enough to update your local repository with these updates.

Thanks very much for your perseverance.
stevead is offline   Reply With Quote
Old 05-10-2019, 06:30   #137
Registered User

Join Date: Jan 2018
Location: Belgium
Boat: Raider 18 Cuddy
Posts: 68
Re: Twocan - a new Plugin

Quote:
Originally Posted by stevead View Post
Can you confirm whether canal32.lib &canal32.dll are indeed in the Toucan/lib folder ?

If so, then I think your 64bit build is looking for the 64 bit libraries. I have just copied these two files canal64.lib and canal64.dll up to github and also made a change to the Toucan CMakeLists.txt file to hopefully link your code with the 64 bit version of the canal libraries. A git pull should be enough to update your local repository with these updates.

Thanks very much for your perseverance.
canal32.lib & canal32.dll are in the folder.
After a git pull and with the 64bit libs, it compiles.

Next is the plugin that does not compiles
Problem with wxwidgets
Do you have the latest windows plugin for me Steven?
Ben S is offline   Reply With Quote
Old 06-10-2019, 15:04   #138
Registered User

Join Date: Mar 2011
Posts: 725
Re: Twocan - a new Plugin

Hi Ben,
Quote:
Next is the plugin that does not compiles
Problem with wxwidgets
What is the error message ? Did you build wxWidgets from the source or did you use pre-built binaries ? Which version of wxWidgets ?
Quote:
Do you have the latest windows plugin for me
Very sorry, but I'm sailing my last few days of the season before hauling the boat out for winter and I don't have a Windows build system with me with which to compile a version for you.
stevead is offline   Reply With Quote
Old 24-10-2019, 10:50   #139
Registered User

Join Date: Jan 2018
Location: Belgium
Boat: Raider 18 Cuddy
Posts: 68
Re: Twocan - a new Plugin

The Rusoku TouCAN adapter is not in the list to select.

Compiled the latest plugin
toucan.dll in drivers map

Toucan adapter is visible in device manager

Any idea what's wrong?
Attached Thumbnails
Click image for larger version

Name:	twocan.JPG
Views:	92
Size:	62.2 KB
ID:	202019  
Ben S is offline   Reply With Quote
Old 25-10-2019, 15:09   #140
Registered User

Join Date: Mar 2011
Posts: 725
Re: Twocan - a new Plugin

Are there any error messages logged in the OpenCPN log file ?

If a plugin driver dll is present in the opencpn\plugins\twocan_pi\data\drivers directory then the plugin will attempt to load the driver. If it fails to load the driver or fails to correctly find the exported functions then it will log an error in the log file.
stevead is offline   Reply With Quote
Old 26-10-2019, 10:47   #141
Registered User

Join Date: Jan 2018
Location: Belgium
Boat: Raider 18 Cuddy
Posts: 68
Re: Twocan - a new Plugin

yes, error

Code:
Invalid DLL Handle Error: 193 for C:\Program Files (x86)\OpenCPN\plugins\twocan_pi\data\drivers\toucan.dll
Ben S is offline   Reply With Quote
Old 27-10-2019, 01:53   #142
Registered User

Join Date: Mar 2011
Posts: 725
Re: Twocan - a new Plugin

ERROR_BAD_EXE_FORMAT
193 (0xC1)
%1 is not a valid Win32 application.

This has been lurking at the back of my mind for some time.

On 64bit versions of Windows any driver naturally will be 64bits. The Rusoku plugin that you have compiled and linked with the CANAL 64bit library will also be 64bit, yet the TwoCan plugin & OpenCPN are 32bit.

This is one of those Oh F..k moments. I don’t know why there is only a 32bit version of OpenCPN for Windows. Let’s ask.

The alternative solution will be for me to rewrite the Rusoku (and Kvaser) plugin driver to use a stub that uses Named Pipes to communicate between a 32bit application and the 64bit driver.

(Note that I have been using an old Windows 7 32bit laptop for my dev & testing, hence why it works fine for me.)
stevead is offline   Reply With Quote
Old 28-10-2019, 09:53   #143
Registered User

Join Date: Jan 2018
Location: Belgium
Boat: Raider 18 Cuddy
Posts: 68
Re: Twocan - a new Plugin

Maybe rgleason can add the nessecary files for appveyor to the twocanplugindrivers repository?
Ben S is offline   Reply With Quote
Old 28-10-2019, 13:34   #144
Registered User

Join Date: Oct 2019
Location: Vilnius, Lithuania
Posts: 7
Send a message via Skype™ to gedass2000
Re: Twocan - a new Plugin

Hi,
I compilled twocan plugin and get an error like this:
Code:
10:23:06 PM: PlugInManager: Loading PlugIn: C:\Program Files (x86)\OpenCPN\plugins\twocan_pi.dll
10:23:06 PM: Error: Failed to load shared library 'C:\Program Files (x86)\OpenCPN\plugins\twocan_pi.dll' (error 126: The specified module could not be found.)
10:23:06 PM:    PlugInManager: Cannot load library: C:\Program Files (x86)\OpenCPN\plugins\twocan_pi.dll
what could be wrong ?

Ged
gedass2000 is offline   Reply With Quote
Old 31-10-2019, 13:01   #145
Registered User

Join Date: Jan 2018
Location: Belgium
Boat: Raider 18 Cuddy
Posts: 68
Re: Twocan - a new Plugin

Same here

Code:
20:54:30: Fout: TwoCan Settings, Invalid DLL Handle Error: 126 for C:\Program Files (x86)\OpenCPN\plugins\twocan_pi\data\drivers\toucan.dll
20:54:30: TwoCan Settings, Attempting to load driver: C:\Program Files (x86)\OpenCPN\plugins\twocan_pi\data\drivers\yachtdeviceslog.dll
Ben S is offline   Reply With Quote
Old 31-10-2019, 15:11   #146
Registered User

Join Date: Mar 2011
Posts: 725
Re: Twocan - a new Plugin

Re:
Code:
10:23:06 PM: PlugInManager: Loading PlugIn: C:\Program Files (x86)\OpenCPN\plugins\twocan_pi.dll
10:23:06 PM: Error: Failed to load shared library 'C:\Program Files (x86)\OpenCPN\plugins\twocan_pi.dll' (error 126: The specified module could not be found.)
10:23:06 PM:    PlugInManager: Cannot load library: C:\Program Files (x86)\OpenCPN\plugins\twocan_pi.dll
Not sure what the error is, unfortunately Windows Error Code 126 doesn't provide much detail. I would expect the problem is due to a compile/link error. Ensure that you have linked with the correct version of wxWidgets and opencpn.lib for the version of OpenCPN that you are using.

I think the dumpbin utility could be useful in this context.

Re:
Code:
20:54:30: Fout: TwoCan Settings, Invalid DLL Handle Error: 126 for C:\Program Files (x86)\OpenCPN\plugins\twocan_pi\data\drivers\toucan.dll
20:54:30: TwoCan Settings, Attempting to load driver: C:\Program Files (x86)\OpenCPN\plugins\twocan_pi\data\drivers\yachtdeviceslog.dll
This is a different error.
My guess is you're attempting to use a 32bit version of the Rusoku plugin driver (compiled with the 32 bit version of the CANAL library) but on a 64 bit version of Windows which to be expected has loaded 64bit Rusoku WinUSB driver. Unfortunately a 32bit application cannot invoke functions in a 64 bit driver. The only solution in your case is to either downgrade your OS to a 32 bit version, attempt to compile openCPN and the TwoCan plugin as a 64 bit version, or wait for me to re-architect the Rusoku plugin driver.
stevead is offline   Reply With Quote
Old 01-11-2019, 00:31   #147
Registered User

Join Date: Oct 2019
Location: Vilnius, Lithuania
Posts: 7
Send a message via Skype™ to gedass2000
Re: Twocan - a new Plugin

But CANALView GUI 32bit and toucan32.dll works properly on 64bit OS so twocan 32bit plugin should work as well imho.


Quote:
Re:
Code:
20:54:30: Fout: TwoCan Settings, Invalid DLL Handle Error: 126 for C:\Program Files (x86)\OpenCPN\plugins\twocan_pi\data\drivers\toucan.dll
20:54:30: TwoCan Settings, Attempting to load driver: C:\Program Files (x86)\OpenCPN\plugins\twocan_pi\data\drivers\yachtdeviceslog.dll
This is a different error.
My guess is you're attempting to use a 32bit version of the Rusoku plugin driver (compiled with the 32 bit version of the CANAL library) but on a 64 bit version of Windows which to be expected has loaded 64bit Rusoku WinUSB driver. Unfortunately a 32bit application cannot invoke functions in a 64 bit driver. The only solution in your case is to either downgrade your OS to a 32 bit version, attempt to compile openCPN and the TwoCan plugin as a 64 bit version, or wait for me to re-architect the Rusoku plugin driver.
gedass2000 is offline   Reply With Quote
Old 04-11-2019, 09:43   #148
Registered User

Join Date: Mar 2011
Posts: 725
Re: Twocan - a new Plugin

Announcing version 1.6 of the TwoCan plugin

This incremental release is perhaps of more interest to motor boat enthusiasts and adds support for Parameter Group Numbers 127488 (Engine Parameters, Rapid Update), 127489 (Engine Parameters, Dynamic) and 127505 (Fluid Level) which may be sent by engine and tank level sensors on NMEA 2000® networks.

The more astute sailor may well ask "That's all well and good being able to receive RPM's, Oil Pressure and how much fuel I have left, but how do I visualize this in OpenCPN ?"

Also announcing the release of "yet another dashboard", the Engine Dashboard. Please refer to the separate post for further details.
stevead is offline   Reply With Quote
Old 04-11-2019, 21:25   #149
Registered User

Join Date: Apr 2018
Location: Saugatuck, MI
Boat: Nauticat 32
Posts: 286
Re: Twocan - a new Plugin

Greeetings,

I have two YachtDevices interfaces on my boat: The main one a USB interface, feeding directly into the NMEA 2000 network and a WIFI version. Both are "smart" adapters and translate 2K to 0183. Work well. They are also suppose to "passthrough" 2K directly. Is there a way I can have toucan talk to either of them?
SCarns is offline   Reply With Quote
Old 05-11-2019, 15:30   #150
Registered User

Join Date: Mar 2011
Posts: 725
Re: Twocan - a new Plugin

Quote:
have two YachtDevices interfaces on my boat: The main one a USB interface, feeding directly into the NMEA 2000 network and a WIFI version. Both are "smart" adapters and translate 2K to 0183. Work well. They are also suppose to "passthrough" 2K directly. Is there a way I can have toucan talk to either of them?
No.

In your scenario there no need for TwoCan as the YachtDevices interfaces when working in 0183 mode connect OpenCPN to your NMEA 2000 network and perform the bi-directional translation between 2K and 0183.
stevead is offline   Reply With Quote
Reply

Tags
plug


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
New IAC Fleetcode Plugin for OpenCPN CBorchardt OpenCPN 77 23-04-2019 05:40
Plugin development... How to receive chart objects in my plugin? dmartinez OpenCPN 6 04-08-2017 00:56
New History Plugin for OpenCPN seandepagnier OpenCPN 11 04-10-2010 14:11

Advertise Here


All times are GMT -7. The time now is 01:50.


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.