Migrating from OBD2 to CAN

Ok as per my understanding, BMW 3 series has a CAN bus and OBD2 connector (which I am using now). But since I am using a VGate BT adaptor which does not support the above CAN protocols, I suppose buying that Vgate vLinker MC+ linked above and choosing the OBD2 protocol as ISO 15765-4 CAN should provide the CAN reading to RD and get more accurate fuel (kmpl) readings?

Just thinking aloud!

If you use the OBD2 connection type in RealDash, nothing changes when you change the adapter.

It is possible to use ELM327 adapters as a CAN adapter. Then the connection type in RealDash is ‘Adapters (CAN/LIN)->OBDLink CAN Adapter’. Then you get raw CAN data from the vehicle. The thing is; raw CAN data must be interpreted somehow. RealDash uses XML files to give instructions for RealDash how to interpret the raw CAN data. Currently we do not have ready made XML file for BMW, so you would need to figure that on your own.

1 Like

@realdashdev

I understand from reviewing material on the net, sending the following frame (equivalent to PID 2129 on OBD2) on the canbus:

7C0#0221290000000000

would give the following response:

7C8#036129XX00000000

where XX is the fuel level in 0.5 litres

I am struggling to understand how and if this can be implemented in the RealDash XML file?

@realdashdev hoping you can give a steer on this

Somehow I don’t seem to understand you and what you are trying to achieve. The example commands that you gave for fuel level are to my understanding ELM327 commands, and has no meaning when working on CAN.

Hi this may be my incorrect assumption on how the CANBUS works, but I understood all the frames currently visible to any device listening are based on one or more devices on the bus requesting this information, for example, the instrument cluster requesting speed or RPM from the ECU, while the request is not visible. When an ELM327 request is placed from a device, it eventually becomes a CANBUS request with a frame response? I am basically asking how to generate a request and then receive the response.

Note that OBD2 and CAN XML files in RealDash are completely different format and not compatible with each other.

On CAN connection you don’t specify the requests at all. If you use ELM327 as CAN adapter, its ‘Monitor All’ command is used to retrieve all CAN frames in the bus.

Use the RealDash CAN monitor, identify the frame and bytes where your fuel level is, then I can help you to specify the frame in CAN XML.

@realdashdev I fully understand the difference between OBD2 and CAN, my current configuration has a Y splitter cable to a MeatPi adapter in CAN mode, and an OBDLINK LX in ELM327 mode, where I am trying to migrate as much as possible from OBD2 to CAN, for the performance improvements. In normal operation I have an Android unit Bluetooth connecting to both of these devices so I see composite information on my dash. However, I have connected the devices to separate Android units and observed the CANBUS activity from the ELM327 device, where the query is sent to frame 0x7df and the response comes back on 0x7e8. My query was really whether RealDash can be used to replicate these requests at a CANBUS level without using the ELM327 OBD2 adapter?

Secondly, my understanding is the CANBUS activity which can be monitored is the product of units on the CANBUS actively exchanging information, for example, the physical dashboard requesting speed from the ECU for the speedometer. If there are no units on the CANBUS requesting this information, then it will not appear in the CANBUS monitor. If I use the example of transmission temperature this does not appear anywhere in the car, but I can see the values using OBD2 if so requested. Do these values exist in CANBUS frames which are not being requested by other units, and if so how do you make a request on the CANBUS to reveal them, is this the writeinterval function in RealDash?

In CAN connections, the CAN frame is sent to the bus in these situations:

  • XML specifies ‘writeInterval’ attribute for the frame.
  • Any value specified in XML changes via a Action in RealDash, like a button press etc. Corresponding frame is then sent to the bus.

fj_can.xml (10.2 KB)
Still work in progress but considerably more extensive than earlier revision

Thanks! I will put this to next release.

Apart from one or two bits I could not reconcile with anything meaningful, attached is my final FJ CAN xml
fj_can.xml (9.9 KB)

Alright, will update this to next release of RealDash.

@realdashdev
Uploading: fj_can.xml…
I noticed you recently updated the xml files on the RealDash extras website. Please find attached my final Toyota FJ Cruiser xml file; this includes improved steering angle calculation (-20 degrees to +20 degrees), an equivalent OBD2Load engine load calculation, and several other minor enhancements. I left the UAE recently (selling the Toyota FJ) for new destination of Vietnam, where I plan to work on the Mazda canbus shortly.

fj_can.xml (7.8 KB)

Thank you for sharing! Its now updated and will also be included in next release of RealDash.

@mmain did you get your OBDLINK LX work in CAN mode or as an “OBDLink CAN adapter”?
I have bought a VGATE iCar Pro 2S and I was unable to establish a connection with CAN monitor. Now I am thinking to buy a vLinker MC (The Meatpi device is expensive in Spain because of shipping costs and taxes):


But I am not sure I can make it work in CAN mode.

@realdashdev I am a little confused:
My car is a Nissan Qashqai and I have the XML CAN file from another post.
When in OBD2 mode I can see my car OBD2 protocol: ISO 15765-4 CAN (11 bit ID - 500kbaud).
vLinker MC says it is an “ISO 11898 (raw can)” capable device, but as far as I can understand, ISO 11898 is useless for my car, so I will be unable to get raw CAN data, and I could only get CAN data configuring the vLinker device as an “OBDLink CAN adapter” (I have read its limitations) assuming I will be able to establish a connection using OBD2 protocol ISO 15765… Am I wright?

@P_invest_new yes I have the OBDLINK LX working in CAN mode as you describe, however, whilst it does work, it intermittently loses the connection with nothing of significance logged. Whilst it may not be significant, the latest firmware for the LX is 2021, suggesting to me there may be no further development intended. I have ordered a VLinker MC to give this a try, as I understand this device also supports BLE, and not just BT, so I am hoping the comms are reliable, will update with my findings later.

@mmain

You have left me speechless. I did not expected so much empathy, nor collaboration, nor someone spending their money to fix a stranger’s problem. I’m really impressed.

Thank you very much endeed.

I look forward to the results of your tests.

1 Like

@P_invest_new For clarity, I did not purchase the device for your problem, but to overcome my own reliability problem. It arrived today and it works in can mode but it is slower than the LX, lets see how reliable it is over time.