An update on my progress of reading data straight from the controller. For those who want to do this too, hopefully this will get you going,
When initially turned on the drive will try and init the bluetooth modem. If its not plugged in it will continually try. Not a bit deal but make sure your code will handle it.
To start the data streaming back send these bytes,
{0xAA, 0x13, 0xEC, 0x07, 0x01, 0xF1, 0xA2, 0x5D, 0xF0, 0xF0, 0xF0, 0xF0, 0xF0, 0xF0, 0xF0, 0xF0}
A stream will start, but about once a second you will need to send this,
{0xAA, 0x13, 0xEC, 0x07, 0x01, 0xF1, 0xA2, 0x5D}
to keep it going.
The data coming back has a leading sync byte of 0xAA, followed by an ID packet going from 0x00 to 0x17 (24 fields). The rest of the packets seem to be data. Each packet is 16 bytes long, so 14 data Bytes.
Ive been a bit lazy because its cold in the shed but I dragged the bike into the kitchen and did some testing 8) . So far I have decoded throttle %, riding gear (low mid high), brake on, regen active, voltage, SOC, Throttle ADC reading (12bit ADC) and MOS temp. Couldnt find current, hard to tell by free spinning the wheel in the air, might be a job for the dyno. Im guessing watts is calculated, not transmitted. I also havent looked at writing data at all yet. Will look at it later. It would be nice to be able to change at least some of the basic settings from the dash.
If you just want it for SOC then it should be really easy to do with something like an arduino and a dual 7 seg display module.
Will update as I work more out.
EDIT: I suppose I should explain how to get voltage from 2 bytes. basically the controller is returning a 16bit number as 2 bytes, an upper and lower byte. If the voltage is at 95.5V the packet will look like this;
0xAA(sync), 0x01(ID), 0x03(upper byte), 0xBB(lower byte), (more data......)
so the 2 bytes together are 0x03BB. Convert that to decimal and its 955. Divide by 100. If your new to programming your data processing should look something like this;
voltage = ((upper byte << 8 ) + lower byte)/100
or;
voltage = (256 * upper byte + lower byte) /100
Doug