The Raspberry Pi 4 with the Z-Wave hat can co-exist without problems. I ran mine that way for over a year.
Roger D
Announcement
Collapse
No announcement yet.
HS4-PI bluetooth doesn't work
Collapse
X
-
I thought I read somewhere that you couldn't have Bluetooth enabled and the Z-Wave hat installed because they used the same serial connection? I suspect that's why BT is disabled by default. Since you are using a Pi4 (not a Hometroller hub) you should be fine.
Leave a comment:
-
Originally posted by Roger D View PostIs the logged in user a member of the bluetooth group?
Roger D
Leave a comment:
-
Originally posted by PFL View PostDo this to enable bluetooth:
sudo nano /boot/config.txt
add this 2 lines:
enable_uart=1
dtoverlay=pi3-miniuart-bt
homeseer@HS4PiV6:~ $ sudo systemctl status bluetooth
● bluetooth.service - Bluetooth service
Loaded: loaded (/lib/systemd/system/bluetooth.service; enabled; vendor preset
Active: active (running) since Tue 2022-07-19 21:50:05 EDT; 8min ago
Docs: man:bluetoothd(8)
Main PID: 502 (bluetoothd)
Status: "Running"
Tasks: 1 (limit: 4915)
CGroup: /system.slice/bluetooth.service
└─502 /usr/lib/bluetooth/bluetoothd
Jul 19 21:50:05 HS4PiV6 systemd[1]: Starting Bluetooth service...
Jul 19 21:50:05 HS4PiV6 bluetoothd[502]: Bluetooth daemon 5.50
Jul 19 21:50:05 HS4PiV6 systemd[1]: Started Bluetooth service.
Jul 19 21:50:05 HS4PiV6 bluetoothd[502]: Starting SDP server
Jul 19 21:50:05 HS4PiV6 bluetoothd[502]: Bluetooth management interface 1.18 ini
lines 1-15/15 (END)
● bluetooth.service - Bluetooth service
Loaded: loaded (/lib/systemd/system/bluetooth.service; enabled; vendor preset: enabled)
Active: active (running) since Tue 2022-07-19 21:50:05 EDT; 8min ago
Docs: man:bluetoothd(8)
Main PID: 502 (bluetoothd)
Status: "Running"
Tasks: 1 (limit: 4915)
CGroup: /system.slice/bluetooth.service
└─502 /usr/lib/bluetooth/bluetoothd
Jul 19 21:50:05 HS4PiV6 systemd[1]: Starting Bluetooth service...
Jul 19 21:50:05 HS4PiV6 bluetoothd[502]: Bluetooth daemon 5.50
Jul 19 21:50:05 HS4PiV6 systemd[1]: Started Bluetooth service.
Jul 19 21:50:05 HS4PiV6 bluetoothd[502]: Starting SDP server
Jul 19 21:50:05 HS4PiV6 bluetoothd[502]: Bluetooth management interface 1.18 initialized
However, I also get this:
homeseer@HS4PiV6:~ $ sudo bluetoothctl
Agent registered
[bluetooth]# scan on
No default controller available
So, the Bluetooth device is not being seen by the RPi and Bluetooth is not working. Any help would be appreciated. Thanks.
Leave a comment:
-
Originally posted by PFL View Post
Yes, HS4 is also working with raspberry pi OS desktop, not only lite OS, usually bluetooth works better on desktop.
Leave a comment:
-
Originally posted by PFL View Post
Did you tried the desktop version OS?
Leave a comment:
-
Originally posted by trevor-austin View Post
Hi I ran that. completed without errors rebooted but still get the same no such device result. Also hcitool dev is empty, result of bluetooth status is this.
root@HS4PiV5:~# sudo hciconfig hci0 reset
Can't get device info: No such device
root@HS4PiV5:~# sudo invoke-rc.d bluetooth restart
root@HS4PiV5:~# sudo systemctl status bluetooth
● bluetooth.service - Bluetooth service
Loaded: loaded (/lib/systemd/system/bluetooth.service; enabled; vendor preset: enabled)
Active: active (running) since Tue 2022-02-15 20:30:24 UTC; 19s ago
Docs: man:bluetoothd(8)
Main PID: 1070 (bluetoothd)
Status: "Running"
Tasks: 1 (limit: 4915)
CGroup: /system.slice/bluetooth.service
└─1070 /usr/lib/bluetooth/bluetoothd
Feb 15 20:30:24 HS4PiV5 systemd[1]: Starting Bluetooth service...
Feb 15 20:30:24 HS4PiV5 bluetoothd[1070]: Bluetooth daemon 5.50
Feb 15 20:30:24 HS4PiV5 systemd[1]: Started Bluetooth service.
Feb 15 20:30:24 HS4PiV5 bluetoothd[1070]: Starting SDP server
Feb 15 20:30:24 HS4PiV5 bluetoothd[1070]: Bluetooth management interface 1.18 initialized
root@HS4PiV5:~# hcitool dev
I also see this error
sudo systemctl start hciuart.service
Job for hciuart.service failed because the control process exited with error code.
See "systemctl status hciuart.service" and "journalctl -xe" for details.
root@HS4PiV5:~# systemctl status hciuart.service
● hciuart.service - Configure Bluetooth Modems connected by UART
Loaded: loaded (/lib/systemd/system/hciuart.service; disabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Tue 2022-02-15 20:38:21 UTC; 1min 3s ago
Process: 1214 ExecStart=/usr/bin/btuart (code=exited, status=1/FAILURE)
Feb 15 20:38:15 HS4PiV5 systemd[1]: Starting Configure Bluetooth Modems connected by UART...
Feb 15 20:38:21 HS4PiV5 btuart[1214]: Can't set line discipline: Invalid argument
Feb 15 20:38:21 HS4PiV5 btuart[1214]: Can't initialize device: Invalid argument
Feb 15 20:38:21 HS4PiV5 btuart[1214]: bcm43xx_init
Feb 15 20:38:21 HS4PiV5 btuart[1214]: Flash firmware /lib/firmware/brcm/BCM4345C0.hcd
Feb 15 20:38:21 HS4PiV5 btuart[1214]: Set Controller UART speed to 460800 bit/s
Feb 15 20:38:21 HS4PiV5 systemd[1]: hciuart.service: Control process exited, code=exited, status=1/FAILURE
Feb 15 20:38:21 HS4PiV5 systemd[1]: hciuart.service: Failed with result 'exit-code'.
Feb 15 20:38:21 HS4PiV5 systemd[1]: Failed to start Configure Bluetooth Modems connected by UART.
Leave a comment:
-
Originally posted by PFL View Post
Yes, but you still need to do this:
sudo apt install bluetooth pi-bluetooth bluez blueman
root@HS4PiV5:~# sudo hciconfig hci0 reset
Can't get device info: No such device
root@HS4PiV5:~# sudo invoke-rc.d bluetooth restart
root@HS4PiV5:~# sudo systemctl status bluetooth
● bluetooth.service - Bluetooth service
Loaded: loaded (/lib/systemd/system/bluetooth.service; enabled; vendor preset: enabled)
Active: active (running) since Tue 2022-02-15 20:30:24 UTC; 19s ago
Docs: man:bluetoothd(8)
Main PID: 1070 (bluetoothd)
Status: "Running"
Tasks: 1 (limit: 4915)
CGroup: /system.slice/bluetooth.service
└─1070 /usr/lib/bluetooth/bluetoothd
Feb 15 20:30:24 HS4PiV5 systemd[1]: Starting Bluetooth service...
Feb 15 20:30:24 HS4PiV5 bluetoothd[1070]: Bluetooth daemon 5.50
Feb 15 20:30:24 HS4PiV5 systemd[1]: Started Bluetooth service.
Feb 15 20:30:24 HS4PiV5 bluetoothd[1070]: Starting SDP server
Feb 15 20:30:24 HS4PiV5 bluetoothd[1070]: Bluetooth management interface 1.18 initialized
root@HS4PiV5:~# hcitool dev
I also see this error
sudo systemctl start hciuart.service
Job for hciuart.service failed because the control process exited with error code.
See "systemctl status hciuart.service" and "journalctl -xe" for details.
root@HS4PiV5:~# systemctl status hciuart.service
● hciuart.service - Configure Bluetooth Modems connected by UART
Loaded: loaded (/lib/systemd/system/hciuart.service; disabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Tue 2022-02-15 20:38:21 UTC; 1min 3s ago
Process: 1214 ExecStart=/usr/bin/btuart (code=exited, status=1/FAILURE)
Feb 15 20:38:15 HS4PiV5 systemd[1]: Starting Configure Bluetooth Modems connected by UART...
Feb 15 20:38:21 HS4PiV5 btuart[1214]: Can't set line discipline: Invalid argument
Feb 15 20:38:21 HS4PiV5 btuart[1214]: Can't initialize device: Invalid argument
Feb 15 20:38:21 HS4PiV5 btuart[1214]: bcm43xx_init
Feb 15 20:38:21 HS4PiV5 btuart[1214]: Flash firmware /lib/firmware/brcm/BCM4345C0.hcd
Feb 15 20:38:21 HS4PiV5 btuart[1214]: Set Controller UART speed to 460800 bit/s
Feb 15 20:38:21 HS4PiV5 systemd[1]: hciuart.service: Control process exited, code=exited, status=1/FAILURE
Feb 15 20:38:21 HS4PiV5 systemd[1]: hciuart.service: Failed with result 'exit-code'.
Feb 15 20:38:21 HS4PiV5 systemd[1]: Failed to start Configure Bluetooth Modems connected by UART.
Leave a comment:
-
Originally posted by trevor-austin View Post
Hi, I wonder if you could clarify for me.
Are lines 1-5 added to the end of config.txt? then saved and the remaining 3 lines as separate command lines.
If that is the case I get a fail on sudo hciconfig hci0 reset with a no such device, any further ideas?
sudo apt install bluetooth pi-bluetooth bluez blueman
Leave a comment:
-
Originally posted by PFL View PostEdit config.txt
# Enable Bluetooth alternate port
enable_uart=1
#dtoverlay=pi3-miniuart-bt
dtoverlay=uart4
dtoverlay=miniuart-bt
sudo reboot
sudo hciconfig hci0 reset
sudo invoke-rc.d bluetooth restart
Are lines 1-5 added to the end of config.txt? then saved and the remaining 3 lines as separate command lines.
If that is the case I get a fail on sudo hciconfig hci0 reset with a no such device, any further ideas?
Leave a comment:
-
edit bluetooth.service
find line and change to /usr/lib/bluetooth/bluetoothd --plugin=a2dp
Leave a comment:
-
Success! Thank you very much. I've been obsessed.
Originally posted by jasv View PostThanks. My image which contains both raspbian and HS4 that I downloaded did not have bluetooth installed.
Although it is working now, I am getting a couple of errors. Can Ignore them?
Code:Jan 10 11:12:13 raspbdev bluetoothd[657]: Bluetooth daemon 5.50 Jan 10 11:12:13 raspbdev systemd[1]: Started Bluetooth service. Jan 10 11:12:13 raspbdev bluetoothd[657]: Starting SDP server Jan 10 11:12:13 raspbdev bluetoothd[657]: Bluetooth management interface 1.18 initialized [COLOR=#c0392b]Jan 10 11:12:13 raspbdev bluetoothd[657]: Sap driver initialization failed. Jan 10 11:12:13 raspbdev bluetoothd[657]: sap-server: Operation not permitted (1)[/COLOR] Jan 10 11:12:13 raspbdev bluetoothd[657]: Endpoint registered: sender=:1.31 path=/org/bluez/hci0/A2DP/SBC/Source/1 Jan 10 11:12:13 raspbdev bluetoothd[657]: Endpoint registered: sender=:1.31 path=/org/bluez/hci0/A2DP/SBC/Source/2 [COLOR=#c0392b]Jan 10 11:12:13 raspbdev bluetoothd[657]: Failed to set privacy: Rejected (0x0b)[/COLOR]
Leave a comment:
-
Originally posted by jasv View PostThanks. I will try to reflash an image and to try again. My image which contains both raspbian and HS4 that I downloaded did not have bluetooth installed. Did you install it first?
Leave a comment:
Leave a comment: