nisargjhaveri / WirelessAndroidAutoDongle

Use Wireless Android Auto with a car that supports only wired Android Auto using a Raspberry Pi.
MIT License
331 stars 43 forks source link

Bluetooth not working on some Raspberry Pi Zero 2W #30

Closed NegussugeN closed 5 months ago

NegussugeN commented 7 months ago

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.

nisargjhaveri commented 6 months ago

The default wifi password is "ConnectAAWirelessDongle" as defined in hostapd.conf. You can ssh using root/password for now, defined in relevant defconfigs, e.g. raspberrypi0w_defconfig.

To troubleshoot, you can start with having a look at /var/log/messages once it tries to connect to the car.

NegussugeN commented 6 months ago

AADongle Messages.txt

Here is what I'm seeing in messages. Does anything here look out of the ordinary to you?

nisargjhaveri commented 6 months ago

This looks like an issue

Jan  1 00:00:04 buildroot user.info aawgd[224]: Did not find any bluetooth adapters\

I can also see these, might be related.

Jan  1 00:00:02 buildroot kern.err kernel: [    1.759758] Bluetooth: hci0: BCM: firmware Patch file not found, tried:\
Jan  1 00:00:02 buildroot kern.err kernel: [    1.762682] Bluetooth: hci0: BCM: 'brcm/BCM.hcd'\

Looks like bluetooth is not working properly for your device/build.

nisargjhaveri commented 6 months ago

See #9, seems to be the same issue.

nisargjhaveri commented 6 months ago

Did some research, seems like some RPi 2W uses a particular version of the chip that is not handled properly in the kernel version we're using. It seems to have fixed in newer RPi kernels, we might have to try update the kernel or patch our version.

I see that buildroot upstream not also has a new kernel for RPi, so should be feasible to use the new kernel without much effort.

In the meantime, the workaround from #9 might work for you.

nisargjhaveri commented 6 months ago

This should now be fixed by 8c0dd4c42ee6d860f82895671bff2dca9de97c03.