[TUTO] Adaptateur pour SMEG/NAC/Matrice CAN2010 sur BSI CAN2004

Do you mean ID 246 (0xF6) probably?
Everything looks OK. It shows 0xA0 by reverse gear, and as i said before, parking sensors are working.
IMG_0251_wynik.jpg IMG_0253_wynik.jpg
 

Yes sorry.

What VIN did you use ? Are you using a PSA camera or Chinese camera ? The issue is probably linked to it if the 208 has the camera.
 

The VIN number I've used is VF3CCHMRPKT080332. The camera I've bought by my Peugeot dealer. He gave me also wiring instruction.
IMG_0254_wynik.jpg IMG_0255_wynik.jpg
 

It is strange because the camera is not even displayed in parts of this VIN so it can be a issue.

Second problem, you bought a 180° camera and the 208 never had this camera type so even if you telecode it you will get a fisheye view on your screen
 
  • J'aime
Reactions: zertaul

By the telecoding reverse camera was as "present".
So, should I use another VIN number for coding and/or another one camera?
As I understand, camera brings not "normal" video signal, but can signal?
 

It is a NTSC standard video signal

BTW there are tests menus in Diagbox ("Tests Actionneurs") where you can force displaying the camera on the NAC ;)
 
Dernière édition:
  • J'aime
Reactions: zertaul

It is a NTSC standard video signal

I've just tried my camera with TV and it shows video on the screen.

BTW there are tests menus in Diagbox ("Tests Actionneurs") where you can force displaying the camera on the NAC ;)

I'll try it next time. I have to also search another one VIN number. Maybe do you know one with camera and parking sensors front + rear?

EDIT. As far as I know, only GTi version of 208's have NAC + reverse camera + paring sensors front + parking sensors rear. Is this true?
 
Dernière édition:

Hi!
Im trying to put this project a step up. I know INFO DIV shares the dashboard information too and im trying to convert CAN2004 dashboard info to CAN2010. The reason is i have a CIROCCO TFT panel i wish put on my C5.
I have the readings (traces) from a CAN2010 car and also from my car 2004. I have most of the conversion data finished on an Excel table.
Is there any possibility to implement a "custom code" section on your sketch? I mean any field where we can fill "if CAN0 receives 0x128, send to CAN1 0x0B6". At this point im not familiar with C++ code so if i can reproduce these sections we would have a dashboard converter too.

Thanks
 
  • J'aime
Reactions: Laleksss

The C code is not extremely difficult, share your conversion table, I will see what I can do :)
 

The C code is not extremely difficult, share your conversion table, I will see what I can do :)
Thank you for this quick reply!
Here you will have the most simple commands for conversion. https://drive.google.com/open?id=1nt9Um1p93nqwFxWY0Phib9niJ1ur-5JE
One of the CAN messages is responsible to wake on the screen. It must be forwarded even if it receives another value. Otherwise it will behave like this : https://drive.google.com/file/d/1m66nZXcoiztFlw4snrAf0BDerkmEle_m/view?usp=sharing

Im using the ARDUINO to test and develop, the 3008 dashboard and an old 307 CAN2004 dashboard for comparison.
 

As far as I understand you want to send to convert messages from CAN0 (old 2004) to CAN1 (2010) according to conversion table?
You need modify Arduino code like this:

//before
Code:
      } else if (id == 0x128 && len == 8) {
        canMsgSnd.data[0] = canMsgRcv.data[0];
        canMsgSnd.data[1] = canMsgRcv.data[6];
        canMsgSnd.data[2] = canMsgRcv.data[7];

        tmpVal = (canMsgRcv.data[0] & 0xFF);
        if (tmpVal == 96) { // Handbrake
          canMsgSnd.data[3] = 0x02;
        } else {
          canMsgSnd.data[3] = 0x00;
        }

        canMsgSnd.data[4] = canMsgRcv.data[4];
        canMsgSnd.data[5] = canMsgRcv.data[5];
        canMsgSnd.data[6] = canMsgRcv.data[6];
        canMsgSnd.data[7] = canMsgRcv.data[7];
        canMsgSnd.can_id = 0x128;
        canMsgSnd.can_dlc = 8;

        CAN1.sendMessage( & canMsgSnd);
        if (Send_CAN2010_ForgedMessages) { // Will generate some light issues on the instrument panel
          CAN0.sendMessage( & canMsgSnd);
        }
      } else if (id == 0x3A7 && len == 8) {


//after
Code:
      } else if (id == 0x128 && len == 8) {
          if        (canMsgRcv.data[0] == 0x63 && canMsgRcv.data[1] == 0x01 && canMsgRcv.data[2] == 0x00 && canMsgRcv.data[3] == 00 && canMsgRcv.data[4] == 0x80 && canMsgRcv.data[5] == 0xD4 && canMsgRcv.data[6] == 0x00 && canMsgRcv.data[7] == 0x00) { // 1st position from table
              canMsgSnd.data[0] = 0x01; canMsgSnd.data[1] = 0x00; canMsgSnd.data[2] = 0x00; canMsgSnd.data[3] = 0x02; canMsgSnd.data[4] = 0x40; canMsgSnd.data[5] = 0x51; canMsgSnd.data[6] = 0x54; canMsgSnd.data[7] = 0x00;
          } else if (canMsgRcv.data[0] == 0x63 && canMsgRcv.data[1] == 0x11 && canMsgRcv.data[2] == 0x00 && canMsgRcv.data[3] == 00 && canMsgRcv.data[4] == 0xC0 && canMsgRcv.data[5] == 0xD4 && canMsgRcv.data[6] == 0x00 && canMsgRcv.data[7] == 0x00) { // 2nd position from table
              canMsgSnd.data[0] = 0x01; canMsgSnd.data[1] = 0x00; canMsgSnd.data[2] = 0x00; canMsgSnd.data[3] = 0x02; canMsgSnd.data[4] = 0x40; canMsgSnd.data[5] = 0x51; canMsgSnd.data[6] = 0x54; canMsgSnd.data[7] = 0x00;
          } else if (canMsgRcv.data[0] == 0x63 && canMsgRcv.data[1] == 0x11 && canMsgRcv.data[2] == 0x00 && canMsgRcv.data[3] == 00 && canMsgRcv.data[4] == 0x00 && canMsgRcv.data[5] == 0xD4 && canMsgRcv.data[6] == 0x00 && canMsgRcv.data[7] == 0x00) { // 3rd position from table
              canMsgSnd.data[0] = 0x21; canMsgSnd.data[1] = 0x00; canMsgSnd.data[2] = 0x00; canMsgSnd.data[3] = 0x02; canMsgSnd.data[4] = 0x40; canMsgSnd.data[5] = 0x51; canMsgSnd.data[6] = 0x54; canMsgSnd.data[7] = 0x00;
          } else if (canMsgRcv.data[0] == 0x63 && canMsgRcv.data[1] == 0x11 && canMsgRcv.data[2] == 0x00 && canMsgRcv.data[3] == 00 && canMsgRcv.data[4] == 0xC4 && canMsgRcv.data[5] == 0xD4 && canMsgRcv.data[6] == 0x00 && canMsgRcv.data[7] == 0x00) { // 4th position from table
              canMsgSnd.data[0] = 0xC0; canMsgSnd.data[1] = 0x00; canMsgSnd.data[2] = 0x00; canMsgSnd.data[3] = 0x02; canMsgSnd.data[4] = 0x40; canMsgSnd.data[5] = 0x51; canMsgSnd.data[6] = 0x54; canMsgSnd.data[7] = 0x00;
          } else if (canMsgRcv.data[0] == 0x63 && canMsgRcv.data[1] == 0x11 && canMsgRcv.data[2] == 0x00 && canMsgRcv.data[3] == 00 && canMsgRcv.data[4] == 0xC2 && canMsgRcv.data[5] == 0xD4 && canMsgRcv.data[6] == 0x00 && canMsgRcv.data[7] == 0x00) { // 5th position from table
              canMsgSnd.data[0] = 0xC2; canMsgSnd.data[1] = 0x00; canMsgSnd.data[2] = 0x00; canMsgSnd.data[3] = 0x02; canMsgSnd.data[4] = 0x40; canMsgSnd.data[5] = 0x51; canMsgSnd.data[6] = 0x54; canMsgSnd.data[7] = 0x00;
          } else if (canMsgRcv.data[0] == 0x63 && canMsgRcv.data[1] == 0x11 && canMsgRcv.data[2] == 0x00 && canMsgRcv.data[3] == 00 && canMsgRcv.data[4] == 0xE0 && canMsgRcv.data[5] == 0xD4 && canMsgRcv.data[6] == 0x00 && canMsgRcv.data[7] == 0x00) { // 6th position from table
              canMsgSnd.data[0] = 0xC4; canMsgSnd.data[1] = 0x00; canMsgSnd.data[2] = 0x00; canMsgSnd.data[3] = 0x02; canMsgSnd.data[4] = 0x40; canMsgSnd.data[5] = 0x51; canMsgSnd.data[6] = 0x54; canMsgSnd.data[7] = 0x00;
          } else if (canMsgRcv.data[0] == 0x63 && canMsgRcv.data[1] == 0x11 && canMsgRcv.data[2] == 0x00 && canMsgRcv.data[3] == 00 && canMsgRcv.data[4] == 0xD0 && canMsgRcv.data[5] == 0xD4 && canMsgRcv.data[6] == 0x00 && canMsgRcv.data[7] == 0x00) {// 7th position from table
              canMsgSnd.data[0] = 0xD0; canMsgSnd.data[1] = 0x00; canMsgSnd.data[2] = 0x00; canMsgSnd.data[3] = 0x02; canMsgSnd.data[4] = 0x40; canMsgSnd.data[5] = 0x51; canMsgSnd.data[6] = 0x54; canMsgSnd.data[7] = 0x00;
          } else if (canMsgRcv.data[0] == 0x63 && canMsgRcv.data[1] == 0x11 && canMsgRcv.data[2] == 0x00 && canMsgRcv.data[3] == 00 && canMsgRcv.data[4] == 0xD8 && canMsgRcv.data[5] == 0xD4 && canMsgRcv.data[6] == 0x00 && canMsgRcv.data[7] == 0x00) { // 8th position from table
              canMsgSnd.data[0] = 0xD8; canMsgSnd.data[1] = 0x00; canMsgSnd.data[2] = 0x00; canMsgSnd.data[3] = 0x02; canMsgSnd.data[4] = 0x40; canMsgSnd.data[5] = 0x51; canMsgSnd.data[6] = 0x54; canMsgSnd.data[7] = 0x00;
          } else {
            canMsgSnd.data[0] = canMsgRcv.data[0];
            canMsgSnd.data[1] = canMsgRcv.data[6];
            canMsgSnd.data[2] = canMsgRcv.data[7];
 
            tmpVal = (canMsgRcv.data[0] & 0xFF);
            if (tmpVal == 96) { // Handbrake
              canMsgSnd.data[3] = 0x02;
            } else {
              canMsgSnd.data[3] = 0x00;
            }
 
            canMsgSnd.data[4] = canMsgRcv.data[4];
            canMsgSnd.data[5] = canMsgRcv.data[5];
            canMsgSnd.data[6] = canMsgRcv.data[6];
            canMsgSnd.data[7] = canMsgRcv.data[7];
        }
            canMsgSnd.can_id = 0x128;
            canMsgSnd.can_dlc = 8;
 
            CAN1.sendMessage( & canMsgSnd);
            if (Send_CAN2010_ForgedMessages) { // Will generate some light issues on the instrument panel
              CAN0.sendMessage( & canMsgSnd);
            }

      } else if (id == 0x3A7 && len == 8) {




BTW. Is there any possibility to insert preformated code?

EDIT: I found it.
 
  • J'aime
Reactions: horuscurcino

Thanks zertaul! I appreciate your code and to me the logic makes sense. I understood where i need to modify for another codes conversion.
But for some reason the code is not sending the converted message to the dashboard. I used a CanHacker monitor to see if the converted values reach the other side but it does not. I have checked the cables and the order CAN0 CAN1. ForgedMessages is turned on.
 


I'm not sure do I get you correct. Is there on the left side what are you getting on CAN0, and on the right side what do you want to send, right?


upload_2019-11-4_14-30-48.png
 

Exactly! Im away from my bench so i cant post the screenshots right now. But i have made a setup with:

1. a continuous looping arduino BSI with 036, 0F6 and 128 signals from CAN2004. A CAN2004 dashboard is connected to it;
2. Another arduino as converter receiving these signals from one MCP2515 and sending the converted ones to another (its working because i can get RTC on NAC radio);
3. The 3008 panel connected to the "converted side" and also another arduino acting as CanHacker monitor to check the signals (i was using the serial debug from the code but i found the canhacker easier to check and log)

I was expecting to receive at least the 0x54 signal from the code on the converted side but it does not
 

I didn't check my code in "real world", but it should works. Need logs/screenshoots from CAN0 and CAN1 at the same time.

You can also again modify source code like this:

// before
Code:
     } else if (id == 0x128 && len == 8) {
         if        (canMsgRcv.data[0] == 0x63 && canMsgRcv.data[1] == 0x01 && canMsgRcv.data[2] == 0x00 && canMsgRcv.data[3] == 00 && canMsgRcv.data[4] == 0x80 && canMsgRcv.data[5] == 0xD4 && canMsgRcv.data[6] == 0x00 && canMsgRcv.data[7] == 0x00) { // 1st position from table


// after

Code:
     } else if (id == 0x128 && len == 8) {
          Serial.print("CAN0 0x128 INPUT DATA: ");
          char tmp[3];
          for (int i = 0; i < 8; i++) {
            Serial.print(" ");
 
            snprintf(tmp, 3, "%02X", canMsgRcv.data[i]);
 
            Serial.print(tmp);
          }
           Serial.println();
         if        (canMsgRcv.data[0] == 0x63 && canMsgRcv.data[1] == 0x01 && canMsgRcv.data[2] == 0x00 && canMsgRcv.data[3] == 00 && canMsgRcv.data[4] == 0x80 && canMsgRcv.data[5] == 0xD4 && canMsgRcv.data[6] == 0x00 && canMsgRcv.data[7] == 0x00) { // 1st position from table

and

// before
Code:
           canMsgSnd.can_id = 0x128;
           canMsgSnd.can_dlc = 8;

           CAN1.sendMessage( & canMsgSnd);
           if (Send_CAN2010_ForgedMessages) { // Will generate some light issues on the instrument panel
             CAN0.sendMessage( & canMsgSnd);
           }

     } else if (id == 0x3A7 && len == 8) {


// after

Code:
           canMsgSnd.can_id = 0x128;
           canMsgSnd.can_dlc = 8;

          Serial.print("CAN1 0x128 OUTPUT DATA: ");
          char tmp[3];
          for (int i = 0; i < 8; i++) {
            Serial.print(" ");
 
            snprintf(tmp, 3, "%02X", canMsgSnd.data[i]);
 
            Serial.print(tmp);
          }
           Serial.println();
           CAN1.sendMessage( & canMsgSnd);
           if (Send_CAN2010_ForgedMessages) { // Will generate some light issues on the instrument panel
             CAN0.sendMessage( & canMsgSnd);
           }

     } else if (id == 0x3A7 && len == 8) {


and of course

//before
Code:
bool SerialEnabled = false;


//after
Code:
bool SerialEnabled = true;


and just go to Serial Debug Console and you should see what happened.
 
Dernière édition:

Hi!
Two things to consider: I am not using the RTC module on this converter. And i am using 8MHZ MCP2515 interfaces. I made a little change on the code to fullfill this.

Code:
  CAN0.reset();
  CAN0.setBitrate(CAN_SPEED, MCP_8MHZ);
  while (CAN0.setNormalMode() != MCP2515::ERROR_OK) {
    delay(100);
  }

  if (SerialEnabled) {
    // CAN-BUS to CAN2010 device(s)
    Serial.println("Initialization CAN1");
  }

  CAN1.reset();
  CAN1.setBitrate(CAN_SPEED, MCP_8MHZ);
  while (CAN1.setNormalMode() != MCP2515::ERROR_OK) {
    delay(100);
  }

I had to change your code a bit because "char tmp[3];" was declared two times.
But here is the output:

Code:
Initialization CAN0
Initialization CAN1
Unable to sync with the RTC
Current Time: 14/10/2019 0:0

If i turn on the debugCAN0 and debugCAN1, the output is the signal the dashboard generates by itself. Altough the 0F6, 036 and 128 messages are generated in CAN0 they does not appear on the debug.

Code:
Initialization CAN0
Initialization CAN1
Unable to sync with the RTC
Current Time: 14/10/2019 0:0
FRAME:ID=246:LEN=8:8E:7F:00:00:DD:DD:82:20
FRAME:ID=296:LEN=8:63:11:00:00:C0:D4:00:00
FRAME:ID=54:LEN=8:0E:00:03:2F:31:00:89:AC
FRAME:ID=471:LEN=1:00
FRAME:ID=535:LEN=8:F2:40:00:00:02:FF:1B:01
FRAME:ID=246:LEN=8:8E:7F:00:00:DD:DD:82:20
FRAME:ID=296:LEN=8:63:11:00:00:C0:D4:00:00
FRAME:ID=54:LEN=8:0E:00:03:2F:31:00:89:AC
FRAME:ID=471:LEN=1:00
FRAME:ID=535:LEN=8:F2:40:00:00:02:FF:1B:01
FRAME:ID=796:LEN=5:00:00:00:00:FF
FRAME:ID=246:LEN=8:8E:7F:00:00:DD:DD:82:20
FRAME:ID=296:LEN=8:63:11:00:00:C0:D4:00:00
FRAME:ID=54:LEN=8:0E:00:03:2F:31:00:89:AC
FRAME:ID=471:LEN=1:00
FRAME:ID=535:LEN=8:F2:40:00:00:02:FF:1B:01
FRAME:ID=727:LEN=3:63:08:10
FRAME:ID=246:LEN=8:8E:7F:00:00:DD:DD:82:20
FRAME:ID=296:LEN=8:63:11:00:00:C0:D4:00:00
FRAME:ID=54:LEN=8:0E:00:03:2F:31:00:89:AC
FRAME:ID=471:LEN=1:00
FRAME:ID=535:LEN=8:F2:40:00:00:02:FF:1B:01
FRAME:ID=796:LEN=5:00:00:00:00:FF
FRAME:ID=246:LEN=8:8E:7F:00:00:DD:DD:82:20
FRAME:ID=296:LEN=8:63:11:00:00:C0:D4:00:00
FRAME:ID=54:LEN=8:0E:00:03:2F:31:00:89:AC
FRAME:ID=471:LEN=1:00
FRAME:ID=535:LEN=8:F2:40:00:00:02:FF:1B:01
FRAME:ID=246:LEN=8:8E:7F:00:00:DD:DD:82:20
FRAME:ID=296:LEN=8:63:11:00:00:C0:D4:00:00
FRAME:ID=54:LEN=8:0E:00:03:2F:31:00:89:AC



AND IT KEEPS REPEATING................................

I am pretty sure i was editing at the right places.
Still no code conversion.

EDIT: the link to the sketch:
https://drive.google.com/open?id=1ZfzQ0t_XZ-GEHzMz-nAyQovikXoH564z
 

Is it really your code? You've got:

Code:
bool debugCAN0 = false; // Read data sent by ECUs from the car to Entertainment CAN bus using https://github.com/alexandreblin/python-can-monitor
bool debugCAN1 = false; // Read data sent by the NAC / SMEG to Entertainment CAN bus using https://github.com/alexandreblin/python-can-monitor

but anyway still output CAN messages on Serial console...it shouldn't happened.

EDIT: OK, understood. Please do NOT enable debug for CAN0 and CAN1, because if debug is enabled, you'll never reach part of code corresponding to read/send messages from 0x128. It results from this part of code:

Code:
   if (debugCAN0) {
       ...
       ...
    } else if (!debugCAN1) {
       ...here is part of the code corresponding to send messages (e.g. to 0x128)
       ...but it happens only, if debugCAN0 and debugCAN1 is false
 
Dernière édition:

Today I was once more by my Dealership and he coded my NAC with Peugeot 208 GTI VIN number. Still no luck :(
The coding was successful, but there's no camera view on the display. The camera view doesn't work at all also by NAC test - only black screen with yellow arrow as I remember.
My question is do I missing something? The camera in this way:

17: Signal Video +
16: Signal Vidéo -

I proofed camera with TV and it shows correctly.

UPDATE:
I proofed connections once more and camera was not correctly connected with NAC.
Now camera shows signal on the display, but only trough test with DiagBox.
Still no luck with reverse gear...
 
Dernière édition:

Today I was once more by my Dealership and he coded my NAC with Peugeot 208 GTI VIN number. Still no luck :(
The coding was successful, but there's no camera view on the display. The camera view doesn't work at all also by NAC test - only black screen with yellow arrow as I remember.
My question is do I missing something? The camera in this way:

17: Signal Video +
16: Signal Vidéo -

I proofed camera with TV and it shows correctly.

UPDATE:
I proofed connections once more and camera was not correctly connected with NAC.
Now camera shows signal on the display, but only trough test with DiagBox.
Still no luck with reverse gear...

Your camera must be considered on the BSI settings. There is a field called "Type of park assistance" and it you need to fill with your cars sensor options plus "reversing camera". Example: With front and rear sensors, with reversing camera. Otherwise the camera will not be considered to be shown when in reverse gear.
 

Thanks for the clue.
I tried telecoding BSI in different ways:
- with parking sensors front + rear;
- with parking sensors front + rear + reverse camera:
- with parking sensors front + rear + reverse camera with guide lines:

Still no luck. Can anybody with working reverse camera proof which values are comming on CANBUS ID 246 (0xF6))?
 


bLI2iB1.png


Here is the Matrix PINOUT.

3: CAN-BUS Comfort High
2: CAN-BUS Comfort Low
1: +12V from F14
5 & 4: Buttons on the console
6: GND

You just have to dissemble the connector and unplug CAN-BUS wires and send them as source to the Arduino first card (or isolate them if you took the input from the telematic unit)
Put the new ones connected from the matrix to the second card of the Arduino (where CAN-BUS messages are modified to appear as CAN2010), PIN reference:
6542 WY (6542WY) x 2 - Clips (0.95€ TTC l'unité) - Référence TE: 144969-1
 


bLI2iB1.png


Here is the Matrix PINOUT.

3: CAN-BUS Comfort High
2: CAN-BUS Comfort Low
1: +12V from F14
5 & 4: Buttons on the console
6: GND

You just have to dissemble the connector and unplug CAN-BUS wires and send them as source to the Arduino first card (or isolate them if you took the input from the telematic unit)
Put the new ones connected from the matrix to the second card of the Arduino (where CAN-BUS messages are modified to appear as CAN2010), PIN reference:

thanks for replay!
i buy Phonocar 4/790 as for step 6 , what it will help me ?
 

Dernière édition:


Code:
   [Arduino]   <>    [CAN-BUS Shield]    <>      [CAN-BUS Shield]
      ^                   ^                        ^
  12V or 5V             Two wires from            Two wires to
doesn't matter          car CAN-BUS (input)       matrix CAN-BUS (converted messages)

You can't mix CAN-BUS wires, High and Low are going to a single ECU.
 

Code:
   [Arduino]   <>    [CAN-BUS Shield]    <>      [CAN-BUS Shield]
      ^                   ^                        ^
  12V or 5V             Two wires from            Two wires to
doesn't matter          car CAN-BUS (input)       matrix CAN-BUS (converted messages)

You can't mix CAN-BUS wires, High and Low are going to a single ECU.
Where i can found pictures or diagram of all connection of that special project i search on net but nothing.... there are CAN-BUS Shield as Master and Slave that connect between their Terminal - CAN_H and CAN_L - IS IT LIKE THIS?

Only you VLud make it possible!
is the picture i attached is ok ?:
 

Pièces jointes

  • CANBUS.jpg
    CANBUS.jpg
    279.8 Ko · Affichages: 139

[QUOTE = "VLud, post: 2517849, membro: 108646"] Oi, enviei uma atualização para corrigir isso ;)[/ QUOTE]
Obrigado pela atualização!: Bom:
Agora KM / L funcionando! Mas ... Não muda de idioma kkkk
não muda no RT6 e no código.
no código é definido como "0 = FR", mas em MATT sempre em EN.
Eu também testei "noFMUX = True" ... não funcionou