Gateway BLE con Pi 4: bluetoothctl dice que no hay ningún controlador predeterminado disponible
Traducido del English por IA ·
Para mi proyecto final de carrera estoy convirtiendo una Pi 4 en un gateway BLE: escucha seis RuuviTags por el laboratorio y reporta cada uno a Hermetry como dispositivo hijo a través de v1/gw/telemetry. La parte de Hermetry funciona cuando le envío datos falsos desde mi portátil.La parte de Bluetooth no funciona. En la Pi:
$ bluetoothctl
Agent registered
[bluetoothctl]# scan on
No default controller available
$ hciconfig -a
$
$ systemctl status bluetooth
Active: active (running)
Así que el servicio está en marcha, pero no hay ningún controlador. Pi 4 Model B, Raspberry Pi OS Bookworm de 64 bits, instalación bastante reciente de hace un mes aproximadamente. La misma tarjeta SD estaba en la Pi que usé para lo de la impresora de tickets hace unas semanas, por si eso importa.
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.
Traducido del English por IA ·
¿Instalaste bluez? Creo que en la versión lite no viene instalado por defecto
did you install bluez? I think it’s not there by default on lite
Traducido del English por IA ·
Está instalado, si no, bluetoothctl no funcionaría.
It’s installed, bluetoothctl wouldn’t run otherwise.
Traducido del English por IA ·
¿Qué muestra rfkill list? Un bloqueo por software también se ve así.
What does rfkill list show? A soft block looks like this too.
Traducido del English por IA ·
0: phy0: Wireless LAN
Soft blocked: no
Hard blocked: no
Solo Wi-Fi, ninguna entrada de Bluetooth en absoluto.
0: phy0: Wireless LAN
Soft blocked: no
Hard blocked: no
Only Wi-Fi, no Bluetooth entry at all.
Traducido del English por IA ·
Hm, si rfkill ni siquiera lo lista, el kernel nunca activó el controlador.
Hm, if rfkill doesn’t even list it, the kernel never brought the controller up.
Traducido del English por IA ·
Podría ser la radio. Una vez tuve una Pi 4 con el Bluetooth muerto pero el Wi-Fi funcionando, mismo chip, pero pasa.
Could be the radio. I had a Pi 4 with dead Bluetooth but working Wi-Fi once, same chip but it happens.
Traducido del English por IA ·
«La misma tarjeta SD que la impresora de recibos» es la pista. Revisa /boot/firmware/config.txt (en Bookworm se movió desde /boot) buscando dtoverlay=disable-bt. Nuestro integrador lo puso para un hat RS-485 en una pasarela de línea y seis meses después alguien pasó un día intentando emparejar un escáner con la misma Pi.En la Pi 4, el chip Bluetooth está conectado a la UART buena. disable-bt cede esa UART a los pines GPIO y el Bluetooth desaparece por completo, lo que coincide con tu salida de rfkill. Comenta la línea y luego:
sudo systemctl enable --now hciuart
sudo reboot
# tras reiniciar
rfkill list # debería mostrar hci0: Bluetooth
bluetoothctl show
Si necesitas a la vez una UART de hardware y Bluetooth en la Pi 4, dtoverlay=miniuart-bt mantiene el Bluetooth en la mini UART, o usa una de las UART adicionales (uart2 a uart5) que tiene la Pi 4.
«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.
Traducido del English por IA ·
Era eso, la línea disable-bt del proyecto de la impresora. Qué vergüenza. La comenté, activé hciuart, hci0 volvió y los seis tags aparecen en el escaneo. Ahora aparecen como hijos en Hermetry.
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.
Traducido del English por IA ·
Merece la pena dejar un comentario encima de cada línea que añadas a config.txt, con la fecha y el motivo. Así le ahorras trabajo a la siguiente persona.
Worth leaving a comment above every line you add to config.txt with the date and why. Saves the next person.
- Debes estar registrado para responder a este debate.
Únete a la conversación
Inicia sesión para preguntar y responder, dar me gusta a las publicaciones útiles y marcar la respuesta que resolvió tu problema. Cada aportación suma puntos y niveles.

