PSAVanCanBridge
PSAVanCanBridge copied to clipboard
BSI crash after few minutes
Hello,
I am still struggling with the configuration of the whole project in my Peugeot 206 RC and code from main
branch.
I replaced the display from color to monochrome (I wanted BT support, and the color one didn't offer it without an additional module). Before that, I didn't have a chance to test the project longer, because I was waiting for this display.
Today I managed to do it and unfortunately I still have problems with the BSI. After a few minutes of running the kit, the BSI stops working, the main gauges start flashing.
Display number: 9803399680
When everything is connected, some of the options from the display are unavailable:
(I don't know if it should be possible to do this, but you can't highlight that first icon.)
In the settings of the board I have: C3 - activated, C11 - activated, S1 - RD45, S2 - CAN2004, E2 - 60
Finding a color display with Bluetooth and USB support is almost impossible. It requires a very high version number. Sw revision above 60 (6x.xxx or something like that). Maybe the ref number 9667027580 is good, but this isn't 100% accurate info.
The first icon is only available when the radio is turned on as I remember.
The "Define the vehicle parameters" is always disabled as there is nothing you could set up on a car with a VAN bus (there would be settings to enable DRL, parking assistant, follow me home light and stuff like that, but those aren't available on older cars). So even if I'd enable the menu, it wouldn't do much.
The "Manage the telephone call" is only active during a phone call as I remember.
Regarding the BSI crash you can try enabling C1 so my board won't write anything to the VAN bus. Did you remove the original display? If you enable C1 and you don't have the original display the consumption info and the door status won't work, that is perfectly normal. So try enabling C1 and reconnect the original display, and check if the BSI still crashes.
Thank you so much for explaining everything. Actually leaving the old display in the 206 and enabling the C1 option solves all the problems. I did some miles today and there were no problems.
Thanks for the feedback. I would like to fix this issue, and I would be glad if you could help me as I can't reproduce this issue on my car. Please capture some VAN bus logs for me if possible with the original display attached, and driving around for a few minutes. If you need further instructions I am happy to provide.
Sure, I will try to register something this week. I understand that I need to connect via bluetooth the computer and ESP32, and read the logs in PlatformIO?
VAN log via bluetooth
If you comment out this line: https://github.com/morcibacsi/PSAVanCanBridge/blob/main/PSAVanCanBridge/Config.h#L9 and remove the comment from the start of the next line: https://github.com/morcibacsi/PSAVanCanBridge/blob/main/PSAVanCanBridge/Config.h#L10 then bluetooth will be started instead of wifi. You can follow this guide on capturing with a phone: https://github.com/morcibacsi/PSAVanCanBridge/blob/master/wiki/debugging.md#3-van-bus-capture--software-replay The log can be saved to a file in the ... menu on the right by clicking the Data/save item.
VAN log via USB
If you don't have an Android phone but you have a laptop, then you can connect with an USB (make sure you don't connect the 12V from the car in this case). Also in this case you don't need to modify the config,h file, you need to use the wifi version. See on how to open the serial monitor in Arduino here: https://forum.arduino.cc/t/using-the-serial-monitor-for-debugging-analysing-what-is-going-on-inside-your-code/978443 (make sure you select the correct COM port, and enable the "Show timestamps" checkbox) The serial monitor output can be copied to a text file.
The best would be to have two logs, one with the original display connected and C1 enabled (1-2 minutes is enough, you don't need to drive, just make sure you open and close the door a few times). And another log with C1 disabled, and the original display removed (same method as the previous, maybe until the BSI crashes). This way I can try comparing the original behavior and my version, and try figuring out what is the difference which causes the BSI to crash.
Also I had an idea, regarding the crash, it is a shot in the dark, but try increasing this value to 500 and disable C1 (and remove the original display to see if that fixes the issue) https://github.com/morcibacsi/PSAVanCanBridge/blob/main/PSAVanCanBridge/src/Van/Writers/VanDisplayStatus.h#L14
Thank you very much for your help and patience.
Ok, thanks for all the information. I have the logs. The one withoutC1 is really extensive, because I waited until the BSI stopped working.
Yesterday I also did another longer route (1.5 hours) and at the end I experienced strange behavior of the display and radio. They stopped working for a while. They would then turn on for a bit and turn off again (for longer and longer periods). This was a configuration with C1 turned on and the original display connected.
Thanks for the log files. I analyzed them, and maybe I found something. To display the door status and consumption data the following happens: the BSI sends a message (lines starting with 0E 8C 4C) to the display that there is new data to show. When the display receives this message it sends a request (lines starting with 0E 56 4E) to the BSI for the new data. 56 4E is an awkward message as half of it is from the display, the other half is from the BSI. With the original display it seems these messages are go side-by-side. So after a 8C 4C is received, a 56 4E follows immediately, and after that 8C 4C is received a bit later. But with my code after I receive a 8C 4C even though I send the 56 4E almost immediately, the BSI keeps sending the 8C 4C, like if it wouldn't register my query with 56 4E.
I suspect I don't send the 56 4E "fast enough" after 8C 4C and the BSI keeps sending the 8C 4C again, and again. And maybe that causes the crash.
So... I would ask another pair of logs if you don't mind, where I can see the timestamps of the messages to verify this. As I saw you are using platformio on linux (?) I think you need to add monitor_filters = time to platformio.ini under monitor_speed to enable timestamps.
Yesterday I also did another longer route (1.5 hours) and at the end I experienced strange behavior of the display and radio. They stopped working for a while. They would then turn on for a bit and turn off again (for longer and longer periods). This was a configuration with C1 turned on and the original display connected.
I think this is caused by the overheating of the LM7805. I am going to modify the software so the Wifi hotspot won't be enabled all the time. That way the board won't draw that much current, so the LM7805 won't get overheated.
Sorry it took so long, but I was busy during the week. I'm uploading more logs from today.
I'm using PlatformIO on Mac OS and had to add in platformio.ini
exactly this line: monitor_filters = time
.
(this is for people who would like to do something like this someday too)
As for the logs themselves, this logWithoutC1
is very extensive, as BSI work surprisingly well for a long time. It was only when I tried to reset the mileage by holding down the button on the right stalk (the one from the wipers) that the BSI stopped working.
logC1.txt
logWithoutC1.txt
I think this is caused by the overheating of the LM7805. I am going to modify the software so the Wifi hotspot won't be enabled all the time. That way the board won't draw that much current, so the LM7805 won't get overheated.
As for overheating, my board looks like this:
Karol mentioned to me that for lowering the temperature I should use a voltage converter. Maybe this also affects this problem.
Sorry for the late reply, I was busy with other stuff. Thanks for the additional logs, I saw the same as before 8C 4C is sometimes keeps getting sent, but I am not really sure if that is a problem. However indeed it is strange that this time it took longer before it crashed. I am working on a newer hw revision where the overheating issue will be resolved, and maybe thee TSS463 also won't be needed anymore. It will definitely take a few weeks to finish it, so please stay tuned.
No problem, I know that such things can take some time. Can I still provide you with some additional data? A few comments earlier you mentioned:
Also I had an idea, regarding the crash, it is a shot in the dark, but try increasing this value to 500 and disable C1 (and remove the original display to see if that fixes the issue) https://github.com/morcibacsi/PSAVanCanBridge/blob/main/PSAVanCanBridge/src/Van/Writers/VanDisplayStatus.h#L14
Would you still like to check it out?
Well, you can give it a try, just to check all possibilities.
I think I’ve got the same issue. What is the year of your car @bronisMateusz ? Mine is a 2002 model. Maybe it’s related ?
I’ve just installed the bridge in my car, with a RD45 and a new screen. I had to compile the main branch as the master didn’t work and made my bsi crash instantly. I had issues with the compilation of the main branch, as some of the includes are wrong (some includes of Config.h). After that, it worked, but after 10 minutes of tests, the bsi crashed again. I had to unplug the battery of the car.
Can I help with something ?
I think I’ve got the same issue. What is the year of your car @bronisMateusz ? Mine is a 2002 model. Maybe it’s related ?
I’ve just installed the bridge in my car, with a RD45 and a new screen. I had to compile the main branch as the master didn’t work and made my bsi crash instantly. I had issues with the compilation of the main branch, as some of the includes are wrong (some includes of Config.h). After that, it worked, but after 10 minutes of tests, the bsi crashed again. I had to unplug the battery of the car.
Can I help with something ?
@Toniob Thanks for reaching out. The main branch is much more stable, and behaves more like the original display, so you should definitely use that. I spent a few hours trying to make some sense of various VAN log files, but I couldn't see any obvious clues (apart from what I mentioned earlier). And (of course) I can't reproduce it in my car (but it is a 307 from 2004). This issue is so annoying. Unfortunately I am currently out of ideas on how to solve this. Except the workaround to hide the original display somewhere and enable C1 in the settings. If you could somehow solve it / debug it further that would be nice. And of course if you have any questions regarding the inner workings of the software, feel free to ask.
Would it help if I send you some logs ? And I don’t know if it’s related, but I didn’t manage to stop the thief protection. I’ve put my VIN number in the web interface and did the konami like code. Is it how it’s supposed to be done ?
@Toniob
What is the year of your car @bronisMateusz ? Mine is from 2004.
If you are able to send logs, then you can check the solution that @morcibacsi mentioned. I, unfortunately, have not been able to log them recently. I will have the car again in about 3 weeks:
Also I had an idea, regarding the crash, it is a shot in the dark, but try increasing this value to 500 and disable C1 (and remove the original display to see if that fixes the issue)
https://github.com/morcibacsi/PSAVanCanBridge/blob/main/PSAVanCanBridge/src/Van/Writers/VanDisplayStatus.h#L14
PS: For the time being, I removed the superfluous components from the original B-type display I had and hid it behind the C-type display to keep it out of my way. This solution seems to be working at the moment. I also once spoke with a person who uses this design in Iran, and they also all do it this way for the 206.
PS2:
I had to unplug the battery of the car.
You do not need to do this. After the old display is counted again, remove the key from the ignition and wait several minutes (I wait about 20 minutes), after which time the BSI will go dormant. Turning the key again, should solve the problem and everything will return to normal.
Would it help if I send you some logs ? And I don’t know if it’s related, but I didn’t manage to stop the thief protection. I’ve put my VIN number in the web interface and did the konami like code. Is it how it’s supposed to be done ?
Yes, if possible send some logs when the BSI crashes. Maybe I can figure out something.
VIN pairing shouldn't interfere with this. Strange you mentioned it doesn't work, it should. Both the keypresses, and the settings page auto-pair button.
Thank you for your answers. I’ll try the auto-pair button tomorrow. How can I know if I need to use CAN2004 or CAN2010 ? Same question for the radio type. Should I use RD45 or RD45 2010 ?
And by the way, thank you for your awesome work.
Thank you for your answers. I’ll try the auto-pair button tomorrow. How can I know if I need to use CAN2004 or CAN2010 ? Same question for the radio type. Should I use RD45 or RD45 2010 ?
And by the way, thank you for your awesome work.
CAN2004 (or AEE2004 to be precise) was used in older cars made until ~2012. After that PSA modified their CAN protocol (CAN2010/AEE2010) where some messages have been removed some changed and got new meaning.
If you have one of the 12 pin type displays, then you need to use CAN2004:
If you have the 6 pin display, you need to use CAN2010:
Take care that you can't mix AEE2010 and AEE2004 peripherals. So if you choose the 12pin display then it will only work with the "old version" of the RD4/RD43/RD45 which worked with the AEE2004 protocol.
@bronisMateusz @Toniob Please send me a picture of the sticker on your BSI. Maybe I can buy the same type and try reproducing the issue on my bench.
Here are 2 dumps. I’ve tested 2 different screens. Type C both of them, but not the same year, and the color are different. The BSI crashed the 2 times, quite fast (2 minutes tops). C1 was not activated and I didn’t have the old screen plugged in.
serial_20240229_103935.txt serial_20240229_102926.txt
And here is a picture of the sticker
I’ve tested with C1 activated and it didn’t crash (I didn’t have to old screen attached). So it really seems it related to the VAN packets which are sent.
Yes, definitely the sending is the problem, unfortunately it is required to have the trip computer working. So if C1 is activated and there is no original display installed, then the door statuses and the trip computer won't be available.
Right now, I can live without the trip computer, that’s not a real issue for me. I can wait.
Do you think you can find the same BSI as I have ? Does @bronisMateusz have the same one ?
I’ve realized that my dumps are small. It didn’t put the buffer to unlimited. Do you want me to do them again, or you’ve got what you needed in them ?
The dumps are fine. I managed to find a BSI, it will arrive next week. In the meantime I have an idea, to reduce the number of VAN sending and see if that helps. Please comment out this line to see if that changes anything. https://github.com/morcibacsi/PSAVanCanBridge/blob/main/PSAVanCanBridge/src/Van/Writers/VanDisplayStatus.cpp#L7
I bought this BSI: https://allegro.pl/oferta/peugeot-206-modul-skrzynka-bsi-9646777380-europa-14608567084
Ehh.... on second thought, please repeat the logging again.
I bought this BSI: https://allegro.pl/oferta/peugeot-206-modul-skrzynka-bsi-9646777380-europa-14608567084
The number starting with S is a little different with mine. It ends with an E and not a G. But I don’t know if that’s a big difference.
I’ll try commenting the line you asked and test again soon. And I’ll make better logs this time ;)
The number starting with S is a little different with mine. It ends with an E and not a G. But I don’t know if that’s a big difference.
Yeah, I saw that, couldn't find an exact match. Let's hope for the best.
Oh and btw we have a nice community around PSA related development here, if you like joining. Everyone is welcome: https://discord.gg/DPthrN2cbS
The dumps are fine. I managed to find a BSI, it will arrive next week. In the meantime I have an idea, to reduce the number of VAN sending and see if that helps. Please comment out this line to see if that changes anything. https://github.com/morcibacsi/PSAVanCanBridge/blob/main/PSAVanCanBridge/src/Van/Writers/VanDisplayStatus.cpp#L7
I had no crash with the version compiled with this line commented. With my other tests, the BSI crashed pretty quickly. But as you’ll see in the logs, more than 5 minutes, and it was still working.
Everything seemed fine, i could navigate in the menu, I had the trip informations.
Did we find something ?
Sounds promising 🙂 that message is required for the trip computer reset, but I can rewrite the code to send it a few times when the actual reset happens. Please test it for a few days, and we'll see what to do next.