1

I am trying to set a can connection with one node. I am using IXXAT USB to can adapter http://www.netbiter.com/images/librariesprovider8/product-images/pc-can-interfaces/interfaces-usb-to-can-2-compact-subd.png?sfvrsn=2

and using the following socket can driver but gettin an error while setting the bitrate

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

Below are the results from the commands that might help in getting the idea what's wrong.

ip link show

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

can_raw 20480 0
can 32768 1 can_raw
can_dev 20480 2 ixx_pci,ixx_usb

dmesg

[ 592.860214] usb 1-1: Product: USB-to-CAN V2
[ 592.860218] usb 1-1: Manufacturer: IXXAT
[ 592.860222] usb 1-1: SerialNumber: HW442744
[ 592.869494] ixx_usb 1-1:1.0 can0: attached to USB-to-CAN_V2 channel 0 (device HW442744)
[ 742.106278] usb 1-1: sending command failure: -32
[ 742.106366] ixx_usb 1-1:1.0 can0: couldn't set bitrate (err -32)
[ 813.182948] usb 1-1: sending command failure: -32
[ 813.183036] ixx_usb 1-1:1.0 can0: couldn't set bitrate (err -32)

Setting bitrate

Xyz@Abc:~/socketcan_1-1-92-0_20150508$ sudo ip link set can0 type can bitrate 1000000
RTNETLINK answers: Broken pipe




Any kind of inputs will be helpful.

Vishal Rawat
  • 325
  • 1
  • 3
  • 19

1 Answers1

0

I can not see any error on your side, but never used the IXXAT USB SocketCAN driver. Have you tried it with other bitrates, lower than 1000000?

hjoe
  • 51
  • 3
  • please try sudo ip link set can0 up type can bitrate 500000 the difference is setting "up" the network – hjoe Aug 21 '16 at 09:33
  • Hello hjoe, thanks for the input I have been using the same commands to bring up the interface.But some times i have to pull ou the adapter from the PC and plug it again, then it works.Not sure about the reason. – Vishal Rawat Aug 23 '16 at 10:57