Passerelle BLE sur Pi 4 : bluetoothctl indique qu'aucun contrôleur par défaut n'est disponible
Traduit de English par IA ·
Pour mon projet de fin d’études, je transforme un Pi 4 en passerelle BLE : elle écoute six RuuviTags dans le labo et signale chacun à Hermetry comme périphérique enfant via v1/gw/telemetry. La partie Hermetry fonctionne quand je lui envoie de fausses données depuis mon ordinateur portable.La partie Bluetooth, elle, ne fonctionne pas. Sur le Pi :
$ bluetoothctl
Agent registered
[bluetoothctl]# scan on
No default controller available
$ hciconfig -a
$
$ systemctl status bluetooth
Active: active (running)
Donc le service tourne, mais il n’y a aucun contrôleur. Pi 4 Model B, Raspberry Pi OS Bookworm 64 bits, installation assez récente, datant d’environ un mois. La même carte SD était dans le Pi que j’ai utilisé pour le projet d’imprimante de tickets il y a quelques semaines, si ça peut avoir de l’importance.
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.
Traduit de English par IA ·
As-tu installé bluez ? Je pense qu’il n’est pas présent par défaut sur la version lite
did you install bluez? I think it’s not there by default on lite
Traduit de English par IA ·
Il est installé, sinon bluetoothctl ne fonctionnerait pas.
It’s installed, bluetoothctl wouldn’t run otherwise.
Traduit de English par IA ·
Que affiche rfkill list ? Un blocage logiciel ressemble aussi à ceci.
What does rfkill list show? A soft block looks like this too.
Traduit de English par IA ·
0: phy0: Wireless LAN
Soft blocked: no
Hard blocked: no
Seulement du Wi-Fi, aucune entrée Bluetooth du tout.
0: phy0: Wireless LAN
Soft blocked: no
Hard blocked: no
Only Wi-Fi, no Bluetooth entry at all.
Traduit de English par IA ·
Hm, si rfkill ne le liste même pas, le noyau n’a jamais activé le contrôleur.
Hm, if rfkill doesn’t even list it, the kernel never brought the controller up.
Traduit de English par IA ·
Ça pourrait venir de la radio. J’ai eu une fois un Pi 4 avec le Bluetooth HS mais le Wi-Fi fonctionnel, même puce, mais ça arrive.
Could be the radio. I had a Pi 4 with dead Bluetooth but working Wi-Fi once, same chip but it happens.
Traduit de English par IA ·
« Même carte SD que l’imprimante de tickets » est l’indice. Vérifiez /boot/firmware/config.txt (sous Bookworm, il a été déplacé depuis /boot) pour dtoverlay=disable-bt. Notre intégrateur a ajouté cette ligne pour un hat RS-485 sur une passerelle de ligne, et six mois plus tard quelqu’un a passé une journée à essayer d’appairer un scanner sur le même Pi.Sur le Pi 4, la puce Bluetooth est reliée au bon UART. disable-bt attribue cet UART aux broches GPIO et le Bluetooth disparaît complètement, ce qui correspond à votre sortie rfkill. Commentez la ligne, puis :
sudo systemctl enable --now hciuart
sudo reboot
# après redémarrage
rfkill list # doit afficher hci0: Bluetooth
bluetoothctl show
Si vous avez besoin à la fois d’un UART matériel et du Bluetooth sur le Pi 4, dtoverlay=miniuart-bt conserve le Bluetooth sur le mini UART, ou utilisez l’un des UART supplémentaires (uart2 à uart5) que possède le 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.
Traduit de English par IA ·
C’était ça, la ligne disable-bt du projet imprimante. Embarrassant. Mise en commentaire, hciuart activé, hci0 est de retour et les six tags apparaissent dans le scan. Ils apparaissent maintenant comme enfants dans 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.
Traduit de English par IA ·
Il vaut la peine de laisser un commentaire au-dessus de chaque ligne ajoutée à config.txt, avec la date et la raison. Cela fera gagner du temps à la prochaine personne.
Worth leaving a comment above every line you add to config.txt with the date and why. Saves the next person.
- Vous devez être connecté pour répondre à ce sujet.
Rejoignez la discussion
Connectez-vous pour poser et répondre à des questions, aimer les messages utiles et marquer la réponse qui a résolu votre problème. Chaque contribution rapporte des points et des niveaux.

