Ich hänge mich mal an diesen schon etwas älteren Thread dran.
Ich habe einen Pi3 mit einem angeschlossenen RaspBee-Modul, bei dem ich auch Bluetooth verwenden will. Nur funktioniert das leider sehr unzuverlässig. Nach jedem Reboot wird Bluetooth nicht gestartet und händisches Starten funktioniert nur nach dem Zufallsprinzip.
Einträge in config.txt:
Die beiden "serial"-Devices:
pi@raspberrypi:~ $ ls -l /dev/serial?
lrwxrwxrwx 1 root root 7 Dez 20 18:11 /dev/serial0 -> ttyAMA0
lrwxrwxrwx 1 root root 5 Dez 20 18:11 /dev/serial1 -> ttyS0
Und meine /lib/systemd/system/hciuart.service:
[Unit]
Description=Configure Bluetooth Modems connected by UART
ConditionPathIsDirectory=/proc/device-tree/soc/gpio@7e200000/bt_pins
Before=bluetooth.service
After=dev-serial1.device
[Service]
Type=forking
ExecStart=/usr/bin/hciattach /dev/serial1 bcm43xx 921600 noflow -
[Install]
WantedBy=multi-user.target
Display More
Damit sollte eigentlich alles richtig eingerichtet sein. Aber hciuart startet nach dem Booten nicht:
Dez 21 08:33:02 raspberrypi sudo[27558]: pi : TTY=pts/0 ; PWD=/home/pi ; USER=root ; COMMAND=/bin/systemctl start hciuart.service
Dez 21 08:33:02 raspberrypi sudo[27558]: pam_unix(sudo:session): session opened for user root by pi(uid=0)
Dez 21 08:33:02 raspberrypi systemd[1]: apparmor.service: Cannot add dependency job, ignoring: Unit apparmor.service is masked.
Dez 21 08:33:02 raspberrypi systemd[1]: Starting Configure Bluetooth Modems connected by UART...
-- Subject: Unit hciuart.service has begun start-up
-- Defined-By: systemd
-- Support: https://www.debian.org/support
--
-- Unit hciuart.service has begun starting up.
Dez 21 08:33:12 raspberrypi hciattach[27564]: Initialization timed out.
Dez 21 08:33:12 raspberrypi hciattach[27564]: bcm43xx_init
Dez 21 08:33:12 raspberrypi hciattach[27564]: Set Controller UART speed to 921600 bit/s
Dez 21 08:33:12 raspberrypi hciattach[27564]: Flash firmware /etc/firmware/BCM43430A1.hcd
Dez 21 08:33:12 raspberrypi systemd[1]: hciuart.service: Control process exited, code=exited status=1
Dez 21 08:33:12 raspberrypi systemd[1]: Failed to start Configure Bluetooth Modems connected by UART.
-- Subject: Unit hciuart.service has failed
-- Defined-By: systemd
-- Support: https://www.debian.org/support
--
-- Unit hciuart.service has failed.
--
-- The result is failed.
Dez 21 08:33:12 raspberrypi systemd[1]: hciuart.service: Unit entered failed state.
Dez 21 08:33:12 raspberrypi sudo[27558]: pam_unix(sudo:session): session closed for user root
Dez 21 08:33:12 raspberrypi systemd[1]: hciuart.service: Failed with result 'exit-code'.
Display More
Starte ich den Service manuell mit sudo systemctl start hciuart.service, dann kann ich Glück haben und er startet, ein anderes Mal läuft er auch nach 10 Versuchen noch nicht.
Gibt es keine Möglichkeit, ein Modul auf den GPIOs undBluetooth stabil zu nutzen?