question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Multiple Bluetooth and hci errors

See original GitHub issue

I recently updated Rasbian and am now seeing multiple errors and unstable hci interface. These errors only occur when the ble_monitor is running.

I was running the older (original passive) mitemp_ble (which was stable) when I updated and I saw the errors immediately on Raspbian update. I then updated to ble_monitor and I still see the errors.

I also suffer from the issue of the internal/external Bletooth device issue documented here. https://www.raspberrypi.org/forums/viewtopic.php?f=28&t=282948#p1713622

I am seeing lots of hci errors when trying to read Bluetooth data. the hci interfaces crash regularly.

Selection of syslog errors.

Feb 07 06:49:15 hassio kernel: Bluetooth: hci0: advertising data len corrected 18 -> 3
Feb 07 06:49:15 hassio kernel: Bluetooth: hci0: hardware error 0x00
Feb 07 06:49:15 hassio kernel: debugfs: File 'force_bredr_smp' in directory 'hci0' already present!
Feb 07 06:49:28 hassio kernel: Bluetooth: hci1: advertising data len corrected 17 -> 14
Feb 07 06:49:28 hassio kernel: Bluetooth: hci1: Received unexpected HCI Event 00000000

Feb 07 06:51:33 hassio kernel: Bluetooth: hci1: Received unexpected HCI Event 00000000
Feb 07 06:51:33 hassio kernel: Bluetooth: hci1: Received unexpected HCI Event 00000000
Feb 07 06:51:33 hassio kernel: Bluetooth: hci1: hardware error 0x00
Feb 07 06:51:33 hassio kernel: debugfs: File 'force_bredr_smp' in directory 'hci1' already present!
Feb 07 06:51:48 hassio kernel: Bluetooth: hci0: advertising data len corrected 28 -> 4
Feb 07 06:51:48 hassio kernel: Bluetooth: hci0: Received unexpected HCI Event 00000000
Feb 07 06:51:48 hassio kernel: Bluetooth: hci0: Received unexpected HCI Event 00000000
Feb 07 06:51:48 hassio kernel: Bluetooth: hci0: Received unexpected HCI Event 00000000
Feb 07 06:51:48 hassio kernel: Bluetooth: hci0: Received unexpected HCI Event 00000000
Feb 07 06:51:49 hassio kernel: Bluetooth: hci0: Received unexpected HCI Event 00000000
Feb 07 06:51:49 hassio kernel: Bluetooth: hci0: Received unexpected HCI Event 00000000
Feb 07 06:51:49 hassio kernel: Bluetooth: hci0: Received unexpected HCI Event 00000000
Feb 07 06:51:49 hassio kernel: Bluetooth: hci0: Received unexpected HCI Event 00000000
Feb 07 06:51:49 hassio kernel: Bluetooth: hci0: Received unexpected HCI Event 00000000
Feb 07 06:51:49 hassio kernel: Bluetooth: hci0: Received unexpected HCI Event 00000000
Feb 07 06:51:50 hassio kernel: Bluetooth: hci0: hardware error 0x03
Feb 07 06:51:50 hassio kernel: debugfs: File 'force_bredr_smp' in directory 'hci0' already present!
Feb 07 06:52:07 hassio kernel: Bluetooth: hci0: hardware error 0x00
Feb 07 06:52:08 hassio kernel: debugfs: File 'force_bredr_smp' in directory 'hci0' already present!
Feb 07 06:52:19 hassio kernel: Bluetooth: hci1: advertising data len corrected 28 -> 4
Feb 07 06:52:19 hassio kernel: Bluetooth: hci1: Received unexpected HCI Event 00000000
Feb 07 06:52:19 hassio kernel: Bluetooth: hci1: Received unexpected HCI Event 00000000
Feb 07 06:52:19 hassio kernel: Bluetooth: hci1: Received unexpected HCI Event 00000000
Feb 07 06:52:19 hassio kernel: Bluetooth: hci1: Received unexpected HCI Event 00000000
Feb 07 06:52:19 hassio kernel: Bluetooth: hci1: Received unexpected HCI Event 00000000
Feb 07 06:52:19 hassio kernel: Bluetooth: hci1: Received unexpected HCI Event 00000000
Feb 07 06:52:19 hassio kernel: Bluetooth: hci1: Received unexpected HCI Event 00000000
Feb 07 06:52:19 hassio kernel: Bluetooth: hci1: Received unexpected HCI Event 00000000
Feb 07 06:52:19 hassio kernel: Bluetooth: hci1: Received unexpected HCI Event 00000000
Feb 07 06:52:28 hassio kernel: Bluetooth: hci1: Received unexpected HCI Event 00000000
Feb 07 06:52:28 hassio kernel: Bluetooth: hci1: Received unexpected HCI Event 00000000
Feb 07 06:52:28 hassio kernel: Bluetooth: hci1: Received unexpected HCI Event 00000000
Feb 07 06:52:28 hassio kernel: Bluetooth: hci1: Received unexpected HCI Event 00000000
Feb 07 06:52:28 hassio kernel: Bluetooth: hci1: Received unexpected HCI Event 00000000
Feb 07 06:52:28 hassio kernel: Bluetooth: hci1: Received unexpected HCI Event 00000000
Feb 07 06:52:28 hassio kernel: Bluetooth: hci1: Received unexpected HCI Event 00000000
Feb 07 06:52:28 hassio kernel: Bluetooth: hci1: Received unexpected HCI Event 00000000
Feb 07 06:52:28 hassio kernel: Bluetooth: hci1: Received unexpected HCI Event 00000000
Feb 07 06:52:28 hassio kernel: Bluetooth: hci1: Received unexpected HCI Event 00000000
Feb 07 06:52:28 hassio kernel: Bluetooth: hci1: hardware error 0x37
Feb 07 06:52:28 hassio kernel: debugfs: File 'force_bredr_smp' in directory 'hci1' already present!
Feb 07 06:53:02 hassio kernel: Bluetooth: hci1: advertising data len corrected 18 -> 3
Feb 07 06:53:02 hassio kernel: Bluetooth: hci1: hardware error 0x03
Feb 07 06:53:02 hassio kernel: debugfs: File 'force_bredr_smp' in directory 'hci1' already present!
Feb 07 06:54:18 hassio apcupsd[612]: Communications with UPS lost.
Feb 07 06:54:44 hassio kernel: Bluetooth: hci1: Received unexpected HCI Event 00000000
Feb 07 06:54:44 hassio kernel: Bluetooth: hci1: Received unexpected HCI Event 00000000
Feb 07 06:54:44 hassio kernel: Bluetooth: hci1: Received unexpected HCI Event 00000000
Feb 07 06:54:44 hassio kernel: Bluetooth: hci1: Received unexpected HCI Event 00000000
Feb 07 06:54:44 hassio kernel: Bluetooth: hci1: Received unexpected HCI Event 00000000
Feb 07 06:54:44 hassio kernel: Bluetooth: hci1: Received unexpected HCI Event 00000000
Feb 07 06:54:44 hassio kernel: Bluetooth: hci1: Received unexpected HCI Event 00000000
Feb 07 06:54:47 hassio kernel: Bluetooth: hci1: advertising data len corrected 28 -> 4
Feb 07 06:54:47 hassio kernel: Bluetooth: hci1: Received unexpected HCI Event 00000000
Feb 07 06:54:47 hassio kernel: Bluetooth: hci1: Received unexpected HCI Event 00000000
Feb 07 06:54:47 hassio kernel: Bluetooth: hci1: Received unexpected HCI Event 00000000
Feb 07 06:54:47 hassio kernel: Bluetooth: hci1: Received unexpected HCI Event 00000000
Feb 07 06:54:47 hassio kernel: Bluetooth: hci1: Received unexpected HCI Event 00000000
Feb 07 06:54:47 hassio kernel: Bluetooth: hci1: Received unexpected HCI Event 00000000

Feb 07 07:00:01 hassio kernel: Bluetooth: hci1: command 0x040a tx timeout
Feb 07 07:00:15 hassio kernel: Bluetooth: hci0: hardware error 0x76
Feb 07 07:00:15 hassio kernel: debugfs: File 'force_bredr_smp' in directory 'hci0' already present!

HA Log

2021-02-07 06:49:49 DEBUG (MainThread) [custom_components.ble_monitor.binary_sensor] 0 MiBeacon BLE ADV messages processed for 0 binary sensor device(s) total. Priority queue = 0
2021-02-07 06:50:00 DEBUG (MainThread) [custom_components.ble_monitor.sensor] 50 MiBeacon BLE ADV messages processed for 5 measuring device(s).
2021-02-07 06:50:00 DEBUG (Thread-2881) [custom_components.ble_monitor] HCIdump thread: main event_loop stopped, finishing
2021-02-07 06:50:00 DEBUG (Thread-2881) [custom_components.ble_monitor] HCIdump thread: Scanning will be restarted
2021-02-07 06:50:00 DEBUG (Thread-2881) [custom_components.ble_monitor] 883 HCI events processed for previous period.
2021-02-07 06:50:00 DEBUG (Thread-2881) [custom_components.ble_monitor] HCIdump thread: Run
2021-02-07 06:50:00 DEBUG (Thread-2881) [custom_components.ble_monitor] HCIdump thread: connected to hci0
2021-02-07 06:50:00 DEBUG (Thread-2881) [custom_components.ble_monitor] HCIdump thread: connected to hci1
2021-02-07 06:50:00 DEBUG (Thread-2881) [custom_components.ble_monitor] HCIdump thread: start main event_loop
2021-02-07 06:50:02 DEBUG (Recorder) [homeassistant.components.recorder] Sending keepalive
2021-02-07 06:50:32 DEBUG (Recorder) [homeassistant.components.recorder] Sending keepalive
2021-02-07 06:50:49 DEBUG (MainThread) [custom_components.ble_monitor.binary_sensor] 0 MiBeacon BLE ADV messages processed for 0 binary sensor device(s) total. Priority queue = 0
2021-02-07 06:51:00 DEBUG (MainThread) [custom_components.ble_monitor.sensor] 80 MiBeacon BLE ADV messages processed for 5 measuring device(s).
2021-02-07 06:51:00 DEBUG (Thread-2881) [custom_components.ble_monitor] HCIdump thread: main event_loop stopped, finishing
2021-02-07 06:51:00 DEBUG (Thread-2881) [custom_components.ble_monitor] HCIdump thread: Scanning will be restarted
2021-02-07 06:51:00 DEBUG (Thread-2881) [custom_components.ble_monitor] 1629 HCI events processed for previous period.
2021-02-07 06:51:00 DEBUG (Thread-2881) [custom_components.ble_monitor] HCIdump thread: Run
2021-02-07 06:51:00 DEBUG (Thread-2881) [custom_components.ble_monitor] HCIdump thread: connected to hci0
2021-02-07 06:51:00 DEBUG (Thread-2881) [custom_components.ble_monitor] HCIdump thread: connected to hci1
2021-02-07 06:51:00 DEBUG (Thread-2881) [custom_components.ble_monitor] HCIdump thread: start main event_loop
2021-02-07 06:51:02 DEBUG (Recorder) [homeassistant.components.recorder] Sending keepalive
2021-02-07 06:51:32 DEBUG (Recorder) [homeassistant.components.recorder] Sending keepalive
2021-02-07 06:51:49 DEBUG (MainThread) [custom_components.ble_monitor.binary_sensor] 0 MiBeacon BLE ADV messages processed for 0 binary sensor device(s) total. Priority queue = 0
2021-02-07 06:52:00 DEBUG (MainThread) [custom_components.ble_monitor.sensor] 75 MiBeacon BLE ADV messages processed for 5 measuring device(s).
2021-02-07 06:52:00 DEBUG (Thread-2881) [custom_components.ble_monitor] HCIdump thread: main event_loop stopped, finishing
2021-02-07 06:52:00 DEBUG (Thread-2881) [custom_components.ble_monitor] HCIdump thread: Scanning will be restarted
2021-02-07 06:52:00 DEBUG (Thread-2881) [custom_components.ble_monitor] 1645 HCI events processed for previous period.
2021-02-07 06:52:00 DEBUG (Thread-2881) [custom_components.ble_monitor] HCIdump thread: Run
2021-02-07 06:52:00 DEBUG (Thread-2881) [custom_components.ble_monitor] HCIdump thread: connected to hci0
2021-02-07 06:52:00 DEBUG (Thread-2881) [custom_components.ble_monitor] HCIdump thread: connected to hci1
2021-02-07 06:52:00 DEBUG (Thread-2881) [custom_components.ble_monitor] HCIdump thread: start main event_loop
2021-02-07 06:52:02 DEBUG (Recorder) [homeassistant.components.recorder] Sending keepalive
2021-02-07 06:52:32 DEBUG (Recorder) [homeassistant.components.recorder] Sending keepalive
2021-02-07 06:52:49 DEBUG (MainThread) [custom_components.ble_monitor.binary_sensor] 0 MiBeacon BLE ADV messages processed for 0 binary sensor device(s) total. Priority queue = 0
2021-02-07 06:53:01 DEBUG (Thread-2881) [custom_components.ble_monitor] HCIdump thread: main event_loop stopped, finishing
2021-02-07 06:53:01 DEBUG (MainThread) [custom_components.ble_monitor.sensor] 44 MiBeacon BLE ADV messages processed for 5 measuring device(s).
2021-02-07 06:53:01 DEBUG (Thread-2881) [custom_components.ble_monitor] HCIdump thread: Scanning will be restarted
2021-02-07 06:53:01 DEBUG (Thread-2881) [custom_components.ble_monitor] 787 HCI events processed for previous period.
2021-02-07 06:53:01 DEBUG (Thread-2881) [custom_components.ble_monitor] HCIdump thread: Run
2021-02-07 06:53:01 DEBUG (Thread-2881) [custom_components.ble_monitor] HCIdump thread: connected to hci0
2021-02-07 06:53:01 DEBUG (Thread-2881) [custom_components.ble_monitor] HCIdump thread: connected to hci1
2021-02-07 06:53:01 DEBUG (Thread-2881) [custom_components.ble_monitor] HCIdump thread: start main event_loop
2021-02-07 06:53:02 DEBUG (Recorder) [homeassistant.components.recorder] Sending keepalive
2021-02-07 06:53:32 DEBUG (Recorder) [homeassistant.components.recorder] Sending keepalive
2021-02-07 06:53:49 DEBUG (MainThread) [custom_components.ble_monitor.binary_sensor] 0 MiBeacon BLE ADV messages processed for 0 binary sensor device(s) total. Priority queue = 0
2021-02-07 06:54:02 DEBUG (Recorder) [homeassistant.components.recorder] Sending keepalive
2021-02-07 06:54:02 DEBUG (MainThread) [custom_components.ble_monitor.sensor] 39 MiBeacon BLE ADV messages processed for 5 measuring device(s).
2021-02-07 06:54:02 DEBUG (Thread-2881) [custom_components.ble_monitor] HCIdump thread: main event_loop stopped, finishing
2021-02-07 06:54:02 DEBUG (Thread-2881) [custom_components.ble_monitor] HCIdump thread: Scanning will be restarted
2021-02-07 06:54:02 DEBUG (Thread-2881) [custom_components.ble_monitor] 1038 HCI events processed for previous period.
2021-02-07 06:54:02 DEBUG (Thread-2881) [custom_components.ble_monitor] HCIdump thread: Run
2021-02-07 06:54:02 DEBUG (Thread-2881) [custom_components.ble_monitor] HCIdump thread: connected to hci0
2021-02-07 06:54:02 DEBUG (Thread-2881) [custom_components.ble_monitor] HCIdump thread: connected to hci1
2021-02-07 06:54:02 DEBUG (Thread-2881) [custom_components.ble_monitor] HCIdump thread: start main event_loop
2021-02-07 06:54:32 DEBUG (Recorder) [homeassistant.components.recorder] Sending keepalive
2021-02-07 06:54:50 DEBUG (MainThread) [custom_components.ble_monitor.binary_sensor] 0 MiBeacon BLE ADV messages processed for 0 binary sensor device(s) total. Priority queue = 0
2021-02-07 06:55:02 DEBUG (Recorder) [homeassistant.components.recorder] Sending keepalive
2021-02-07 06:55:03 DEBUG (Thread-2881) [custom_components.ble_monitor] HCIdump thread: main event_loop stopped, finishing
2021-02-07 06:55:03 DEBUG (MainThread) [custom_components.ble_monitor.sensor] 116 MiBeacon BLE ADV messages processed for 5 measuring device(s).
2021-02-07 06:55:03 DEBUG (Thread-2881) [custom_components.ble_monitor] HCIdump thread: Scanning will be restarted
2021-02-07 06:55:03 DEBUG (Thread-2881) [custom_components.ble_monitor] 2201 HCI events processed for previous period.
2021-02-07 06:55:03 DEBUG (Thread-2881) [custom_components.ble_monitor] HCIdump thread: Run
2021-02-07 06:55:03 DEBUG (Thread-2881) [custom_components.ble_monitor] HCIdump thread: connected to hci0
2021-02-07 06:55:03 DEBUG (Thread-2881) [custom_components.ble_monitor] HCIdump thread: connected to hci1
2021-02-07 06:55:03 DEBUG (Thread-2881) [custom_components.ble_monitor] HCIdump thread: start main event_loop
2021-02-07 06:55:32 DEBUG (Recorder) [homeassistant.components.recorder] Sending keepalive
2021-02-07 06:55:50 DEBUG (MainThread) [custom_components.ble_monitor.binary_sensor] 0 MiBeacon BLE ADV messages processed for 0 binary sensor device(s) total. Priority queue = 0

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:28

github_iconTop GitHub Comments

1reaction
borpincommented, Feb 12, 2021

Well that is the solution. How on earth the packages get deleted on upgrade!

It has been rock solid for 12 hours.

Thanks for your support and help @Ernst79 and keep up the good work 😄

1reaction
Ernst79commented, Feb 9, 2021

I don’t have any hold back packages.

~ $ uname -a
Linux raspberrypi4 5.10.14-v7l+ #1401 SMP Mon Feb 8 14:27:07 GMT 2021 armv7l GNU/Linux

I did a dist upgrade yesterday to see if it would fix my issues, but that didn’t help.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Linux/WL1835MOD: HCI Hardware Error with multiple BT LE ...
I'm using WL1835MOD to provide BT LE 6LoWPAN connectivity to multiple Zephyr (Cortex-M4) devices, but quite often getting HCI Hardware Errors ...
Read more >
[Solved] Bluetooth down and hciconfig hci0 up timeout
I've tried googling the error codes and haven't come up with anything that works. Most suggestions are to make sure the device is...
Read more >
HCI Layer Tutorial
The objective of the HCI UART Transport Layer is to make it possible to use the Bluetooth HCI over a serial interface between...
Read more >
Bluetooth for Programmers - People
2. Bluetooth programming with Python - PyBluez. ... 3.5.2. HCI sockets . ... time limit, then the connection is terminated and an error...
Read more >
HCI Requirements | Android Open Source Project
This document provides a list of Bluetooth (BT) and Bluetooth Low Energy ... See Bluetooth Spec [Vol 2] Part D, Error Codes for...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found