[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4692: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3823)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4694: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3823)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4695: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3823)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4696: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3823)
8devices Community - View topic - USB2CAN bus error and protocol violation
www.8devices.com
View unanswered posts | View active topics It is currently 16 Apr 2024, 08:02



Reply to topic  [ 9 posts ] 
 USB2CAN bus error and protocol violation 
Author Message

Joined: 10 Mar 2016, 23:37
Posts: 7
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.


20 Mar 2016, 20:29
Profile

Joined: 28 Oct 2012, 09:11
Posts: 25
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


27 Mar 2016, 07:24
Profile

Joined: 28 Oct 2012, 09:11
Posts: 25
Please also post your can parameters and which command you use to set the parameters on the device.


27 Mar 2016, 07:30
Profile

Joined: 10 Mar 2016, 23:37
Posts: 7
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.


04 Apr 2016, 18:48
Profile

Joined: 28 Oct 2012, 09:11
Posts: 25


05 Apr 2016, 04:58
Profile

Joined: 10 Mar 2016, 23:37
Posts: 7


12 Apr 2016, 03:13
Profile

Joined: 28 Oct 2012, 09:11
Posts: 25


12 Apr 2016, 07:34
Profile

Joined: 10 Mar 2016, 23:37
Posts: 7
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?


05 Jul 2016, 22:41
Profile

Joined: 28 Oct 2012, 09:11
Posts: 25
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


06 Jul 2016, 08:55
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 9 posts ] 

Who is online

Users browsing this forum: No registered users


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron

Protected by Anti-Spam ACP Powered by phpBB® Forum Software © phpBB Group
Designed by ST Software.