Menu
andipanda.dev

CaRadio v2: An Unexpected Processor and Exploring the Android Head Unit

In the previous article, I explained why I decided to change the concept of CaRadio and use a ready-made car head unit instead of Raspberry Pi.

After researching numerous options, I chose the Vordon VW-910S. According to the specifications listed by the seller, the head unit was supposed to feature a quad-core Allwinner T3 processor and 1 GB of RAM.

The processor was one of my main selection criteria. I was interested in the possibility of installing Linux and implementing proper power management, including sleep mode.

However, after receiving the head unit, I discovered an unpleasant surprise.

Instead of the expected Allwinner T3, the device contained a MediaTek MT8321 with 2 GB of RAM and Android 10.

At first glance, having more RAM than advertised might seem like a good thing. But it did not matter much to me because I had purchased the device for very specific purposes.

My first reaction was disappointment. That same evening, I was already planning to pack everything up and return the head unit to the seller.

However, I decided not to rush.

Giving the Device a Second Chance

The following day, after calming down a little, I started researching the installed processor and the head unit itself.

Besides, I liked the device's appearance. It looked neat, had a suitable display, and fitted well with my original idea of upgrading CaRadio.

Gradually, a thought occurred to me: was installing Linux really necessary?

After all, Android also supports developing native applications in C++, and SDL, the library I had already used in my projects, supports this platform as well.

This meant that I did not necessarily have to abandon the ready-made hardware simply because my original plan could not be implemented.

Meanwhile, I contacted the seller about the mismatch between the advertised specifications and the actual hardware. Eventually, the seller offered a substantial discount, and I decided to keep the head unit.

The financial aspect also played an important role.

The head unit came with a CAN Box, a device used to communicate with the vehicle's electronics through the CAN bus.

If I had purchased such a module separately, it could have cost around 40% of the head unit's final price after the seller's partial refund.

So, for a relatively small amount of money, I received a display, an amplifier, a ready-made power management system, a housing, and a CAN Box.

Keeping the device now seemed like a reasonable decision.

First Steps with Android

That was when my investigations began.

Fortunately, the installed Android system already had root access, so connecting to the head unit through ADB was straightforward.

I was able to explore the file system, system applications, device configuration, and the interaction between the software and hardware.

I was particularly interested in how Android handled functions specific to a car head unit.

After all, besides the usual display and audio functionality, the device included power management, camera connections, CAN Box integration, and other features that are not normally found in a standard Android tablet.

Gradually, I realized that the device was quite an interesting platform for further experimentation.

Exploring the CAN Box

I paid particular attention to the CAN Box supplied with the head unit.

This module was supposed to provide communication with the vehicle's electronics.

However, I discovered something unusual: the CAN Box was not connected to the head unit's UART interface, and its connector was different from what I had expected.

I also could not find a suitable connector pinout.

So I had to investigate it myself.

Through experimentation, I managed to identify the necessary pins and determine how the CAN Box interacted with the head unit.

Initial tests showed that ACC control was implemented quite simply: the CAN Box supplied 12 V to the corresponding input on the head unit, effectively telling it to turn on.

The illumination, reverse gear, and parking brake signals were handled in a similar way.

In other words, the head unit did not even need to receive digital commands from the CAN Box over UART to perform its basic functions.

This explained why the device could interact with the vehicle's electronics despite the absence of such a connection.

First Experiments with UART

But my investigations did not end there.

I wanted to find out what additional capabilities were supported by the head unit's factory software.

While exploring the device, I managed to locate its UART interface. I also found published reverse-engineering results for the protocol used by the same type of CAN Box.

Another developer had already done the work of analyzing the communication protocol, which gave me an opportunity to test the discovered commands on my own device.

I sent several messages over UART.

And the head unit responded.

Information about parking sensors and open vehicle doors appeared on the screen.

This was an interesting result. It turned out that the factory software was already capable of processing such messages, even though the supplied CAN Box had not originally been connected to the head unit's UART interface.

This suggested that the device's hardware and software capabilities were more extensive than its original wiring arrangement might indicate.

I will not go into the details of the CAN Box hardware, connector pinout, or communication protocol here. These topics are covered in a separate series of articles where I describe how the module works and share the results of my own investigations.

From Disappointment to New Possibilities

In the end, a purchase that initially seemed unsuccessful opened up an entirely different direction for the project.

Yes, instead of the expected Allwinner T3, I received a MediaTek MT8321, and my original plans to install Linux had to be reconsidered.

However, it turned out that Android was perfectly suitable for running my own C++ application using SDL.

Furthermore, the head unit already contained almost all the necessary hardware, and my first experiments confirmed that I could interact with its automotive functions.

Gradually, my initial disappointment faded into the background, replaced by an interest in further development.

At this stage, I decided to put the head unit aside temporarily and focus on finishing the software part of CaRaBack.

After all, CaRaBack was intended to become one of the main components of the new system.

Once that work was complete, I could return to CaRadio v2 and start developing my own Android application.

But that is a topic for the next article.