Finish sketch for Citroen C5 X7 Nac operation with arduino Can Comfort 2004-2010.


  • I'm trying to find out the bsi frame for the start stop button and the NAC start stop touch button but having no success I have the frame sent by the original cluster when start stop/eco switch pressed but need to get the NAC to emulate it now I have cirocco fitted it's just that and the notifications that I need to get working on my vehicle

    I have looked around to try to find someone to do it if I pay them as I am totally thick with c++ 😔

    Einmal editiert, zuletzt von Ukautotechnic () aus folgendem Grund: Merged a post created by Ukautotechnic into this post.

  • I'm trying to find out the bsi frame for the start stop button and the NAC start stop touch button but having no success

    You have to configure the option in bsi so that the bsi recognize the frame via touch panel. ;)


    I have the frame sent by the original cluster when start stop/eco switch pressed but need to get the NAC to emulate it now I have cirocco fitted it's just that and the notifications that I need to get working on my vehicle

    I have looked around to try to find someone to do it if I pay them as I am totally thick with c++ 😔

    The main thing is, i could write a Sketch for it but it takes a looot of hours, including testing and so on and that's to much for my free time you know.

    It's not done in 10 minutes.


    If I were to tinker with it myself, it wouldn't be an issue, but I'm not interested in that at the moment.

    My priorities are elsewhere at the moment.


    Especially since I couldn't test everything anyway, since I only have Peugeot stuff here at home and no Citroen. ;)

  • fully understandable we all know how valuable your time is with other things maybe one day ☺️


    Back to the sketches you posted yesterday would like to learn how to use them as I haven't been able to get anything to show in the serial monitor except mcp ok . maybe if you could tell a complete novice how to use the sketches I will then use them to get my frames I need 🤗

    The other thing is the start stop is not configured in my bsi it was a frame that I have captured that is sent by the original cluster.

    However the cirocco has an eco button connected to it and I intend to look for the frame sent by it and then get this used to send correct frame to the bsi to enable disable the stop start using the eco button like I did with the original cluster and not the touch button.

    Maybe one day when you have time we can look at the original post by myself and friend Manuel

    So any help with using the sketch from last night much appreciated and thanks for your help I will as promised show my appreciation by using the donate button as at least you haven't shot me down because I don't understand c++ 🤗


    Time is precious as we know and respect this and understand you have other commitments.

    I do know someone who could write c++

    But you did explain to my friend at the start on how this issue could possibly be resolved

    Involving buffering of the messages on 1A1 and sending to the NAC if you could give a quick rough idea of how this would need to be done in a way he would understand I can ask another friend to experiment for us

    Thank you

    2 Mal editiert, zuletzt von Ukautotechnic () aus folgendem Grund: Merged a post created by Ukautotechnic into this post.

  • maybe if you could tell a complete novice how to use the sketches I will then use them to get my frames I need 🤗

    C++ is not "just" explained.

    The sketch shows all frames that are on the bus, that's the short explanation.

    If no frames are displayed, check the wiring and baud rate.


    You can find out exactly how the library of the MCP2515 works in the examples.

    To do this, go to "File > Examples > MCP2515"


    Each library in the Arduino IDE has some examples with example codes (Sketch). :)



    The other thing is the start stop is not configured in my bsi it was a frame that I have captured that is sent by the original cluster.

    However the cirocco has an eco button connected to it and I intend to look for the frame sent by it and then get this used to send correct frame to the bsi to enable disable the stop start using the eco button like I did with the original cluster and not the touch button.

    It may be that the button is a normal switch and not a bus module.

    Therefore, it must be set in the bsi whether it works via a button or via a frame.

    Maybe one day when you have time we can look at the original post by myself and friend Manuel

    So any help with using the sketch from last night much appreciated and thanks for your help I will as promised show my appreciation by using the donate button as at least you haven't shot me down because I don't understand c++ 🤗

    I like to help where I can, but you also have to know how much work is behind it.


    I would suggest that you read up on C++ first.

    Maybe you can already answer some questions yourself. ;)


    I'll probably tinker with it later myself, because I still have some ideas with the canbus.

    But it will take a while until then. :smiling_face_with_tear:


    Time is precious as we know and respect this and understand you have other commitments.

    I do know someone who could write c++

    But you did explain to my friend at the start on how this issue could possibly be resolved

    Involving buffering of the messages on 1A1 and sending to the NAC if you could give a quick rough idea of how this would need to be done in a way he would understand I can ask another friend to experiment for us

    Thank you

    Yes, i said, you need to figure out all frames and redirect it.

    That's what this sketch from your post does.


    Now all you have to do is figure out what frames you need and where to send them.

    As I said, I have neither a Citroën nor a cluster here at home, so I can't test it myself, you have to do that then. :)


    And of course the alerts must be activated in the Nac to show alert messages.

  • this has just been updated but it looks like it is for C5 with the original cluster and NAC if you look at the code

    I tried it with my NAC cirroco setup and no different


    https://github.com/ludwig-v/ar…551e74a295870aca852e377b8


    No idea why the notifications are still not displaying

    But this sketch was written by a friend to test and it displays boot open maybe you can understand and see why the previous sketch I sent doesn't work

    Thank you

  • this has just been updated but it looks like it is for C5 with the original cluster and NAC if you look at the code

    I tried it with my NAC cirroco setup and no different


    https://github.com/ludwig-v/ar…551e74a295870aca852e377b8

    Maybe this line in the "if" query is wrong:

    Code
    bitRead(canMsgRcv.data[2], 6)

    For example if the 6th bit of the third Byte isn't 1, the "if" query will be ignored and nothing will be converted here.


    Or this 2 lines are wrong:

    Code
    bitWrite(canMsgSnd.data[2], 7, 1); // NAC / EMF
    bitWrite(canMsgSnd.data[2], 6, 0); // CMB


    This just edit the third Byte from the message but we don't know the byte here so we can't check if this is correct.


    Bitread and bitwrite were probably used here to save RAM, but this function is rubbish for explanations.


    Whoever wrote this, could have at least written the bytes (old/new) from the message next to it as a note or something...:rolleyes:


    You need to know the third byte from the 1A1 message from bsi.

    Then convert this byte to the 8 digit binary code (there are several code converters online) and then edit the 6th bit to 0 and the 7th bit to 1.

    Then convert it back to a byte value and you see the new converted byte.


    After that you know the old and the new converted frame message.


    I hope I explained it clearly. :see_no_evil_monkey:

    If not, ask again, maybe I can write a better explanation.


    In short, we cannot guess from this code what the 3rd incoming byte of the 1A1 message looks like and into which byte it is converted.


    We have to know:

    -What does the complete frame for the Nac look like

    -What does the complete frame from the BSI look like


    At least the complete 1A1 message from bsi would help.


    Only then can we know if it is correct.

  • When I tried this sketch written by someone else to make the wiper stalk bring up the boot open notification it worked not sure what part he changed to achieve this.

  • It's the same procedure.


    Here for example

    C++
     bitWrite(canMsgSnd.data[1], 6, bitRead(canMsgRcv.data[3], 5)); // Wiper in reverse

    In this line the 6th bit of the second Byte of the frame message will be changed and thats's it.


    The bit of the second Byte is changed to the value read with bitread.


    Bitread reads the value of the 5th bit from the 4th frame message.


    It sucks to read but basically nothing more than changing as simple byte like 0xFF to 0xF1 for example.



    canMsgSnd.data[0] = Byte 1

    canMsgSnd.data[1] = Byte 2 <- This Byte changed

    canMsgSnd.data[2] = Byte 3

    canMsgSnd.data[3] = Byte 4

    canMsgSnd.data[4] = Byte 5

    canMsgSnd.data[5] = Byte 6

    canMsgSnd.data[6] = Byte 7

    canMsgSnd.data[7] = Byte 8


    With this shitty unreadable bitWrite and bitRead you have a better performance.

    But you're lost if you don't take notes. ^_^



    Here an example:


    Lets say canMsgSnd.data[1] (Byte 2) of the frame message is 0xFF.

    Byte Value 0xFF = 11111111 in Bit value


    We Change now the 6th bit from 1 to 0 = 11111111 to 11111011

    And now we have a new byte value = 0xFB.


    Result:

    11111111 = 0xFF

    11111011 = 0xFB


    More examples:

    11001100 = 0xCC

    10100101 = 0xA5

    11010111 = 0xD7

    11001001 = 0xC9


    So you have the choice to change this example byte value directly from 0xFF to 0xFB OR you change it via binary value 11111111 to 11111011.

    It's the same.


    The binary code is performance friendly but shit to read.


    I hope I was able to write it clearly. :see_no_evil_monkey: :D

  • hello sir

    They have had no luck with the sketch numerous attempts lol have now put the cirocco in my C4 Picasso

    But I need to know what frame changes the cirroco display pages in my C5 they changed with the left scroll wheel

    But in the Picasso you don't have this wheel so I want to make my left stalk push button change the page


    Thanks

  • hello sir



    xD




    But I need to know what frame changes the cirroco display pages in my C5 they changed with the left scroll wheel

    But in the Picasso you don't have this wheel so I want to make my left stalk push button change the page

    I would say you have to ask a users who has installed a cirroco or have a scroll wheel in their car.

    The various speedometers hardly differ from each other, even if they are installed in different models.

    Therefore most frames will be the same.


    After that, find the frame from your button that you want to use and redirect it like all other frames.

    You can also have a look here.

    Some frames are still the same.

  • I have added to the list the rest of the keys that were missing on the C5 X7 steering wheel


  • Beitrag von Ukautotechnic ()

    Dieser Beitrag wurde von Mittns aus folgendem Grund gelöscht: Wrong Forum and Wrong Thread. Read the forum rules. ().
  • Hello, I am getting improvements in the sketch to adapt Nac can 2010 in C5 can 2004 but I have a need to correct, when I have an ice risk warning it remains fixed and hides information from the screen I would like that this warning only be done during a short time of 5 or 10 seconds. Can you help me? I have tried millis but it does not do what I need.


    If someone needs the sketch I can send it to them, it is modified to be used in Citroen C5.


    line 47 the ice warning code.


    Thanks.


    Manuel Pérez :bandera_España:

    2 Mal editiert, zuletzt von Mamalague ()

  • Please use the "Code"-Tag in editor, otherwise it's not possible to read the code. ;)



    Edit:


    If you use millis, the popup will only recognized in the first 5 seconds.

    It should work.

    Code
    if (millis() <= 5000) {
        sendPOPup(bitRead(canMsgRcv.data[7], 4), 216, 10, 0x00); // Ice warning (INFO)
    }


    If this doesn't work, you have another problem.

  • I try it, thanks


    Hello, I have pasted a larger part, so that it can be easier to understand the context. Using millis that way, the warning does not appear at any time. Some tell me the following "the notification or flag activates the presentation for the time of 5 seconds or 5000 msec using millis(). When you exceed it, you set the notification to false and it will not show it anymore." .But I don't know how to apply it. Thank,s



    Line 57.

    Manuel Pérez :bandera_España:

    3 Mal editiert, zuletzt von Mamalague () aus folgendem Grund: Merged a post created by Mamalague into this post.

  • Hi I have a 2009 Citroen jumpy/dispatch same as Peugeot expert

    I have built this adapter and used this sketch

    My problems are that I cannot change odometer from kmh to miles.

    With the nac installed and the EMF screen still in place the odometer flashes between kmh mph every second

    If you unplug the EMF the odometer stays on kmh and the NAC will not change it do any of you genius know what could be the problem and how to resolve it?

    I have changed the line bool mpg mph but still the same

    As this post is about pop ups these all display fine but I need odometer reading in mph

    Thank you

  • 3A7

    Hi, I have Pegueot 407 2007 Instrument Cluster and can not find IDs for handing Display popups. Do you maybe know ID? BR

  • Hello good, I am learning to be able to send messages to can bus in C5 using an arduino nano and in canano sketch. Using serial

    And I have several examples to send.

    Example 1:


    BUTTON RETURN RIGHT PRESSID162A20010000000

    What is the can ID?


    I put 162

    how many bytes is the message?

    I put 6

    to add the message I put:


    A2 00 10 00 00 00


    and then I send.


    My first question is if it is.


    my second question is how to do it when the message to send is like this.



    How do you do it with 217?


    Thank you so much.



    START/ STOP535217F28000020000FFFF



    I already found out that after the ID in decimal the next bytes are in hexagesimal.

    Manuel Pérez :bandera_España:

    Einmal editiert, zuletzt von Mamalague ()

  • Hi, I only have Peugeot 407 cluster. In order to understand your question and help you I need the Arduino sketch that you are currently using.

Jetzt mitmachen!

Hey! Es scheint, als ob Dir dieser Austausch gefällt, aber Du hast bisher noch kein Benutzerkonto erstellt. Mit einem Konto kannst Du über neue Antworten informiert werden, Foto's in unsere Galerie hochladen, unsere Tools nutzen, anderen mit einem „Gefällt mir“ danken oder selbst dabei unterstützen, anderen zu helfen. Gemeinsam können wir dazu beitragen, diese Community zu etwas größerem zu machen.