I pushed an update to the github repo with improved baud rate setup and auto rate detection! I still need to update the docs.

<b>New baud rate config code</b>
It allows you to use any baud rate on the can bus. If you tell it to use 381 that's what it will try to do. Before it had fixed settings you could run 10,20,50,125,250,500,1000.

Serial api command: 0x0109NNXXXX (NN is bus id, XXXX 16bit integer representing speed, up to 1000)

Example: Set bus 1 to 500kbps.
Decimal 500 = Hex 0x1F4

So send: 0x01090101F4

Also, changes are written to eeprom so they are persisted through a reboot or power loss.

<b>Auto Baud</b>
Also, if your CBT is connected to a CAN bus you can send a command to auto detect baud rate.
Serial api command: 0x0108X (X being the bus, 01 - 03)

So to find the baud of bus 1 send 0x010801 and the CBT will send back JSON data as it tries each speed (speeds are hard coded at the moment)

If a speed is detected it's written to the eeprom settings and persisted through a reboot or power loss.

Make sure you update to the new code (0.4.2) to use this functionality. <a href=""></a>

I'm working on the mobile / desktop app still which will make logging easier.

I'm sure the example should be:
<blockquote>Example: Set bus 1 to 500kbps.
Decimal 500 = Hex 0x1E4
So send: 0x01090101E4</blockquote>

But, by the way. Not every value can be possible. What happens in case the bit rate, eg. 520Kbit/s, can not be set?

The term "baud rate" is not correct and never used in CAN. Better say "bit"rate" (If you like, check Wikipedia for the term "baud".

I'm getting a similar result as alan had, receiving "ÿ" with 030101. What was the fix there ?

Bit of background info...
01 10 01:
{"e":"busdgb", "name":"Bus 1", "canctrl":"4", "status":"0", "error":"0 - No Errors", "nextTxBuffer":"0"}

Checked wiring, looks good. Using the supplied OBD cable. On a 2013 Jeep Wrangler.

@Derek I installed the new code and tried the baudrate detection, works great on my High Speed Can connection and helps me in my quest to get the data logging on Low Speed Can working!

Yes the new autobaud code does work pretty nicely. Tested successfully on two OBD-II ports. The changes to the bus status outputs are also helpful. But I'm still fighting an error message connecting to the 2005 Mercedes CAN B network. Have even tied manual settings, but same error. Looking at the MCP2515 documents, looks to be taking errors on the transceiver. Any thoughts?

{"e":"busdgb", "name":"Bus 3", "canctrl":"7", "status":"0", "error":"1011"
"Receive Error Warning - TEC or REC >= 96",
"Receive Error Warning - REC >= 96",
"Receive Error Warning - REC >= 128", "nextTxBuffer":"0"}

Hmm, KidTurbo, looks we are facing similar problems, when checking the status of Bus 1 on my 2005 Volvo XC70, I now see:
{"e":"busdgb", "name":"Bus 1", "canctrl":"4", "status":"0", "error":"1011"
"Receive Error Warning - TEC or REC >= 96",
"Receive Error Warning - REC >= 96",
"Receive Error Warning - REC >= 128", "nextTxBuffer":"0"}
What I did:
This time I only connected CBT wire 4 (yellow, CAN1 LOW ) to the CAN low wire of my car (white cable) and CBT wire 3 (orange, CAN1 HIGH)) to CAN high wire of my car (white). I now used connectors, no soldering anymore. The white and green twisted cabling in my car is very clearly the CAN wiring according to the diagram. The CBT is connected to the USB port of the laptop and I used CoolTerm to send commands. I receive no response when I send other commands like the start logging on Bus 1 command or discovering the bitrate. Sending the device info command gives a normal response.
I am wondering if I am still facing wiring problems or if this is something else.....

Hey wow! I tried again: the only difference was that I first connected all the wiring and after that I connected the CBT to the USB of my laptop so it powered up. Now I could finally log data on the low speed CAN bus :D
I probably caused the Canbus errors because I plugged/unplugged a wire while the CBT was already running, I can imagine that it is not a good idea to do that...

I'll give that a try. Was reading on the 2515 transceiver regarding those errors and effect. It seems we may need a way to reset it when that occurs.
If I am reading correctly, when the error limit is reached, it pulls the transceiver off line. If in normal mode, it needs to be told to reset. If in <u>listen only</u> mode, it ignores errors and continues to pass all packets. Is probably why I did see data streaming one time after a usb reset. Hopefully someone experience can clarify how this should be handled.

henk_kuipers , your approach did help with connection issues I was seeing on the Benz CAN B & C bus. I've still been fighting errors, and noticed that the other units on the bus will actually change baud rate, shut down, or switch to single wire mode if the CBT doesn't sync up. But am able to record some data off each and working to isolate the error cause. Also haven't noticed this problem on the OBD-II port, where a interface gateway isolates the other networks.

Hi KidTurbo, good to read it helped you somewhat. Good luck with the rest of the puzzle!

  • 61
  • 57290

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