Mwyann / psakey

Peugeot Connect Apps / Citroën Multicity Connect your way
59 stars 14 forks source link

PSA Key... #3

Open att100101 opened 5 years ago

att100101 commented 5 years ago

I am glad with your job. The project about the emulator for PSA key connect is wonderfull...but, must I wait for a long time to watch on screen the phrase "Hello World"? Please help!

Mwyann commented 5 years ago

What is the model of your car? What type of Rpi are you using? When you plug your Rpi on the car, what do you get on the screen of your car after at least 30 seconds?

att100101 commented 5 years ago

Thanks to answer me...the car model is Grand Picassso Citröen Model 2016 and i have the SMEG+(5.43.A.R2). The Ppi is Zero W with the same specifications that the project need. The screen shows the prhase: "Turning on...do not disconnect the key. This operation can take a few minutes". I wait for ten minutes, but nothing happens, please, can you help me?

Mwyann commented 5 years ago

Ok then, there is a problem somewhere. Here are some steps you can try to debug the process;

If you need more instructions about debugging what's going wrong, I can assist you, although it's not that easy on github's ticket system ;) Last time I checked, the install script did all the work for you, maybe something changed somewhere but I can't figure out what (and my Rpi is broken right now, I need to buy another one).

att100101 commented 5 years ago

Thank´s for you help! I will try all you told me step by step and i will report to you with the feedback

att100101 commented 5 years ago

Hi again! I bought other microsd Kingston 32Gb and i repeated all again. I saw that an update is before that the wifi configurations, so some lines did not downloading. But, with a Ubuntu Desktop and the Pi plug in usb like at the car, i did not saw nothing...i am sorry because i don´t know enough in linux machines... New Microsd, all the steps carefully and watching on screen without errors...finally, the program end and say: Reboot and put it on the car with USB plug and push bottom of "internet conection" and first is conecting and after say:"do not unplug the key...you might wait a while..." and nothing happens. I think it is connected to internet by SSH ( i can see some Kb/s in the screen of the smartphone) But the code or psakey do not charged to allow to use the key. Sorry for my English

quadrat2 commented 4 years ago

Hello! I have a similar problem. Car: Citroen C4 Grand Picasso SMEG+ version: 5.43.A.R2

At first: "Connecting...", few minutes later: IMG_20200516_154517 .. and nothing!

Mwyann commented 4 years ago

@quadrat2 Weird, I have the same SMEG+ version but the visuals are not the same at all. I guess there's something different in the way the car connects to the key, but I cannot debug it without access to some car with a similar system. I can only redirect you to the previous post which indicates some debugging tests, to see if the key is properly configured, and to check if the car and the key are communicating correctly.

There's something you could try eventually to help me debug this problem: you could try step number 2, which is connecting the rpi to your phone's wifi hotspot, then connect to your rpi via ssh from your phone, while plugged into the car, run the 'remount' comman dto remount the rpi's system read/write, and try to make a tcpdump like this:

tcpdump -i usb0 -w psakey.pcap

Wait a few seconds to capture some data, then send me the resulting psakey.pcap file so I can see what the car is trying to communicate to the key. It's not guaranteed but it's a start :)

quadrat2 commented 4 years ago

@quadrat2 Weird, I have the same SMEG+ version but the visuals are not the same at all. I guess there's something different in the way the car connects to the key, but I cannot debug it without access to some car with a similar system. I can only redirect you to the previous post which indicates some debugging tests, to see if the key is properly configured, and to check if the car and the key are communicating correctly.

There's something you could try eventually to help me debug this problem: you could try step number 2, which is connecting the rpi to your phone's wifi hotspot, then connect to your rpi via ssh from your phone, while plugged into the car, run the 'remount' comman dto remount the rpi's system read/write, and try to make a tcpdump like this:

tcpdump -i usb0 -w psakey.pcap

Wait a few seconds to capture some data, then send me the resulting psakey.pcap file so I can see what the car is trying to communicate to the key. It's not guaranteed but it's a start :)

psakey.zip

Mwyann commented 4 years ago

@quadrat2 Thanks for the dump :) I've looked at it and... yeah there's something that caught my eye:

GET http://pms-onboard.mpsa.com/2/widgetengine/ru/[YOUR_VIN] HTTP/1.1
HTTP/1.1 404 Not Found

I didn't think about different languages, so the 'ru' language code wasn't expected. You should try this (and maybe @att100101 may try it too if you're still interested):

Edit the file /etc/apache2/sites-available/psakey.conf and change these lines:

    RewriteRule "^/2/widgetengine/fr/.*$" "/resources.json" [R=307]
    RewriteRule "^/2/widgetengine/en/.*$" "/resources.json" [R=307]

into this line:

    RewriteRule "^/2/widgetengine/[a-z]+/.*$" "/resources.json" [R=307]

Should work better I guess.

quadrat2 commented 4 years ago

Yep!!! It works! The problem was probably that the language of the system was set to "Russian". Many thanks!!! Great job!!!

Mwyann commented 4 years ago

Thank you for pointing out the bug and providing your help to find it out. The problem wasn't what language you've selected, the problem was an oversight on my part :-) I've pushed the change to commit https://github.com/Mwyann/psakey/commit/f6c8d04a6e804ebde71beccdb6902b30f14a49e4

Can I ask what you're gonna do with it? :) Maybe following this discussion on this issue https://github.com/Mwyann/psakey/issues/4 ?