I was finally able to flash BLE firmware, and discovered that <i>conn_interval</i> is 39ms on my Android Phone, so the problem is not in that parameter.

I suggest a custom middleware implementation. I am having good results unleashing 0x03 0x01 0x01, suppressing Serial1 output in SerialCommand.h, and constructing custom results for just the data I want in my own middleware class.


Good stuff going on in this thread!

Yeah connection interval should be around 40ms, it's controlled by the host OS.

@Emanuele‌ - if you could share some code as to how you connected to the CBT over bluetooth that would be great.

I am able to connect to the device and discover the services, both using debug tools and the iOS app I'm testing, but I just can't get any data from the CBT.

I tried modifying the BLE112 firmware to add a serial RX characteristic but that didn't help.

I need to be able to pass serial data between the CBT and the connected Bluetooth device using Serial1 on the CBT.

Any help you can offer would be most appreciated!

@Emanuele‌ - if you're still having trouble updating the BLE firmware, and you're trying to follow the steps on Derek's page to update over USB, I found the way to get it working was to send the 0802 command to the CBT over USB serial BEFORE sending the '1' to the DFU characteristic over Bluetooth. That's contrary to the order on Derek's instruction page, but swapping that order worked for me.

I haven't had to touch the embedded BT firmware.

Grab Derek's latest commit from master. He's improved BT throttling considerably over the past week.

Use x03 x01 for filtering. The x04 stuff is abandoned.

Thanks @ShellDude‌ - are you using your own (developed) app/code to connect to the CBT over bluetooth, or Derek's standard app?

I'm using his app on OSX for sniffing over USB and my own Android app for final implementation using BTLE.

I'll be publishing full source, including my custom CBT middleware shortly.

My app is working quite well now. I am implementing some OBD II communication through CAN messages, following Wikipedia Article on OBD II (https://en.wikipedia.org/wiki/OBD-II_PIDs).
If I've time I will publish the code during this weekend.
I used this library (Cordova plugin) for BLE: https://github.com/randdusing/BluetoothLE

I have to say the same ... CBT is the car hacking tool of 21st century!

I say this only having hacked into a single bus. Just wait till I'm opening windows and doors from my watch!

One additional note.. I'm not using cross platform stuff.

All my work ioutside of ardruino is pure Android because I loathe iOS.

Ironically I absolutely love OSX.

What Bluetooth characteristic(s) are you connecting to from your Android device to talk with the CBT? That's the bit I can't get working at the moment.


Hah! I too hate iOS and love OSX!

Hey James, check here for some quick info on the characteristics: https://www.canb.us/tutorials/Bluetooth LE, Sensors and you

@jamesatfish‌, serial communication service UUID is 7a1fb359-735c-4983-8082-bdd7674c74d2
I subscribed to its characteristic b0d6c9fe-e38a-4d31-9272-b8b3e93d8657 (with indicate method), and send commands to its other characteristic b0d6c9fe-e38a-4d31-9272-b8b3e93d8658 (with notify method).
But they are interchangeable. You can also use the same characteristic to write and receive data (subscribe).

Yeah, I'm only using notify. Works good enough for everything I need to do.

Here is the source code for my app: https://github.com/eiannone/CBT-Diagnostic
To ease dealing with OBD protocol I implemented mask filtering on firmware for CAN messages id. That's because ODB II CAN messages id are only in the range from 0x7E8 to 0x7EF. You can find it in my <a href="https://github.com/eiannone/CANBus-Triple/tree/can-mask">v0.5.1 can-mask branch</a>.
I suggest also to disable bluetooth rate limiting, in order to avoid missing some CAN packets when you receive quick responses from the car.
The apk is here: https://github.com/eiannone/CBT-Diagnostic/releases/download/0.1alpha/android-debug.apk

Thanks all - managed to get the CBT chatting via Bluetooth last night, so appreciate all the hints.

  • 27
  • 29907

Looks like your connection to CANBus Triple was lost, please wait while we try to reconnect.