Bluetooth SENA UD100 ne marche pas

Bonjour!
J’ai un problème avec le dongle Bluetooth SENA UD100 qui me rend fou. Il fonctionnait bien depuis des mois et lors du passage à un pi 4, il a cessé de fonctionner. Le Raspberry le détecte bien, apparemment tout va bien mais je n’obtiens aucun signal sur le plugin BLEA ni sur la ligne de commandes. La seule erreur que je vois est dans dmesg « Bluetooth: hci0: erreur matérielle 0x31 »
Quelqu’un sait quel pourrait être le problème?

hciconfig -a hci0
hci0:	Type: Primary  Bus: USB
	BD Address: 00:02:5B:00:A5:A5  ACL MTU: 310:10  SCO MTU: 64:8
	UP RUNNING 
	RX bytes:192047 acl:0 sco:0 events:31793 errors:0
	TX bytes:200797 acl:0 sco:0 commands:31787 errors:1
	Features: 0xff 0xff 0x8f 0xfe 0xdb 0xff 0x5b 0x87
	Packet type: DM1 DM3 DM5 DH1 DH3 DH5 HV1 HV2 HV3 
	Link policy: RSWITCH HOLD SNIFF PARK 
	Link mode: SLAVE ACCEPT 
	Name: 'PiEstanque'
	Class: 0x000000
	Service Classes: Unspecified
	Device Class: Miscellaneous, 
	HCI Version: 4.0 (0x6)  Revision: 0x2031
	LMP Version: 4.0 (0x6)  Subversion: 0x2031
	Manufacturer: Cambridge Silicon Radio (10)
sudo systemctl status bluetooth
[sudo] password for jeedom: 
● bluetooth.service - Bluetooth service
   Loaded: loaded (/lib/systemd/system/bluetooth.service; enabled; vendor preset: enabled)
   Active: active (running) since Wed 2020-07-29 22:21:32 BST; 42s ago
     Docs: man:bluetoothd(8)
 Main PID: 355 (bluetoothd)
   Status: "Running"
    Tasks: 1 (limit: 2200)
   Memory: 3.0M
   CGroup: /system.slice/bluetooth.service
           └─355 /usr/lib/bluetooth/bluetoothd
Jul 29 22:21:31 PiEstanque systemd[1]: Starting Bluetooth service...
Jul 29 22:21:32 PiEstanque bluetoothd[355]: Bluetooth daemon 5.50
Jul 29 22:21:32 PiEstanque systemd[1]: Started Bluetooth service.
Jul 29 22:21:32 PiEstanque bluetoothd[355]: Starting SDP server
Jul 29 22:21:32 PiEstanque bluetoothd[355]: Bluetooth management interface 1.14 initialized
Jul 29 22:21:32 PiEstanque bluetoothd[355]: Sap driver initialization failed.
Jul 29 22:21:32 PiEstanque bluetoothd[355]: sap-server: Operation not permitted (1)
Jul 29 22:21:32 PiEstanque bluetoothd[355]: Failed to set privacy: Rejected (0x0b)
Jul 29 22:21:40 PiEstanque bluetoothd[355]: Sap driver initialization failed.
Jul 29 22:21:40 PiEstanque bluetoothd[355]: sap-server: Operation not permitted (1)
sudo bluetoothctl
Agent registered
[bluetooth]# list
Controller B8:27:EB:68:0D:00 PiEstanque #2 [default]
Controller 00:02:5B:00:A5:A5 PiEstanque 
[bluetooth]# select 00:02:5B:00:A5:A5
Controller 00:02:5B:00:A5:A5 PiEstanque [default]
[bluetooth]# show
Controller 00:02:5B:00:A5:A5 (public)
	Name: PiEstanque
	Alias: PiEstanque
	Class: 0x00000000
	Powered: yes
	Discoverable: no
	Pairable: yes
	UUID: Generic Attribute Profile (00001801-0000-1000-8000-00805f9b34fb)
	UUID: A/V Remote Control        (0000110e-0000-1000-8000-00805f9b34fb)
	UUID: PnP Information           (00001200-0000-1000-8000-00805f9b34fb)
	UUID: A/V Remote Control Target (0000110c-0000-1000-8000-00805f9b34fb)
	UUID: Generic Access Profile    (00001800-0000-1000-8000-00805f9b34fb)
	Modalias: usb:v1D6Bp0246d0532
	Discovering: no
[bluetooth]#
dmesg|grep error
[    5.637410] Bluetooth: hci0: hardware error 0x31

Si tu a ajouter une clef SENA sur un RPI qui a déjà un port BT
tu devrait voir 2 ports BT hci0 qui est ton port original plus hci1 qui devrait être ta clef SENA

Pour vérifier si ta clef est vien vu en ssh tape la commande

lsusb

Tu devrait avoir dans les réponses une des lignes équivalente à celle-ci

Bus 001 Device 004: ID 0a12:0001 Cambridge Silicon Radio, Ltd Bluetooth Dongle (HCI mode)

Quelques commandes utiles et quelques liens :

sudo systemctl status hciuart

sudo systemctl enable hciuart
sudo systemctl start hciuart
sudo hciconfig hcio down
sudo hciconfig hcio up

https://community.jeedom.com/t/desactivation-bluetooth-interne/14012/5
https://www.raspberrypi.org/forums/viewtopic.php?t=242281
http://sigalou-domotique.fr/domotique/67-activer-port-bluetooth-au-demarrage-de-jeedom

oui, je vois les deux, mais USB lui attribue le hci0 et le Pi4 d’origine attribue le hci1.

hciconfig

hci1: Type: Primary Bus: UART
BD Address: DC:A6:32:3E:C8:76 ACL MTU: 1021:8 SCO MTU: 64:1
UP RUNNING
RX bytes:792 acl:0 sco:0 events:50 errors:0
TX bytes:2265 acl:0 sco:0 commands:50 errors:0

hci0: Type: Primary Bus: USB
BD Address: 00:02:5B:00:A5:A5 ACL MTU: 310:10 SCO MTU: 64:8
UP RUNNING
RX bytes:1856 acl:0 sco:0 events:107 errors:0
TX bytes:2747 acl:0 sco:0 commands:104 errors:0

sudo systemctl status hciuart
● hciuart.service - Configure Bluetooth Modems connected by UART
Loaded: loaded (/lib/systemd/system/hciuart.service; enabled; vendor preset: enabled)
Active: active (running) since Thu 2020-07-30 00:04:12 CEST; 3min 7s ago
Process: 348 ExecStart=/usr/bin/btuart (code=exited, status=0/SUCCESS)
Main PID: 545 (hciattach)
Tasks: 1 (limit: 4915)
CGroup: /system.slice/hciuart.service
└─545 /usr/bin/hciattach /dev/serial1 bcm43xx 3000000 flow -

Jul 30 00:04:05 Pi4JEEDOM systemd[1]: Starting Configure Bluetooth Modems connected by UART…
Jul 30 00:04:12 Pi4JEEDOM btuart[348]: bcm43xx_init
Jul 30 00:04:12 Pi4JEEDOM btuart[348]: Flash firmware /lib/firmware/brcm/BCM4345C0.hcd
Jul 30 00:04:12 Pi4JEEDOM btuart[348]: Set Controller UART speed to 3000000 bit/s
Jul 30 00:04:12 Pi4JEEDOM btuart[348]: Device setup complete
Jul 30 00:04:12 Pi4JEEDOM systemd[1]: Started Configure Bluetooth Modems connected by UART.

Tu peut aussi voir ici :

il est possible que l’attribution soit inversée hci0 / hci1

RX et TX monte tout le temps, je peux sélectionner hci0 sur le plugin BLEA, mais après je reçois rien des devices… ?

jeedom@Pi4JEEDOM:~ $ hciconfig
hci1: Type: Primary Bus: UART
BD Address: DC:A6:32:3E:C8:76 ACL MTU: 1021:8 SCO MTU: 64:1
UP RUNNING
RX bytes:792 acl:0 sco:0 events:50 errors:0
TX bytes:2265 acl:0 sco:0 commands:50 errors:0

hci0: Type: Primary Bus: USB
BD Address: 00:02:5B:00:A5:A5 ACL MTU: 310:10 SCO MTU: 64:8
UP RUNNING
RX bytes:17990 acl:0 sco:0 events:2796 errors:0
TX bytes:19567 acl:0 sco:0 commands:2793 errors:0

jeedom@Pi4JEEDOM:~ $ hciconfig
hci1: Type: Primary Bus: UART
BD Address: DC:A6:32:3E:C8:76 ACL MTU: 1021:8 SCO MTU: 64:1
UP RUNNING
RX bytes:792 acl:0 sco:0 events:50 errors:0
TX bytes:2265 acl:0 sco:0 commands:50 errors:0

hci0: Type: Primary Bus: USB
BD Address: 00:02:5B:00:A5:A5 ACL MTU: 310:10 SCO MTU: 64:8
UP RUNNING
RX bytes:18086 acl:0 sco:0 events:2812 errors:0
TX bytes:19667 acl:0 sco:0 commands:2809 errors:0

jeedom@Pi4JEEDOM:~ $ hciconfig
hci1: Type: Primary Bus: UART
BD Address: DC:A6:32:3E:C8:76 ACL MTU: 1021:8 SCO MTU: 64:1
UP RUNNING
RX bytes:792 acl:0 sco:0 events:50 errors:0
TX bytes:2265 acl:0 sco:0 commands:50 errors:0

hci0: Type: Primary Bus: USB
BD Address: 00:02:5B:00:A5:A5 ACL MTU: 310:10 SCO MTU: 64:8
UP RUNNING
RX bytes:18158 acl:0 sco:0 events:2824 errors:0
TX bytes:19742 acl:0 sco:0 commands:2821 errors:0

fait voir ce que donne le

lsusb

a tu essayer :

sudo hciconfig hcio down
sudo hciconfig hcio up

jeedom@Pi4JEEDOM:~ $ lsusb
Bus 002 Device 002: ID 174c:0825 ASMedia Technology Inc.
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 004: ID 1a86:7523 QinHeng Electronics HL-340 USB-Serial adapter
Bus 001 Device 003: ID 0a12:0001 Cambridge Silicon Radio, Ltd Bluetooth Dongle (HCI mode)
Bus 001 Device 002: ID 2109:3431 VIA Labs, Inc. Hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

jeedom@Pi4JEEDOM:~ $ sudo hciconfig hci0 down
jeedom@Pi4JEEDOM:~ $ sudo hciconfig hci0 up
jeedom@Pi4JEEDOM:~ $

pas de problème ici…

Lorsque je désactive le plugin TX et RX de l’USB UD100, ils s’arrêtent. Lorsque je l’active à nouveau, ils augmentent à nouveau. C’est comme si tout fonctionnait bien mais je ne pouvais rien lire dans le plugin!

Bonsoir,
Je me mêle à votre conversation.
N’y aurait-il pas un problème d’usb 3 lié au RPI4?
As-tu essayé de la plugguer sur un port usb 2?

Yes ça n’a pas l’air d’être un problème de clef donc …
quel os quel version jeedom ?
que dit la page santé ?

réglage système configuration onglet OS_DB
Rétablissement des droits des dossiers et fichiers

au cas ou ce soit un problème de droits

Merci. oui j’ai essayé tous les ports. USB2 et USB3.
J’ai aussi essayé un autre Raspberry Pi 3 avec le même résultat … Serait-il possible que le SENA ait échoué?

je suis dan Jeedom 4.0.61
Page santé tout ok:

Linux Pi4JEEDOM 5.4.51-v7l+ #1328 SMP Mon Jul 27 16:57:05 BST 2020 armv7l GNU/Linux [10.4]

Si elle marchait avant la bascule, ce serait étonnant.
Comment as-tu fat ton installation debian sur ton rpi4? Fresh install depuis quelle image?

ça c’est logique. Où est cette option?

Le rpi3 sur lequel tu as fait ton test tournait sous quoi?

il vient de te le dire

Fresh install depuis l’image par défaut du Raspberry Pi Imager app. Après apt-get update apt-get full-upgrade. Instalation Jeedom 4

(pardon pour mon français…)

ok! fait! mais meme résultat…
Je commence à penser que le dongle est vraiment cassé

a tu essayer de relancer l’installation des dépendences de blea ?

oui je pense avoir déjà fait l’installation des dépendances 50 fois hahaha
Je pense que le problème vient du côté Raspbian car avec l’USB utilisant bluetoothctl> scan on je ne reçois rien, alors qu’avec le bluetooth interne je reçois tous les périphériques

Essaie de l’installer sur un hub usb autoalimenté pour voir s’il y a une amélioration