0

I am transmitting data with Python-can using isotp.stack().

Successfully able to do the same for 8 bytes of frame size but not able to transmit for 64 bytes of frame.

rxid and txid are enabled for 64 bytes of frame size as tested using capl script.

I even tried to add param 'tx_data_min_length': 64 in the stack, but did not work.

Below is my code that I am using.

bus = VirtualBus(net_channel=channel)
print(bus.bus.channel_info)
address = isotp.Address(addressing_mode=isotp.AddressingMode.Normal_29bits, rxid=rxid, txid=txid)

stack = isotp.CanStack(bus=bus.bus,
                       address=address,
                       error_handler=print,
                       params={'tx_padding': 0xCC,
                               'can_fd': True,
                               'tx_data_length': 64,
                               'rx_consecutive_frame_timeout': 100000})
stack.send(data)

while stack.transmitting():
    stack.process()
    time.sleep(stack.sleep_time())

ERROR:

E RuntimeError: (c_ubyte_Array_8) <class 'IndexError'>: invalid index

Is there any other params I am missing out?

Document that I have read https://can-isotp.readthedocs.io/en/latest/isotp/implementation.html

  • This error has been resolved when I set fd=True while initializing can bus obj. But Now I have encountered different error which looks like the issue is with the Canoe channel/network configuration. I have raised issue under python-can for some help. This is not an issue with python-can-isotp. – Farhat Jahan Apr 30 '23 at 16:32

0 Answers0