Coder Social home page Coder Social logo

nisargjhaveri / wirelessandroidautodongle Goto Github PK

View Code? Open in Web Editor NEW
605.0 24.0 67.0 128 KB

Use Wireless Android Auto with a car that supports only wired Android Auto using a Raspberry Pi.

License: MIT License

Shell 8.16% Makefile 5.69% C++ 85.25% Dockerfile 0.89%
android-auto android-automotive headunit wireless-android-auto

wirelessandroidautodongle's People

Contributors

bluemediager avatar hkfuertes avatar ioniq3 avatar nabeeluppel avatar nisargjhaveri avatar thom-x avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

wirelessandroidautodongle's Issues

Difficult Connection

My car is Toyota Corolla 2023 (European version, only wired Android Auto). My phone is Samsung Galaxy S20 FE.

I can barely connect to the Raspberry Pi. It rarely connects the first time. I need to try a second or third time. I have to restart the multimedia unit many times. Only then can it establish a connection. It does not disconnect once connected.

What can be done to connect it at once?

PI Zero W + v0.3 + Skoda Karoq (2020)

Hi,

I just got a PI Zero W and installed v0.3.
I paired my phone via bluetooth and the "AA Wireless Dongle" shows on my cars dash but my phone says
"Connected to Android Auto" then shortly after it sits at "Looking for Android Auto"

I changed hostapd.conf from IN to GB as I'm in the UK, and the logs show the following

Any ideas on what I'm doing wrong?

messages.txt

Looking for Android auto

Since my interest in this project, at first I was wondering to run this in arm but due to board compability & your feedback I planned on ordering a raspberry Pi zero w, I flashed the img into sd & all the process done once I start the device I connect to the Bluetooth sometimes it doesn't connect to the wifi & if connected it still loops on with notification looking for Android auto device which is annoying I tried it with head unit of Suzuki Scross & Head unit reloaded tell me if I am doing any mistakes

Add the ability to switch devices

Hey Y'all,

I run into this situation where I want to disconnect the current WirelessAA connection and let another device connect instead. Currently, for me to do this I would need to reboot the PI, have my device in airplane mode so that the other device can connect.

I am wondering if it would be possible to have a feature where switching devices would be easier. Maybe something like if a device is requesting a Bluetooth connection then make a connection to that device instead of the previously connected device 🤔.

Thanks!

Orange Pi zero 2W support

The new Orange pi Zero 2W looks like the perfect hardware for the use. It provides much better hardware spec with respect to the price. If possible kindly add support for this particular board. Thank you

AAWireless connection Developer Mode

Hello nisargjhaveri,

First I would like to thank you for your great work and let you know that your software installed on Rpi0w works great with Renault Megane 4 '2019 (R-Link2 media system).

But there is one problem that is not related to your application, but can maybe it be solved with it.
Since Android 14, Android Auto does not display apps installed outside of the Google Play Store. Third-party Apps like Fermata Auto and Screen2Auto are no longer shown on the Android Auto screen.
More information here:
AndreyPavlenko/Fermata#327

The only way to run applications installed from outside the Play Store is the original AAWireless.io adapter with the Developer Mode option enabled in their application:
https://play.google.com/store/apps/details?id=app.aawireless
https://i.redd.it/aawireless-settings-for-kia-hyundai-genesis-v0-braceaqsutmb1.png?s=5b566795c38d799e4a2b352b9d139cfbf634f4e3

Is it possible to enable a similar connection mode in your application?

Restart gadget on TCP failure (disconnect) or hostapd disconnect

Hello Again,
Just proposing an enhancement. Sometimes that I take the car for short rides... and I hop on and hop off rather quickly, my car infosystem does not turn off completely and therefore the PI is still on when I come back, but my Wifi is disconnected, so I need to unplug and replug the pi to re-connect.

Suggestion:
a) Catch any TCP exception and trigger a gadget restart (efectively restarting everything), well or in fact doing nothing so that the next loop of the infinite loop comes...
b) Externalize gadget restart functionality into a binary and trigger it via hostapd_cli (https://superuser.com/questions/1071354/hostapd-execute-a-command-when-there-is-new-connection-established)
c) ... any other ideas ...?

I will try to play with it this weekend to see if I can propose a PR.
Thank you again for this amazing project!

Frequent disconnections with ATOTO headunit

Hi,
I have an ATOTO YS102SL (now out of production) with a "Linux" proprietary OS. I tried your project on an RPi4, but it didn't work at all. The head unit didn't even recognize the device. So, I built this fork https://github.com/BluemediaGER/AAWirelessDongle, and it recognizes the RPi, but it doesn't start Android Auto. On the phone (Pixel 8), I get a notification saying "Looking for Android Auto..." and that's all. I also tried the fork on a Peugeot car, and after some tries, it worked fine.
Here are some photos I took of the head unit and the log on a monitor connected to the Pi. Note that every time I tap "Reconnect" on the head unit, I get a new address.
PXL_20231022_211730527
PXL_20231022_211738242

I'm available for further testing of the project with my head unit; I just need some guidance on what to adjust.

Issues with harware

Thank you for your hard work on the project. I drive a Mazda 3 2023 with wired Android Auto. I tried to implement your solution, and it worked successfully on the Raspberry Pi 4 8GB board. However, I also attempted to use it on a Raspberry Pi Zero, but I was unsuccessful.

No bluetooth with Raspberry Pi zero 2w

Hello @nisargjhaveri ,
First of all, a big thank you for this much needed project.

I am using the v0.2.0 with Raspberry Pi zero 2w on my TATA Nexon (XZA+) car.
And unfortunately, no Bluetooth is getting listed to connect.
Wi-FI is visible.

It was working fine earlier. But from last month or two approximately, it stopped working.
In this time-frame, I think that my car's headunit got some update in one of the servicing.
So I am suspecting that after this update it stopped working.

I can provide you logs but I need some help to generate the logs.
I am able to connect with SSH but I don't know where the logs are generated and if there is any specific command line to hit in shell ?

Thank you for your help in advance.

A temporary workaround for start time of the headunit and reconnect of BT/wifi

First of all, Nisarg thanks, thanks a lot for your work. Finally I get that my hunday can connect android auto and the usb memory thanks to the MTP profile, as the car only have one usb port. No other device in the market allow me this.

I have a crude external workaroud for these issue, the initial connection and reconecttion until a more sophisticated solution is available.
This consist in two families of script, the (1) is for wait and restart until headunit and mobile is full available to connect
(2) is for reconnect after wifi or bluetooth loss.
In both cases this scripts avoid the restart or reconnect of the usb dongle (raspberry pi zero w in my case)

The four files need chmod +x for they will convert in executables

-------------------------- /usr/bin/checkaa1 :
#!/bin/sh

b='00:00:00'
c=0

while true
do

sleep 1

a=cat /var/lib/misc/messages | grep 'buildroot user.info aawgd' | awk '{print $3}' | tail -1 | tr -d '\n'

if [[ $a = $b ]]
then
let c=c+10
sleep 10
else
let c=0
fi

#echo $a $b $c

b=$a

if [[ $c -eq '30' ]]
then
/etc/init.d/S92usb_gadget restart
/etc/init.d/S93aawgd restart
let c=0
fi

done

--------------------- /usr/bin/checkaa2
#!/bin/sh

while true
do
a=cat /var/lib/misc/messages | tail -50 | grep '39 bytes' | wc -l

if [[ $a = '50' ]]
then
#/etc/init.d/S92usb_gadget restart
/etc/init.d/S93aawgd restart
fi

sleep 20
done

-------------------------------- /etc/init.d/S94checkaa1
#!/bin/sh

DAEMON="checkaa1"
PIDFILE="/var/run/$DAEMON.pid"

RETVAL=0

case "$1" in
start)
printf "Starting $DAEMON: "
start-stop-daemon -S -b -q -m -p "$PIDFILE" -x "/usr/bin/$DAEMON"
RETVAL=$?
[ $RETVAL = 0 ] && echo "OK" || echo "FAIL"
;;
stop)
printf "Stopping $DAEMON: "
start-stop-daemon -K -q -p "$PIDFILE"
RETVAL=$?
[ $RETVAL = 0 ] && echo "OK" || echo "FAIL"
;;
restart)
$0 stop
$0 start
;;
*)
echo "Usage: $0 {start|stop}"
;;
esac

exit $RETVAL

----------------------- /etc/init.d/S94checkaa2
#!/bin/sh

DAEMON="checkaa2"
PIDFILE="/var/run/$DAEMON.pid"

RETVAL=0

case "$1" in
start)
printf "Starting $DAEMON: "
start-stop-daemon -S -b -q -m -p "$PIDFILE" -x "/usr/bin/$DAEMON"
RETVAL=$?
[ $RETVAL = 0 ] && echo "OK" || echo "FAIL"
;;
stop)
printf "Stopping $DAEMON: "
start-stop-daemon -K -q -p "$PIDFILE"
RETVAL=$?
[ $RETVAL = 0 ] && echo "OK" || echo "FAIL"
;;
restart)
$0 stop
$0 start
;;
*)
echo "Usage: $0 {start|stop}"
;;
esac

exit $RETVAL

Using for Tata Nexon 2023 edition - Audio Music Lag when using touchscreen.

Welldone for creating a very usefull and money saving project.
I'm using it with my RPi0-W, connect very nicesly and good.

The only problem I noticed when Music is playing & streaming to car infotainment, and when using Car touchscreen to navigate or use map to set, Audio starts lagging.

Using this saved me 8K for devices available on amazon.

RPi02w v0.3 prebuilt wifi not activating

Tried the latest build v0.3 and I now get the option to pair on the bluetooth but the wifi does not show up. Confirming going back to v0.2 I can't pair the bluetooth but can connect to the wifi.

Port to Java

Hello, I would love to have a try and replicate the bluetooth/wifi communication to android/java/kotlin to make the AAGateWay work as if it was native, but I don't find how it is done, no architecture, no point to start... how is the protocol? Is it wifi or wifi direct? Bluetooth socket in, response with the ip, the phone connects to the ip?

If you could provide some info or doc or point to start digging, it would be awesome.

Thank you very much!

Lags in android interface and musics

Hello,
i installed the app on a raspberry pi zero W, in a peugeot 2008.
my phone is a Samsung Galaxy S23 ultra, i don't think the problem is coming from there.

The phone connect quickly, no problem to launch the android auto interface.

But there is some lag in the interface, for exemple in waze when i move the map it react 1/2 sec after, and not in a fluid way.
The music (from spotify) got some micro stutter sometimes too, cutting for 1/2 sec and coming back.

Could the Rpi zero W not be beefy enough ?

When connected directly with my phone, i got no problem at all and the interface is totally fluid.

Thx anyway for your app, you saved me from buying a dongle ;)

Customize the installation

Hi, I tried the project with a Raspberry PI 3A+ and it works very well.
However, I would like to customize some settings for security reasons. I would like to change the WiFi password, try to ask for the bluetooth pin and change the root password but I couldn't.
When I change the WiFi password from the pre-built sd card image, the smartphone no longer connects.
I also tried to recompile the image changing the parameters in the sources files configuration but it still doesn't work.
Is there a way to customize the installation?

Thanks

Best regards

Access to other services in the raspberry pi

Hello everyone,

I don't know if it is a characteristic of the android auto protocol or not. Sorry if the answer is yes.
Could be possible to access to other ports apart from the tcp server for android auto at the same time android auto is working.
I tried but it doesn't work, for example access to ssh server from the mobile phone, but i don't know if it is a issue of the code o the protocol itself.

For example to run a subsonic server in the rapsberry in the 10.0.0.1 at some port, so the mobile can connect wireless to the RPI for android auto and to the server to allow symfonium or other app subsonic compatible read and no used mobile data for music. Another posibility is to access samba despiste there is few music broser for samba in google play.

Xiaomi cant connect to bluetooth

Have an xiaomi device and i cant connect to the rpi 2 zero by bluetooth using the latest code!
Have tested BluemediaGER fork and there i can connect and it shows up correctly but then it cant connect to my cars android auto.
The bluetooth doesn't show up unless i tell my phone to not show names on bluetooth and then i can see the mac adress of the device but pairing fails!

bluetooth dropout while connecting AAWirelessDongle to Headunit

I made the new build (#35 "optimistic phone connection") on Pi Zero 1.1.(pi0w)
The "optimistic phone connection" function works, but now the Bluetooth communication fails and does not return.
This means that AAWirelessDogle is paired with the cell phone via Bluetooth, --> Android Auto starts automatically on the Headunit, --> the Bluetooth connection between AAWirelessDongle and Phone fails, -->Android Auto started and works on Headunit, but without Bluetooth connection, so the bluetooth sound (AndroidAuto sound) doesn't work on the Headunit.

Do you have an idea what I could do?

thanks in advance

Gyula

Feature request: audio routing

Hello great community.

I would like to propose the configuration where audio sync stays with the phone vs being sent to the headunit via AAWirelessDongle.

The value of this configuration is a choice user can make whether audio is routed via BT of the phone connected to a head unit directly or via AAWirelessDongle, because in some cars there are differences in audio quality.

This feature has been implemented by Emil B. in AAwireless and I think it's amazing, I can hear a great degree of difference in my car.

Thank you !

Slow reaction and low resolution

Hey guys,
I have a few questions, what Pi will be best used for your project?
For now, I'm using Pi zero w2 and it seems to be extremely slow compared to the AAWireless dongle,
also it seems like the resolution is a bit lower (compared to the AAWireless dongle), is that fixable?

Great project and I can't wait to see it grow.

Delay USB switching

I'm happy to announce that AAWirelessDongle works with Suzuki Swift (model year 2022) using a Raspberry Pi 4 B. I just ordered a Pi Zero W as a permanent solution.

However, my car often has an issue when the USB is already connected when I turn on the ignition. I already noticed this when using wired AA, so I often wait until the radio has fully powered on (takes a few seconds) before I plug in my phone. It seems the same applies to AAWirelessDongle. When the Pi is already plugged in, the car doesn't connect; if I plug it in after the radio has booted, it works.
I am unfortunately not familiar with the USB protocol and the implementation on the RPi. Do you think it would be possible to artificially delay switching to gadget mode so the car's radio has time to boot?

Cannot re-pair bluetooth after forgetting from the phone

@rareshornet reported here.

"I do have a weird issue, if I delete/forget the bluetooth AA device from my pixel 6 then I can never reconnect it unless I reimage the sdcard. The error I get on my phone at least is that the pin number is incorrect although no pin prompt shows up. Not a huge issue as I don't have to forget the AA device anyway but if you want to take a look let me know if I can help in any way, collect logs etc."

Bluetooth is not available

hello,

i build it using my raspberry pi 4, the wifi is available but the bluetooth is not even discovered. so im reflashing using your release instead of building. but got the same result instead
WhatsApp Image 2023-10-20 at 11 03 00 (1)
WhatsApp Image 2023-10-20 at 11 03 00

Rebooting when android auto on car attempts to connect Skoda Kodiaq 2018

Hi,

Thanks so much for all your hard work on this project, I'm trying to use your ready made sd card images to work with my Skodi Kodiaq 2018 in the UK.

I've tried with both a Raspberry Pi 0 w v1.1 and also a Pi 0 W 2 (using the correct images 0.2.0 and after editing country code) and both with pretty similar results in that when I connect to the car usb port it sees the dongle initially but doesn't auto connect, so after a little time I hit the button to tell it to connect which it initally seems to do, but then shortly afterwards the rpi seems to reboot because I see the green light flashing.

I have connected using the wireless and downloaded the logs from messages right before the reboot and I've pasted in a file of what I got on my last time.

Here is what I've tried so far:

Both different types of hardware = same
Different cables = same
Rolled back to v 0.1.1 = very slightly different in that on a couple of occasions I managed to see the Bluetooth from the rpi, but it soon stopped once the reboot occured.

The error I see on my car is smartlink not supported or similar.

Is there anything you can think of for me to try to get this working correctly using either of my devices? I'm happy to troubleshoot with you where I'm able.

Thanks again for your help.
rpi 2 w logs.txt

Bluetooth not working on some Raspberry Pi Zero 2W

After flashing the premade image to a Pi Zero 2W, I am not able to get AA functioning. The car's head unit never responds to anything, nor does a new Bluetooth device appear from the Pi to pair my Pixel 6 Pro with.

I realize with that information not much help can be provided, so my question: What is the best way to troubleshoot the connection issues? I see that a wifi network is available, so I thought I'd ssh to it to poke around, but I'm not sure what the password is.

My Car has an Inbuit Internet Wifi

What changes should I look into, so that rather than create a new wifi, Device connect to my car inbuilt WIFI, and my phone also connected to my car wifi.

Wifi is JIO Powered wifi. which is used my JIO Motive for Car Monitoring & diagnostic.

Issue with Bluetooth Pi Zero 2W

Hello, I finally made my Zero 2W bring up Bluetooth. By default it complains that the patch bcrm/BCM.hcd is missing. But its right there in /lib/firmware/bcrm/BCM43430B0.hcd. I manage to fix this by ssh into the PI and copying it to the new name:

cd /lib/firmware/bcrm/
cp BCM43430B0.hcd BCM.hcd

So that's the fix, but I don't know how to integrate it into Buildroot, and therefore, not able to open a PR.

Question: Compatibility of AAWireless with stock Pi OS

Hello,

I'm interested in learning whether the AAWirelessDongle is compatible with a standard Raspberry Pi OS image. If so, are there specific installation procedures or packages required? If possible a compilation wiki for it will be helpfull

Not compatible with Medianav Renault/Dacia

I tried both with Raspberry Pi 2 W and 4. Same situations
The Bluetooth connection is successful, but it remains in the loop on "searching for android auto..."
The connection with Android Auto does not appear on the car display

First time connect Issue

There is a need to reconnect the usb to get a connection where it gets stuck at searching for android auto but after that it works as expected. Tested on TATA Tiago.
Is there a possibility to do a similar setup for apple carplay?

Bluetooth device not showing up on pixel 7

I am using rpizero2w, wifi ssid is showing up however Bluetooth device isn't showing.up. any particular config that need to be updated? Any specific Bluetooth config need to be updated post installation? Thanks

Pioneer head unit.

It works with the head unit. However as an fyi you must update the date via ssh in the terminal on the dongle, not just the country code.

On a side note..thank you for this project. It serves 2 purposes for me.

  1. My wireless head unit has been having connectivity issues and I didnt want to buy a new one or lose AAWireless. Raspberry Pi 4b laying around and a 3d printed case. The otg port powers the dongle as well as provides AA to my head unit. I have a system in my car and will say the sound is superior than the HUs wireless. The pi must be doing the processes vs the phone? Or the radio vs the phone? Idk but using my tuner I can see the actual difference in sounds coming from my speakers at similar levels.

  2. I drive company cars that often don't have AAWireless, which is tough when you're in and out of a car all day. Now i have a portable dongle to carry with me in each car and wont have to even pair it to each car.

Again thank you!!!

It does not start android auto susuki jimny

How are you doing?

What kind of radio do you use in the swift?

I have a jimny 2024 and by USB it detects without problems my cell phone, when I connect my Pi zero W, I connect the device to the wifi network and bluetooth.

At that time on the device I see that it searches for android auto then it seems to boot but the message of android auto in search is not removed.

And on the console it does not start.

Raspberry Pi compatible

Hello community

I've been looking into the repo and I could not find the list of compatible raspberry. Is the last version necessary? Can I buy a cheaper raspberry or any other compatible board?

Does it not work on Raspberry Pi 3 B+?

I have a Raspberry Pi 3 B+.
I downloaded the image file, installed it on the Raspberry Pi, and booted it, but there was no response when connected to the car.
So, I looked it up and found that the device in question does not have OTG mode. Is this correct information?
Is there any solution?

Compatibility for a arm Mobile?

I used to have custom rom on my old device which has good specs is there a way I could flash the file of raspberry Pi & able to use my phone has AA Dongle

Change DPI

Would it be possible to implement a way to change the dpi on the headunit?

Compatibility with VAG head units

Hi!

First of all, thanks for the cool project. I stumbled upon it after testing some commercial Android Auto wireless dongles, which all had some issues. Unfortunately, because these things are black boxes, it's difficult to debug them.

I have built the image for the Raspberry Pi 4, but can't get it to run properly. I have tested both with the head unit in my Skoda Fabia III Combi (LG MIB2 Entry device) and with the official Google Desktop Head Unit emulator. Sadly, in both cases it didn't work as expected.

The head unit in my car recognizes the default USB gadget and shows it as connected. When a device is connected, the head unit displays a selection window for Android Auto and MirrorLink, as it supports both protocols. As soon as I select Android Auto, it tries to connect but fails. The head unit then resets the USB connection and displays the selection menu again. This loop can be repeated several times.

The Google Desktop Head Unit simply doesn't do anything. When I start the tool and then connect the Raspberry Pi, nothing happens. It is recognized (number of devices increases from 7 to 8), but not started:

root@zeus:~/Android/Sdk/extras/google/auto$ ./desktop-head-unit -u -i touch
Android Auto - Desktop Head Unit
  Build: 2022-03-30-438482292
  Version: 2.0-linux

ALSA lib pcm.c:2666:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.rear
ALSA lib pcm.c:2666:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.center_lfe
ALSA lib pcm.c:2666:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.side
ALSA lib pcm_route.c:877:(find_matching_chmap) Found no matching channel map
ALSA lib pcm_route.c:877:(find_matching_chmap) Found no matching channel map
ALSA lib pcm_route.c:877:(find_matching_chmap) Found no matching channel map
ALSA lib pcm_route.c:877:(find_matching_chmap) Found no matching channel map
[W]: No configuration specified - using default values.
[E]: Could not load configuration from '~/.android/headunit.ini'.
BoringSSL is the SSL implementation used in the receiver-lib.
Starting link. Requested protocol version: 1.7
[I]: Searching for compatible USB device...
[I]: Found 7 USB devices.
[I]: No device found ready yet, will retry shortly...
[I]: Found 7 USB devices.
[I]: No device found ready yet, will retry shortly...
[I]: Found 7 USB devices.
[I]: No device found ready yet, will retry shortly...
[I]: Found 7 USB devices.
[I]: No device found ready yet, will retry shortly...
[I]: Found 8 USB devices.
[I]: No device found ready yet, will retry shortly...
[I]: Found 8 USB devices.
[I]: No device found ready yet, will retry shortly...
[I]: Found 8 USB devices.
[I]: No device found ready yet, will retry shortly...
[I]: Found 8 USB devices.
[I]: No device found ready yet, will retry shortly...
[I]: Found 8 USB devices.
[E]: Couldn't find/access compatible USB device.
[E]: Failed to start Google Automotive Link.

My OnePlus 7 Pro on the other hand, is recognized without problems, restarted in accessory mode, and then works as expected:

root@zeus:~/Android/Sdk/extras/google/auto$ ./desktop-head-unit -u -i touch
Android Auto - Desktop Head Unit
  Build: 2022-03-30-438482292
  Version: 2.0-linux

ALSA lib pcm.c:2666:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.rear
ALSA lib pcm.c:2666:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.center_lfe
ALSA lib pcm.c:2666:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.side
ALSA lib pcm_route.c:877:(find_matching_chmap) Found no matching channel map
ALSA lib pcm_route.c:877:(find_matching_chmap) Found no matching channel map
ALSA lib pcm_route.c:877:(find_matching_chmap) Found no matching channel map
ALSA lib pcm_route.c:877:(find_matching_chmap) Found no matching channel map
[W]: No configuration specified - using default values.
[E]: Could not load configuration from '~/.android/headunit.ini'.
BoringSSL is the SSL implementation used in the receiver-lib.
Starting link. Requested protocol version: 1.7
[I]: Searching for compatible USB device...
[I]: Found 7 USB devices.
[I]: No device found ready yet, will retry shortly...
[I]: Found 7 USB devices.
[I]: No device found ready yet, will retry shortly...
[I]: Found 7 USB devices.
[I]: No device found ready yet, will retry shortly...
[I]: Found 8 USB devices.
[I]: Device 'OnePlus GM1911' (vid=22d9, pid=2764) supports AOAPv2, starting accessory mode...
[I]: No device found ready yet, will retry shortly...
[I]: Found 8 USB devices.
[I]: Found device 'OnePlus GM1911' in accessory mode (vid=18d1, pid=2d00).
[I]: Found accessory: ifnum: 0, rd_ep: 129, wr_ep: 1
[I]: Attaching to USB device...
[I]: Attached!
> Phone reported protocol version 1.7
ssl state=TLS client read_server_hello -1
ssl state=TLS client process_change_cipher_spec -1
ssl state=SSL negotiation finished successfully 1
SSL version=TLSv1.2 Cipher name=ECDHE-RSA-AES128-GCM-SHA256
Verify returned: ok

I did a bit of debugging and it looks like in both cases there is simply no accessory start request arriving at the default USB gadget.

In further testing, I modified /etc/init.d/S92usb_gadget to directly start the accessory gadget instead of the default gadget. Additionally I modified the /root/start_accessory.sh so that aawgd is started directly when a uevent with USB_STATE=CONFIGURED arrives. With this configuration I at least managed to get the desktop head unit working. But the head unit in my car does not recognize the device at all.

Are there any tips I could use to debug further? My understanding is that the Pi must respond to USB packets according to AOA v1.0. However, I have not found any corresponding code on the default gadget that can do this. Is it possible that this is the problem?

Not working with VW Vento 2020 model OEM Head Unit

Thanks for this awesome project it works flawlessly in my Hyundai car, however it does not seem to work in my VW Vento, it powers on but it is not discoverable in the phone's BT settings. I was able to get it paired only once & the head unit showed AA, Miracast or carplay but the wireless AA didn't launch phone keeps showing searching for AA.

I tried to troubleshoot by unpairing it & I am unable to get it working.

IF you can help me out with how to debug I can perform it & provide you with the logs for troubleshooting.

Ford Sync 3 no connection on cold boot/first vehicle start

As requested in the other issue, I'm adding this here along with my log files.

Came across this repo a few days ago and decided to give it a go. Went straight to the latest artifact as of the time of writing: https://github.com/nisargjhaveri/AAWirelessDongle/actions/runs/7856371400

This is on a 0w (not a '2' model) and connecting to a stock Pixel 4a with Android 13.

Leaving the Pi plugged in to the vehicle before powering up, when the vehicle/headunit starts up, there's no visible connection on the headunit. The phone is ready and has the telltale 'looking for AA connection' and actively connected to the Pi's SSID. Not until I powercycle the Pi with the vehicle running does it come up and seems to do so pretty reliably.

Attached my messages log file from that attempt:
messages.zip

I also have log files from the headunit itself if needed, although they are a bit verbose and I need to redact some stuff like the GPS location that appears in numerous spots. Skimming over it I don't see anything obvious other than a 'not supported' USB message every 10-15 seconds or so. But I'm also not sure what I'd be looking for.

Side note during this most recent test and I can move this to its own issue if you'd like: I tried to use the assistant and it didn't seem to want to pick up my voice. The little animation at the bottom of the screen just stayed until it timed out. Using the native wired connection I've had zero issues with this. A quick search here and I don't readily see anything mentioned about this (unless I'm using the wrong search terms).

'Specs':

Pi zero w
Pixel 4a - stock Android 13
Ford C-Max Energi w/ Sync 3 v3.4.23188 (latest version available as of this writing)

Release binary images

Hello AAWirelessDongle team,

It looks like no new images have been released since Nov 2023 even though many issues have been fixed and checked in.
It will be great to have an updated set of binaries to try out !

Thanks in advance !

AA bluetooth profile

Hi. Having looked at your implementation, I think you'd be better off by not connecting using HSP (since you don't really handle it) but rather providing a complete ServiceRecord property when registering the AA profile.

This could also leave the door open for using ofono to handle HSP properly I guess, besides cleaning up the code and making it make more sense.

(output of sudo dbus-monitor --system attached)

method call time=1700571187.703631 sender=:1.406 -> destination=org.bluez serial=4 path=/org/bluez; interface=org.bluez.ProfileManager1; member=RegisterProfile
   object path "/com/aa/aa"
   string "4de17a00-52cb-11e6-bdf4-0800200c9a66"
   array [
      dict entry(
         string "Name"
         variant             string "AA Wireless"
      )
      dict entry(
         string "Role"
         variant             string "server"
      )
      dict entry(
         string "Channel"
         variant             uint16 8
      )
      dict entry(
         string "ServiceRecord"
         variant             string "<?xml version="1.0"?>
<record>
    <attribute id="0x0001">
        <sequence>
            <uuid value="4de17a00-52cb-11e6-bdf4-0800200c9a66"/>
            <uuid value="0x1101"/>
        </sequence>
    </attribute>
    <attribute id="0x0003">
        <uuid value="4de17a00-52cb-11e6-bdf4-0800200c9a66"/>
    </attribute>
    <attribute id="0x0004">
        <sequence>
            <sequence>
                <uuid value="0x0100"/>
            </sequence>
            <sequence>
                <uuid value="0x0003"/>
                <uint8 value="0x08"/>
            </sequence>
        </sequence>
    </attribute>
    <attribute id="0x0005">
        <sequence>
            <uuid value="0x1002"/>
        </sequence>
    </attribute>
    <attribute id="0x0009">
        <sequence>
            <uuid value="0x1101"/>
        </sequence>
    </attribute>
    <attribute id="0x0100">
        <text value="WebAuto Bluetooth Service" encoding="normal"/>
    </attribute>
    <attribute id="0x0101">
        <text value="AndroidAuto WiFi projection automatic setup" encoding="normal"/>
    </attribute>
    <attribute id="0x0102">
        <text value="WebAuto" encoding="normal"/>
    </attribute>
</record>
            "
      )
   ]

Device not compatible in the car

I have a MBUX systeme on a mercedes, when i launch android auto on the car, i can't, i have a message witch say "uncompatible device" i have a pixel 7a

Can't compile

Hello !

Thank in advantage for your job, i would like to test it but i can't compile...

I have a 2w raspberry and when i compile i get:

..................... LAST LINES :

rsync -a --ignore-times --exclude .svn --exclude .git --exclude .hg --exclude .bzr --exclude CVS --chmod=u=rwX,go=rX --exclude .empty --exclude '*~' package/skeleton-init-sysv//skeleton/ /home/vagrant/AAWirelessDongle/buildroot/output/rpi2w/target/

skeleton Extracting
skeleton Patching
skeleton Configuring
skeleton Building
skeleton Installing to target
linux-headers custom Extracting
gzip -d -c /home/vagrant/AAWirelessDongle/buildroot/dl/linux/linux-0b54dbda3cca2beb51e236a25738784e90853b64.tar.gz | tar --strip-components=1 -C /home/vagrant/AAWirelessDongle/buildroot/output/rpi2w/build/linux-headers-custom -xf -

gzip: /home/vagrant/AAWirelessDongle/buildroot/dl/linux/linux-0b54dbda3cca2beb51e236a25738784e90853b64.tar.gz: not in gzip format
tar: This does not look like a tar archive
tar: Exiting with failure status due to previous errors
make[1]: *** [package/pkg-generic.mk:217: /home/vagrant/AAWirelessDongle/buildroot/output/rpi2w/build/linux-headers-custom/.stamp_extracted] Error 2
make: *** [Makefile:23: _all] Error 2

Thank you very much !

Bluetooth still connected after "handshake"

Hello again, maybe this is not an issue, but I have been playing with the android project of this, and found there that just after Wifi credentials are exchanged, bluetooth connections are closed.

Is it possible to do this here?
As the way it pairs is as an audio sink I don't know if the pi is an actual audio sink, or just pretends it in order for Android Auto to start the wifi credential transaction. Anyway, it keeps connected, and therefore I have 2 connections, one with the pi and other with the car at all times, and some times it gets a little bit confused, specially with phone calls...

If I go into the bluetooth settings, and untoggle the "phone calls" profile, then the handshake does not happens...

I don´t know that much C++ to propose a PR, sorry, but I can test whatever needed.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.