Re: USB2CAN adapters

From
Oliver Hartkopp <socketcan@hartkopp.net>
Date
2016-04-27 16:25:00
On 04/27/2016 05:02 AM, kay Cee wrote:
You're right, I should've sent more specific info.

I have A beaglebone black and a usbcan adapter ------->>>>>
http://m.aliexpress.com/item-desc/1443071907.html

And I'm sure if I should be using the slcan protocol to make it work or if i can
Set it up as a regular can device even though it connects to a USB port?
There are numerous chinese USB2CAN adapters you can find with entering 'usb can adapter' at Ebay, e.g. this one:

http://www.ebay.de/itm/USB-CAN-USB-to-CAN-BUS-Converter-Adapter-USB-Cable-support-win7-System-/361538969224

All these adapters come with some WinXP or Win7 drivers, libraries and applications that usually do not tell anything about the protocol on the serial/USB link.

Checking the example above the driver.rar package contained a PDF with

USB (Serial port) to CAN protocol defines

Serial port 1228800bps
8 data bit
1 stop bit
No parity

Default baud rate of CAN:250kbsp

Send and receive data packet format

No.	Definition	Remark
0	Packet header	0xaa
1	Packet header	0x55
2	Type		0x01- Transmitting and receiving data
3	Frame type	0x01- Standard frame,0x02- Extended frame
4	Frame format	0x01-ata frame,0x02- Remote Frame
5	Frame ID data 1	1~8bit
6	Frame ID data 2	9~16bit
7	Frame ID data 3	17~24bit
8	Frame ID data 4	25~32bit
9	Length	To send or receive data length of CAN bus(0~8)
10	Data 1	CAN send or receive data 1
11	Data 2	CAN send or receive data 2
12	Data 3	CAN send or receive data 3
13	Data 4	CAN send or receive data 4
14	Data 5	CAN send or receive data 5
15	Data 6	CAN send or receive data 6
16	Data 7	CAN send or receive data 7
17	Data 8	CAN send or receive data 8
18	Reserve	0
19	Check	Red part of the data accumulation and checksum

So this is far away from slcan and we don't know details about the checksum either.

Oliver


Thread (1 message) 1 message, 1 author, last reply 2016-04-27
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help