Skip to content

Commit 24a5095

Browse files
committed
README.md: reorder sections
1 parent 1ba700f commit 24a5095

File tree

1 file changed

+85
-85
lines changed

1 file changed

+85
-85
lines changed

README.md

Lines changed: 85 additions & 85 deletions
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,72 @@ Using the web interface, you can configure all settings that are also available
114114

115115
You can also download logs with a single click.
116116

117+
## MITM mode
118+
Man-in-the-middle mode support has been added recently. This is the mode which allows to change the data passed between the HU and the phone.
119+
Separate encrypted connections are made to each device to be able to see or modify the data passed between HU and MD.<br>
120+
This is opening new possibilities like, e.g., forcing HU to specific DPI, adding EV capabilities to HU/cars which doesn't support this Google Maps feature.<br>
121+
All the above is not currently supported but should be possible and easier with this mode now implemented.<br>
122+
To have this mode working you need enable `mitm` option in configuration and provide certificate and private key for communication for both ends/devices.
123+
Default directory where the keys are search for is: `/etc/aa-proxy-rs/`, and the following file set needs to be there:<br>
124+
- hu_key.pem
125+
- hu_cert.pem
126+
- md_key.pem
127+
- md_cert.pem
128+
- galroot_cert.pem
129+
130+
I will not add these files into this repository to avoid potential problems. You can find it in other places, or even other git repos, like:<br>
131+
- https://github.com/tomasz-grobelny/AACS/tree/master/AAServer/ssl
132+
- https://github.com/tomasz-grobelny/AACS/tree/master/AAClient/ssl
133+
- https://github.com/lucalewin/vehiculum/tree/main/src/server/cert
134+
- https://github.com/lucalewin/vehiculum/tree/main/src/client/cert
135+
- https://github.com/borconi/headunit/blob/master/jni/hu_ssl.h#L29
136+
137+
Special thanks to [@gamelaster](https://github.com/gamelaster/) for the help, support and his [OpenGAL Proxy](https://github.com/gamelaster/opengal_proxy) project.
138+
139+
### DPI settings
140+
Thanks to above MITM mode a DPI setting of the car HU can be forced/replaced. This way we can change the hardcoded value to our own. This is allowing to view more data (at cost of readability/font size).<br>
141+
Example with Google Maps, where a `Report` button is available after changing this value:
142+
143+
|160 DPI (default)|130 DPI|
144+
|---|---|
145+
|![](images/160dpi.png)|![](images/130dpi.png)
146+
147+
## Google Maps EV routing
148+
Google introduced EV routing features at [CES24](https://blog.google/products/android/android-auto-new-features-ces24/).
149+
The first cars to support this via Android Auto are the Ford Mustang Mach-E and F-150 Lightning.
150+
151+
This clip shows how it works in the car:<br>
152+
[![This is a clip how it works in the car](https://img.youtube.com/vi/M1qf9Psu6g8/hqdefault.jpg)](https://www.youtube.com/embed/M1qf9Psu6g8)
153+
154+
The idea of using this feature with other cars started here: https://github.com/manio/aa-proxy-rs/issues/19 in February 2025.
155+
After a long journey searching for someone with the knowledge and hardware that could help us obtain the logs, we finally, at the end of June 2025,
156+
thanks to [@SquidBytes](https://github.com/SquidBytes), got the sample data to analyze.
157+
158+
Thanks to many hours of work by [@Deadknight](https://github.com/Deadknight) and [@gamelaster](https://github.com/gamelaster), we were finally
159+
able to make some use of that data.
160+
Unfortunately, the work is still in progress, but I am currently at a stage where, by customizing some parameters, I can provide real-time battery
161+
level data to `aa-proxy-rs`, and overall it makes correct estimates for my car.
162+
163+
`aa-proxy-rs` has an embedded REST server for obtaining battery data from any source (I am using a slightly modified version of the
164+
[canze-rs](https://github.com/manio/canze-rs) app for this purpose).
165+
It reads the data on the same Raspberry Pi (connecting wirelessly to the Bluetooth OBD dongle).
166+
167+
`aa-proxy-rs` can be configured to execute a specific data collection script when Android Auto starts and needs the battery level data, and also when it stops.
168+
The script can be configured in `config.toml` and is executed with the arguments `start` and `stop` accordingly.
169+
170+
Thanks to the power of open source, even older EVs can now enjoy modern features and a much better navigation experience!
171+
172+
## Troubleshooting
173+
Sometimes deleting the system Bluetooth cache at /var/lib/bluetooth and restarting bluetoothd fixes persistent issues with device connectivity.
174+
Consider also using "Forget" of bluetooth device in the Android phone.
175+
176+
By default, the application logs to the file:
177+
`/var/log/aa-proxy-rs.log`
178+
179+
This log can be useful for troubleshooting and diagnosing issues.
180+
181+
You can easily download the log file via the [embedded web interface](#embedded-web-interface).
182+
117183
## History and Motivation
118184
There are many commercial solutions available for wireless Android Auto, such as AAWireless or Motorola MA1. I even bought a
119185
clone from AliExpress — but unfortunately, it didn’t work in my car (I ended up giving it to a friend who had a compatible vehicle).
@@ -182,6 +248,25 @@ Proper synchronization between these steps ensures a stable and reliable connect
182248
## Demo
183249
[![asciicast](https://asciinema.org/a/686949.svg)](https://asciinema.org/a/686949)
184250

251+
## Manual configuration
252+
Default startup config file is `/etc/aa-proxy-rs/config.toml`.
253+
254+
Configuration options are documented in comments, but these needs some more attention:<br>
255+
- `legacy`<br>
256+
Original `aawgd` is using two USB gadgets: **default** and **accessory**. When connecting to car headunit, it switches first to **default** then to **accessory**.
257+
During my development I found out that my car headunit doesn't need this switching. It is working fine connecting directly to **accessory** gadget.
258+
Moreover with this approach it is much faster and doesn't need to wait for USB events in dedicated _UEvent_ thread. As the result I decided to leave the old (legacy)
259+
code under this switch for compatibility with some headunits.<br>
260+
In short: if you have problems with USB connection try to enable the legacy mode.
261+
262+
- `connect`<br>
263+
By default without this option the aa-proxy-rs is starting but it is only visible as a bluetooth dongle, to which you have to connect manually from your phone to
264+
initiate AndroidAuto connection. If I am correct this was called `dongle mode` in `aawgd`.<br>
265+
If you provide `connect` option with default `00:00:00:00:00:00` wildcard address, then the daemon is trying to connect to known (paired?) bluetooth devices (phones) in a loop
266+
(the **bluetoothd** have a cached list of recently connected devices in /var/lib/bluetooth).<br>
267+
If you set this option to specific `MAC_ADDRESS` where MAC_ADDRESS is the MAC of your phone (bluetooth), then the aa-proxy-rs will try to connect only to this specified device
268+
in a loop (ignoring all **bluetoothd** cached devices).
269+
185270
## Building
186271

187272
If you'd like to build the SD card images yourself, head over to our Buildroot repository:<br>
@@ -219,91 +304,6 @@ To achieve full functionality similar to the official Buildroot-based images, ma
219304
- CONFIG_BT_RFCOMM
220305
- CONFIG_BT_RFCOMM_TTY
221306

222-
## Manual configuration
223-
Default startup config file is `/etc/aa-proxy-rs/config.toml`.
224-
225-
Configuration options are documented in comments, but these needs some more attention:<br>
226-
- `legacy`<br>
227-
Original `aawgd` is using two USB gadgets: **default** and **accessory**. When connecting to car headunit, it switches first to **default** then to **accessory**.
228-
During my development I found out that my car headunit doesn't need this switching. It is working fine connecting directly to **accessory** gadget.
229-
Moreover with this approach it is much faster and doesn't need to wait for USB events in dedicated _UEvent_ thread. As the result I decided to leave the old (legacy)
230-
code under this switch for compatibility with some headunits.<br>
231-
In short: if you have problems with USB connection try to enable the legacy mode.
232-
233-
- `connect`<br>
234-
By default without this option the aa-proxy-rs is starting but it is only visible as a bluetooth dongle, to which you have to connect manually from your phone to
235-
initiate AndroidAuto connection. If I am correct this was called `dongle mode` in `aawgd`.<br>
236-
If you provide `connect` option with default `00:00:00:00:00:00` wildcard address, then the daemon is trying to connect to known (paired?) bluetooth devices (phones) in a loop
237-
(the **bluetoothd** have a cached list of recently connected devices in /var/lib/bluetooth).<br>
238-
If you set this option to specific `MAC_ADDRESS` where MAC_ADDRESS is the MAC of your phone (bluetooth), then the aa-proxy-rs will try to connect only to this specified device
239-
in a loop (ignoring all **bluetoothd** cached devices).
240-
241-
## MITM mode
242-
Man-in-the-middle mode support has been added recently. This is the mode which allows to change the data passed between the HU and the phone.
243-
Separate encrypted connections are made to each device to be able to see or modify the data passed between HU and MD.<br>
244-
This is opening new possibilities like, e.g., forcing HU to specific DPI, adding EV capabilities to HU/cars which doesn't support this Google Maps feature.<br>
245-
All the above is not currently supported but should be possible and easier with this mode now implemented.<br>
246-
To have this mode working you need enable `mitm` option in configuration and provide certificate and private key for communication for both ends/devices.
247-
Default directory where the keys are search for is: `/etc/aa-proxy-rs/`, and the following file set needs to be there:<br>
248-
- hu_key.pem
249-
- hu_cert.pem
250-
- md_key.pem
251-
- md_cert.pem
252-
- galroot_cert.pem
253-
254-
I will not add these files into this repository to avoid potential problems. You can find it in other places, or even other git repos, like:<br>
255-
- https://github.com/tomasz-grobelny/AACS/tree/master/AAServer/ssl
256-
- https://github.com/tomasz-grobelny/AACS/tree/master/AAClient/ssl
257-
- https://github.com/lucalewin/vehiculum/tree/main/src/server/cert
258-
- https://github.com/lucalewin/vehiculum/tree/main/src/client/cert
259-
- https://github.com/borconi/headunit/blob/master/jni/hu_ssl.h#L29
260-
261-
Special thanks to [@gamelaster](https://github.com/gamelaster/) for the help, support and his [OpenGAL Proxy](https://github.com/gamelaster/opengal_proxy) project.
262-
263-
### DPI settings
264-
Thanks to above MITM mode a DPI setting of the car HU can be forced/replaced. This way we can change the hardcoded value to our own. This is allowing to view more data (at cost of readability/font size).<br>
265-
Example with Google Maps, where a `Report` button is available after changing this value:
266-
267-
|160 DPI (default)|130 DPI|
268-
|---|---|
269-
|![](images/160dpi.png)|![](images/130dpi.png)
270-
271-
## Google Maps EV routing
272-
Google introduced EV routing features at [CES24](https://blog.google/products/android/android-auto-new-features-ces24/).
273-
The first cars to support this via Android Auto are the Ford Mustang Mach-E and F-150 Lightning.
274-
275-
This clip shows how it works in the car:<br>
276-
[![This is a clip how it works in the car](https://img.youtube.com/vi/M1qf9Psu6g8/hqdefault.jpg)](https://www.youtube.com/embed/M1qf9Psu6g8)
277-
278-
The idea of using this feature with other cars started here: https://github.com/manio/aa-proxy-rs/issues/19 in February 2025.
279-
After a long journey searching for someone with the knowledge and hardware that could help us obtain the logs, we finally, at the end of June 2025,
280-
thanks to [@SquidBytes](https://github.com/SquidBytes), got the sample data to analyze.
281-
282-
Thanks to many hours of work by [@Deadknight](https://github.com/Deadknight) and [@gamelaster](https://github.com/gamelaster), we were finally
283-
able to make some use of that data.
284-
Unfortunately, the work is still in progress, but I am currently at a stage where, by customizing some parameters, I can provide real-time battery
285-
level data to `aa-proxy-rs`, and overall it makes correct estimates for my car.
286-
287-
`aa-proxy-rs` has an embedded REST server for obtaining battery data from any source (I am using a slightly modified version of the
288-
[canze-rs](https://github.com/manio/canze-rs) app for this purpose).
289-
It reads the data on the same Raspberry Pi (connecting wirelessly to the Bluetooth OBD dongle).
290-
291-
`aa-proxy-rs` can be configured to execute a specific data collection script when Android Auto starts and needs the battery level data, and also when it stops.
292-
The script can be configured in `config.toml` and is executed with the arguments `start` and `stop` accordingly.
293-
294-
Thanks to the power of open source, even older EVs can now enjoy modern features and a much better navigation experience!
295-
296-
## Troubleshooting
297-
Sometimes deleting the system Bluetooth cache at /var/lib/bluetooth and restarting bluetoothd fixes persistent issues with device connectivity.
298-
Consider also using "Forget" of bluetooth device in the Android phone.
299-
300-
By default, the application logs to the file:
301-
`/var/log/aa-proxy-rs.log`
302-
303-
This log can be useful for troubleshooting and diagnosing issues.
304-
305-
You can easily download the log file via the [embedded web interface](#embedded-web-interface).
306-
307307
## Similar/other open source AndroidAuto-related projects
308308
- https://github.com/nisargjhaveri/WirelessAndroidAutoDongle
309309
- https://github.com/nisargjhaveri/AAWirelessGateway

0 commit comments

Comments
 (0)