2024年11月24日星期日 下午7:35:02

How to install uninstall upgrade latest bluez(Compile/install latest bluez) on Raspberry step by step

2 年 前
#16412 引用
How to install uninstall upgrade latest bluez on  Raspberry  step by step


Compilation and installation

https://github.com/bluez/bluez  see:README


https://github.com/andrewjfreyer/presence

0
2 年 前
#16413 引用
Step 1:SSH into the Raspberry Pi (password: raspberry):
ssh pi@theipaddress



Compile/install latest bluez

https://github.com/andrewjfreyer/presence


#purge old bluez
sudo apt-get --purge remove bluez

#get latest version number from: https://www.kernel.org/pub/linux/bluetooth/
#current version as of this writing is 5.49
cd ~; wget https://www.kernel.org/pub/linux/bluetooth/bluez-5.49.tar.xz
tar xvf bluez-5.49.tar.xz

#update errythang again
sudo apt-get update

#install necessary packages
sudo apt-get install libusb-dev libdbus-1-dev libglib2.0-dev libudev-dev libical-dev libreadline-dev

#move into new unpacked directory
cd bluez-5.49

#set exports
export LDFLAGS=-lrt

#configure
./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var --enable-library -disable-systemd

#make & install
make
sudo make install

#cleanup
cd ~
rm -r bluez-5.49/
rm bluez-5.49.tar.xz

#update again
sudo apt-get update
sudo apt-get upgrade

#verify bluez version
bluetoothd -v
0
2 年 前
#16437 引用
Step 2:Change the default password:
sudo passwd pi
0
2 年 前
#16438 引用
Step 3;Update and upgrade:
sudo apt-get update
sudo apt-get upgrade -y
sudo apt-get dist-upgrade -y
sudo rpi-update
sudo reboot



Updating packages ensures that we have the latest firmware for the Raspberry Pi
0
2 年 前
#16439 引用
Step 4:[BLUETOOTH] Install Bluetooth Firmware:

#install bluetooth drivers for Pi Zero W
sudo apt-get install pi-bluetooth



正在解压 bluez-firmware (1.2-4) ...
正在选中未选择的软件包 pi-bluetooth。
准备解压 .../pi-bluetooth_0.1.10_all.deb




Check



bluetooth - Raspberry 3B+蓝牙设备不见了

https://www.msly.cn/boards/topic/10346/bluetooth-raspberry-3b%E8%93%9D%E7%89%99%E8%AE%BE%E5%A4%87%E4%B8%8D%E8%A7%81%E4%BA%86

# systemctl status hciuart.service

● hciuart.service - Configure Bluetooth Modems connected by UART
     Loaded: loaded (/lib/systemd/system/hciuart.service; enabled; vendor preset: enabled)
     Active: active (running) since Tue 2022-09-20 21:19:38 CST; 1 day 2h ago
    Process: 333 ExecStart=/usr/bin/btuart (code=exited, status=0/SUCCESS)
   Main PID: 408 (hciattach)
      Tasks: 1 (limit: 2200)
     Memory: 960.0K
        CPU: 75ms
     CGroup: /system.slice/hciuart.service
             └─408 /usr/bin/hciattach /dev/serial1 bcm43xx 921600 noflow - b8:27:eb:2a:96:fa

9月 20 21:19:37 raspberrypi systemd[1]: Starting Configure Bluetooth Modems connected by UART...
9月 20 21:19:38 raspberrypi btuart[370]: Cannot open directory '/etc/firmware': No such file or directory
9月 20 21:19:38 raspberrypi btuart[370]: Patch not found, continue anyway
9月 20 21:19:38 raspberrypi btuart[370]: bcm43xx_init
9月 20 21:19:38 raspberrypi btuart[370]: Set BDADDR UART: b8:27:eb:2a:96:fa
9月 20 21:19:38 raspberrypi btuart[370]: Set Controller UART speed to 921600 bit/s
9月 20 21:19:38 raspberrypi btuart[370]: Device setup complete
9月 20 21:19:38 raspberrypi systemd[1]: Started Configure Bluetooth Modems connected by UART.



#verify that bluetooth is working
sudo service bluetooth start
sudo service bluetooth status
0