I’m having trouble in activating bluetooth in combination with miniuart.
The reason is that /dev/ttyAMA0 is used by my Razberry zwave card.
Thus I need GPIO 14 and 15 available.
Name: pi3-miniuart-bt
Info: Switch Pi3 Bluetooth function to use the mini-UART (ttyS0) and restore
UART0/ttyAMA0 over GPIOs 14 & 15. Note that this may reduce the maximum
usable baudrate.
N.B. It is also necessary to edit /lib/systemd/system/hciuart.service
and replace ttyAMA0 with ttyS0, unless you have a system with udev rules
that create /dev/serial0 and /dev/serial1, in which case use
/dev/serial1 instead because it will always be correct. Furthermore,
you must also set core_freq=250 in config.txt or the miniuart will not
work.
Load: dtoverlay=pi3-miniuart-bt
Params: <None>
I do see dev-ttyAMA0.device hardcoded in this file:
Identical problem here. Also need the GPIO pins for Razberry
Using bluetooth support results in following error:
2018-08-24 10:03:44 ERROR (MainThread) [homeassistant.components.device_tracker] Error setting up platform bluetooth_tracker
Traceback (most recent call last):
File "/usr/local/lib/python3.6/site-packages/homeassistant/components/device_tracker/__init__.py", line 183, in async_setup_platform
disc_info)
File "/usr/local/lib/python3.6/concurrent/futures/thread.py", line 56, in run
result = self.fn(*self.args, **self.kwargs)
File "/usr/local/lib/python3.6/site-packages/homeassistant/components/device_tracker/bluetooth_tracker.py", line 72, in setup_scanner
for dev in discover_devices():
File "/usr/local/lib/python3.6/site-packages/homeassistant/components/device_tracker/bluetooth_tracker.py", line 50, in discover_devices
lookup_class=False)
File "/usr/local/lib/python3.6/site-packages/bluetooth/bluez.py", line 26, in discover_devices
device_id = _bt.hci_get_route()
OSError: [Errno 19] No such device
wanted to use a HomeMatic Shield (as you with zwave) and bluetooth. Think i fixed it. See the trial path below:
Configure for HM/ZWave only
# ssh -l root 192.168.178.87 -p 22222
hassio > login
# vi /mnt/boot/config.txt
SET
dtoverlay=pi3-miniuart-bt
enable_uart=1
# reboot
# systemctl status bluetooth-bcm43xx
-> Bluetooth broken
# ls -la /dev
lrwxrwxrwx 1 root root 7 Nov 9 18:39 serial0 -> ttyAMA0
-> This Points to HM/Zwave Dongle
lrwxrwxrwx 1 root root 5 Nov 9 18:39 serial1 -> ttyS0
-> This Points to Bluetooth. Does not work
Configure for Bluetooh (only)
# ssh -l root 192.168.178.87 -p 22222
hassio > login
# vi /mnt/boot/config.txt
SET
#dtoverlay=pi3-miniuart-bt
#enable_uart=1
# reboot
# systemctl status bluetooth-bcm43xx
-> Bluetooth works
# ls -la /dev
lrwxrwxrwx 1 root root 7 Nov 9 19:21 serial1 -> ttyAMA0
-> This Points to Bluetooth
Configure for both
# ssh -l root 192.168.178.87 -p 22222
hassio > login
# vi /mnt/boot/config.txt
SET
#dtoverlay=pi3-miniuart-bt
enable_uart=1
# reboot
# systemctl status bluetooth-bcm43xx
-> Bluetooth works
# ls -la /dev
lrwxrwxrwx 1 root root 5 Nov 9 19:21 serial0 -> ttyS0
-> This Points to HM/Zwave Dongle
lrwxrwxrwx 1 root root 7 Nov 9 19:21 serial1 -> ttyAMA0
-> This Points to Bluetooth
After changing the config, you have to change the zwave hardware device id from /dev/ttyAMA0 to /dev/ttyS0.
This has to be done, because (as you see above) the binding of the serial devices is swapped between /dev/ttyAMA0 and /dev/ttyS0.
Unfortunately the HomeMatic OCCU integration stays broken - but this should not be a matter of hardware accessibility, but a firmware issue.
@greetoz: Are you using 64bit HASSOS ? I had same issue with 64bit HASSOS, also boot issues.
But on 32bit HASSOS it will work. Just try it with another SD card and install 32bit version of HASSOS.
Switched to RasPi4 recently. The old options, pointed out above, do no longer work.
Had to disable bluetooth as i found no other way of enabling UART for OCCU:
dtoverlay=uart1
dtoverlay=disable-bt
Someone an idea of enabling UART without breaking Bluetooth?
Setting BT to miniUART should allow foth BT and GPIO at the same time:
/boot/config.txt:
dtoverlay=miniuart-bt
force_turbo=1
The 1st line switches BT to the miniUART and the 2nd line is needed with miniUART BT to set the VPU core clock to a fixed frequency, this is required based on https://www.raspberrypi.org/documentation/configuration/uart.md / UARTs and Device Tree -section, 3rd chapter.
This works now ok in my setup, BT can find RuuviTags and Z-Wave scanning with the RazBerry2 hat works
I’ve switched force_turbo=1 with core_freq=250 as there were some BT related errors visible in system log. After the switch I have not yet seen any BT errors.
With those configurations I have Home Assistant with RazBerry2 Z-Wave hat and BlueTooth working simultaneously.
Hey, I’ve tried all what you mentioned for my config on rpi4b. I’ve purchased RaspbeeII module and somehow I’ve managed to make it work. Configured also Zigbee Home assistant and detected my ikea switches. But all my Xiaomi BLE thermo&humidity sensor stopped working as they were configured with BT (flashed firm).
I have a Rpi 3b+ and RaspBee I and having the onboard Bluetooth enabled always caused many problems so I turned it off and even the wifi:
dtoverlay=disable-bt
dtoverlay=disable-wifi (I use ethernet cable)
I added an external BT dongle on an extender cable, an old one that is less annoying 4.2 than the latest 5.0 +, and in this way, I can have BT and BLE presence (etc.) and Raspbee work more stable.
I’ve done the same ultimately. Bought an usb dongle for BT and disable BT and wifi internally since I also have it connected via cable and looks like I got some progress but my switches are not working with my hue lights: