Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Bluetooth #77

Open
Francky46 opened this issue Feb 15, 2022 · 0 comments
Open

Fix Bluetooth #77

Francky46 opened this issue Feb 15, 2022 · 0 comments
Labels
bug Something isn't working

Comments

@Francky46
Copy link

his version of raspberry pi OS in 64bit has a problem with bluetooth, especially when it comes to executing the connect command, who will give this error:

Failed to connect: org.bluez.Error.Failed

Indeed, the mac address of the agent is "E4:5F:01" which is not good for Raspberry Pi 4, the mac address should start with "B8:27:EB". To check this you can for example type this command :

sudo hcitool dev

If the mac address is not right, you can fix this by editing this file :

sudo nano /usr/bin/btuart

Comment on the first "if", "else" and "fi", for example :

 #!/bin/sh

HCIATTACH=/usr/bin/hciattach
#if grep -q "raspberrypi,4" /proc/device-tree/compatible; then
  BDADDR=
#else
  SERIAL=`cat /proc/device-tree/serial-number | cut -c9-`
  B1=`echo $SERIAL | cut -c3-4`
  B2=`echo $SERIAL | cut -c5-6`
  B3=`echo $SERIAL | cut -c7-8`
  BDADDR=`printf b8:27:eb:%02x:%02x:%02x $((0x$B1 ^ 0xaa)) $((0x$B2 ^ 0xaa)) $((0x$B3 ^ 0xaa))`
#fi
@Francky46 Francky46 added the bug Something isn't working label Feb 15, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant