TransportLayerCommand sends on MasterID instead on the BroadcastID

A free API for the communication with control units based on the Universal Measurement and Calibration Protocol (XCP) by ASAM for Windows®
Locked
Flo1989
Posts: 2
Joined: Thu 26. Nov 2020, 18:47

TransportLayerCommand sends on MasterID instead on the BroadcastID

Post by Flo1989 » Thu 26. Nov 2020, 19:16

Hi,

i have some trouble with the TransportLayerCommand (Subcommand GET_SLAVE_ID). When i Send the command in async mode it returns "XCP_ERR_INSUFFICIENT_BUFFER". When i send it in synchron mode it returns XCP_ERR_OK but sends on Master ID. But i want send on the Broadcast ID which is configured in the TXCPTransportLayerCAN struct.

Code: Select all

           
            TXCPResult result;

            msg = new byte[8];
            txmsg = new byte[6];
            txmsg[0] = (byte)'X';
            txmsg[1] = (byte)'C';
            txmsg[2] = (byte)'P';
            txmsg[3] = (byte)0x0; //identify by echo
            XCPApi.ResetQueue(m_XcpSession, TXCPQueue.XCP_CTO_QUEUE);
            result = XCPApi.TransportLayerCommand(m_XcpSession, (byte)TXCPSubCommands.XCP_GET_SLAVE_ID, txmsg); //async mode
            //result = XCPApi.TransportLayerCommand(m_XcpSession, (byte)TXCPSubCommands.XCP_GET_SLAVE_ID, txmsg, (byte)txmsg.Length, msg, (byte)msg.Length); //synchron mode
            libx_Log.Items.Add(result);
            System.Threading.Thread.Sleep(500);
Can anybody tell me how i can send on the Broadcast ID?

Thanks
Flo

K.Wagner
Software Development
Software Development
Posts: 768
Joined: Wed 22. Sep 2010, 13:36

Re: TransportLayerCommand sends on MasterID instead on the BroadcastID

Post by K.Wagner » Fri 27. Nov 2020, 09:09

Hello,
Flo1989 wrote:
Thu 26. Nov 2020, 19:16
When i Send the command in async mode it returns "XCP_ERR_INSUFFICIENT_BUFFER".
Indeed, this seems to be a bug. For two of three sub commands of TRANSPORT_LAYER_CMD it is mandatory to use the synchron version of the function. GET_SLAVE_ID is the exception, but the API is currently not allowing it.
Flo1989 wrote:
Thu 26. Nov 2020, 19:16
When i send it in synchron mode it returns XCP_ERR_OK but sends on Master ID
In our test, this is working as expected. We use one of the examples delivered with the API to do the test. In it, the broadcast ID is configured to 0x300, Master ID to 0x200, and Slave ID to 0x100 (using XCPApi.InitializeCanChannel). We just added at the end, a TransportLayderCommand call. See results on the following picture:
GET_SLAVE_ID Broadcast test
GET_SLAVE_ID Broadcast test
XCP.PNG (22.06 KiB) Viewed 455 times
We will fix the function TransportLayerCommand to allow using it asynchron, when sending the sub command GET_SLAVE_ID. Thanks for bringing this to our attention.
Best regards,
Keneth

K.Wagner
Software Development
Software Development
Posts: 768
Joined: Wed 22. Sep 2010, 13:36

Re: TransportLayerCommand sends on MasterID instead on the BroadcastID

Post by K.Wagner » Fri 27. Nov 2020, 09:42

Hello again,
Flo1989 wrote:
Thu 26. Nov 2020, 19:16
When i send it in synchron mode it returns XCP_ERR_OK but sends on Master ID
After further tests we were able to get the Master ID too, as you described. This will also be fixed.

Thanks for bringing this to our attention.
Best regards,
Keneth

K.Wagner
Software Development
Software Development
Posts: 768
Joined: Wed 22. Sep 2010, 13:36

Re: TransportLayerCommand sends on MasterID instead on the BroadcastID

Post by K.Wagner » Fri 27. Nov 2020, 11:09

Hello,

if you are interested in a test version (RC version), please send an email to support[at]peak-system.com, mentioning this topic.
Best regards,
Keneth

Flo1989
Posts: 2
Joined: Thu 26. Nov 2020, 18:47

Re: TransportLayerCommand sends on MasterID instead on the BroadcastID

Post by Flo1989 » Mon 30. Nov 2020, 16:43

Hi,

and thank you very much, with the RC Version its working well!

K.Wagner
Software Development
Software Development
Posts: 768
Joined: Wed 22. Sep 2010, 13:36

Re: TransportLayerCommand sends on MasterID instead on the BroadcastID

Post by K.Wagner » Tue 1. Dec 2020, 08:16

Hello,

thanks for your feedback! This version will be released the coming week.

Closed.
Best regards,
Keneth

Locked