Why do I receive the error "Unable to unlock DAQ resources due to error SEED_KEY_E​RROR_LOAD_​LIBRARY_FA​ILED" while connecting via XCP?

15 views (last 30 days)
I am trying to create an XCP connection between MATLAB and an ECU, using a PEAK device and I have the following problem with the SeedNKey "process" : "Unable to unlock DAQ resources due to error SEED_KEY_ERROR_LOAD_LIBRARY_FAILED"
Here are the steps that I follow:
1) Access the A2L file (I tested the A2L file, and it reads the data correctly)
2) Connect to hardware (the device is working with a CAN communication, so the problem is not with the device)
3) Configure the channel to unlock the slave – here I added the DLL file containing the seed and key algorithm.
4) Connect the channel to the slave -> here it appears the problem because the status returned by "mexXCPSeedKey" is 4 (Load library failed), but the seed is the same as on the ECU, so it seems that the DLL file is not causing the problem.
*This DLL file is also used in CANape, and it’s working.
What is causing this error?

Accepted Answer

MathWorks Support Team
MathWorks Support Team on 19 May 2021
Edited: MathWorks Support Team on 19 May 2021
The error is due to a bitness mismatch. The DLL being used is 32-bit while MATLAB is 64-bit, which is not supported. Since we no longer offer 32-bit MATLAB, you must use a 64-bit seed & key DLL to connect via XCP in MATLAB.
If this 32-bit DLL was obtained from 32-bit CANape, then a possible workaround is to use 64-bit CANape instead. CANape is 64-bit starting with version 17 as showing in the following Vector KnowledgeBase article:

More Answers (0)

Products


Release

R2018b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!