Hi,
I'm getting an invalid handle error.
result = XCPApi.Connect(m_XcpSession, 0, msg, (ushort)msg.Length);
XCPApi.Connect seems to be working successfully but when I use same handle for AddSlaveOnCan, I get "The given handle is invalid" error. Variables are as below.
private TXCPChannel m_XcpChannel;
private TXCPHandle m_XcpSession;
private TXCPProtocolLayerConfig m_XcpProtocolConfig;
private TXCPTransportLayerCAN m_XcpSlaveData;
result = XCPApi.AddSlaveOnCAN(m_XcpChannel, m_XcpSlaveData, m_XcpProtocolConfig, out m_XcpSession);
Can you help me please? Thanks in advance.
Invalid handle
-
- Sales & Support
- Posts: 1083
- Joined: Fri 20. Sep 2019, 13:31
Re: Invalid handle
Hello,
Please make sure that you have the latest PCANBasic API and PCAN-XCP API Installed.
PCANBasic API:
https://www.peak-system.com/fileadmin/m ... -basic.zip
PCAN-XCP API:
https://www.peak-system.com/fileadmin/m ... AN-XCP.ZIP
Furthermore, is there a XCP-Slave available on the Bus and is it answering?
Please also check, if the Example appliaction in the PCAN-XCP package works correctly.
(You should see the Slave respond after clicking "Connect Slave")
Please report back to us regarding this.
Best Regards
Marvin
Please make sure that you have the latest PCANBasic API and PCAN-XCP API Installed.
PCANBasic API:
https://www.peak-system.com/fileadmin/m ... -basic.zip
PCAN-XCP API:
https://www.peak-system.com/fileadmin/m ... AN-XCP.ZIP
Furthermore, is there a XCP-Slave available on the Bus and is it answering?
Please also check, if the Example appliaction in the PCAN-XCP package works correctly.
(You should see the Slave respond after clicking "Connect Slave")
Please report back to us regarding this.
Best Regards
Marvin
---
Marvin Heidemann
PEAK-Support Team
Marvin Heidemann
PEAK-Support Team