@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.
@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!
@jodank - see my post above about connecting to the OBD connector vs tapping a 'real' CAN line elsewhere in the car.
If you're just listening on the OBD2 CAN pins using your scope you won't see very much - that CAN line does not actively send any data unless it has been specifically requested by a device connected to those pins.
If you connect a diagnostic tool to those pins and actively request CAN data from the car then you should be able to watch the traffic go past using your scope.
Note that the VW CAN Gateways are very particular in their data format and packet timing and if you don't send commands exactly per the specification the Gateway will close the 'session' and stop sending data, so sending individual CAN commands by hand doesn't usually work when connected to the diagnostic CAN line via the OBD2 port.
If you tap an actual vehicle CAN line then those are chatty, and you'll pick up traffic on those lines just by listening.
As a bit of inspiration to anyone who's not sure what their CBT is capable of, here's a very brief teaser with an example of what you can build with your little orange box.
To drive the display in the video we have a CBT connected to 2 CAN Buses, with data being parsed in real-time across both buses by the CBT itself before being handed off to another chipset to be processed and displayed.
Everything that causes inputs on the display - from the vehicle data to the steering wheel buttons and door open messages - comes from the CBT. For example, the method we used to capture the steering wheel buttons on the CBT for this little demo is exactly as documented on this forum.
The exact code varies depending on what options you've got in your car, but look for packets with frame IDs from 0x420 - 0x4A0.
You should see a series of packets with a format like:
(0x436) 16 02 C0 04 00 00 (6 bytes)
(0x428) 16 01 00 00 00 00 (6 bytes)
(0x436) 08 01 00 00 00 00 (6 bytes)
The first byte in each packet matches the frameID (420+byte0).
Essentially that series of packets equates to:
ID 436 asking to join the ring
ID 428 is the last device in the ring saying it's OK to join
ID 436 responds back to ID 428 acknowledging the message
Once you're on the ring, you may need to send keep-alives (0x661) on a regular basis if you see them on the bus in your car.
Oh, and if you haven't figured it out already, 0x263 is the ID for the 2nd line at the top of your DIS, if supported on your car.
The RNS-E sends the DIS packets every second (or quicker) so as you've seen if you just inject a new message packet once it'll be over-written fairly quickly.
If you want your messages to persist you'll need to use the CBT in 'man-in-the-middle' mode, with your software passing through all packets except for 0x261, which you replace with your own payload.
Modules that want to communicate with the DIS need to join the 'ring', which is how they register their intent to send data for display. It's how your DIS knows if there is a navigation module attached, or a Bluetooth module etc, and thus displays the relevant pages.
With your RNS-E off, it will not have joined the ring and as the DIS will ignore packets from unregistered modules, your messages don't get displayed.