Listening to music through USB sticks is a common practice, particularly in vehicles like [Folkert van Heusden]’s Opel Astra. However, factory-installed USB playback systems often have restrictions when it comes to audio formats and storage capacities. To get around these limitations, [Folkert] converted a Raspberry Pi Zero into a virtual USB mass storage device using the Mass Storage Gadget (MSG) driver available in the Linux kernel.
The decision to use USB storage was influenced by the absence of Bluetooth and the low-quality audio input jack in the older infotainment system. While turning the Raspberry Pi Zero into a virtual storage device didn’t directly solve the file limit problem, two Python scripts were created for this purpose. One script generates album art from a music directory, while the other randomly selects an image from the Zero’s SD card, which is then used to configure the MSG driver.
In the future, potential enhancements could involve making the RPi Zero’s SD card read-only to ensure data integrity during power-off scenarios. Additionally, creating album art currently requires root access due to loopback device usage. Despite being in its Proof-of-Concept phase, this project displays potential.
This modification isn’t limited to older infotainment systems; those with Linux-based dashboards could also benefit from similar tweaks, such as a straightforward Bash script to expand the system’s capabilities.
Image Source: Pazargic Liviu / Shutterstock