Hi Nvidia- developers, I’m trying to use this library can-isotp on a Jetson TX2 Board inside of an docker container.
If I test the following code from the docs:
import isotp
s = isotp.socket()
s2 = isotp.socket()
# Configuring the sockets.
s.set_fc_opts(stmin=5, bs=10)
s.bind("vcan0", isotp.Address(rxid=0x123 txid=0x456))
s2.bind("vcan0", isotp.Address(rxid=0x456, txid=0x123))
s2.send(b"Hello, this is a long payload sent in small chunks of 8 bytes.")
print(s.recv())
I get the following error message:
root@d1a297bae985:/# python3.7 test.py
Traceback (most recent call last):
File “test.py”, line 3, in
s = isotp.socket()
File “/usr/local/lib/python3.7/site-packages/isotp/tpsock/init.py”, line 74, in init
self._socket = socket_module.socket(socket_module.AF_CAN, socket_module.SOCK_DGRAM, socket_module.CAN_ISOTP)
File “/usr/local/lib/python3.7/socket.py”, line 151, in init
_socket.socket.init(self, family, type, proto, fileno)
OSError: [Errno 97] Address family not supported by protocol
I already searched the internet but didn’t find anything helping me in this context. I am not sure why it isn’t working (it worked before on a RPI3). Ifconfig shows both interfaces, can0 and can1.
I would really appreciate any help!