Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- https://gist.github.com/0/c73e2557d875446b9603
- https://www.pcsuggest.com/linux-bluetooth-setup-hcitool-bluez/
- defaultuser:pi
- defaultpass:raspberry
- Blend Micro
- CC:5A:BC:A3:05:6F
- https://scribles.net/updating-bluez-on-raspberry-pi-5-43-to-5-48/#Step01
- bluetoothctl -v
- sudo apt-get update
- sudo apt-get install libdbus-1-dev libglib2.0-dev libudev-dev libical-dev libreadline-dev -y
- wget www.kernel.org/pub/linux/bluetooth/bluez-5.48.tar.xz
- tar xvf bluez-5.48.tar.xz && cd bluez-5.48
- ./configure --prefix=/usr --mandir=/usr/share/man --sysconfdir=/etc --localstatedir=/var --enable-experimental
- make -j4
- sudo make install
- sudo reboot
- BLUETOOTH PAIRING AND BONDING
- bluetoothctl
- power on
- agent on
- scan on
- connect <addr>
- Unpair
- remove aa:bb:cc:dd:ee:ff
- sudo rfcomm connect hci0 <bdaddr>
- to make the binding for /dev/rfcomm0
- rfcomm bind 0 <bdaddr> [channel]
- systemctl status bluetooth
- hciconfig -a
- systemctl restart bluetooth
- bluetoothctl
- as root, returns list of known addresses in bluez
- busctl tree org.bluez
- Checked /etc/dbus-1/system.d/bluetooth.conf, which says users must be in the bluetooth group.
- sudo adduser pi bluetooth
- newgrp bluetooth
- Hello Douglas, thanks for your support and sorry for my late answer. After apt-get update & upgrade I found that I have to
- sudo apt-get install bluealsa
- to get rid of the
- Failed to connect: org.bluez.Error.Failed
- Newer versions of BlueZ tools no longer seem to document the /etc/bluetooth/rfcomm.conf file. It might be that you'll have to always use the full form of the rfcomm bind command to set up your bindings. You might want to add these commands to /etc/rc.local or some custom start-up script, to make them execute automatically at boot time, as the associations won't persist through a reboot.
- It seems that the last major rebuild of BlueZ internals cost us some of the RFCOMM-related features, like the /etc/bluetooth/rfcomm.conf file. But at least the rfcomm command is still available and can do the job.
- sudo echo "This is a test" > /dev/rfcomm0
- sudo nano /etc/bluetooth/rfcomm.conf
- rfcomm0 {
- bind yes;
- device CC:5A:BC:A3:05:6F;
- channel 0;
- comment "Serial Port";
- }
- I also had the "Failed to obtain handles for "Service Changed" characteristic" messages, and no sound playback over bluetooth (raspberry as playback device).
- Audio playback now works using /usr/bin/bluealsa-aplay (procedure similar to https://volumio.org/forum/volumio-bluez ... t6130.html).
- ("Failed to obtain..." messages are still logged.)
- https://scribles.net/running-ble-advertising-example-code-on-raspbian-stretch/
- https://scribles.net/tag/bluez/
- hciconfig hci0 up
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement