我在RaspberryPi3上使用了python can isotp,并用示例代码对其进行了测试,但是我得到了一个错误。在
我的简单代码:
import isotp
s = isotp.socket()
s2 = isotp.socket()
# Configuring the sockets.
s.set_fc_opts(stmin=5, bs=10)
#s.set_general_opts(...)
#s.set_ll_opts(...)
s.bind("vcan0" rxid=0x123 txid=0x456) # We love named parameters!
s2.bind("vcan0", rxid=0x456, txid=0x123)
s2.send(b"Hello, this is a long payload sent in small chunks of 8 bytes.")
print(s.recv())
错误:
File "/usr/local/opt/python-3.7.0/lib/python3.7/socket.py", line 151, in __init__
_socket.socket.__init__(self, family, type, proto, fileno)
OSError: [Errno 93] Protocol not supported
有人能帮我找到解决问题的办法吗?在
我遵循这些instructions(稍作修改)使
isotp
使用最新的Raspbian拉伸处理树莓pi3b+。在以下是我执行命令的确切顺序:
但是,我在Python中没有使用它。我只是测试了提供给}。在
isotp
使用的工具,例如isotpsend
和{相关问题 更多 >
编程相关推荐