Quantcast
Channel: Madox.NET » Software Problems Help
Viewing all articles
Browse latest Browse all 3

EasySync USB-CAN Bus Adapter – Works great in Ubuntu after some fiddling

$
0
0
Neat little package

Neat little package

The toys just keep coming in!  Another one of those wallet killing impulsive orders whilst I was sick in bed last week just arrived today, a USB-CAN bus converter module by EasySync that promises a great interface and should work in Linux!  This will give a little bump start to my Mazda CAN Bus / mChumby projects.

Note : EasySync UK’s online form doesn’t allow international shipping but a short E-mail or two managed that.  There is a US subsidiary with US and international shipping, but the international shipping rates on the US site is plain ridiculous [$68USD to ship a $88 device to Australia].

Note 2 : I hear the interface is mimicking the Lawicel CAN-USB interface…only hearsay…

Plugged it in – didn’t work.  Doh!  Took a peek at the manual and website, nothing on Linux other than “Linux drivers provided”… So much for the marketing material, guess I have to try make it work myself.  (Yes I got it working, read on for the quick run-down post aimed at helping others)

Sneak peek inside the box

Sneak peek inside the box

Now with the photos out of the way, a little bit of detective work is ahead of us… why doesn’t this thing work… I paid so much money for it to replace the qprotos adapter!

A little bit of lsusb (or cat /proc/bus/usb/devices if you’ve got usbdevfs) sleuthing later…

Bus 003 Device 004: ID 0403:fac6 Future Technology Devices International, Ltd 
Device Descriptor:
 bLength                18
 bDescriptorType         1
 bcdUSB               2.00
 bDeviceClass            0 (Defined at Interface level)
 bDeviceSubClass         0 
 bDeviceProtocol         0 
 bMaxPacketSize0         8
 idVendor           0x0403 Future Technology Devices International, Ltd
 idProduct          0xfac6 
 bcdDevice            6.00
 iManufacturer           1 EasySync
 iProduct                2 USB2-F-7001 CAN-Plus Adapter
 iSerial                 3 ESNFWLPL
 bNumConfigurations      1
 Configuration Descriptor:
 bLength                 9
 bDescriptorType         2
 wTotalLength           32
 bNumInterfaces          1
 bConfigurationValue     1
 iConfiguration          0 
 bmAttributes         0x80
 (Bus Powered)
 MaxPower              150mA
 Interface Descriptor:
 bLength                 9
 bDescriptorType         4
 bInterfaceNumber        0
 bAlternateSetting       0
 bNumEndpoints           2
 bInterfaceClass       255 Vendor Specific Class
 bInterfaceSubClass    255 Vendor Specific Subclass
 bInterfaceProtocol    255 Vendor Specific Protocol
 iInterface              2 USB2-F-7001 CAN-Plus Adapter
 Endpoint Descriptor:
 bLength                 7
 bDescriptorType         5
 bEndpointAddress     0x81  EP 1 IN
 bmAttributes            2
 Transfer Type            Bulk
 Synch Type               None
 Usage Type               Data
 wMaxPacketSize     0x0040  1x 64 bytes
 bInterval               0
 Endpoint Descriptor:
 bLength                 7
 bDescriptorType         5
 bEndpointAddress     0x02  EP 2 OUT
 bmAttributes            2
 Transfer Type            Bulk
 Synch Type               None
 Usage Type               Data
 wMaxPacketSize     0x0040  1x 64 bytes
 bInterval               0
Device Status:     0x0000
 (Bus Powered)

Yup definitely a FTDI device, even with the FTDI vendor ID (Did I mention I love FTDI?).  Looks like EasySync decided they wanted their own unique product ID, unfortunately that means the vanilla ftdi_sio drive won’t pick it up without a little bit of coercing.

The little bit of coercing goes like…

modprobe ftdi_sio vendor=0×0403 product=0xfac6

And bingo…

[ 6372.229046] usb 2-2: new full speed USB device using uhci_hcd and address 3
[ 6372.437247] usb 2-2: configuration #1 chosen from 1 choice
[ 6372.439834] ftdi_sio 2-2:1.0: FTDI USB Serial Device converter detected
[ 6372.439872] usb 2-2: Detected FT232RL
[ 6372.439934] usb 2-2: FTDI USB Serial Device converter now attached to ttyUSB0

Using putty to connect to ttyUSB0 at 115200, and typing “H” followed by “Enter” gives us

=~=~=~=~=~=~=~=~=~=~=~= PuTTY log 2009.06.30 21:23:18 =~=~=~=~=~=~=~=~=~=~=~=
H
List of Supported Commands
O - Open CAN Channel
C - Close CAN Channel
t - Transmit Standard Frame
T - Transmit Extended Frame
F - Read Status Flag
V - USB2-F-7001 Version
N - Serial Number of USB2-F-7001
Z - TimeStamp Option On/Off
S - Set CAN Bit Rate
s - Set BRGCON Registers
m - Set Acceptance Mask
M - Set Acceptance Filter
B - Enter Bootload Mode
L - Set Listen Mode
E - Clear Buffers and Echo Char
R - Reset USB2-F-7001
H, ? or h - Help on USB2-F-7001 Commands

Only problem is that its Mac style line endings.  Even the append CR to LF option in putty is useless because the stream seems to be CR without LF…  Doesn’t hurt too much except displaying it is a bit annoying.

The EasySync USB-CAN adapter’s pinout is pretty much standard DB9 for CAN Bus and all I had to do was connect my existing J1962 (aka OBD-II aka DLC-2) cable on and onto the car I went.

A couple of short “S6″ (500kbps) “L” (Open connection for listen mode) commands later, I had CAN data being spat back at me

t04680601FF0000000000
t04680601FF0000000000
t04680601FF0000000000
t04680601FF0000000000
t04680601FF0000000000
t20F8FFFF27104000FF01
t2118FFFF000040000001
t4B082710271027102710
t19080000000000000000

All is good…except I just deleted my Chumby Development Virtual Machine a few hours ago…ooops…another day before I use this neat little adapter for mChumby.


Viewing all articles
Browse latest Browse all 3

Latest Images

Trending Articles





Latest Images