【问题标题】:Can Bus set bitrate error | RTNETLINK broken pipeCan Bus 设置比特率错误 | RTNETLINK 断管
【发布时间】:2016-08-05 14:40:25
【问题描述】:

我正在尝试设置与一个节点的 can 连接。 我正在使用 IXXAT USB 转接头 http://www.netbiter.com/images/librariesprovider8/product-images/pc-can-interfaces/interfaces-usb-to-can-2-compact-subd.png?sfvrsn=2

使用以下套接字可以驱动,但在设置比特率时会出错

"http://www.ixxat.com/support/file-and-documents-download/drivers/socketcan-driver

以下是可能有助于了解问题所在的命令结果。

ip 链接显示

1: lo: mtu 65536 qdisc noqueue state UNKNOWN mode DEFAULT group default link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
2: eth0: mtu 1500 qdisc mq state UP mode DEFAULT group default qlen 1000 link/ether 00:07:32:38:ab:49 brd ff:ff:ff:ff:ff:ff
3: eth1: mtu 1500 qdisc mq state DOWN mode DEFAULT group default qlen 1000 link/ether 00:07:32:38:ab:4a brd ff:ff:ff:ff:ff:ff
5:can0:mtu 16 qdisc noop state DOWN mode DEFAULT group default qlen 10

xyz@abc:~/socketcan_1-1-92-0_20150508$ lsmod | grep 可以

can_raw 20480 0
可以 32768 1 can_raw
can_dev 20480 2 ixx_pci,ixx_usb

dmesg

[ 592.860214] USB 1-1:产品:USB-to-CAN V2
[592.860218] USB 1-1:制造商:IXXAT
[592.860222] USB 1-1:序列号:HW442744
[592.869494]ixx_usb 1-1:1.0 can0:连接到 USB-to-CAN_V2 通道 0(设备 HW442744)
[742.106278]usb 1-1:发送命令失败:-32
[742.106366]ixx_usb 1-1:1.0 can0:无法设置比特率(错误 -32)
[813.182948]usb 1-1:发送命令失败:-32
[813.183036]ixx_usb 1-1:1.0 can0:无法设置比特率(错误 -32)

设置比特率

xyz@Abc:~/socketcan_1-1-92-0_20150508$ sudo ip link set can0 type可以比特率1000000
RTNETLINK 答案:断管




任何类型的输入都会有所帮助。

【问题讨论】:

    标签: can-bus socketcan


    【解决方案1】:

    我看不到您这边有任何错误,但从未使用过 IXXAT USB SocketCAN 驱动程序。您是否尝试过低于 1000000 的其他比特率?

    【讨论】:

    • 请尝试 sudo ip link set can0 up type can bitrate 500000 不同的是设置“up”网络
    • 您好 hjoe,感谢您的输入,我一直在使用相同的命令来调出界面。但有时我必须从 PC 中拔出适配器并重新插入,然后才能正常工作。不确定原因。
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2018-10-21
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2021-05-01
    • 1970-01-01
    相关资源
    最近更新 更多