ea / bosch_headunit_root

Documentation and code for rooting and extending a Bosch car head unit (lcn2kai)
393 stars 57 forks source link

Android Auto / Apple CarPlay support #32

Open spupetic opened 3 months ago

spupetic commented 3 months ago

Since these head units run Linux, and Android Auto / Apple CarPlay can work on a Raspberry Pi via dongles, would it be possible to replace the built-in, outdated navigation app with a modern, phone-based solution like those?

ea commented 3 months ago

It might be possible, but it'd be hell of a lot of work and it's questionable if the CPU on this thing is fast enough. It's a very old platform. I believe the existing Raspberry Pi solutions require you to run Android on it so you could run an app that works with the dongle... There's probably a way around that , but that'd be a separate reverse engineering project.

Cheers!

spupetic commented 3 months ago

This project does not require the system to run Android: https://github.com/electric-monk/pycarplay How can I get ffmpeg and python compiled for this thing?

ea commented 3 months ago

That's interesting. Python's already there, although a very very old version so some work would definitely be required. FFMPEG might be a bit tougher to crosscompile, but could be doable. Probably. Check out this makefile https://github.com/ea/bosch_headunit_root/blob/main/rtos_interaction/Makefile Nothing too special about cross compiling, just needs a sysroot from the device , see here: https://github.com/ea/bosch_headunit_root/blob/main/rtos_interaction/README.md

Bigger trouble is that this system doesn't have the usual framebuffer device. And it's not running X. The display driver is custom and the rendering onto it isn't straightforward.

spupetic commented 3 months ago

Thank you! You mentioned in the docs that the apps section on the head unit is a NodeJS app, so basically a web browser, which works with the display driver by default. I assume it is ancient though, so I don't know if it would be easier to use a Raspberry Pi with existing CarPlay project to handle the ffmpeg stuff, and make a web server with an html page available which can be displayed on the head unit and can be interacted with. A solution like this already exists for Tesla cars: https://github.com/marcraft2/tesla-carplay And the underlying library is this: https://github.com/rhysmorgan134/node-CarPlay

ea commented 2 months ago

Technically it would be possible. Yes, part of the existing UI can easily be turned into a browser that navigates to a desired page, so doing UI via a web app running on something else (or on a simple http server running on the device itself) would be possible. OTOH, you can also have a simple LAN and talk to the RPi over it using the same usb2eth adapter I used to gain initial access. You'd either have to keep the Pi powered on at all times or suffer waiting for it to boot. It'd be fun to try! Do you have one of these infotainment systems in your car?

spupetic commented 2 months ago

Thank you. I do have one of these units, but for now, I don't have the time to try it.

AlKu84 commented 4 weeks ago

Good afternoon! Suzuki cars were equipped with a standard head unit with android auto support, the software and hardware are similar. I would be very interested to participate in the launch work on lcn2. Also, I managed to change the settings described in kds_addresses_and_structures.md via can bus commands. The abbreviation SDSECNR most likely means SD security number.

ea commented 4 weeks ago

Do you mean to say you got root on your suzuki head unit? Could you provide more details? Or is it just very similar system that's used ?

AlKu84 commented 3 weeks ago

Only very similar. I know a little about CAN, but I don't know Linux. You can see the update package for the Suzuki head unit from here: https://www.dropbox.com/scl/fi/komgmwdnmk54s1d9hff17/SLDA_Software_1890.zip . Experimenting with the LCN2 on the table, it knows how to show an additional menu when long pressing ENTER+day/night, but it doesn't work on the unit in the car, can't figure it out. IMG_20241002_091850

AlKu84 commented 1 week ago

Enabled the assistant in the configuration https://disk.yandex.ru/i/1-aG_yuQYkuozQ