8devices Community https://www.8devices.com/community/ |
|
USB2CAN bus error and protocol violation https://www.8devices.com/community/viewtopic.php?f=16&t=936 |
Page 1 of 1 |
Author: | dlederman [ 20 Mar 2016, 20:29 ] |
Post subject: | USB2CAN bus error and protocol violation |
I'm working with the 8devices USB2CAN device which successfully logged several sets of data from an automotive CANBus. I used can-utils on an Ubuntu (Linux) PC. Working in Terminal, the specific command was: candump -l any,0:0,#FFFFFFFF Below is a sample of the data logged: Unix Timestamp CAN device CAN ID CAN message (1457019889.244736) can0 20000088 #000002000000007F Apparently the CAN ID indicates two errors: bus error and protocol violation Any thoughts on how to clear these errors and log data correctly? Thanks. |
Author: | krumboeck [ 27 Mar 2016, 07:24 ] |
Post subject: | Re: USB2CAN bus error and protocol violation |
You cannot (and need not) clear these errors on the software side. Which pins do you have connected? Can you provide a simple schematic? regards, Bernd |
Author: | krumboeck [ 27 Mar 2016, 07:30 ] |
Post subject: | Re: USB2CAN bus error and protocol violation |
Please also post your can parameters and which command you use to set the parameters on the device. |
Author: | dlederman [ 04 Apr 2016, 18:48 ] |
Post subject: | Re: USB2CAN bus error and protocol violation |
Responding to both your recent posts. 1. I am connected to the car via an OBD/DS9 cable to the USB2CAN device, and then from the device to the USB port on my PC. 2. Not sure which OBD pins I am connected to, nor how to figure that out. 3. As for commands/parameters, following are the commands in Terminal $ sudo modprobe can $ sudo slcand /dev/ttyUSB0/can0 $ sudo ip link set up can0 type can bitrate 125000 /Bitrate is variable, but MUST set a bitrate (12500 or 500000) $ sudo ip link set up can0 $candump After $candump you get a number of options. I select the option that gives all CAN messages. Thanks for your assistance. |
Author: | krumboeck [ 05 Apr 2016, 04:58 ] |
Post subject: | Re: USB2CAN bus error and protocol violation |
Author: | dlederman [ 12 Apr 2016, 03:13 ] |
Post subject: | Re: USB2CAN bus error and protocol violation |
Author: | krumboeck [ 12 Apr 2016, 07:34 ] |
Post subject: | Re: USB2CAN bus error and protocol violation |
Author: | dlederman [ 05 Jul 2016, 22:41 ] |
Post subject: | Re: USB2CAN bus error and protocol violation |
Bernd, It's been some time since communicating; I have turned my attention from another project back to getting the UCB2CAN device to function. Following your replies to my posts, please note the following. I'm running the following (from dmesg): Ubuntu Linux Release: 14.04 Kernel 3.13.0-85-generic (newer than kernel version 3.9) dmesg query shows the following [ 1083.782149] usb 2-1.3: Product: USB2CAN converter [ 1083.782154] usb 2-1.3: Manufacturer: edevices [ 1083.782159] usb 2-1.3: SerialNumber: ED000200 [ 1083.825976] CAN device driver interface [ 1083.845203] usb_8dev 2-1.3:1.0 can0: firmware: 1.7, hardware: 1.0 [ 1083.845386] usbcore: registered new interface driver usb_8dev This compares favorably with the criteria you laid out: [23.895986] CAN device driver interface [ 23.992073] usb_8dev 1-4.1.2:1.0: can0: firmware: 1.5, hardware: 1.0 [ 23.992299] usbcore: registered new interface driver usb_8dev I use socketCAN to connect to the car and follow the command structure laid out in the documentation (https://www.kernel.org/doc/documentatio ... ng/can.txt). I've tried the following bitrates/sample points (note that socketCAN automatically sets the sample point when the bitrate is selected). 1000kbits/0.75 800kbits/0.80 500kbits/0.875 250kbits/0.875 125kbits/0.875 50kbits/0.875 20kbits/0.875 10lbitd/0.875 Which you will no doubt recognize as “standard” bitrates. I have also tested at 10.4kbits and 41.6kbits because I am working in a car on the 1850VPW OBD system and those are the specified bitrates for that standard. At every bitrate I get frame format errors, bit stuffing errors, and crc delimiter errors. I believe that the bit stuffing errors are related to having the wrong bitrate; no;t sure what causes the other errors. That said, I have to believe that this should work at one of these bitrates. As always, I appreciate your responses and assistance, but it seems that having done all this I should be seeing consistent, reliable results from the USB2CAN device. Clearly, that's not happening. What does one have to do to make this work? |
Author: | krumboeck [ 06 Jul 2016, 08:55 ] |
Post subject: | Re: USB2CAN bus error and protocol violation |
I assume your setup is ok. At least you get different errors. 1850VPW is a different bus, the bitrates have no relevance for can bus. Normally one of these settings should work: ISO 15765-4 CAN (11 bit ID,500 Kbaud) ISO 15765-4 CAN (29 bit ID,500 Kbaud) ISO 15765-4 CAN (11 bit ID,250 Kbaud) ISO 15765-4 CAN (29 bit ID,250 Kbaud) Fiat/Alfa/Lancia may use 50 Kbaud Maybe your connector/adapter does not fit? Some cars does not connect the internal CAN Bus to OBD interface. Most cars (2008+) use following pinout on OBD II: Pin 6 - CAN High Pin 14 - CAN Low Pin 5 - GND It's also possible that you have to terminate the CAN bus with a 120 Ohm resistor. regards, Bernd |
Page 1 of 1 | All times are UTC |
Powered by phpBB® Forum Software © phpBB Group http://www.phpbb.com/ |