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

Error communicating with local bluetooth adapter (RPi3) #30147

Closed
CheeseySandal opened this issue Dec 22, 2019 · 53 comments
Closed

Error communicating with local bluetooth adapter (RPi3) #30147

CheeseySandal opened this issue Dec 22, 2019 · 53 comments

Comments

@CheeseySandal
Copy link

Home Assistant release with the issue:

0.103.2 & 0.103.3

Last working Home Assistant release (if known):
0.103.1

Operating environment (Hass.io/Docker/Windows/etc.):

arch armv7l
dev false
docker true
hassio true
os_name Linux
python_version 3.7.5
timezone Europe/London
version 0.103.3
virtualenv false

Integration:

https://www.home-assistant.io/integrations/device_tracker/

Description of problem:
This might be due the recent upgrade of HassOS to v3 but I don't understand enough about these things!

My bluetooth device trackers are currently all broken and stuck on away. They sometimes work for a while after a reboot, but will fail at some point

Problem-relevant configuration.yaml entries and (fill out even if it seems unimportant):

- platform: bluetooth_tracker
  interval_seconds: 20
  consider_home: 180
  new_device_defaults:
    track_new_devices: false

Traceback (if applicable):

Error looking up Bluetooth device
Traceback (most recent call last):
  File "/usr/local/lib/python3.7/site-packages/bluetooth/bluez.py", line 31, in discover_devices
    lookup_class=lookup_class, device_id=device_id)
_bluetooth.error: (110, 'Operation timed out')

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/components/bluetooth_tracker/device_tracker.py", line 140, in perform_bluetooth_update
    devices = await hass.async_add_executor_job(discover_devices, device_id)
  File "/usr/local/lib/python3.7/concurrent/futures/thread.py", line 57, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/usr/src/homeassistant/homeassistant/components/bluetooth_tracker/device_tracker.py", line 62, in discover_devices
    device_id=device_id,
  File "/usr/local/lib/python3.7/site-packages/bluetooth/bluez.py", line 34, in discover_devices
    raise BluetoothError ("error communicating with local "
bluetooth.btcommon.BluetoothError: error communicating with local bluetooth adapter

Additional information:

@springstan
Copy link
Member

Could be related to this issue #30116

@CheeseySandal
Copy link
Author

I think it might be. Failed to update to 0.103.4. Bluetooth trackers were dead and error communicating with local bluetooth adapter in logs.

Rebooted, bluetooth trackers started working again, updated to 0.103.4 just fine. Just waiting for Bluetooth to die again now.......

@tejminatoj
Copy link

Having the same issue.

@talondnb
Copy link

talondnb commented Dec 30, 2019

This relates to why I'm getting unavailable with my miflora. I've also noticed that this issue came about with 0.103.

Some findings:

  • sensors will remain in Unavailable until a host reboot is performed
  • when attempting to run a bluetooth scan from cli using bluetoothctl > scan on command, returns the following:

image

workaround in cli:

  • running a bluetoothctl > power off, then power on will allow a scan to be performed again although I've not yet verified if the sensors come back online yet, will update when/if this occurs.
    Update: sensors did come back online but I'm anticipating them failing again at some point.

See here for the workaround: https://docs.ubuntu.com/core/en/stacks/bluetooth/bluez/docs/troubleshoot/faq

I'm facing this issue on Hassio 0.103.4 on a Raspberry Pi 3b.

@Iam-lcl
Copy link

Iam-lcl commented Dec 31, 2019

I have this issue too, same error in logs and it repeats hundreds of time..
But I use hass.io 0.101.2 (restored from backup) with HassOS 3.7
RPi 3B

So at this moment I have no bluetooth presence working.

@ghost
Copy link

ghost commented Jan 2, 2020

We use Bluetooth exclusively but ended up installing HACS and this little gem so now we track using both Wifi and Bluetooth until this is fixed

@talondnb
Copy link

Issue still here with 0.103.6.

@nepozs
Copy link

nepozs commented Jan 11, 2020

It looks like a problem with HassOS 3.7 - I've no problems with Bluetooth with versions 0.103.x till OS update… (I've had HassOS 2.12 before and BT was working normal)

@springstan
Copy link
Member

Has anyone tried this with the latest beta release?

@zawasp
Copy link

zawasp commented Jan 12, 2020

Same issue on 0.104.0b3. It works for a few minutes, then I need to reboot the PI.
EDIT: now on HassOS 3.8 / 0.104.0b3, issue is still present.

@Iam-lcl
Copy link

Iam-lcl commented Jan 14, 2020

running HassOS 3.8 and 0.101.2 worked for about 9 hours, at least once.
But is the same with bluetooth errors and then stops working.

@talondnb
Copy link

Same here.

@fahmietalife
Copy link

fahmietalife commented Jan 14, 2020

same here, tried just now with 3.8

@Cooad
Copy link

Cooad commented Jan 18, 2020

Same here, on 0.104.2 and HassOS 3.8.
According to this:
https://wiki.alpinelinux.org/wiki/Raspberry_Pi_3_-_Setting_Up_Bluetooth
and this:
https://www.raspberrypi.org/documentation/configuration/uart.md
the bluetooth adapter in Raspberry Pi 3 is connected to a serial port (/dev/ttyAMA0), and if something else tries to user that serial port, the bluetooth won't work.

Is it possible that something is trying to use this serial port, and that's why bluetooth is failing? I've think I've read (although, I can't find the source now) that somewhere between version 0.90 and 0.100 the docker image of homeassistant switched from using Debian to Alpine as it's base - maybe that image is trying to access console for some reason?

I'm not well versed in Docker or Linux, so I can't really verify anything on my own... I tried modifying the cmdline.txt file, and removing the "console=tty1" part. It didn't help. I also tried disablind the SSH Add-on (based on a wild guess, that it might be using the serial port), but it didn't help either.

@talondnb
Copy link

No traction on this?

@wraith11
Copy link

wraith11 commented Jan 23, 2020

I have the same problem.
I'm on version 0.104.3 on HassOS 3.8.
My setup is HomeMatic with the HM-MOD-RPI-PCB, 3 MiFlora Sensors and a ConBee stick.

It may a problem with the UART's of the Pi 3. For what I now understand the Pi 3 has two UART's. There is the primary UART ttyAMA0 ( a PL011 chip) and the ttyS0 ( miniUART ).
It may relevant that the ttyAMA0 is the better UART. While the miniUART have less performance and the baud rate depends on the core frequency.
According to the instructions for HM-MOD-RPI-PCB you have to set "dtoverlay=pi3-miniuart-bt" in config.txt. For RaspBee the instructions are to set "dtoverlay=pi3-miniuart-bt" and "enable_uart=1".

"dtoverlay=pi3-miniuart-bt" changes the UART used by bluetooth to the miniUART so that ttyAMA0 could provided at GPIOs 14 and 15. But it have now a changing baud rate cause governor changing the core frequency according to the needed performance. Bluetooth don't like a changing baut rate.

"enable_uart=1" enable the mini UART and provide ttyS0 at GPIOs 14 and 15. If I set only the pi3-miniuart-bt flag ttyS0 and ttyAMA0 both working. So I guess that pi3-miniuart-bt sets enable_uart.

According to some websites enable_uart set core_freq=250 what stabilises the baud rate of the mini UART. But everywhere is stated that you should set core_freq=250 manually. Alternatively you could set force_turbo=1 what locks the core frequency to 400MHz and may better the performance of the mini UART.

Most of this information could found here: https://www.raspberrypi.org/documentation/configuration/uart.md

A other thing I discovered is that as I reflashed HassOS with the new version the default config.txt is completly different from the updated HassOS. Relevant?

I discoverd so far that bluetooth work with this set of options in config.txt (at least a 24h testing)

dtoverlay=pi3-miniuart-bt
enable_uart=1
force_turbo=1

And I deleted the console part in the cmdline.txt.
But one of my miFlora wont connect and one disconnects randomly. With core_freq=250 it seems to be more stable but just two of three miFlora connect.

Now I'm testing this settings

enable_uart=1
force_turbo=1

And switched HomeMatic CCU to ttyS0. So bluetooth is on ttyAMA0. That works very well for one hour now.

I really don't know whether this could be a thing, but if I set force_turbo my ConBee stick seems to have problems. I know that the stick uses a own UART over USB. May it is affected from force turbo?

Update:
Forget what I've said about the ConBee Stick. Zigbee network recovered over night.
Bluetooth works well for one day now.

@lucagiove
Copy link

lucagiove commented Jan 25, 2020

Do you have these errors in dmesg?

# dmesg | grep hci0
[ 4736.036216] Bluetooth: hci0: command 0x200c tx timeout
[ 4738.196216] Bluetooth: hci0: command 0x200c tx timeout
[ 4738.200151] Bluetooth: hci0: Frame reassembly failed (-84)
[ 4740.276220] Bluetooth: hci0: command 0x200b tx timeout
[ 8600.449665] Bluetooth: hci0: Frame reassembly failed (-84)
[ 8600.452634] Bluetooth: hci0: Frame reassembly failed (-84)
[ 8602.610650] Bluetooth: hci0: command 0x0406 tx timeout

As far as these appear bluetooth communication is interrupted.
Only solution is systemctl restart bluetooth or a reboot.

@Cooad
Copy link

Cooad commented Jan 27, 2020

I have a lot of errors connected to hci0

[  145.652653] Bluetooth: hci0: Frame reassembly failed (-84)
[  145.656052] Bluetooth: hci0: Frame reassembly failed (-84)
[  146.627061] Bluetooth: hci0: command 0x0419 tx timeout
[  148.707594] Bluetooth: hci0: command 0x040a tx timeout
[  156.948738] Bluetooth: hci0: command 0x0401 tx timeout
[  165.127239] Bluetooth: hci0: Frame reassembly failed (-84)
[  165.127255] Bluetooth: hci0: last event is not cmd complete (0x00)
[  174.035361] Bluetooth: hci0: Frame reassembly failed (-84)
[  176.066547] Bluetooth: hci0: command 0x0419 tx timeout
[  287.941931] Bluetooth: hci0: Frame reassembly failed (-84)
[  289.965130] Bluetooth: hci0: command 0x0419 tx timeout
[  508.930952] Bluetooth: hci0: Frame reassembly failed (-84)
[  508.933443] Bluetooth: hci0: Frame reassembly failed (-84)
[  510.115200] Bluetooth: hci0: command 0x0419 tx timeout
[  512.194902] Bluetooth: hci0: command 0x040a tx timeout
[  513.834128] Bluetooth: hci0: Frame reassembly failed (-84)
[  513.836270] Bluetooth: hci0: Frame reassembly failed (-84)
[  513.838131] Bluetooth: hci0: Frame reassembly failed (-84)
[  515.154349] Bluetooth: hci0: command 0x0419 tx timeout
[  520.913376] Bluetooth: hci0: command 0x0401 tx timeout
[  544.849530] Bluetooth: hci0: last event is not cmd complete (0x00)
[  546.908820] Bluetooth: hci0: command 0x0401 tx timeout
[  548.988483] Bluetooth: hci0: command 0x0419 tx timeout
[  551.867939] Bluetooth: hci0: command 0x0419 tx timeout
[  554.875294] Bluetooth: hci0: Frame reassembly failed (-84)
[  556.907019] Bluetooth: hci0: command 0x0419 tx timeout
[  896.957960] Bluetooth: hci0: Frame reassembly failed (-84)
[  899.001691] Bluetooth: hci0: command 0x0419 tx timeout
[  922.505303] Bluetooth: hci0: Frame reassembly failed (-84)
[  924.519277] Bluetooth: hci0: command 0x0419 tx timeout
[  974.109918] Bluetooth: hci0: Frame reassembly failed (-84)
[  976.120797] Bluetooth: hci0: command 0x0419 tx timeout
[  984.860252] Bluetooth: hci0: Frame reassembly failed (-84)
[  986.925529] Bluetooth: hci0: command 0x0401 tx timeout
[ 1040.264654] Bluetooth: hci0: Frame reassembly failed (-84)
[ 1042.300006] Bluetooth: hci0: command 0x0419 tx timeout
[ 1065.133240] Bluetooth: hci0: Frame reassembly failed (-84)
[ 1067.183060] Bluetooth: hci0: command 0x0419 tx timeout
[ 1105.020547] Bluetooth: hci0: Frame reassembly failed (-84)
[ 1105.022597] Bluetooth: hci0: Frame reassembly failed (-84)
[ 1105.024552] Bluetooth: hci0: Frame reassembly failed (-84)
[ 1105.026699] Bluetooth: hci0: Frame reassembly failed (-84)
[ 1106.305655] Bluetooth: hci0: command 0x0419 tx timeout
[ 1108.385740] Bluetooth: hci0: command 0x040a tx timeout
[ 1116.946030] Bluetooth: hci0: command 0x0401 tx timeout
[ 1125.136400] Bluetooth: hci0: Frame reassembly failed (-84)
[ 1125.138325] Bluetooth: hci0: last event is not cmd complete (0x00)
[ 1261.490200] Bluetooth: hci0: Frame reassembly failed (-84)
[ 1261.492142] Bluetooth: hci0: Frame reassembly failed (-84)
[ 1261.493905] Bluetooth: hci0: Frame reassembly failed (-84)
[ 1261.495568] Bluetooth: hci0: Frame reassembly failed (-84)
[ 1262.467731] Bluetooth: hci0: command 0x0419 tx timeout
[ 1264.547753] Bluetooth: hci0: command 0x040a tx timeout
[ 1272.948006] Bluetooth: hci0: command 0x0401 tx timeout
[ 1281.126035] Bluetooth: hci0: Frame reassembly failed (-84)
[ 1281.126056] Bluetooth: hci0: last event is not cmd complete (0x00)
[ 1288.595478] Bluetooth: hci0: Frame reassembly failed (-84)
[ 1290.628356] Bluetooth: hci0: command 0x0419 tx timeout
[ 1312.128780] Bluetooth: hci0: Frame reassembly failed (-84)
[ 1314.148735] Bluetooth: hci0: command 0x0419 tx timeout
[ 1317.127123] Bluetooth: hci0: Frame reassembly failed (-84)
[ 1319.188799] Bluetooth: hci0: command 0x0419 tx timeout
[ 1338.512137] Bluetooth: hci0: Frame reassembly failed (-84)
[ 1340.548936] Bluetooth: hci0: command 0x0419 tx timeout
[ 1478.884493] Bluetooth: hci0: Frame reassembly failed (-84)
[ 1480.948617] Bluetooth: hci0: command 0x0401 tx timeout
[ 1521.551867] Bluetooth: hci0: Frame reassembly failed (-84)
[ 1523.588145] Bluetooth: hci0: command 0x0419 tx timeout
[ 1545.141810] Bluetooth: hci0: Frame reassembly failed (-84)
[ 1547.187863] Bluetooth: hci0: command 0x0419 tx timeout
[ 1550.141861] Bluetooth: hci0: Frame reassembly failed (-84)
[ 1552.147805] Bluetooth: hci0: command 0x0419 tx timeout
[ 1555.894794] Bluetooth: hci0: Frame reassembly failed (-84)
[ 1557.907752] Bluetooth: hci0: command 0x0401 tx timeout
[ 1755.787230] Bluetooth: hci0: Frame reassembly failed (-84)
[ 1757.826028] Bluetooth: hci0: command 0x0419 tx timeout
[ 1792.906062] Bluetooth: hci0: Frame reassembly failed (-84)
[ 1794.947205] Bluetooth: hci0: command 0x0419 tx timeout
[ 1909.392726] Bluetooth: hci0: Frame reassembly failed (-84)
[ 1911.429562] Bluetooth: hci0: command 0x0419 tx timeout
[ 2089.872468] Bluetooth: hci0: Frame reassembly failed (-84)
[ 2091.910758] Bluetooth: hci0: command 0x0419 tx timeout
[ 2202.916183] Bluetooth: hci0: Frame reassembly failed (-84)
[ 2204.950580] Bluetooth: hci0: command 0x0401 tx timeout
[ 2283.143343] Bluetooth: hci0: Frame reassembly failed (-84)
[ 2285.190254] Bluetooth: hci0: command 0x0419 tx timeout
[ 2449.884643] Bluetooth: hci0: Frame reassembly failed (-84)
[ 2451.909165] Bluetooth: hci0: command 0x0401 tx timeout
[ 2673.740467] Bluetooth: hci0: Frame reassembly failed (-84)
[ 2675.747177] Bluetooth: hci0: command 0x0419 tx timeout
[ 2725.901719] Bluetooth: hci0: Frame reassembly failed (-84)
[ 2725.904113] Bluetooth: hci0: Frame reassembly failed (-84)
[ 2727.186694] Bluetooth: hci0: command 0x0419 tx timeout
[ 2731.442793] Bluetooth: hci0: Frame reassembly failed (-84)
[ 2731.445004] Bluetooth: hci0: Frame reassembly failed (-84)
[ 2731.447239] Bluetooth: hci0: Frame reassembly failed (-84)
[ 2732.946615] Bluetooth: hci0: command 0x0419 tx timeout
[ 2750.946573] Bluetooth: hci0: command 0x0401 tx timeout
[ 2774.893905] Bluetooth: hci0: last event is not cmd complete (0x00)
[ 2776.946709] Bluetooth: hci0: command 0x0401 tx timeout
[ 2779.026738] Bluetooth: hci0: command 0x0419 tx timeout
[ 2781.986788] Bluetooth: hci0: command 0x0419 tx timeout
[ 2784.922187] Bluetooth: hci0: Frame reassembly failed (-84)
[ 2786.946856] Bluetooth: hci0: command 0x0419 tx timeout
[ 2786.949224] Bluetooth: hci0: Frame reassembly failed (-84)
[ 2789.026895] Bluetooth: hci0: command 0x040a tx timeout
[ 2907.968443] Bluetooth: hci0: Frame reassembly failed (-84)
[ 2909.988602] Bluetooth: hci0: command 0x0419 tx timeout
[ 2968.141146] Bluetooth: hci0: Frame reassembly failed (-84)
[ 2970.149225] Bluetooth: hci0: command 0x0419 tx timeout
[ 2990.521038] Bluetooth: hci0: Frame reassembly failed (-84)
[ 2992.549424] Bluetooth: hci0: command 0x0419 tx timeout
[ 3086.897298] Bluetooth: hci0: Frame reassembly failed (-84)
[ 3088.950135] Bluetooth: hci0: command 0x0401 tx timeout
[ 3185.735998] Bluetooth: hci0: Frame reassembly failed (-84)
[ 3187.750554] Bluetooth: hci0: command 0x0419 tx timeout
[ 3357.141626] Bluetooth: hci0: Frame reassembly failed (-84)

After setting enable_uart=1 and force_turbo=1 into config.txt, the number of errors has decreased, but bluetooth still failed after a few hours.

[  710.504518] Bluetooth: hci0: Frame reassembly failed (-84)
[  712.552554] Bluetooth: hci0: command 0x0419 tx timeout
[ 3290.559967] Bluetooth: hci0: command 0x0419 tx timeout
[ 3293.638383] Bluetooth: hci0: Frame reassembly failed (-84)
[ 3293.641113] Bluetooth: hci0: Frame reassembly failed (-84)
[ 3293.642427] Bluetooth: hci0: Frame reassembly failed (-84)
[ 3295.519990] Bluetooth: hci0: command 0x0419 tx timeout
[ 3297.599937] Bluetooth: hci0: command 0x040a tx timeout
[ 3298.761860] Bluetooth: hci0: Frame reassembly failed (-84)
[ 3298.763093] Bluetooth: hci0: Frame reassembly failed (-84)
[ 3298.764270] Bluetooth: hci0: Frame reassembly failed (-84)
[ 3298.946325] Bluetooth: hci0: Frame reassembly failed (-84)
[ 3298.947431] Bluetooth: hci0: Frame reassembly failed (-84)
[ 3298.948471] Bluetooth: hci0: Frame reassembly failed (-84)
[ 3298.949465] Bluetooth: hci0: Frame reassembly failed (-84)
[ 3298.950445] Bluetooth: hci0: Frame reassembly failed (-84)
[ 3300.560037] Bluetooth: hci0: command 0x0419 tx timeout
[ 4169.335473] Bluetooth: hci0: Frame reassembly failed (-84)
[ 4169.336430] Bluetooth: hci0: Frame reassembly failed (-84)
[ 4169.337299] Bluetooth: hci0: Frame reassembly failed (-84)
[ 4169.338091] Bluetooth: hci0: Frame reassembly failed (-84)
[ 4169.338838] Bluetooth: hci0: Frame reassembly failed (-84)
[ 6430.327459] Bluetooth: hci0: Frame reassembly failed (-84)
[ 6432.336066] Bluetooth: hci0: command 0x0419 tx timeout
[12440.163222] Bluetooth: hci0: Frame reassembly failed (-84)
[12440.164674] Bluetooth: hci0: Frame reassembly failed (-84)
[12440.166040] Bluetooth: hci0: Frame reassembly failed (-84)
[12440.167360] Bluetooth: hci0: Frame reassembly failed (-84)
[18000.991635] Bluetooth: hci0: Frame reassembly failed (-84)
[18000.993190] Bluetooth: hci0: Frame reassembly failed (-84)
[18000.994551] Bluetooth: hci0: Frame reassembly failed (-84)
[18000.995850] Bluetooth: hci0: Frame reassembly failed (-84)
[18019.332295] Bluetooth: hci0: command 0x0401 tx timeout
[18043.326494] Bluetooth: hci0: last event is not cmd complete (0x00)
[18045.332401] Bluetooth: hci0: command 0x0401 tx timeout
[18047.412390] Bluetooth: hci0: command 0x0419 tx timeout
[18050.372413] Bluetooth: hci0: command 0x0419 tx timeout
[18053.353911] Bluetooth: hci0: Frame reassembly failed (-84)
[18055.412415] Bluetooth: hci0: command 0x0419 tx timeout
[25842.047343] Bluetooth: hci0: Frame reassembly failed (-84)
[25842.048813] Bluetooth: hci0: Frame reassembly failed (-84)
[25842.050168] Bluetooth: hci0: Frame reassembly failed (-84)
[25842.051461] Bluetooth: hci0: Frame reassembly failed (-84)
[30127.386302] Bluetooth: hci0: Frame reassembly failed (-84)
[30127.387882] Bluetooth: hci0: Frame reassembly failed (-84)
[30127.389317] Bluetooth: hci0: Frame reassembly failed (-84)
[30136.605723] Bluetooth: hci0: Frame reassembly failed (-84)
[30136.607020] Bluetooth: hci0: last event is not cmd complete (0x00)

@lucagiove
Copy link

So here is the original issue probably:
raspberrypi/firmware#1150

@wraith11
Copy link

My bluetooth sadly stopped working today... After reboot I've got only 5 working minutes. So the behavior is like before.

@talondnb
Copy link

talondnb commented Feb 6, 2020

HassOS 3.9 seems to have fixed this issue for me, miflora sensors haven’t failed yet.

@CheeseySandal
Copy link
Author

I re-added my bluetooth device tracking after your message but unfortunately

Error looking up Bluetooth device
Traceback (most recent call last):
  File "/usr/local/lib/python3.7/site-packages/bluetooth/bluez.py", line 31, in discover_devices
    lookup_class=lookup_class, device_id=device_id)
_bluetooth.error: (110, 'Operation timed out')

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/components/bluetooth_tracker/device_tracker.py", line 140, in perform_bluetooth_update
    devices = await hass.async_add_executor_job(discover_devices, device_id)
  File "/usr/local/lib/python3.7/concurrent/futures/thread.py", line 57, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/usr/src/homeassistant/homeassistant/components/bluetooth_tracker/device_tracker.py", line 62, in discover_devices
    device_id=device_id,
  File "/usr/local/lib/python3.7/site-packages/bluetooth/bluez.py", line 34, in discover_devices
    raise BluetoothError ("error communicating with local "
bluetooth.btcommon.BluetoothError: error communicating with local bluetooth adapter

after updating to HassOS 3.9 and 0.105.1 core

@nepozs
Copy link

nepozs commented Feb 7, 2020

Raspberry Pi 3B+
HassOS 3.9 and 0.105.2 still not solved problem - bluetooth just not start

> systemctl status bluetooth 
> Loaded: loaded (/usr/lib/systemd/system/bluetooth.service; enabled; vendor preset: enabled)
> Active: inactive (dead)
> Docs: man:bluetoothd(8)

and bluetoothctl just freezes
even
> systemctl start bluetooth
does not ressolve problem, but changes to
> Active: active (running)
but
bluetoothctl says:
> No default controller available

@homeassistant
Copy link
Contributor

This issue has been mentioned on Home Assistant Community. There might be relevant details there:

https://community.home-assistant.io/t/bluetooth-stops-tracking-in-the-middle-of-the-night/123710/9

@smoke007
Copy link

I continue to keep having this issue with BT tracking crashing with any version of HassOS 3.x on a RP3b. BT tracking is solid on HassOS 2.12. I have a wired network connection and wifi not configured.

To easily roll back to HassOS 2.12, run the following command from SSH.
hassio os update --version 2.12

@Iam-lcl
Copy link

Iam-lcl commented Feb 10, 2020

HassOS 3.10
Supervisor 200
Home Assistant 0.105.2
On a Raspberry Pi 3B

Still having issues.

@vpomax
Copy link

vpomax commented Mar 1, 2020

HassOS 3.11
Supervisor 201
Home Assistant 0.105.5
On a Raspberry Pi 3B

Still having issues.

@Gman1988
Copy link

Is there any update on this ?
I also experience this issue ;/

@jlt24
Copy link

jlt24 commented Mar 25, 2020

Is there any update on this ?
I also experience this issue ;/

Only thing that worked for me was to downgrade to 2.12 as mentioned above.

hassio os update --version 2.12

lucagiove added a commit to lucagiove/operating-system that referenced this issue Mar 25, 2020
This problem is referenced in many different issues, some of them:
Bluetooth: hci0: Frame reassembly failed (-84)
raspberrypi/firmware#1150

Error communicating with local bluetooth adapter (RPi3)
home-assistant/core#30147

Xiaomi BLE Temperature and Humidity sensor no longer working after update from 0.95.4 to .096.5
home-assistant/core#25704

Xiaomi BLE Temperature and Humidity sensor
home-assistant/core#24313 (comment)

Solution seemed to reeduce the boud rate of the serial connection to BT
on rpi3b where flow control is missing.

The patch to the original btuart file is to reduce the baudrate only for
rpi3b models where flow control is missing:

-		$HCIATTACH /dev/serial1 bcm43xx 921600 noflow - $BDADDR
+		$HCIATTACH /dev/serial1 bcm43xx 460800 noflow - $BDADDR

I'm not a buildroot expert but the best way seemed to move the
upstream btuart download in a PRE_PATCH_HOOK so that standard
buildroot way of patching can be applied.
lucagiove added a commit to lucagiove/operating-system that referenced this issue Mar 25, 2020
This problem is referenced in many different issues, some of them:
Bluetooth: hci0: Frame reassembly failed (-84)
raspberrypi/firmware#1150

Error communicating with local bluetooth adapter (RPi3)
home-assistant/core#30147

Xiaomi BLE Temperature and Humidity sensor no longer working after update from 0.95.4 to .096.5
home-assistant/core#25704

Xiaomi BLE Temperature and Humidity sensor
home-assistant/core#24313 (comment)

Solution seemed to reeduce the boud rate of the serial connection to BT
on rpi3b where flow control is missing.

The patch to the original btuart file is to reduce the baudrate only for
rpi3b models where flow control is missing:

-		$HCIATTACH /dev/serial1 bcm43xx 921600 noflow - $BDADDR
+		$HCIATTACH /dev/serial1 bcm43xx 460800 noflow - $BDADDR

I'm not a buildroot expert but the best way seemed to move the
upstream btuart download in a PRE_PATCH_HOOK so that standard
buildroot way of patching can be applied.
@olapettersson
Copy link

I ended up upgrading to RPi4b, for other reasons, and that "solved" this problem for me.

@craigcarps
Copy link

I ended up upgrading to RPi4b, for other reasons, and that "solved" this problem for me.

Great to know that a raspberry pi 4 works with the new Bluetooth libraries. Did you find any new issues / capability problems with the raspberry pi 4 (eg with other hardware links or integrations?)

@olapettersson
Copy link

No, not at all. Everything works perfectly with the RPi4, and I push it quite hard (Hassio, Node-RED, NGINX rev. proxy, AdGuard, MariaDB, several MB of config, loads of template sensors, and so on). A problem with the RPi3 that was a bit annoying, was that restarting Home Assistant didn't work; I had to restart the host (reboot). Trying a restart of Hone Assistant from the GUI always resulted in hanging just before the startup was finished. Never figured out why. This too went away with changing to RPi4, without changing anything in the config. I just flashed the 32-bit image for RPi4 onto a new MicroSD, installed Samba, uploaded my latest config and made a "Wipe & Restore".

The only HW-problem you might face is if you use a Aeotec Z-Stick, because it does not comply properly with the USB-standard, which creates problems on USB3. It does not help plugging it into one of the USB2-ports on the RPi4, but you need to get a little USB2-hub (NOT USB3), which acts as an isolator for the non-compliant USB-signalling going on with the Z-Stick at startup.

pvizeli pushed a commit to home-assistant/operating-system that referenced this issue Mar 31, 2020
This problem is referenced in many different issues, some of them:
Bluetooth: hci0: Frame reassembly failed (-84)
raspberrypi/firmware#1150

Error communicating with local bluetooth adapter (RPi3)
home-assistant/core#30147

Xiaomi BLE Temperature and Humidity sensor no longer working after update from 0.95.4 to .096.5
home-assistant/core#25704

Xiaomi BLE Temperature and Humidity sensor
home-assistant/core#24313 (comment)

Solution seemed to reeduce the boud rate of the serial connection to BT
on rpi3b where flow control is missing.

The patch to the original btuart file is to reduce the baudrate only for
rpi3b models where flow control is missing:

-		$HCIATTACH /dev/serial1 bcm43xx 921600 noflow - $BDADDR
+		$HCIATTACH /dev/serial1 bcm43xx 460800 noflow - $BDADDR

I'm not a buildroot expert but the best way seemed to move the
upstream btuart download in a PRE_PATCH_HOOK so that standard
buildroot way of patching can be applied.
@lucagiove
Copy link

Hi all, I've just finished to install on my rpi3b an image I've built with a possible fix.
Below the link to the image, any help in testing and feedback is much appreciated:
https://drive.google.com/open?id=1ue0tELFgTZys-_KRs9CSZoq9bhUx9OYF

It's an unofficial version built from development branch.

@wraith11
Copy link

wraith11 commented Apr 3, 2020

I've installed your image and it's working so far. But it usually works a few days after reflashing any image. So I will report then again.

@lucagiove
Copy link

thank you @wraith11 for your help let me know!!
My raspy is working since 2 days ago so far so good!

@teamsuperpanda
Copy link

We running:
HassOS 3.12
Supervisor 214
Home Assistant 0.107.4

On a Pi 4. Using the bluetooth to track our iPhones and only get "home" / "away" alternating throughout the day. Have been following various threads with no luck. Though upgrading to the latest might have a firmware fix. See people are having luck with the Pi 4?
I did but that was almost 6 months ago.

pvizeli pushed a commit to home-assistant/operating-system that referenced this issue Apr 15, 2020
This problem is referenced in many different issues, some of them:
Bluetooth: hci0: Frame reassembly failed (-84)
raspberrypi/firmware#1150

Error communicating with local bluetooth adapter (RPi3)
home-assistant/core#30147

Xiaomi BLE Temperature and Humidity sensor no longer working after update from 0.95.4 to .096.5
home-assistant/core#25704

Xiaomi BLE Temperature and Humidity sensor
home-assistant/core#24313 (comment)

Solution seemed to reeduce the boud rate of the serial connection to BT
on rpi3b where flow control is missing.

The patch to the original btuart file is to reduce the baudrate only for
rpi3b models where flow control is missing:

-		$HCIATTACH /dev/serial1 bcm43xx 921600 noflow - $BDADDR
+		$HCIATTACH /dev/serial1 bcm43xx 460800 noflow - $BDADDR

I'm not a buildroot expert but the best way seemed to move the
upstream btuart download in a PRE_PATCH_HOOK so that standard
buildroot way of patching can be applied.
@Iam-lcl
Copy link

Iam-lcl commented Apr 19, 2020

I have been running 3.13 now for a day and for me it has been working without any issue, no error logs, no dropout of bluetooth.
I would say 3.13 has fixed this issue.

HassOS 3.13
Raspberry PI 3B
Supervisor 217
Home Assistant 0.108.6

@nepozs
Copy link

nepozs commented Apr 19, 2020

In the meantime, I've migrated to the amd64 platform, but I specifically implemented an additional Raspberry HA installation to confirm this patch, so I can also confirm working fix in version 3.13, but on different hardware: RPi 3B+
The equipment only works for 2 days, but for now without any errors.

HassOS 3.13
Raspberry Pi 3B+
Supervisor 217
Home Assistant 0.108.x (now with the last update to 0.108.6)

@wraith11
Copy link

Okay, since I have @lucagiove 's unofficial build running I had a few bluetooth problems. But they always gone after a reboot. I might have too much going on on my bluetooth device.
So I guess it works well. A few days ago I updated to the official OS 3.13 and got no problems so far. I would say the problem is fixed.

@lucagiove
Copy link

Same for me, I'm glad to say that it seems I managed to fix this.

@smoke007
Copy link

Same here, I would agree that it looks like the bluetooth issue has been fixed with 3.13 for RP3B after running it for a few days. Thank you!!

HassOS 3.13
Raspberry PI 3B
Supervisor 217
Home Assistant 0.108.5

@lorisbc
Copy link

lorisbc commented Apr 22, 2020

Same ! Issue seems to be fixed with OS 3.13 on my RP3B.

@CheeseySandal
Copy link
Author

I've upgraded to a rpi4 since I opened this issue, so can't comment personally, but thank you very much @lucagiove

@pilot1981
Copy link

same issue here in 0.116.4

@StreetGuru
Copy link

I'm also facing this issue since the last HassOS update to 4.14

@lorisbc
Copy link

lorisbc commented Oct 21, 2020

You can revert to 4.13 with ha os update --version 4.13
This issue will be fixed in 4.15 -> home-assistant/operating-system#910

@Gelisob
Copy link

Gelisob commented Oct 28, 2020

You can revert to 4.13 with ha os update --version 4.13
This issue will be fixed in 4.15 -> home-assistant/operating-system#910

core 0.116.2 here, my system was indeed on 4.14 and update to 4.15 finally ended/solved this "Error during Bluetooth LE scan: No BLE adapter found" issue. (tagging for search) Thanks for information and fix!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests