Bonjour,
Je suis face à un problème (depuis pas loin de 3 heures maintenant ) avec mon dongle bluetooth (enfin, je pense que le problème est d’abord lié à la gestion USB de Débian)
Ma configuration :
NUC Intel sous W10 (je dois être en 1909, mais je doute que cela ait de l’importance)
VirtualBox 6.1
Jeedom tourne sur VBox via l’image ISO Jeedom (donc :Débian 10 + Jeedom en V4)
Compléments d’infos sur les composants logiciels (je doute que toutes ces infos soient nécessaires mais qui peut le plus peut le moins :
- V 4.0.56 (Par défaut l’ISO Jeedom fourni 4.0.59 ou 60 il me semble mais j’ai migré mon installation qui tournait sur VMM sur DS218+)
- 10.3.22-MariaDB-0+deb10u1
- 7.3.19-1~deb10u1
- Linux jeedom 4.19.0-9-amd64 #1 SMP Debian 4.19.118-2+deb10u1 (2020-06-07) x86_64 GNU/Linux [10.4]
J’ai parcouru tout un tas de forum à droite et à gauche (entre autres : https://forum.jeedom.com/viewtopic.php?t=41048 ; https://community.jeedom.com/t/bluetooth-advertisement-blea-le-port-nest-pas-configure/18551 et j’en passe) ;
J’ai testé la plupart des commandes que je vais évoquer ci-dessous via putty et via OS/DB ;
J’ai bien (enfin, bien peut-être pas, mais j’y reviens plus tard) mappé le dongle USB dans la machine virtuelle ;
Le dongle USB est un Ugreen, qui est bien reconnu par le NUC après installation des pilotes
Bref, une fois les présentations faites, abordons le vif du sujet :
La commande « hciconfig » ne donne pas de réponse ;
La commande « lsusb » donne :
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 002: ID 80ee:0021 VirtualBox USB Tablet
Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Ce qui me laisse penser que j’ai correctement mappé mon port USB vers la VM
D’autres commandes avec leurs résultats :
root@jeedom:/home/jeedom# sudo hciconfig hci0 reset
Can't get device info: No such device
root@jeedom:/home/jeedom# sudo systemctl enable hciuart
Failed to enable unit: Unit file hciuart.service does not exist.
root@jeedom:/home/jeedom# systemctl enable hciuart
Failed to enable unit: Unit file hciuart.service does not exist.
root@jeedom:/home/jeedom# service bluetooth status
bash: service : commande introuvable
root@jeedom:/home/jeedom# apt-get install rfkill
Lecture des listes de paquets... Fait
Construction de l'arbre des dépendances
Lecture des informations d'état... Fait
rfkill est déjà la version la plus récente (2.33.1-0.1).
0 mis à jour, 0 nouvellement installés, 0 à enlever et 1 non mis à jour.
root@jeedom:/home/jeedom# rfkill unblock all
bash: rfkill : commande introuvable
root@jeedom:/home/jeedom# hciconfig hci0 up
Can't get device info: No such device
root@jeedom:/home/jeedom# bluetoothctl -a
bluetoothctl: option requires an argument -- 'a'
bluetoothctl ver 5.50
Usage:
bluetoothctl [options]
Options:
--agent Register agent handler: <capability>
--timeout Timeout in seconds for non-interactive mode
--version Display version
--help Display help
root@jeedom:/home/jeedom# power on
bash: power : commande introuvable
root@jeedom:/home/jeedom# lsusb
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 002: ID 80ee:0021 VirtualBox USB Tablet
Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
root@jeedom:/home/jeedom# hcitool dev
Devices:
root@jeedom:/home/jeedom# bluetoothctl
Agent registered
[bluetooth]# quit
Je précise que l’ordre dans lequel je poste tout ceci n’est pas forcément chronologique 'sauf, évidement, lorsque je poste plusieurs commandes dans un seul bloc), et que je synthétise 3h de recherches (malheureusement sans développement à la clé )
le log « Blea_local » donne :
Traceback (most recent call last):
File "/var/www/html/plugins/blea/resources/blead/blead.py", line 26, in <module>
from bluepy.btle import Scanner, DefaultDelegate
ModuleNotFoundError: No module named 'bluepy'
le log « Blea_syncconf » conclut que mes configurations sont OK ;
le log « Blea_update » donne :
********************************************************
* Installation des dépendances *
********************************************************
Hit:1 http://ftp.fr.debian.org/debian buster InRelease
Hit:2 http://security.debian.org/debian-security buster/updates InRelease
Hit:3 http://ftp.fr.debian.org/debian buster-updates InRelease
Reading package lists...
Reading package lists...
Building dependency tree...
Reading state information...
libatlas-base-dev is already the newest version (3.10.3-8).
bluetooth is already the newest version (5.50-1.2~deb10u1).
libbluetooth-dev is already the newest version (5.50-1.2~deb10u1).
build-essential is already the newest version (12.6).
libffi-dev is already the newest version (3.2.1-9).
libopenjp2-7 is already the newest version (2.3.0-2+deb10u1).
libssl-dev is already the newest version (1.1.1d-0+deb10u3).
python3-serial is already the newest version (3.4-4).
python3-setuptools is already the newest version (40.8.0-1).
python3-dev is already the newest version (3.7.3-1).
python3-pyudev is already the newest version (0.21.0-1).
python3-requests is already the newest version (2.21.0-1).
libtiff5 is already the newest version (4.1.0+git191117-2~deb10u1).
rfkill is already the newest version (2.33.1-0.1).
0 upgraded, 0 newly installed, 0 to remove and 1 not upgraded.
Reading package lists...
Building dependency tree...
Reading state information...
debconf: unable to initialize frontend: Dialog
debconf: (Dialog frontend will not work on a dumb terminal, an emacs shell buffer, or without a controlling terminal.)
debconf: falling back to frontend: Readline
debconf: unable to initialize frontend: Readline
debconf: (This frontend requires a controlling tty.)
debconf: falling back to frontend: Teletype
dpkg-preconfigure: unable to re-open stdin:
0 upgraded, 0 newly installed, 1 reinstalled, 0 to remove and 1 not upgraded.
Need to get 0 B/171 kB of archives.
After this operation, 0 B of additional disk space will be used.
(Reading database ...
(Reading database ... 5%
(Reading database ... 10%
(Reading database ... 95%
(Reading database ... 100%
(Reading database ... 60969 files and directories currently installed.)
Preparing to unpack .../python3-pip_18.1-5_all.deb ...
Unpacking python3-pip (18.1-5) over (18.1-5) ...
Setting up python3-pip (18.1-5) ...
Processing triggers for man-db (2.8.5-2) ...
Requirement already up-to-date: setuptools in /usr/local/lib/python3.7/dist-packages (49.2.0)
Reading package lists...
Building dependency tree...
Reading state information...
git is already the newest version (1:2.20.1-2+deb10u3).
libglib2.0-dev is already the newest version (2.58.3-2+deb10u2).
0 upgraded, 0 newly installed, 0 to remove and 1 not upgraded.
Requirement already satisfied: pyudev in /usr/lib/python3/dist-packages (0.21.0)
Requirement already satisfied: pyserial in /usr/lib/python3/dist-packages (3.4)
Requirement already satisfied: requests in /usr/lib/python3/dist-packages (2.21.0)
Requirement already satisfied: pybluez in /usr/local/lib/python3.7/dist-packages (0.23)
Requirement already satisfied: pillow in /usr/local/lib/python3.7/dist-packages (7.2.0)
Requirement already satisfied: numpy in /usr/local/lib/python3.7/dist-packages (1.19.1)
Cloning into 'bluepy'...
running build
running build_py
creating build
creating build/lib
creating build/lib/bluepy
copying bluepy/sensortag.py -> build/lib/bluepy
copying bluepy/thingy52.py -> build/lib/bluepy
copying bluepy/scan_fuzz.py -> build/lib/bluepy
copying bluepy/blescan.py -> build/lib/bluepy
copying bluepy/__init__.py -> build/lib/bluepy
copying bluepy/get_services.py -> build/lib/bluepy
copying bluepy/btle.py -> build/lib/bluepy
copying bluepy/scanner.py -> build/lib/bluepy
copying bluepy/uuids.json -> build/lib/bluepy
copying bluepy/bluez-src.tgz -> build/lib/bluepy
copying bluepy/bluepy-helper.c -> build/lib/bluepy
copying bluepy/Makefile -> build/lib/bluepy
running install
Working dir is /tmp/bluepy
execute make -C ./bluepy clean
execute make -C bluepy -j1
running build
running build_py
copying bluepy/bluepy-helper -> build/lib/bluepy
running install_lib
copying build/lib/bluepy/uuids.json -> /usr/local/lib/python3.7/dist-packages/bluepy
copying build/lib/bluepy/sensortag.py -> /usr/local/lib/python3.7/dist-packages/bluepy
copying build/lib/bluepy/thingy52.py -> /usr/local/lib/python3.7/dist-packages/bluepy
copying build/lib/bluepy/Makefile -> /usr/local/lib/python3.7/dist-packages/bluepy
copying build/lib/bluepy/bluez-src.tgz -> /usr/local/lib/python3.7/dist-packages/bluepy
copying build/lib/bluepy/scan_fuzz.py -> /usr/local/lib/python3.7/dist-packages/bluepy
copying build/lib/bluepy/blescan.py -> /usr/local/lib/python3.7/dist-packages/bluepy
copying build/lib/bluepy/__init__.py -> /usr/local/lib/python3.7/dist-packages/bluepy
copying build/lib/bluepy/bluepy-helper.c -> /usr/local/lib/python3.7/dist-packages/bluepy
copying build/lib/bluepy/bluepy-helper -> /usr/local/lib/python3.7/dist-packages/bluepy
copying build/lib/bluepy/get_services.py -> /usr/local/lib/python3.7/dist-packages/bluepy
copying build/lib/bluepy/btle.py -> /usr/local/lib/python3.7/dist-packages/bluepy
copying build/lib/bluepy/scanner.py -> /usr/local/lib/python3.7/dist-packages/bluepy
byte-compiling /usr/local/lib/python3.7/dist-packages/bluepy/sensortag.py to sensortag.cpython-37.pyc
byte-compiling /usr/local/lib/python3.7/dist-packages/bluepy/thingy52.py to thingy52.cpython-37.pyc
byte-compiling /usr/local/lib/python3.7/dist-packages/bluepy/scan_fuzz.py to scan_fuzz.cpython-37.pyc
byte-compiling /usr/local/lib/python3.7/dist-packages/bluepy/blescan.py to blescan.cpython-37.pyc
byte-compiling /usr/local/lib/python3.7/dist-packages/bluepy/__init__.py to __init__.cpython-37.pyc
byte-compiling /usr/local/lib/python3.7/dist-packages/bluepy/get_services.py to get_services.cpython-37.pyc
byte-compiling /usr/local/lib/python3.7/dist-packages/bluepy/btle.py to btle.cpython-37.pyc
byte-compiling /usr/local/lib/python3.7/dist-packages/bluepy/scanner.py to scanner.cpython-37.pyc
running install_egg_info
running egg_info
creating bluepy.egg-info
writing bluepy.egg-info/PKG-INFO
writing dependency_links to bluepy.egg-info/dependency_links.txt
writing entry points to bluepy.egg-info/entry_points.txt
writing top-level names to bluepy.egg-info/top_level.txt
writing manifest file 'bluepy.egg-info/SOURCES.txt'
reading manifest file 'bluepy.egg-info/SOURCES.txt'
writing manifest file 'bluepy.egg-info/SOURCES.txt'
removing '/usr/local/lib/python3.7/dist-packages/bluepy-1.1.4-py3.7.egg-info' (and everything under it)
Copying bluepy.egg-info to /usr/local/lib/python3.7/dist-packages/bluepy-1.1.4-py3.7.egg-info
running install_scripts
Installing blescan script to /usr/local/bin
Installing sensortag script to /usr/local/bin
Installing thingy52 script to /usr/local/bin
Requirement already satisfied: cryptography in /usr/lib/python3/dist-packages (2.6.1)
Requirement already satisfied: pycrypto in /usr/lib/python3/dist-packages (2.6.1)
********************************************************
* Installation terminée *
********************************************************
Le démon est évidement NOK, et le port clef bluetooth ne me laisse pas d’autre choix que « aucun » , malgrés plusieurs redémarrages (de la VM et même du NUC).
Voila, si quelqu’un sait par quel tour de magie je peux résoudre ce machintruc.
Merci d’avance pour vos lumières