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.