Open bronisMateusz opened 7 months ago
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)
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.
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.
Hello @bronisMateusz . Do you have a description of the superfluous components you removed and how you did it ? Thank you
@morcibacsi I did a test today with increasing the value for the SEND_STATUS_INTERVAL
variable with the original display disconnected and C1 set to false. Everything seems to work correctly, nothing bad happened. Here are the logs:
log500WithoutC1.txt
Hello @bronisMateusz . Do you have a description of the superfluous components you removed and how you did it ? Thank you
@Toniob I was a bit imprecise in my words. I simply removed the plastic casing from the display and placed it under the visor so that it could be put on easily:
Thanks for you answer. I bought a used emf module, and I already did you’ve shown. I even removed the screen, to spare more space. And it’s working fine (and the car goes to sleep).
@morcibacsi I did a test today with increasing the value for the
SEND_STATUS_INTERVAL
variable with the original display disconnected and C1 set to false.
What value did you use?
500 as you suggested. I am driving the car right now and unfortunately the BSI has stopped working again
@Toniob @bronisMateusz Alright, I pushed some changes to the bsi_crash_fix branch please check if that helps resolving the BSI crash and the failure to send the BSI to sleep
@Toniob @bronisMateusz Alright, I pushed some changes to the bsi_crash_fix branch please check if that helps resolving the BSI crash and the failure to send the BSI to sleep
Oh, and please also check if trip reset is still working.
And of course without the original display present.
Ok, I ran tests today and strange things are happening. I tested for less than 15 minutes, including while driving and the BSI still worked properly. The button on top of the windshield wiper handle does not work. You can't switch between screens with it. Also, the statuses from the open doors don't work, nor the fuel consumption display.
I'll wait an hour or so, let the BSI sleep, and try to take another logs.
Ok, I ran tests today and strange things are happening. I tested for less than 15 minutes, including while driving and the BSI still worked properly. The button on top of the windshield wiper handle does not work. You can't switch between screens with it. Also, the statuses from the open doors don't work, nor the fuel consumption display.
Unfortunately I am not near my car, so I can't test the changes, but looking at the code the trip computer should work. Is there a chance that C1 was left enabled?
Interesting case. I went to check the situation again. In the config.h
file I had these changes:
bool BRIDGE_REMOTE_STALK_DATA = true;
bool USE_IGNITION_SIGNAL_FROM_VAN_BUS = true;
uint8_t FUEL_TANK_CAPACITY_IN_LITERS = 50;
bool ENABLE_MANUAL_GEARBOX_DISPLAY = false;
uint8_t TIRE_SIZE = 17;
uint8_t TIRE_WIDTH = 205;
uint8_t TIRE_RATIO = 40;
uint8_t RADIO_TYPE = 2;
I went via bluetooth into the adapter settings, and there C1 was still selected, the tank capacity was also different from what I had set before uploading the code:
In the attached file the moment of switching C1 from true to false there are about 16,000 lines of code. After that the door statuses and combustion indications actually returned. Trip reset suddenly not working.
The settings from config.h are are just default values. As soon as you save the settings from the configuration page they are written to a file in the flash. On startup they are read from the file. So when the file exists changing the config.h has no effect (unless you delete it with the Delete config button). I try to check why the trip reset isn't working.
Thanks for the clarification. I also forgot to include the second log file I mentioned in my previous message: logBSICrashFix2.txt
I fixed the trip reset.
I did more than 100 km with the car today. Everything worked perfectly 😁
Yesterday I will try fixed version
Ok, I uploaded the latest version of the code, resetting the odometer actually works, but you have to hold the button for a long time, about 10 seconds, although looking at the code, it should be about 3 seconds.
This is not some big problem, I am writing this more for information.
https://github.com/morcibacsi/PSAVanCanBridge/assets/45051768/1be8ff0d-b497-47e3-9f2a-3cc3ccbb1f58
I came back from a short drive and the BSI stopped working again unfortunately.
I'll check more in the coming days and maybe I'll be able to record the moment when the BSI crashes
Damn, I was really hopeful that finally we made some progress. Please test it if you can, and in the meanwhile I will try to come up with something.
I know, the whole thing is frustrating, so thank you all the more for having the will to keep looking for a solution to these problems.
I've had a couple of rides in the car recently and nothing bad has happened. I wondered what might have caused the BSI crash then and thought maybe it was that I had reset the trip data. I tried resetting the trip data today, waiting a similar period of time as I did then, but nothing bad happened. I have the logs from this trip, but I'm not attaching them this time because I don't think it's necessary.
Have you perhaps managed to guess why the trip reset button is not working as quickly as before?
@Toniob Are you able to check whether recent changes have also helped to solve problems in your car?
I didn’t have the time to test or to take my car. My main issue is that I live in a city, without a garage. It’s not easy to test or to make modifications on the car. And if something goes wrong, like the last time, it’s a pain to charge the battery. But maybe I’ll do it at my parents next week.
Good news on my side. I’ve tested the bsi_crash_fix branch yesterday. I made 2 trips of 20 minutes each, and the BSI didn’t crash. I’ve also tested the sleep mode and everything went well. Maybe I’ll try with a longer trip in the next few days, but for the moment, it seems I won’t need the original screen anymore.
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:![IMG_5648](https://github.com/morcibacsi/PSAVanCanBridge/assets/45051768/fab07a46-4ed0-4e74-a7d0-dc952e44ef90)
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.)
![AACF1F7C-6DCD-4476-9EAF-0FD825A86591_1_105_c](https://github.com/morcibacsi/PSAVanCanBridge/assets/45051768/2ca8e8c7-a789-4b44-80d0-ebe45d78152d)
In the settings of the board I have: C3 - activated, C11 - activated, S1 - RD45, S2 - CAN2004, E2 - 60