Help with startbit and bitcount

So im trying to make RealDash work for my Renault Clio MK4 RS

I have a lot of information just from the CAN monitor, but i cant get the XML to properly send the values.

For example, on frame 5DE, the Byte 0 is indicators, and lights.

Byte 0 binary:
01100000

The second bit ‘1’ is the right indicator, and the third bit ‘1’ is the left indicator.

So i have used the following in my XML file:

frame id=“0x5de”>
value targetId=“161” startbit=“1” bitcount=“1”/>
!-- right turn signal →
value targetId=“160” startbit=“2” bitcount=“1”/>
!-- left turn signal →
/frame>

Removed the opening < because it wouldnt show up.

But this doesnt seem to actually work.

Same goes for basically anything i have used the startbit and bitcount on.

Am I doing something wrong?

TIA

do you see the frame 0x5de in can monitor if not try add

units=“bit”

I do see the frame in CAN Monitor yes.

I figured out my issue, not sure if its my car, or RealDash but the startbit needs to be from the end of the byte backwards, not the start of the byte forwards. So my values ended up being startbit 6 for Right Indicator and startbit 5 for Left Indicator.

Either way it works now so I am happy, just weird. Not sure if it has anything to do with the default of little endian, as my car seems to show everything in big endian. :man_shrugging:

in your car the turn signal comes from the bcm with the flasher so 0-4 can be the flasher :thinking:

Yes, and the two bits are 1 and 2 of the 8. But for some reason, I had to put in the reverse order.

Actually, the CAN Monitor does not use the XML at all. It just dumps all the received frames into the monitor.

Yeah I understand that, I was assuming the bit index started at 0 on the left and increased to the right to 7, but its backwards. Not sure if thats how RealDash does it normally or not, but in the end it doesn’t matter because now I know that, a lot of other stuff has started working :slight_smile:

Actually the first bit, called LSB (Least Significant Bit) is always the rightmost bit on the byte on all systems that I’m aware of.

That does make sense now, not sure what I was thinking. Point is I know now so that will make future additions a breeze once I know what bit(s) are changing.

1 Like