logoalt Hacker News

js2 • today at 7:05 PM • 7 replies • view on HN

Yeah, well, I have Apple CarPlay feeding directions to the head-ups display on my 2016 Mazda CX-9 when running either Apple or Google Maps. I also made the physical mute button pause/un-pause whatever media is playing. By, "I", I mean that I worked with Claude and Codex. The "hook" to get the Mazda entertainment system to run your own code when you plug in a USB thumb drive is having an empty file on the drive named like so:

  $(awk -v f=%c 'BEGIN{s=f f f f f f f f f f f f f f f f f f f;system(sprintf(s,115,104,32,47,109,110,116,47,115,100,91,97,98,99,100,93,49,47,116))}').up
The entertainment system (running Linux) sees an *.up file as an update file, which it tries to unzip and in so doing passes the filename to the shell, which runs the awk script, which runs `/mnt/t` and away you go. The filename needs to be FAT-32 compatible, hence encoding it in awk.

(There's a separate flaw that lets you run whatever javascript you want using mp3 files on the USB with titles that aren't properly escaped before the entertainment system displays them. Both of these incredibly primitive flaws trigger Claude Fable's safety controls to terminate the session, so I ended up doing most of the work with Codex, which btw, is so much less annoying than Claude in every possible way.)

Based on this work:

- https://github.com/KidMixer/mazda-carplay-hud

- https://mazda-toolkit.monodev.org/

Adapted for North America, and my own particular sensibilities about what I wanted displayed on the HUD.

That Jeep Cherokee is a fantastic vehicle. A 1996 Cherokee Limited w/Upcountry suspension was the first vehicle I purchased new. Finally sold it when it was old enough to drink.


Replies

hnlmorg • today at 9:07 PM

Back when the original RaspberryPi was released, I built an in car entertainment system that used TTS to announce artist and album names, and had physical buttons wired into the GPIO pins.

I’d have killed for something like ChatGPT back then to help with the EE.

loeg • today at 7:29 PM

As usual, motorcycles are 10 years behind cars, but you can cast CarPlay/Android Auto to stock Yamaha motorcycle displays with Pillion: https://github.com/alexandrevega/pillion

➕ show 1 reply
cloudfudge • today at 9:11 PM

Clever trick. In case anyone else is curious, what that string evaluates to is "sh /mnt/sd[abcd]1/t"

novia • today at 8:04 PM

Codex is much less annoying than Claude, but, last night it started issuing major refusals for benign tasks in a way that makes me think they also might be going down the dark path

VladVladikoff • today at 8:13 PM

Something with how my glasses and vision works but I absolutely loathe those heads up displays. I know someone with a Mazda cx30 and driving it was a painful experience. As in literally painful, it gave me a terrible headache and I can’t see well through that portion of the window. Maybe because of my astigmatism.

➕ show 1 reply
obmelvin • today at 7:42 PM

OMG. I have long wished that my '21 CX-5 would show the CarPlay directions in the HUD in addition to the built-in maps.

This is amazing. Thank you so much for posting. Excited for this project :)

syntaxing • today at 7:21 PM

Super cool, is the HUD stock or is it after market?

➕ show 1 reply