Page 1 of 1

TransportLayerCommand sends on MasterID instead on the BroadcastID

Posted: Thu 26. Nov 2020, 19:16
by Flo1989
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

Re: TransportLayerCommand sends on MasterID instead on the BroadcastID

Posted: Fri 27. Nov 2020, 09:09
by K.Wagner
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 5272 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.

Re: TransportLayerCommand sends on MasterID instead on the BroadcastID

Posted: Fri 27. Nov 2020, 09:42
by K.Wagner
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.

Re: TransportLayerCommand sends on MasterID instead on the BroadcastID

Posted: Fri 27. Nov 2020, 11:09
by K.Wagner
Hello,

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

Re: TransportLayerCommand sends on MasterID instead on the BroadcastID

Posted: Mon 30. Nov 2020, 16:43
by Flo1989
Hi,

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

Re: TransportLayerCommand sends on MasterID instead on the BroadcastID

Posted: Tue 1. Dec 2020, 08:16
by K.Wagner
Hello,

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

Closed.