OpenAuto Pro (for a 2006 JDM Subaru Legacy)


This entry is part 17 of 19 in the series Subaru Legacy
Hey. This page is more than 2 years old! The content here is probably outdated, so bear that in mind. If this post is part of a series, there may be a more recent post that supersedes this one.

I have swapped out my previous home-brew Android-based (Emteria on a RPi3) in-car screen to a RPi4B using OpenAuto Pro.

OpenAuto Pro (“OAP”), by BlueWave Studio, uses Qt, same as Tesla, running on top of Raspbian Linux (Buster). It is closed source (despite the ‘open’ in the name) but is very customizable.

There is good documentation on the forum – the threads and answers by BlueWave Studio staff are by far the most useful.

There is a fair bit to setup to get through, so this a record of my setup. Might be useful to someone though.

The touch-screen

I am still using the official RPi 7″ touchscreen, which I cut down so it fits the space available. Still bugs me that there is a black bevel on the sides of the screen that does not seem to do anything.

On the previous install I found the screen to be quite reflective, so I have added a spare Paperlike iPad screen protector I had (there in two in the packet). These have a nice matte finish.

USB. USB. USB.

Sounds odd but you will not get Android Auto through OAP running without a USB Bluetooth dongle and a USB soundcard (with a mic).

The vendors are less than forthright in this respect on their website to be honest. I reached out by email for advice on suitable products and they directed me to the quagmire that is the forum where user endless complain of a ‘black screen in Android Auto’.

Powered USB

Head ups: you are going to be using a lot of USB ports…more than the RPI4 can physically accommodate physically and for power-draw. I am using a J5create 7-port 4A powered hub.

Necessary USB components

  • BT dongle = OAP will not work with RPi4 built-in Bluetooth. Check out forum to learn more.
  • An external USB soundcard ideally with a line-in (for calls) and a line-out (for tunes). I got a cheap Orico one but have been having issues, so cannot recommend it. It mutes itself which breaks the OAP UI. Tapping the buttons on the dongle (mute toggle) fixes issue … until it happens again. (Update: this was not an issue with soundcard – I tried another one with the same issue – it’s an error with my “Step 5” set-up below.
  • A SSD boot disk (not ‘necessary-necessary’, but you should)

Some other USB components (depending on your circumstances):

  • Wi-Fi dongle with an antenna since fitting at external antenna to RiP4 not as easy as it was for RPi3.
  • For Android Auto (or Apple Carplay) if you are not going wireless,
  • K-Line CAN dongle. Not sure if and how I’ll be able to get this to work with CAN from my car
The ORICO USB soundcard NOT to get! Buggy with RPi (Update: works just fine. Issue elsewhere)

Step 1 Installing OAP image

You buy it and BlueWave Studios send you a key and link to the zip which you stick on a SD card. I went straight to an SSD hard drive for booting: quicker boot & more resilient.

I am using OAP v16.

Step 2 Accessing Raspian & setup

Raspbian OS (Buster) is running in the background, and it is super easy to access – you press just the power button in OAP UI and then press exit.

Setup up the RPi as per normal: update with sudo apt update & sudo apt upgrade, change password, device name etc.

Also,

  • Make a connection to your phone via Bluetooth.
  • Go into configuration and turn on all the interfaces, like camera, GPIO etc

I access RPi from my main computer using VNC and SSH using Windows Putty client. A lot of set up can be done via the OAP’s UI > settings. For under the bonnet work, edit openauto_system.ini and other files in the /.openauto/config/ directory:

nano  /home/pi/.openauto/config/openauto_system.ini

Step 3 Android Auto Wireless

Do not get stuck in the forum here; follow the BlueWave’s video below.

Step 4 Custom splash video

The default splash animation is lacklustre, but you can put in whatever you want in h264 video format. Instructions here on OAP forum.

I found in OAP v15 a video I used in OAP v14 did not work, but it did after I stripped out the audio:

ffmpeg -i input.h264 -c copy -an no_audio.h264

Link to my no-audio subaru_splash.h264 here. It is sized for the 7″ RPi touchscreen. I found the original on YouTube.

Step 5 Shortcut buttons

OAP has shortcuts linked to QWERTY keyboard presses. The official user guide has a list of mappings – not sure how current this is.

I kept the 5-button strip from the original unit in my car – INFO, MENU, MAP, A/V and MEDIA. These are just momentary buttons wired to five GPIO pins at one end, and a ground header at the other. I had some issues trying to use GPIO pin 6. I read that GPIO pins 1-8 are HIGH by default, whereas pins 8+ are LOW by default. Might be why.

An OAP controller service (see here) is used to translate GPIO input to keystrokes. Below is the file tailored for my setup. Linux X11 key-codex are used for things like ‘Escape’ and arrow keys (Up, Down, Left, Right).

There is a bit of setup to do too in bash. The controller should after the system has started. Add the following command to the end of autostart:

controller_service /home/pi/.openauto/config/openauto_button_gpio_controller_service.ini
sudo nano /etc/xdg/lxsession/LXDE-pi/autostart

Step 6 Reversing cam

I am using a RPi compatible camera with this from Petit Studio to extent the wiring range using an HDMI cable. I had a few issues getting the camera to work, just getting a black screen in the reversing app with the RPi camera whereas things worked fine with a USB camera. Setting the backend type to finder fixed this:

In OAP, the reversing camera app is automatically opened based on the signal on a specified RPi GPIO pin (7 in my instance). By default, for the nominated pin if the signal is low then the reversing cam app opens.

My car’s pin goes high (with 12V+) when in reverse. Ground otherwise. So, opposite way round plus a different voltage.

Pin state fix

Invert the default state of the reversing trigger GPIO pin. I did this by adding the following to /etc/rc.local. before the exit 0 at the end:

echo 1 > /sys/class/gpio/gpio7/active_low #reverse
echo 1 > /sys/class/gpio/gpio13/active_low #illumination

Also added pin 13 since that is a signal I have from my car for headlights on/off (ILL) which puts OAP & Android Auto in night/day mode.

To edit rc.local:

sudo nano /etc/rc.local

Voltage fix

An initial fix was a voltage divider, to bring the 12V down to 3.3V. Have a more robust (and less Ouch-thats-Hot option now, but that is for another post.

Series navigation

<< Reversing Camera: The New One (Part 2)OpenAuto Pro & CarPiHat. >>