Closed jpvolkmann closed 3 months ago
Are you able to share a reproducing code? I will check in more details later.
You can enable logging in debug to get more info You can also run the unit tests to see if you broke something.
blocking mode is unit tested. Maybe there's a case that is not covered and if that is the case, I want to recreate the case in the unit test and fix it after.
It's easy to reproduce with the test framework if you reduce the number of bytes to fit into one frame (CAN Single Frame),
e.g. from 100 to 5 in the snippet below:
def test_blocking_send(self):
self.layer1.params.blocking_send = True
self.layer1.load_params()
# layer2 has a thread to handle reception
self.layer1.send(bytes([1] * 5), send_timeout=5)
self.assert_no_error_reported()
Oh. blocking_send is a relatively new feature. It is possible that there's an issue with it. I will add a test case to test the tsingle frame case and fix soon. If it goes well, you can expect a new bugfixed release tomorrow
Thanks, I can also use "non-blocking send", so it's not urgent... Just want to avoid that somebody else is facing the same problem.
I can reproduce. Your fix is close to what we need. There is indeed no indication that a single frame is sent for blocking send. Fixing seems to cause troubles with the rate limiter, I will double check that
Thanks for the bug report.
Fixed by #130
V2.0.6 is released and includes the fix to that problem Regards
Hello,
just started using the isotp and wanted to send a simple message (Single Frame). When "
blocking_send
" is set toTrue
thesend()
command times out while if "blocking_send
" is set toFalse
everything is working as expected.I tried to understand the FSM in
protocol.py
and realized thatself.active_send_request.complete(True)
never get called on the transmitted request.Checked especially line 1060ff of protocol.py
I temporarily fixed it by adding a check for a
active_send_reguest
but not sure if this will break anything else.Do I use something wrong?
The code is integrated in some other class: