PDA

View Full Version : Getting Alltrax SPM source code communications protocol



4dollarjoe
26 February 2016, 0739
http://www.mail-archive.com/listserv@electricmotorcycles.net/msg01779.html

https://bitbucket.org/dgutheil/arduino-alltrax-library/src


So I've been looking at people's work on interfacing old Allrax Axe controllers to arduino to read useful information.

I have an alltrax spm 72300 that I'd like to interface but that has a usb port instead of serial.

I contacted alltrax about getting the source code the interface with the communications, but they turned down my request stating 'usb is a lot more complicated'. Surely there has to be a way, but I doubt it would be as simple as putting a usb to serial adapter on the controller haha.



Any thoughts? Anyone have documentation on Alltrax SPM source code? Is there a way I can extract the source code from the controller?

Skahle
26 February 2016, 1944
http://www.mail-archive.com/listserv@electricmotorcycles.net/msg01779.html

https://bitbucket.org/dgutheil/arduino-alltrax-library/src


So I've been looking at people's work on interfacing old Allrax Axe controllers to arduino to read useful information.

I have an alltrax spm 72300 that I'd like to interface but that has a usb port instead of serial.

I contacted alltrax about getting the source code the interface with the communications, but they turned down my request stating 'usb is a lot more complicated'. Surely there has to be a way, but I doubt it would be as simple as putting a usb to serial adapter on the controller haha.



Any thoughts? Anyone have documentation on Alltrax SPM source code? Is there a way I can extract the source code from the controller?

Extracting source code for a product is not a good thing and Alltrax would be within their rights to sue. Not trying to slam...BUT...you do not understand what you are asking for. You don't want controller product code, you want PC app code which you can use as a model to create an interface to a product. Alltrax probably creates a USB "bulk" endpoint in their product and you would like to create a USB host driver which can interface with this endpoint and then build an app on top of that which can manage the interface and expose the data you would like and then create an app that either stores or displays the data along with all of the stuff from your BMS. You could use a USB protocol analyzer to reverse engineer this interface. If you publish the details expect to be contacted by Alltrax. Either way this is not an Arduino job...maybe RPi would be better or at least am STM32, something with a USB Host mode at a minimum.

Jayls4
27 February 2016, 1145
Is there any particular reason why you need the arduino to do so? There's a pretty good instantaneous readout tab in their own program already. It has instantaneous values for throttle % input, battery current, motor current, controller temperature, batt voltage, etc.

zerous
27 February 2016, 1600
Is there any particular reason why you need the arduino to do so? There's a pretty good instantaneous readout tab in their own program already. It has instantaneous values for throttle % input, battery current, motor current, controller temperature, batt voltage, etc.

It can be many reasons... In my build i used arduino to talk with axe7245 and view voltage and current. If you read often enough you can calculate Ah value too. Not as good as Cycle analyst but close. You only need a arduino, a rs232 Shield and Lcd.

I get a cycle analyst in the end :) but it cost a lot.

furyphoto
28 February 2016, 1434
It can be many reasons... In my build i used arduino to talk with axe7245 and view voltage and current. If you read often enough you can calculate Ah value too. Not as good as Cycle analyst but close. You only need a arduino, a rs232 Shield and Lcd.

I get a cycle analyst in the end :) but it cost a lot.

Any chance you would share your code? I am working on arduino control for 12v and displays, it would be nice to add some AXE readings to it.

4dollarjoe
29 February 2016, 0741
Is there any particular reason why you need the arduino to do so? There's a pretty good instantaneous readout tab in their own program already. It has instantaneous values for throttle % input, battery current, motor current, controller temperature, batt voltage, etc.

Personally I want to make a HUD on a plexiglass windscreen that will read voltage, throttle percentage, and amperage. It would be better to use some oleds with arduino.


I guess one alternative is to load windows on a small computer, I have a raspberry pi but I doubt the alltrax software would work on an arm chip. Also the program is ugly and the text is too small to read while riding.

Is there a way I could extract info from the alltrax program to put the data I need on a nicer interface?


Honestly I think I'm going to just try getting a usb-b to serial adapter and try the old axe code just to see.

4dollarjoe
04 March 2016, 0714
Hmmm, I'm going to try taking off my controller and plugging it into my computer. If the alltrax reads as a serial device by taking a COM port that means that the most likely just put a serial to usb chip and are just sending serial, which means they'd probably be lazy enough not to change the communications code. If this is true than a usb-b to serial adapter and the axe code should make the spm work.

zerous
05 March 2016, 1427
I see what i can find, no secrets ...

4dollarjoe
07 March 2016, 1326
Connected my controller, it's reading as a usb device not serial.

I'm going to see if there is a work around.

DRZ400
07 March 2016, 1500
You cant extract source code from the unit, only Alltrax could provide that. If you could access the firmware you could dis-assemble it but would be a real effort. For example people re-flash ECM's all day long.



Extracting source code for a product is not a good thing and Alltrax would be within their rights to sue. Not trying to slam...BUT...you do not understand what you are asking for. You don't want controller product code, you want PC app code which you can use as a model to create an interface to a product. Alltrax probably creates a USB "bulk" endpoint in their product and you would like to create a USB host driver which can interface with this endpoint and then build an app on top of that which can manage the interface and expose the data you would like and then create an app that either stores or displays the data along with all of the stuff from your BMS. You could use a USB protocol analyzer to reverse engineer this interface. If you publish the details expect to be contacted by Alltrax. Either way this is not an Arduino job...maybe RPi would be better or at least am STM32, something with a USB Host mode at a minimum.

frodus
07 March 2016, 1653
Connected my controller, it's reading as a usb device not serial.

I'm going to see if there is a work around.

try using a prolific or FTDI usb serial driver. Many manufacturers just change the device ID, and have their own driver, which is really just a serial device.

Look at the driver they include with the controller to see if it actually is just a serial driver.

zerous
25 March 2016, 1638
Any chance you would share your code? I am working on arduino control for 12v and displays, it would be nice to add some AXE readings to it.

here is my code
http://elmoto.net/showthread.php?t=4209