Reading from OBD port regardless of car manufacturer?

116 views
Skip to first unread message

simon.m...@googlemail.com

unread,
May 16, 2017, 4:04:47 AM5/16/17
to OpenXC
Hello everyone,

I recently bought a CrossChasm C5 BLE VI, and am trying to read off of a 2012 BMW OBD port. I have been able to flash all 4 types of firmware available for this device:

- emulated: (works as expected, can see data with openxc-dashboard)
- default: (semi-works, can get device version number but unable to see any data on running cars OBD port with openxc-dump, I should be able to see some sort of data, even if it's not parsed correctly yes?)
- obd2: (does not seem to work, shows up as device not connected, and unable to read version number with openxc-control version)
- translated-obd2: (same as obd2)

For all firmware I have tried the precompiled v7.2.0 as well as the vagrant self compile with the latest github source (here I only specify my VI model, so I'm guessing that corresponds to the default)

I have two questions:
1) Even with the default firmware flash, should I be seeing data being streamed from the BMW (do I need to adjust the Baud rate or something else to make it compatible)?
2) Does anyone know why the obd2 firmware is causing trouble, and would this allow me to see data on the BMW bus?

Thanks a lot for your help!
Cheers,
Simon

Eric Marsman

unread,
May 16, 2017, 4:02:42 PM5/16/17
to OpenXC
Hi Simon,

The "obd2" firmware is waiting to process commands from BLE/USB. (e.g. sending a diagnostic request like https://github.com/openxc/openxc-message-format/blob/master/JSON.mkd#diagnostic-message). If you want the device to automatically send requests, you'll want the "translated_obd2" firmware which should include all of the signals here: https://github.com/openxc/openxc-message-format#signals-from-diagnostic-messages

The "default" firmware is just a shell and doesn't do any CAN translation. It's sort of our compile test with no CAN information. I've actually be considering removing it from the release to prevent confusion.

Now, for the BMW, you should get something from "translated_obd2" if the BMW has CAN on OBD-II pins 6,14 at 500mhz (HS CAN). You will need to confirm the bus pins and rate. If you want to compile your own firmware and try different speeds, you can confirm your device is getting data by doing something like this


And then do a openxc-generate-firmware-code and "% fab c5ble build" and test with different speeds. 

You can add the "translated_obd2" argument to fab to use a config like this http://vi-firmware.openxcplatform.com/en/master/config/diagnostic.html#recurring-simple-diagnostic-pid-request

Regards,
Eric
Message has been deleted

simon.m...@googlemail.com

unread,
May 17, 2017, 4:26:43 AM5/17/17
to OpenXC
Hi Eric,

Great, thanks a lot for your reply! 
I will try out your suggestions and hopefully get some data streamed off the car.

One thing I forgot to mention is that this is a European car (I'm based in CH) and I believe here we use EOBD, from my brief research it seems this standard is compatible with the US OBD2. If you do, however, know of any differences between the two, then please let me know.

Cheers,
Simon

simon.m...@googlemail.com

unread,
May 19, 2017, 12:42:00 PM5/19/17
to OpenXC
Update:

I have been able to stream some data including parsed messages such as vehicle speed, RPM etc. 
For this to work I had to update my compile options to:
-      CROSSCHASM_C5_BLE   = PLATFORM 
-      1                   = BOOTLOADER 
-      translated_obd2     = ENVIRONMENT_MODE 
-      0                   = TEST_MODE_ONLY 
-      0                   = DEBUG 
-      0                   = MSD_ENABLE 
-      180                 = DEFAULT_FILE_GENERATE_SECS 
-      0                   = DEFAULT_METRICS_STATUS 
-      1                   = DEFAULT_ALLOW_RAW_WRITE_USB 
-      0                   = DEFAULT_ALLOW_RAW_WRITE_UART 
-      0                   = DEFAULT_ALLOW_RAW_WRITE_NETWORK 
-      0                   = DEFAULT_ALLOW_RAW_WRITE_BLE 
-      BOTH                = DEFAULT_LOGGING_OUTPUT 
-      JSON                = DEFAULT_OUTPUT_FORMAT 
-      0                   = DEFAULT_EMULATED_DATA_STATUS 
-      ALWAYS_ON           = DEFAULT_POWER_MANAGEMENT 
-      0x1                 = DEFAULT_USB_PRODUCT_ID 
-      0                   = DEFAULT_CAN_ACK_STATUS 
-      1                   = DEFAULT_OBD2_BUS 
-      1                   = DEFAULT_RECURRING_OBD2_REQUESTS_STATUS 

In particular setting DEFAULT_CAN_ACK_STATUS to FALSE and DEFAULT_POWER_MANAGEMENT  to ALWAYS_ON seemed to do the trick for this vehicle. Standard translated_obd2 firmware did not work.

Eric Marsman

unread,
May 22, 2017, 1:35:22 PM5/22/17
to OpenXC
Simon,

Be careful with the "ALWAYS_ON" power management option. It will drain your battery if left plugged in. I'm assuming the CAN_ACK_STATUS is what really made it work. I will need to confirm that our translated_obd2 firmware is built with that option. 

Regards,
Eric
Reply all
Reply to author
Forward
0 new messages