Joined
Last Online
Recent Posts
posted in Firmware read more

If the blue LED appears for a second when you boot the device, it is functioning OK. If not, you might have to program it with a CC debugger the first time, then use USB after that. If you plan on frequently changing / developing the BLE firmware, I suggest buying a debugger. One time, I accidentally flashed some firmware that did not let me enter DFU mode. Also, you should consult the Bluegiga development forms.

posted in Firmware read more

If you guys are familiar with the BLE firmware, you might have noticed that packets are often enough corrupted on the receiving end (Android, iOS, etc). To combat this issue, one can implement a simple one byte checksum into the transmission so the receiving end can generate the same checksum and compare it with the checksum byte received from the CBT.

For example: on the CBT

byte checksum(byte *payload, const byte length){
	byte chk;
	for(byte i = 0; i < length; i++){
	   chk += payload[i];    //value wraps around once it reaches > 255
	}
	return ~chk;
}

byte bluetoothOut[5];
bluetoothOut[0] = speedMPH;
bluetoothOut[1] = (byte)engineRPM << 8;
bluetoothOut[2] = (byte)engineRPM;
bluetoothOut[3] = (byte)throttlePosition;
bluetoothOut[4] = checksum(bluetoothOut, 4); //5th byte is checksum for bytes 1-4

And for android:

private boolean validCheck(final byte[] bluetooth_rx_data){
    int checksum = 0;
    int cmp = (bluetooth_rx_data[bluetooth_rx_data.length - 1] & 0xFF);
    for(int i = 0; i <bluetooth_rx_data.length - 1; i++){
        int value = (bluetooth_rx_data[i] & 0xFF);
        checksum += value;
    }
    checksum = ~checksum & 0xFF;
    return (checksum == cmp);
}

posted in Howto read more

Some vehicles come with convenience buttons on the steering wheel that control some functions on the radio like volume, seek, mute, etc.

Not all vehicles come with these buttons but my findings conclude that the radio's firmware accept the commands even if the buttons are not present. On vehicles equipped with the buttons, when presssed the small computer inside the button housing generate and send commands over the GMLAN CAN bus and the radio interprets them.

My vehicle does NOT have the radio buttons, only cruise control buttons.

To demonstrate this, I wrote a little Android app that communicates with my Can Bus Triple that emulates these commands respectively.

For added coolness, I made the Can Bus Triple send the radio's display contents to the app :)

https://www.youtube.com/watch?v=va_9YJPQXlk

posted in Hardware and Wiring read more

This forum is for the CanBus Triple. You should ground the CAN_L to the ground on the OBD port.

posted in Hardware and Wiring read more

I found a bug in the 29-bit firmware that causes the ID of the message to become corrupt when receiving serial command. I fixed that, now I can do lots of fun stuff.

the CBT rules!

posted in Firmware read more

The CBT desktop software does not support 29-bit messages. If you are a programmer, you can code your own application that connects to the serial port and receives the data and handles it properly. If not, simply use CoolTerm to log the data into a text file then parse it in Excel or something.

posted in Firmware read more

I was able to modify the sleep functionality to fit my implementation with 100% success.

As Derek mentioned above, using a heartbeat message to trigger the wakeup interrupt is needed so the device can wake up properly. I was able to find the ID that broadcasts the vehicle's VIN every one second when the key is in the ignition; it works! I believe in sleep mode the device only uses about one mA (or less). When the device wakes up, all RAM and variables are retained since the sleep assuming the power was not cut.

posted in Hardware and Wiring read more

make sure you are sending raw HEX data to the serial port, not ASCII.

If you send 01 using ascii the CBT will receive (in decimal) 41 42