BT works, but it cannot dump all the can packets from your car as it's too slow. The idea is the MCU processes the packets and uses BT to send sensor data or whatever to your phone. I'm implementing stuff in the firmware to filter packets on the MCU so you can get can over bt if you know what message id you want. But out of the box you can use BT to talk to the MCU and send commands with a generic BT LE app like Lightblue for iOS. I'm yet to find a good one for Android. The docs list some of the BT LE characteristics and what they do.
On the USB Serial thing, I'm willing to bet whatever software you're using doesn't recognize the USB vid/pid. I had to wrestle with that in the mobile app to get it working. But USB serial to android does work.
Still working on all this software so it will get easier soon, and still be open for people who wish to dive deeper.
P.S. the baudrate of the BLE112 is up to 2Mps http://www.mouser.com/ds/2/52/Bluegiga_Technologies_BLE112_Datasheet-293747.pdf which is plenty. From the schematic I see you just went with the generic 16Mhz crystal instead of matching it to the serial output, this will cause a lot of corrupted data.
The overall throughput of LE is at best 1MBps and probably less even if the UART baud rate can be higher.
It cannot send all the bytes of a full CAN bus (even in Binary), but might be able to do something if there were compression (with loss in the first few packets to establish the dictionary). There are usually few CAN addresses, and often data doesn't change at all or only a few bits.
The BLE112 is flashed and ready to use. If you use a LE scan tool such as LightBlue it will find the CBT BLE112. Right now I'm processing the CAN packets on the MCU and sending the computed values to one of 8 'sensor' characteristics. Their is also a characteristic for reading and writing to the UART. You can find the specific UUIDs here:
Derek can you please confirm that BT filtering is functional in 0.4.4. Using Light Blue I'm able to talk to the MCU UART port no problem.. I can send 01 01 and 01 10 01 to my heart's content and receive valid responses while subscribing.
However, I can't get BT filtering to send anything over at all... I've got a simple register I monitor over USB that I filter with 03 01 01 28 but when I try 04 01 28 (or any number of other filters that are completely valid over USB) I do not get any data back.
It's almost like BT filtering isn't implemented.
I'm trying to implement bluetooth communication with CBT on Android, too.
I'm developing an OBD diagnostic app with <a href="http://www.ionicframework.com/">Ionic framework</a> (borrowing the idea and structure from @Derek offical app) and currently I'm able to connect to CBT, and successfully send / receive data with an Android smartphone. I can share the code if anyone is interested.
I'm also able to activate DFU mode on BLE chip (writing to the specific characteristic).
The app can send log commands and CAN packets but sometimes it gets corrupted data.
One thing that seems strange to me, and could be the cause of corrupted data, is the timer event in BLE code, which is responsible to take data received on UART from MCU and send it over bluetooth (see <a href="https://github.com/CANBus-Triple/CBT-BLE112-Firmware/blob/master/script.bgs#L155">hardware_soft_timer event</a> in BLE firmware script).
This timer is activated when a device is connected via bluetooth, on <a href="https://github.com/CANBus-Triple/CBT-BLE112-Firmware/blob/master/script.bgs#L207">line 207 of the bgscript</a>:
<blockquote>call hardware_set_soft_timer((32768/1000) * conn_interval / 4, 2, 0)</blockquote>
The first argument is the time interval (expressed in 1/32768 seconds) on which the timer event will be fired.
Its value depends on <i>conn_interval</i> variable, which is set by the connected device. Android set this value to 7.5ms (see http://stackoverflow.com/questions/21398766/android-ble-connection-time-interval), so the resulting interval will be less than 2ms!
So apparently the <i>hardware_soft_timer</i> event may be firing too fast.
I will try to change its value, but until now I was not able to update firmware to BLE chip.
@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.
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