morcibacsi / PSAWifiDisplayControl

A simple WiFi portal to control the display in your Peugeot or Citroen if you remove the factory installed head unit
GNU General Public License v3.0
27 stars 6 forks source link

Buttons have no action (HW1.4 board) #1

Open Marc-- opened 3 years ago

Marc-- commented 3 years ago

Hello there,

I'm having some troubles using the WifiDisplay Control with HW 1.4 board. The screen wakes up, and blink on 0:00. I can connect to the Access Point with my phone, but buttons have no action.

On the serial monitor, i can see the codes when buttons are pressed.

TEST_MODE is enabled, as i don't have a PSA head unit (and with TEST_MODE disabled, the screen doesn't wake up).

Is there a way to diagnose it ? Maybe a verbose serial log ? I don't have a scope, only a multimeter.

Regards, Marc

morcibacsi commented 3 years ago

Try uncommenting the lines from 98-100 in the main cpp. That way you can see on the serial monitor if the sent CAN messages are changing or not.

https://github.com/morcibacsi/PSAWifiDisplayControl/blob/master/PSAWifiDisplayControlMain.cpp#L98

Marc-- commented 3 years ago

Thanks for your reply. I'm quite new to this, but i'm trying to understand.

Here is what i see with the "debug" on. A lot of messages from the display.

With the help of those 2 sites i can understand some messages: https://github.com/prototux/PSA-RE/blob/master/buses/AEE2004.full/LS.CONF/ http://autowp.github.io/

But when i press a button on the phone, i can't see any CAN message. So i think my HW is faulty but... the screen wakes up, so it means the "ignition on" message is send on the BUS.

Sending "ignition off" when button is pressed makes screen blink, so data is send on CAN BUS.

        //radioButtonPacketSender->SendButtonCode(buttonId);
        uint8_t data3[] = { 0x0E, 0x00, 0x05, 0x2F, 0x02, 0x80, 0x00, 0xA0 };
        uint8_t data4[] = { 0x00, 0x32, 0x00, 0x1F, 0x00, 0x0D, 0x40, 0x01 };
        CANInterface->SendMessage(0x036, 0, 8, data3);
        CANInterface->SendMessage(0x0F6, 0, 8, data4);

I try to send "menu" : 0x3E5 40 00 00 00 00 00 directly without success.

rst:0x1 (POWERON_RESET),boot:0x12 (SPI_FAST_FLASH_BOOT) configsip: 0, SPIWP:0xee clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00 mode:DIO, clock div:1 load:0x3fff0018,len:4 load:0x3fff001c,len:1044 load:0x40078000,len:10124 load:0x40080400,len:5856 entry 0x400806a8 IP address: 192.168.1.1 3F6 03 1B 70 01 00 80 00 --> (period 1000ms length 7) Radio to Display: Time in seconds:12727 15B 07 00 00 00 00 00 00 F0 --> (period 500ms length 8) ???? 167 01 00 FF FF 00 00 00 00 --> (period 100ms length 8) Display says: ON 3F6 03 1B 70 01 00 80 00 3F6 03 1B 70 01 00 80 00 167 01 00 FF FF 00 00 00 00 167 01 00 FF FF 00 00 00 00 167 01 00 FF FF 00 00 00 00 167 01 00 FF FF 00 00 00 00 15B 07 00 00 00 00 00 00 F0 167 01 00 FF FF 00 00 00 00 167 01 00 FF FF 00 00 00 00 167 01 00 FF FF 00 00 00 00 167 01 00 FF FF 00 00 00 00 525 0D 00 08 00 02 00 00 00 --> (period 1000ms length 8) ???? 167 01 00 FF FF 00 00 00 00 15B 07 00 00 00 00 00 00 F0 167 01 00 FF FF 00 00 00 00 3F6 03 1B 80 01 00 80 00 --> (period 1000ms length 7) Radio to Display: Time in seconds:12728 167 01 00 FF FF 00 00 00 00 167 01 00 FF FF 00 00 00 00 167 01 00 FF FF 00 00 00 00 167 01 00 FF FF 00 00 00 00 15B 07 00 00 00 00 00 00 F0 167 01 00 FF FF 00 00 00 00 167 01 00 FF FF 00 00 00 00 167 01 00 FF FF 00 00 00 00 167 01 00 FF FF 00 00 00 00 525 0D 00 08 00 02 00 00 00 ... 167 01 00 FF FF 00 00 00 00 167 01 00 FF FF 00 00 00 00 167 01 00 FF FF 00 00 00 00 109 109 167 01 00 FF FF 00 00 00 00 525 0D 00 04 00 01 00 00 00 15B 07 00 00 00 00 00 00 F0 167 01 00 FF FF 00 00 00 00 3F6 0E 6C C0 01 00 80 00 167 01 00 FF FF 00 00 00 00 167 01 00 FF FF 00 00 00 00 109 109 167 01 00 FF FF 00 00 00 00 167 01 00 FF FF 00 00 00 00 15B 07 00 00 00 00 00 00 F0 167 01 00 FF FF 00 00 00 00 167 01 00 FF FF 00 00 00 00 167 01 00 FF FF 00 00 00 00 167 01 00 FF FF 00 00 00 00 167 01 00 FF FF 00 00 00 00 525 0D 00 04 00 01 00 00 00 15B 07 00 00 00 00 00 00 F0 167 01 00 FF FF 00 00 00 00 3F6 0E 6C D0 01 00 80 00

morcibacsi commented 3 years ago

I tested the version again, and it works on my side, so I am not sure what could be the problem :( But anyways I pushed a new version which replaced the CAN driver with the official one from ESP-IDF which is much more reliable than the previous one. Please try the new version, and see if it helps. By the way which type of display do you try with? Can you post a picture?

Marc-- commented 3 years ago

Thank you again. It's not better with the new version. My display is a type C "Johnson Controls" from 2012, bought from second hand market.

1632775145512

morcibacsi commented 3 years ago

Interesting... I have 2 Chinese type C displays and a Johnson Controls type A and all are working fine. Do you have another board to test (with this code, or for reading the sent messages with a CAN monitor sketch to check if the 0x3E5 CAN frame gets actually sent)

Marc-- commented 3 years ago

I manage to make a "can reader" with a SN65HVD230 (finally a working one !!)

Quite funny ma car looks like a lab now. 1632923934141

I wire the listener first, then power the "wifi-can" module. Very strange but i don't see the "ignition on" frames 0x036 et 0x0F6. No 3E5 either when pressing buttons.

My first thinging was: i'm not able to send messages on the CAN BUS. But, i can wake the screen up. So messages are send.

Why i can't see them is the question i have to answer first. I'll do some experiments.

datashit commented 6 days ago

@Marc-- I am experiencing the same issue. Were you able to solve it?