Pi 4 BLE-Gateway: bluetoothctl meldet, dass kein Standard-Controller verfügbar ist
Von English mit KI übersetzt ·
Für mein Abschlussprojekt mache ich einen Pi 4 zu einem BLE-Gateway: Es lauscht im Labor auf sechs RuuviTags und meldet jeden davon über v1/gw/telemetry als Child-Device an Hermetry. Der Hermetry-Teil funktioniert, wenn ich ihm Fake-Daten von meinem Laptop schicke.Der Bluetooth-Teil funktioniert nicht. Auf dem Pi:
$ bluetoothctl
Agent registered
[bluetoothctl]# scan on
No default controller available
$ hciconfig -a
$
$ systemctl status bluetooth
Active: active (running)
Der Dienst läuft also, aber es gibt keinen Controller. Pi 4 Model B, Raspberry Pi OS Bookworm 64-bit, eine eher frische Installation von vor etwa einem Monat. Dieselbe SD-Karte war vor einigen Wochen im Pi, den ich für das Kassendrucker-Projekt benutzt habe, falls das relevant ist.
For my final-year project I’m turning a Pi 4 into a BLE gateway: it listens to six RuuviTags around the lab and reports each one to Hermetry as a child device over v1/gw/telemetry. The Hermetry part works when I feed it fake data from my laptop.
The Bluetooth part doesn’t. On the Pi:
$ bluetoothctl
Agent registered
[bluetoothctl]# scan on
No default controller available
$ hciconfig -a
$
$ systemctl status bluetooth
Active: active (running)
So the service runs but there’s no controller. Pi 4 Model B, Raspberry Pi OS Bookworm 64-bit, fresh-ish install from about a month ago. The same SD card was in the Pi I used for the receipt-printer thing a few weeks back, if that matters.
Von English mit KI übersetzt ·
Hast du bluez installiert? Ich glaube, auf der Lite-Version ist es standardmäßig nicht enthalten
did you install bluez? I think it’s not there by default on lite
Von English mit KI übersetzt ·
Es ist installiert, sonst würde bluetoothctl nicht laufen.
It’s installed, bluetoothctl wouldn’t run otherwise.
Von English mit KI übersetzt ·
Was zeigt rfkill list an? Eine Soft-Blockierung sieht ebenfalls so aus.
What does rfkill list show? A soft block looks like this too.
Von English mit KI übersetzt ·
0: phy0: Wireless LAN
Soft blocked: no
Hard blocked: no
Nur Wi-Fi, überhaupt kein Bluetooth-Eintrag.
0: phy0: Wireless LAN
Soft blocked: no
Hard blocked: no
Only Wi-Fi, no Bluetooth entry at all.
Von English mit KI übersetzt ·
Hm, wenn rfkill ihn nicht einmal auflistet, hat der Kernel den Controller nie hochgefahren.
Hm, if rfkill doesn’t even list it, the kernel never brought the controller up.
Von English mit KI übersetzt ·
Das könnte am Funkmodul liegen. Ich hatte einmal einen Pi 4 mit defektem Bluetooth, aber funktionierendem WLAN, gleicher Chip, aber so etwas passiert eben.
Could be the radio. I had a Pi 4 with dead Bluetooth but working Wi-Fi once, same chip but it happens.
Von English mit KI übersetzt ·
„Gleiche SD-Karte wie der Belegdrucker“ ist der Hinweis. Prüfe /boot/firmware/config.txt (unter Bookworm wurde sie von /boot dorthin verschoben) auf dtoverlay=disable-bt. Unser Integrator hat das für einen RS-485-Hat an einem Linien-Gateway eingetragen, und sechs Monate später hat jemand einen Tag damit verbracht, einen Scanner mit demselben Pi zu koppeln.Beim Pi 4 hängt der Bluetooth-Chip am guten UART. disable-bt gibt dieses UART an die GPIO-Pins ab, und Bluetooth verschwindet vollständig, was zu deiner rfkill-Ausgabe passt. Zeile auskommentieren, dann:
sudo systemctl enable --now hciuart
sudo reboot
# nach dem Neustart
rfkill list # sollte hci0: Bluetooth zeigen
bluetoothctl show
Wenn du sowohl ein Hardware-UART als auch Bluetooth am Pi 4 brauchst, hält dtoverlay=miniuart-bt Bluetooth auf dem Mini-UART, oder du nutzt eines der zusätzlichen UARTs (uart2 bis uart5), die der Pi 4 hat.
„Same SD card as the receipt printer“ is the clue. Check /boot/firmware/config.txt (on Bookworm it moved from /boot) for dtoverlay=disable-bt. Our integrator put that in for an RS-485 hat on a line gateway and six months later someone spent a day trying to pair a scanner to the same Pi.
On the Pi 4 the Bluetooth chip hangs off the good UART. disable-bt gives that UART to the GPIO pins and Bluetooth disappears completely, which matches your rfkill output. Comment the line out, then:
sudo systemctl enable --now hciuart
sudo reboot
# after reboot
rfkill list # should show hci0: Bluetooth
bluetoothctl show
If you need both a hardware UART and Bluetooth on the Pi 4, dtoverlay=miniuart-bt keeps Bluetooth on the mini UART, or use one of the extra UARTs (uart2 to uart5) the Pi 4 has.
Von English mit KI übersetzt ·
Das war es, die disable-bt-Zeile aus dem Druckerprojekt. Peinlich. Auskommentiert, hciuart aktiviert, hci0 ist wieder da und alle sechs Tags tauchen im Scan auf. Sie werden jetzt als Untergeordnete in Hermetry angezeigt.
That was it, the disable-bt line from the printer project. Embarrassing. Commented out, hciuart enabled, hci0 is back and all six tags show up in the scan. They’re appearing as children in Hermetry now.
Von English mit KI übersetzt ·
Es lohnt sich, über jede Zeile, die du in config.txt hinzufügst, einen Kommentar mit dem Datum und dem Grund zu hinterlassen. Das spart der nächsten Person Zeit.
Worth leaving a comment above every line you add to config.txt with the date and why. Saves the next person.
- Du musst angemeldet sein, um auf dieses Thema antworten zu können.
Mitdiskutieren
Melde dich an, um Fragen zu stellen und zu beantworten, hilfreiche Beiträge mit „Gefällt mir“ zu markieren und die Antwort zu kennzeichnen, die dein Problem gelöst hat. Jeder Beitrag bringt Punkte und Stufen.

