2ways communication help

Hi Jani;

I want to send system notifications which already appears/ displayed on realdash to can bus, so I can see the notifications in my OEM display.

A- In the below script I should change the “ID#=3201” to Realdash notifications ID#, isn’t?

B- My car sends packets data for example as 0000521: 10 00 20 00 30 00 40 10
0000522: 15 05 24 00 35 00 45 15
0000523: 18 08 28 00 38 00 48 18

Please advise how to send them?


void HandleIncomingSetValueFrame(unsigned long canFrameId, const byte* frameData)
{
if (canFrameId == 3201)
{
memcpy(&digitalPins, frameData, 2);
memcpy(&analogPins[0], frameData + 2, 2);
memcpy(&analogPins[1], frameData + 4, 2);
memcpy(&analogPins[2], frameData + 6, 2);

Best Regards

When inputs are specified in XML file, they are sent to CAN if you change any of those inputs in RealDash; ie using actions etc.

Another way is to specify ‘writeInterval’ parameter for the frame in XML. For example:

<frame id="1513" endianess="big" writeInterval="100">
    <values......>
</frame>

Above example will write that CAN frame to the bus once in 100 milliseconds.

Ok,

Know to make sure i understand correctly,
1- for example frame ID# 551 sent from canbus to Realdash contains data/information that will be displayed on OEM car display, this frame ID must be written inside XML sheet.

2- In order to send it back from Realdash to canbus with different DATA ( here the DATA will be replace with song name from my phone/Realdash) i have to write it in XML sheet and make an action or write an interval.

Correct me if i am wrong?

Now :
1- I need to change the song name above from Text to HEX format and send it to canbus so my OEM display can read it. How can i do that?

2- The song name will be changed and not be fixed.


Thanks

I’m unable to help with your specific vehicle as I do not know how it interprets the CAN data. But those are the two ways of sending CAN data from RealDash to the bus.

Hello.
Can you describe in detail about the first way to transfer data from RealDash to Can? I don’t understand how to set up the transmission using the inputs.

Any value specified in XML is sent over CAN if it is changed in RealDash via actions. For example, a button that changes value will send the updated value over CAN automatically.

Another option is to use the ‘writeInterval’ attribute in XML to write the CAN frame in specified intervals.

The variant with writeInterval is clear to me and works.
The transfer option by clicking on the fixed package button, I found the same.
I did not understand the option “is sent over CAN if it is changed in RealDash via actions”. Can you provide an example or a screenshot of the setup?

If you have an action that changes the value specified in XML, it is immediately written to CAN bus.

Thank you.
I figured out how to do it, but it was not so easy. The logic is a bit messy.
It is a pity that there is no documentation with screenshots. Or a training video with settings for the program’s capabilities.

Maybe not in this topic, but tell me. What the data source is used for: GPIO and Dummy?

GPIO are for Raspberry Pi (and similar) GPIO pin control.

Dummy variables are for whatever you want to use them for.

I use my board with CAN RealDash protocol. Can I use GPIO names? Do they need to be written in targetId?
If yes, what is the main point of GPIO if I can use any name in targetId?

What is the main logic behind the Empty Setting? If I can just set any name to targetId.

targetId attribute in XML is used to identify existing RealDash inputs. See list here:

http://realdash.net/manuals/targetid.php

name attribute in XML creates new custom input. In order for other users to see that value in RealDash, you need to distribute your XML to them.

Sorry. Misspelled.Instead of “targetId” I meant “name”.
But in any case, in order for the RD to work, I must transfer my xml file.
Therefore, I cannot understand. Why use targetId=93 is “Dummy 01” when it’s more convenient to use name=my_value?

As far as I understood, I can’t select values from the PDSX-1 and GPIO sections, because they are for boards with a different protocol. And not presented in the table http://realdash.net/manuals/targetid.php.
Correctly?

Yes, those inputs are used only by their original purpose.

Could you also answer the first question.
I cannot understand. Why use targetId=93 is “Dummy 01” when it’s more convenient to use name=my_value?

You could use Name-my_value. One reason to use the existing variables and targetIDs is that it will make it easier to move to different dashboards without having to manually set each gauge or indicator to custom variable names, but it would work both ways.

smwoodward, thank you. It became more understanding.

Jani,

So in order to send back a frame from RD to Can bus the 1st thing I have to do is to uploaded my Arduino with 2 way “RealDash_CAN_2way.ino”. isn’t?

Then make an action to send back a frame?

Regards

It is just an example sketch, not in any way “required” to send frames. RealDash sends a CAN frame every time any of the values specified in CAN XML changes, or if you use ‘Send CAN Frame’ action.