Skip to content

[Bug]: Raspberry PI 3 - HCIdump thread: Something wrong - interface hci0 not ready, and will be skipped for current scan period.  #1276

Open
@EndermanAPM

Description

@EndermanAPM

What happened?

Every time I boot, the bluetooth works for some time until it doesn't. Doing a full reboot fixes it for some time.
I observed that some versions of HA seem to have longer intervals between flatlines. Right now I'm rebooting twice a day at least.
Also I'm running standard Home Assistant OS with no tinkering.

Sensor type

No response

Relevant log output

2023-12-20 14:49:14.342 ERROR (Thread-3) [custom_components.ble_monitor] HCIdump thread: Something wrong - interface hci0 not ready, and will be skipped for current scan period.
2023-12-20 14:49:14.351 ERROR (Thread-3) [custom_components.ble_monitor] HCIdump thread: Trying to power cycle Bluetooth adapter hci0 xx:xx:xx..., will try to use it next scan period.

Activity

perseus177

perseus177 commented on Jan 4, 2024

@perseus177

Hello I have same problem

Added logs

Logger: custom_components.ble_monitor
Source: custom_components/ble_monitor/__init__.py:654
Integration: Passive BLE monitor (documentation, issues)
First occurred: 08:09:16 (1 occurrences)
Last logged: 08:09:16

HCIdump thread: Something wrong - interface hci0 not ready, and will be skipped for current scan period.
Logger: custom_components.ble_monitor
Source: custom_components/ble_monitor/__init__.py:692
Integration: Passive BLE monitor (documentation, issues)
First occurred: 08:09:16 (1 occurrences)
Last logged: 08:09:16

HCIdump thread: Trying to power cycle Bluetooth adapter hci0 B8:27:EB:54:C2:54, will try to use it next scan period
Logger: homeassistant.components.bluetooth.scanner
Source: components/bluetooth/scanner.py:386
Integration: Bluetooth (documentation, issues)
First occurred: 08:10:59 (2 occurrences)
Last logged: 08:12:59

hci0 (B8:27:EB:54:C2:54): Error stopping scanner: [org.bluez.Error.InProgress] Operation already in progress
Logger: bluetooth_auto_recovery.recover
Source: components/bluetooth/util.py:78
First occurred: 08:13:04 (1 occurrences)
Last logged: 08:13:04

Could not reset the power state of the Bluetooth adapter hci0 [B8:27:EB:54:C2:54] due to timeout after 5 seconds

Hardware
LYWSD03MMC
Xiaomi
Firmware: Xiaomi (MiBeacon V3)

RPI3 - Bluetooth (integrated on RPI)
Firmware: rpi3-20230612
Hardware: usb:v1D6Bp0246d0542
Bluetooth: B8:27:EB:54:C2:54

System Information

version core-2023.12.4
installation_type Home Assistant Supervised
dev false
hassio true
docker true
user root
virtualenv false
python_version 3.11.6
os_name Linux
os_version 6.1.0-12-arm64
arch aarch64
timezone Europe/Budapest
config_dir /config
Home Assistant Community Store
GitHub API ok
GitHub Content ok
GitHub Web ok
GitHub API Calls Remaining 5000
Installed Version 1.33.0
Stage running
Available Repositories 1365
Downloaded Repositories 7
Home Assistant Cloud
logged_in false
can_reach_cert_server ok
can_reach_cloud_auth ok
can_reach_cloud ok
Home Assistant Supervisor
host_os Debian GNU/Linux 12 (bookworm)
update_channel stable
supervisor_version supervisor-2023.12.0
agent_version 1.6.0
docker_version 24.0.7
disk_total 116.9 GB
disk_used 8.6 GB
healthy failed to load: Unhealthy
supported failed to load: Unsupported
supervisor_api ok
version_api ok
installed_addons File editor (5.7.0), Advanced SSH & Web Terminal (17.0.1), Zigbee2MQTT (1.33.1-1), Mosquitto broker (6.3.1)
Dashboards
dashboards 1
resources 4
views 6
mode yaml
Recorder
oldest_recorder_run 29. decembra 2023 o 14:40
current_recorder_run 2. januára 2024 o 23:28
estimated_db_size 143.24 MiB
database_engine sqlite
database_version 3.41.2
Ernst79

Ernst79 commented on Jan 23, 2024

@Ernst79
Collaborator

Try to enable active scan for BLE monitor, if you use passive scanning right now. Or the other way around if you use active scanning right now (if your sensor don’t require active scanning of course).

The aim of this is to make BLE monitor to use the same type of scanning mode as the Bluetooth integration. HA doesn’t like two different scanning modes, as it would have to switch back and forth, which can cause issues like you observe.

perseus177

perseus177 commented on Apr 22, 2024

@perseus177

Currently I have enabled Active Scan with problems.
I will try to disable Active Scan and I will go back with result

perseus177

perseus177 commented on Apr 22, 2024

@perseus177

@Ernst79, change active scan did not help

2024-04-22 18:13:23.695 ERROR (Thread-3) [custom_components.ble_monitor] HCIdump thread: Something wrong - interface hci0 not ready, and will be skipped for current scan period.
2024-04-22 18:14:25.164 ERROR (Thread-3) [custom_components.ble_monitor] HCIdump thread: Something wrong - interface hci0 not ready, and will be skipped for current scan period.
2024-04-22 18:14:25.165 ERROR (Thread-3) [custom_components.ble_monitor] HCIdump thread: Trying to power cycle Bluetooth adapter hci0 B8:27:EB:54:C2:54, will try to use it next scan period.
2024-04-22 18:14:25.177 WARNING (Thread-3) [custom_components.ble_monitor.bt_helpers] Current power state of bluetooth adapter hci0 is OFF, trying to turn it back ON.
2024-04-22 18:14:28.308 WARNING (Thread-3) [custom_components.ble_monitor.bt_helpers] Bluetooth adapter hci0 successfully turned back ON.
2024-04-22 22:11:53.811 ERROR (Thread-197) [custom_components.ble_monitor] HCIdump thread: Something wrong - interface hci0 not ready, and will be skipped for current scan period.
2024-04-22 22:11:53.813 ERROR (Thread-197) [custom_components.ble_monitor] HCIdump thread: Trying to power cycle Bluetooth adapter hci0 B8:27:EB:54:C2:54, will try to use it next
perseus177

perseus177 commented on May 15, 2024

@perseus177

Any update ?

EndermanAPM

EndermanAPM commented on May 15, 2024

@EndermanAPM
Author

I "fixed" the issue by upgrading to a Pi5. So perhaps it's a hardware issue with the PI3?

perseus177

perseus177 commented on May 16, 2024

@perseus177

Hi @EndermanAPM I have also RPI4 in second flat and it is working without problem, but fix the issue as buy different hardware is not a fix. This issue has in name and description that problem is only o RPI3

EndermanAPM

EndermanAPM commented on May 16, 2024

@EndermanAPM
Author

Hi @perseus177 I know that, I'm the OP! 😄 But perhaps eliminating variables can help the project maintainer pinpoint the issue?
Now we know that the PI4/5 works fine, and I've heard that the PI3 with an external BT adapter works just fine. So at least we can be pretty sure it has something to do with the build in BT adapter of the Pi3.

p.s. Looking back, my comment perhaps was poorly worded and I apologize.

CloCkWeRX

CloCkWeRX commented on Feb 7, 2025

@CloCkWeRX
Contributor

Suggestion, downgrade this to a warning rather than error.
Also seeing this on a HP mini device, so it's more about the hardware/not much this integration can "fix"

LeoColman

LeoColman commented on Apr 14, 2025

@LeoColman

I confirm that I am also getting this problem.

It seems to happen when more computing is going on with the PI, and the adapter never comes back up (even with 'restart on failures' enabled). I'm using an external Logitech Bluetooth Dongle.

Same flatline after a few hours (sometimes minutes) booting

This wasn't happening 6~ months ago. Same hardware.


Sometimes, changing the Bluetooth dongle port is enough to fix it for 3~5 days before it flatlines again

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

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

    Development

    No branches or pull requests

      Participants

      @CloCkWeRX@LeoColman@EndermanAPM@Ernst79@perseus177

      Issue actions

        [Bug]: Raspberry PI 3 - HCIdump thread: Something wrong - interface hci0 not ready, and will be skipped for current scan period. · Issue #1276 · custom-components/ble_monitor