altelch / iso-tp

ISO 15765-2 TP implementation for Arduino
GNU General Public License v3.0
82 stars 42 forks source link

mf_test #15

Closed CKRS2 closed 3 years ago

CKRS2 commented 3 years ago

Hi all,

I've got a question about sending the mf_test buffer using the example send_receive provided.

When I change the code to hold the mf_test values it doesn't get send?!

   txMsg.len = sizeof(mf_test);
   txMsg.tx_id = tx_can_id;
   txMsg.rx_id = rx_can_id;
   memcpy(txMsg.Buffer,mf_test,sizeof(mf_test));
   Serial.println(F("Send..."));
   isotp.send(&txMsg);

The buffer is being filled with the 32 values.

What am I doing wrong?

CKRS2 commented 3 years ago

I've enabled debugging to see what is going on.

Once sending more than 7 bytes of data the ISO-TP status changes to 4 (WAIT_FIRST_FC).

In case of sending the provided mf_test array on the receiving side the buffer prints: 7E0 [8] 10 20 00 01 02 03 04 05

The remaining 26 bytes seem to miss/ not being sent. This length is however specified in the debug information:

ISO-TP State: 4
Length      : 26
Wait first FC
FC timeout during receive wait_fc=36828 delta=250

How can I solve this?

altelch commented 3 years ago

Please try to revert https://github.com/altelch/iso-tp/commit/db090eeb0e4dc954c3b867ce1afd9115f9a716b5 This was the latest change, might be related to this. Can't test, no Hardware anymore.

CKRS2 commented 3 years ago

Please try to revert db090ee This was the latest change, might be related to this. Can't test, no Hardware anymore.

Thank you for your reply.

Unfortunately, I was already using the latest release in which the above-mentioned was included.

In case of any other causes, please let me know!