Joined
Last Online
Recent Posts
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

posted in Hardware and Wiring read more

It seems like you are trying to make a workbench canbus.

First thing is first, there must be ~120 ohms total on the bus, that means 60 ohm termination resistors at each end of the bus, otherwise the controllers will have huge problems sending & receiving data.

Second thing, make sure that all nodes on the bus are operating at the same baud rate. This baud rate is NOT the baud rate of the CBT's serial port, that is for RS232 only.

Third thing, make sure you have your pins connected correctly, here is some reference:
http://res.cloudinary.com/ddbgan4vk/image/upload/v1430871773/CBT_Pinouts_Diagram_eqr9fi.jpg

by the way, there won't be any data on your workbench bus unless a node is sending