Open Source DIY Alta Multitool CAN Bus Adapter


robcio

Member
Likes
10
Location
IL
I would like to share with Alta community how to DIY an open source CAN Bus adapter cable that could be used with Alta Multitool.
I have tested it on my own MXR and it works great, but a disclaimer - use it at your own risk.
NOTE: I have not updated firmware using this adapter, since my bike is already on the latest one.

Hardware

USB Can Bus adapter
The adapter has to support Lawicel ASCII protocol specified here.

There are multiple adapters available but I have decided to use CANable.

CANable with microUSB connector can be bought here - shipping from US - $29 + shipping

Or on Ebay - shipping from China:
microUSB version - $19.90 + $5 shipping
USB-A version - $19.90 + $5 shipping

Plug that connects to Alta Can Bus connector - RP13A-12PA-13SC(71) made by HRS.
It can be bough from Digi-Key for $6 - RP13A-12PA-13SC(71).
Contacts for the plug have to be bought separately - 2 pcs. - $0.41 - RP13A-SC-121

Some kind of plastic enclosure for the CANable to keep it from shorting to metallic parts on the bike.

Assembly

Crimp or solder two wires to contacts and insert contacts into positions 7 and 11, looking at the front of the plug

plug.png

Connect wire 7 to CANH and wire 11 to CANL on the CANable.
can.jpg

Software

Follow instructions by TCMB371 here to install Alta Multitool

Connect CANable to any of the USB ports on your laptop.
Open a terminal window and run "ls /dev/ttyA*" command, as a response you should see:
/dev/ttyACM0

Run "lsusb" command. Among the USB devices you should see one that matches ID below:
Bus 001 Device 092: ID ad50:60c4

Download canable.py.zip file attached in this post
Unzip it and place it in the "AltaMT-Engineering/redshift_multitool-3.37.11.ET/redshift_multitool/_ext_python_lib/" directory

Open "AltaMT-Engineering/redshift_multitool-3.37.11.ET/redshift_multitool/_ext_python_lib/canusb2.py" file in your favorite editor and modify line 87 from:

self._can_source = lawicel.CANUSB(device=device, bitrate=bitrate, filters=filters,
to:
self._can_source = canable.CANUSB(device=device, bitrate=bitrate, filters=filters,

Save the file and run install script for the Multitool, "sudo python setup.py install" from "AltaMT-Engineering/redshift_multitool-3.37.11.ET/" directory

Start the Multitool "sudo redshift_multitool"

Multitool should detect CANbus adapter and start in full mode.

Shut down Multitool.

Connect plug to your Alta and turn on the bike.
Start Multitool and it should connect to your bike.

If you want to use Lawicel can adapter just change back line 87 in the canusb2.py file and run install command again.
 

Attachments

  • canable.py.zip
    4.2 KB · Views: 25

effinsiok

Active member
Likes
25
Location
PNW
I am not a computer person, but I finally got multitool to work with this adapter after many hours of frustration!

Takeaways:
-Make sure to use a USB cable that can transmit data - some are only used for charging things and do not transmit data.
-Do not update the CANable adapter firmware to candlelight, leave it with the slcand firmware it comes with. I updated the firmware before trying to use the adapter, but the "Open a terminal window and run "ls /dev/ttyA*" command, as a response you should see: /dev/ttyACM0" step from the original post wouldn't return anything. I switched it back to the slcand and then it worked correctly.
-The "Run "lsusb" command. Among the USB devices you should see one that matches ID below: Bus 001 Device 092: ID ad50:60c4" step from the original post showed Bus 003 Device 003: ID ad50:60c4 for me, so the important part is just the ID, not the Bus and Device.
-Most importantly, when you're updating line 87 (it was line 88 in my file) in the canusb2.py file, you ALSO need to add "import canable" at the top of the file. I put it right below "import lawicel" on line 13:

# $Id: canusb2.py 15682 2018-09-06 20:22:49Z haemish $
import Queue
import binascii
import logging
import multiprocessing
import tempfile
import threading
import time
from collections import deque
from threading import Thread

import lawicel
import canable
# TODO - SWITCH TO THE NEW DRIVER THAT RUNS IN A SEPARATE PROCESS
# TODO - import lawicel2
from canfile import CANFile
 

TeslaRaptor

Well-known member
Likes
69
Location
Lake Travis, Texas
I am not a computer person, but I finally got multitool to work with this adapter after many hours of frustration!

Takeaways:
-Make sure to use a USB cable that can transmit data - some are only used for charging things and do not transmit data.
-Do not update the CANable adapter firmware to candlelight, leave it with the slcand firmware it comes with. I updated the firmware before trying to use the adapter, but the "Open a terminal window and run "ls /dev/ttyA*" command, as a response you should see: /dev/ttyACM0" step from the original post wouldn't return anything. I switched it back to the slcand and then it worked correctly.
-The "Run "lsusb" command. Among the USB devices you should see one that matches ID below: Bus 001 Device 092: ID ad50:60c4" step from the original post showed Bus 003 Device 003: ID ad50:60c4 for me, so the important part is just the ID, not the Bus and Device.
-Most importantly, when you're updating line 87 (it was line 88 in my file) in the canusb2.py file, you ALSO need to add "import canable" at the top of the file. I put it right below "import lawicel" on line 13:

# $Id: canusb2.py 15682 2018-09-06 20:22:49Z haemish $
import Queue
import binascii
import logging
import multiprocessing
import tempfile
import threading
import time
from collections import deque
from threading import Thread

import lawicel
import canable
# TODO - SWITCH TO THE NEW DRIVER THAT RUNS IN A SEPARATE PROCESS
# TODO - import lawicel2
from canfile import CANFile

Excellent computer sleuthing work!

Re: USB cable that does data or not
I lost many hours one night debugging this one (for a different project)....good to learn once & hopefully never repeat the mistake. ;-)
 

effinsiok

Active member
Likes
25
Location
PNW
For anyone planning on using this adapter, I wanted to confirm it does NOT seem to have the ability to load new firmware. Even though I could see all of the data in Multitool, the firmware update would not work (neither the update utility nor the loader tab). As soon as I switched to using a real Alta dongle the new firmware loaded fine.
 

Similar threads

Top Bottom