Am 10.05.21 um 12:02 schrieb Bartosz Zdanowicz: > pt., 7 maj 2021 o 09:59 Patrick Menschel <menschel.p@xxxxxxxxx> napisał(a): >> try to enable CAN_ISOTP_WAIT_TX_DONE via socket.setsockopt() . >> https://github.com/raspberrypi/linux/blob/rpi-5.10.y/net/can/isotp.c#L14 >> >> https://gitlab.com/Menschel/socketcan/-/blob/master/socketcan/socketcan.py#L583 >> >> and wrap tx into a try-except block. >> >> try: >> self.process_data(socket=socket) >> except OSError as e: >> print(e) >> >> With this you actually have a chance to do error handling on tx path >> instead of hitting an already present error of the previous op. >> > I used following code: > > import isotp > import time > s = isotp.socket() > s._socket.settimeout(2) > s.set_opts(s.flags.WAIT_TX_DONE) > s.bind("can0", isotp.Address(rxid=1, txid=2)) > > s.send(b"aaaaaaaaa") -> returns immediately with number of bytes > s.send(b"aaaaaaaaa") -> same OS error as above (Error 70) > OK, this is really strange. I have no clue how that is possible unless it's on kernel side. I have to write a test for it later. Regards, Patrick