# Problème Bluetooth sur PC Ubuntu

**URL:** <https://community.gladysassistant.com/t/probleme-bluetooth-sur-pc-ubuntu/9209>\
**Category:** Configuration\
**Created:** [Novembre 28, 2024, 5:29 UTC](https://community.gladysassistant.com/t/probleme-bluetooth-sur-pc-ubuntu/9209 "2024-11-28T17:29:03Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![thekassmachine](https://gladys-assistant-community.b-cdn.net/letter_avatar_proxy/v4/letter/t/ed8c4c/32.png) [@thekassmachine](https://community.gladysassistant.com/u/thekassmachine)\
**Post date:** [Novembre 28, 2024, 5:29 UTC](https://community.gladysassistant.com/t/probleme-bluetooth-sur-pc-ubuntu/9209/1 "2024-11-28T17:29:03Z")

</div>

je déterre un vieu topic:  
J’ai le meme message d’erreur sur mon installation quand je veux utiliser le Bluetooth.  
Sur mon RPI c’etait OK mais je suis passé sur PC + UBUNTU et ça ne fonctionne plus.  
Sur Ubuntu mon dongle est OK puisque je peux appairer un appareil via Bluetooth.  
J’ai redémarré a plusieurs reprise & aussi fait le redémarrage du docker.  
Des idées ?  
Merci

---

<div class="post-metadata">

**Author:** ![pierre-gilles](https://gladys-assistant-community.b-cdn.net/user_avatar/community.gladysassistant.com/pierre-gilles/32/5886_2.png) [@pierre-gilles](https://community.gladysassistant.com/u/pierre-gilles)\
**Post date:** [Novembre 29, 2024, 8:52 UTC](https://community.gladysassistant.com/t/probleme-bluetooth-sur-pc-ubuntu/9209/2 "2024-11-29T08:52:26Z")

</div>

Sur ton PC Ubuntu, si tu fais:

```auto
sudo systemctl status bluetooth

```

Tu as quoi ?

Si ça marche, si tu fais:

```auto
hcitool dev

```

Tu vois tes appareils Bluetooth ?

---

<div class="post-metadata">

**Author:** ![thekassmachine](https://gladys-assistant-community.b-cdn.net/letter_avatar_proxy/v4/letter/t/ed8c4c/32.png) [@thekassmachine](https://community.gladysassistant.com/u/thekassmachine)\
**Post date:** [Novembre 29, 2024, 5:00 UTC](https://community.gladysassistant.com/t/probleme-bluetooth-sur-pc-ubuntu/9209/3 "2024-11-29T17:00:54Z")

</div>

Dans les statuts j’ai «&nbsp;running&nbsp;» et «&nbsp;enable&nbsp;»  
Ensuite la commande hcitool dev me remonte éléments : un hci0 et un hci2 avec leur adresses respectives

---

<div class="post-metadata">

**Author:** ![pierre-gilles](https://gladys-assistant-community.b-cdn.net/user_avatar/community.gladysassistant.com/pierre-gilles/32/5886_2.png) [@pierre-gilles](https://community.gladysassistant.com/u/pierre-gilles)\
**Post date:** [Décembre 2, 2024, 7:54 UTC](https://community.gladysassistant.com/t/probleme-bluetooth-sur-pc-ubuntu/9209/4 "2024-12-02T07:54:42Z")

</div>

Et si tu rentre dans le container:

```auto
docker exec -it gladys sh

```

Et que tu fais:

```auto
hcitool dev

```

?

Je me demande si il ne manque pas un volume au container Docker…

En cherchant sur internet, j’ai l’impression qu’il faut DBus:

```auto
-v /var/run/dbus:/var/run/dbus \

```

---

<div class="post-metadata">

**Author:** ![thekassmachine](https://gladys-assistant-community.b-cdn.net/letter_avatar_proxy/v4/letter/t/ed8c4c/32.png) [@thekassmachine](https://community.gladysassistant.com/u/thekassmachine)\
**Post date:** [Décembre 2, 2024, 7:55 UTC](https://community.gladysassistant.com/t/probleme-bluetooth-sur-pc-ubuntu/9209/5 "2024-12-02T19:55:44Z")

</div>

![image](https://gladys-assistant-community.b-cdn.net/uploads/default/original/3X/1/c/1c53410fe37683a43f0012177c10120977bfd57b.png)

Sinon pour Dbus c’est là que je me rend compte que mes connaissances Unix sont tres limitées… Je ne connais pas du tout DBUS et j’ai commencé a lire… j’ai pas tout compris ^^

---

<div class="post-metadata">

**Author:** ![thekassmachine](https://gladys-assistant-community.b-cdn.net/letter_avatar_proxy/v4/letter/t/ed8c4c/32.png) [@thekassmachine](https://community.gladysassistant.com/u/thekassmachine)\
**Post date:** [Décembre 2, 2024, 8:22 UTC](https://community.gladysassistant.com/t/probleme-bluetooth-sur-pc-ubuntu/9209/6 "2024-12-02T20:22:28Z")

</div>

cette fois-ci j’ai demandé un peu d’aide a ChatGPT et j’ai compris un peu plus.  
j’ai donc effectué la suite de commande puis j’ai redémarré mais rien n’y fait, j’ai toujours mon message d’erreur…

---

<div class="post-metadata">

**Author:** ![pierre-gilles](https://gladys-assistant-community.b-cdn.net/user_avatar/community.gladysassistant.com/pierre-gilles/32/5886_2.png) [@pierre-gilles](https://community.gladysassistant.com/u/pierre-gilles)\
**Post date:** [Décembre 3, 2024, 7:53 UTC](https://community.gladysassistant.com/t/probleme-bluetooth-sur-pc-ubuntu/9209/7 "2024-12-03T07:53:46Z")

</div>

> [@thekassmachine](#):
>
> Sinon pour Dbus c’est là que je me rend compte que mes connaissances Unix sont tres limitées…

De ce que tu me montres en screenshot, ça a l’air d’être bon donc pas besoin de fouiller sur DBus.

Bizarre que ça ne marche pas dans gladys si tu arrives à lister les appareils Bluetooth depuis le container !

Tu as une erreur dans les logs Gladys quand tu scannes ?

---

<div class="post-metadata">

**Author:** ![gaetanb76](https://gladys-assistant-community.b-cdn.net/user_avatar/community.gladysassistant.com/gaetanb76/32/5911_2.png) [@gaetanb76](https://community.gladysassistant.com/u/gaetanb76)\
**Post date:** [Décembre 4, 2024, 4:16 UTC](https://community.gladysassistant.com/t/probleme-bluetooth-sur-pc-ubuntu/9209/8 "2024-12-04T16:16:46Z")

</div>

Bonjour,  
Ce sujet est identique je pense :  
[https://community.gladysassistant.com/t/pas-de-bluetooth-sur-minipc-beelink-s12/9217](https://community.gladysassistant.com/t/pas-de-bluetooth-sur-minipc-beelink-s12/9217)

Nous sommes 2 autres à avoir le problème.  
Mini PC Lenovo ThinkCentre M93p  
`sudo systemctl status bluetooth`

```auto
● bluetooth.service - Bluetooth service
     Loaded: loaded (/lib/systemd/system/bluetooth.service; enabled; vendor preset: enabled)
     Active: active (running) since Sun 2024-12-01 16:33:03 CET; 3 days ago
       Docs: man:bluetoothd(8)
   Main PID: 667 (bluetoothd)
     Status: "Running"
      Tasks: 1 (limit: 9306)
     Memory: 1.9M
        CPU: 81ms
     CGroup: /system.slice/bluetooth.service
             └─667 /usr/lib/bluetooth/bluetoothd

déc. 03 17:42:38 lenovo bluetoothd[667]: Endpoint unregistered: sender=:1.184 path=/MediaEndpoint/A2DPSink/sbc_xq_552
déc. 03 17:42:38 lenovo bluetoothd[667]: Endpoint unregistered: sender=:1.184 path=/MediaEndpoint/A2DPSource/sbc_xq_552
déc. 04 10:49:33 lenovo bluetoothd[667]: Endpoint registered: sender=:1.237 path=/MediaEndpoint/A2DPSink/sbc
déc. 04 10:49:33 lenovo bluetoothd[667]: Endpoint registered: sender=:1.237 path=/MediaEndpoint/A2DPSource/sbc
déc. 04 10:49:33 lenovo bluetoothd[667]: Endpoint registered: sender=:1.237 path=/MediaEndpoint/A2DPSink/sbc_xq_453
déc. 04 10:49:33 lenovo bluetoothd[667]: Endpoint registered: sender=:1.237 path=/MediaEndpoint/A2DPSource/sbc_xq_453
déc. 04 10:49:33 lenovo bluetoothd[667]: Endpoint registered: sender=:1.237 path=/MediaEndpoint/A2DPSink/sbc_xq_512
déc. 04 10:49:33 lenovo bluetoothd[667]: Endpoint registered: sender=:1.237 path=/MediaEndpoint/A2DPSource/sbc_xq_512
déc. 04 10:49:33 lenovo bluetoothd[667]: Endpoint registered: sender=:1.237 path=/MediaEndpoint/A2DPSink/sbc_xq_552
déc. 04 10:49:33 lenovo bluetoothd[667]: Endpoint registered: sender=:1.237 path=/MediaEndpoint/A2DPSource/sbc_xq_552

```

```auto
hcitool dev
Devices:
        hci0 80:00:0B:CE:2F:B0

```

> [@pierre-gilles](#):
>
> ```auto
> docker exec -it gladys sh
> 
> ```
> 
> Et que tu fais:
> 
> `hcitool dev`

donne la même réponse

---

<div class="post-metadata">

**Author:** ![pierre-gilles](https://gladys-assistant-community.b-cdn.net/user_avatar/community.gladysassistant.com/pierre-gilles/32/5886_2.png) [@pierre-gilles](https://community.gladysassistant.com/u/pierre-gilles)\
**Post date:** [Décembre 4, 2024, 5:02 UTC](https://community.gladysassistant.com/t/probleme-bluetooth-sur-pc-ubuntu/9209/9 "2024-12-04T17:02:08Z")

</div>

Je me demande si il ne manque pas des dépendances dans le container Gladys

Quand je regarde la page de la dépendance qu’on utilise ([@abandonware/noble - npm](https://www.npmjs.com/package/@abandonware/noble#installation))

Je vois qu’il faut ces dépendances:

```auto
apt-get install bluetooth bluez libbluetooth-dev libudev-dev

```

Hors dans le Dockerfile de Gladys, je ne vois que bluez :

> <https://github.com/GladysAssistant/Gladys/blob/master/docker/Dockerfile.buildx#L23>

Je me demande si c’est suffisant ou pas.

Est-ce que quelqu’un pourrait rentrer dans son container Gladys, et tester d’installer un par un ces dépendances, et voir si ça fonctionne ensuite dans Gladys ?

Pour rentrer dans le container:

```auto
docker exec -it gladys sh

```

Ensuite, tester d’installer bluetooth:

```auto
apt-get install bluetooth 

```

Puis re-tester dans Gladys

Puis si ça ne marche pas, tester d’installer :

```auto
apt-get install libbluetooth-dev

```

Puis re-tester dans Gladys.

Puis si ça ne marche pas, tester d’installer :

```auto
apt-get install libudev-dev

```

Merci d’avance !! 🙂

Si c’est ça, je rajouterais les dépendances au container

---

<div class="post-metadata">

**Author:** ![gaetanb76](https://gladys-assistant-community.b-cdn.net/user_avatar/community.gladysassistant.com/gaetanb76/32/5911_2.png) [@gaetanb76](https://community.gladysassistant.com/u/gaetanb76)\
**Post date:** [Décembre 4, 2024, 5:49 UTC](https://community.gladysassistant.com/t/probleme-bluetooth-sur-pc-ubuntu/9209/10 "2024-12-04T17:49:50Z")

</div>

```auto
apt-get install bluetooth 

```

Reading package lists… Done  
Building dependency tree… Done  
Reading state information… Done  
E: Unable to locate package bluetooth

`apt-get install libbluetooth-dev`  
Reading package lists… Done  
Building dependency tree… Done  
Reading state information… Done  
E: Unable to locate package libbluetooth-dev

`apt-get install libudev-dev`  
Reading package lists… Done  
Building dependency tree… Done  
Reading state information… Done  
E: Unable to locate package libudev-dev

Ce que je ne comprends pas, c’est que ça a fonctionné puisque j’ai 2 porte clé nut dans mes appareils.  
Je les avais intégrés il y a longtemps.  
Je ne m’en servais pas, scènes désactivées, car la détection de présence ne me satisfaisait pas.

En me connectant en direct avec un écran sur le mini-pc, je vois bien des appareils bluetooth dans Ubuntu: smartphone, clé TV

Il m’indique que des MAJ pour Docker sont dispos  
Docker Buildx cli plugin  
Docker CLI  
Docker Compose (V2) plugin for the Docker CLI  
Rootless support for Docker

- quelques autres MAJ propres à Ubuntu

---

<div class="post-metadata">

**Author:** ![pierre-gilles](https://gladys-assistant-community.b-cdn.net/user_avatar/community.gladysassistant.com/pierre-gilles/32/5886_2.png) [@pierre-gilles](https://community.gladysassistant.com/u/pierre-gilles)\
**Post date:** [Décembre 4, 2024, 6:19 UTC](https://community.gladysassistant.com/t/probleme-bluetooth-sur-pc-ubuntu/9209/11 "2024-12-04T18:19:15Z")

</div>

> [@gaetanb76](#):
>
> E: Unable to locate package bluetooth

Avant de faire les installations,

Fais un :

`apt-get update`

Puis refais le protocole un par un 🙂

---

<div class="post-metadata">

**Author:** ![gaetanb76](https://gladys-assistant-community.b-cdn.net/user_avatar/community.gladysassistant.com/gaetanb76/32/5911_2.png) [@gaetanb76](https://community.gladysassistant.com/u/gaetanb76)\
**Post date:** [Décembre 4, 2024, 6:49 UTC](https://community.gladysassistant.com/t/probleme-bluetooth-sur-pc-ubuntu/9209/12 "2024-12-04T18:49:20Z")

</div>

> [@pierre-gilles](#):
>
> `apt-get install bluetooth `

liste des paquets récupérée, mais même réponse  
` apt-get install bluetooth`

En fait, j’étais sorti du conteneur Gladys.  
En y retournant :  
` apt-get update`  
…  
Reading package lists… Done

Puis  
`apt-get install bluetooth`  
Reading package lists… Done  
Building dependency tree… Done  
Reading state information… Done  
Suggested packages:  
bluez-cups bluez-obexd bluez-meshd  
The following NEW packages will be installed:  
bluetooth  
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.  
Need to get 38.9 kB of archives.  
After this operation, 69.6 kB of additional disk space will be used.  
Get:1 [Index of /debian](http://deb.debian.org/debian) bookworm/main amd64 bluetooth all 5.66-1+deb12u2 [38.9 kB]  
Fetched 38.9 kB in 0s (1102 kB/s)  
debconf: delaying package configuration, since apt-utils is not installed  
Selecting previously unselected package bluetooth.  
(Reading database … 10770 files and directories currently installed.)  
Preparing to unpack …/bluetooth\_5.66-1+deb12u2\_all.deb …  
Unpacking bluetooth (5.66-1+deb12u2) …  
Setting up bluetooth (5.66-1+deb12u2) …

Rien ne change pour le moment dans Gladys  
Faut-il redémarrer le conteneur Gladys pour que les modifs prennent effet ?

---

<div class="post-metadata">

**Author:** ![pierre-gilles](https://gladys-assistant-community.b-cdn.net/user_avatar/community.gladysassistant.com/pierre-gilles/32/5886_2.png) [@pierre-gilles](https://community.gladysassistant.com/u/pierre-gilles)\
**Post date:** [Décembre 4, 2024, 7:39 UTC](https://community.gladysassistant.com/t/probleme-bluetooth-sur-pc-ubuntu/9209/13 "2024-12-04T19:39:02Z")

</div>

> [@gaetanb76](#):
>
> Faut-il redémarrer le conteneur Gladys pour que les modifs prennent effet ?

Je pense que oui !

docker restart gladys

---

<div class="post-metadata">

**Author:** ![thekassmachine](https://gladys-assistant-community.b-cdn.net/letter_avatar_proxy/v4/letter/t/ed8c4c/32.png) [@thekassmachine](https://community.gladysassistant.com/u/thekassmachine)\
**Post date:** [Décembre 4, 2024, 7:42 UTC](https://community.gladysassistant.com/t/probleme-bluetooth-sur-pc-ubuntu/9209/14 "2024-12-04T19:42:32Z")

</div>

Merci Gaetan pour ton aide 😉  
Pour ma part:  
update + ` apt-get install bluetooth` + `apt-get install libbluetooth-dev` + `apt-get install libudev-dev` + redémarrage du docker… Rien n’a changé… 😕

> [@gaetanb76](#):
>
> l

---

<div class="post-metadata">

**Author:** ![thekassmachine](https://gladys-assistant-community.b-cdn.net/letter_avatar_proxy/v4/letter/t/ed8c4c/32.png) [@thekassmachine](https://community.gladysassistant.com/u/thekassmachine)\
**Post date:** [Décembre 4, 2024, 7:56 UTC](https://community.gladysassistant.com/t/probleme-bluetooth-sur-pc-ubuntu/9209/15 "2024-12-04T19:56:26Z")

</div>

> [@Problème Bluetooth sur PC Ubuntu](https://community.gladysassistant.com/t/probleme-bluetooth-sur-pc-ubuntu/9209/8):
>
> Bonjour, Ce sujet est identique je pense : [https://community.gladysassistant.com/t/pas-de-bluetooth-sur-minipc-beelink-s12/9217](https://community.gladysassistant.com/t/pas-de-bluetooth-sur-minipc-beelink-s12/9217) Nous sommes 2 autres à avoir le problème. Mini PC Lenovo ThinkCentre M93p sudo systemctl status bluetooth ● bluetooth.service - Bluetooth service Loaded: loaded (/lib/systemd/system/bluetooth.service; enabled; vendor preset: enabled) Active: active (running) since Sun 2024-12-01 16:33:03 CET; 3 days ago Docs: man:bluetoothd(8) Main PID: 667 (bl…

Je confirme que j’ai les memes retour hors du docker et dans le docker en tapant `hcitool dev`

---

<div class="post-metadata">

**Author:** ![gaetanb76](https://gladys-assistant-community.b-cdn.net/user_avatar/community.gladysassistant.com/gaetanb76/32/5911_2.png) [@gaetanb76](https://community.gladysassistant.com/u/gaetanb76)\
**Post date:** [Décembre 4, 2024, 8:10 UTC](https://community.gladysassistant.com/t/probleme-bluetooth-sur-pc-ubuntu/9209/16 "2024-12-04T20:10:28Z")

</div>

Je viens de refaire toutes les étapes et le résultat est le même :  
Le module Bluetooth n’est pas disponible, merci de vérifier qu’il est bien activé.

---

<div class="post-metadata">

**Author:** ![thekassmachine](https://gladys-assistant-community.b-cdn.net/letter_avatar_proxy/v4/letter/t/ed8c4c/32.png) [@thekassmachine](https://community.gladysassistant.com/u/thekassmachine)\
**Post date:** [Décembre 4, 2024, 8:13 UTC](https://community.gladysassistant.com/t/probleme-bluetooth-sur-pc-ubuntu/9209/17 "2024-12-04T20:13:49Z")

</div>

Moi aussi, meme constat, au meme point.

---

<div class="post-metadata">

**Author:** ![pierre-gilles](https://gladys-assistant-community.b-cdn.net/user_avatar/community.gladysassistant.com/pierre-gilles/32/5886_2.png) [@pierre-gilles](https://community.gladysassistant.com/u/pierre-gilles)\
**Post date:** [Décembre 5, 2024, 4:51 UTC](https://community.gladysassistant.com/t/probleme-bluetooth-sur-pc-ubuntu/9209/18 "2024-12-05T16:51:46Z")

</div>

Merci pour vos tests !

Je suis en journée Gladys demain, j’investiguerais sur le sujet 🙂

---

<div class="post-metadata">

**Author:** ![pierre-gilles](https://gladys-assistant-community.b-cdn.net/user_avatar/community.gladysassistant.com/pierre-gilles/32/5886_2.png) [@pierre-gilles](https://community.gladysassistant.com/u/pierre-gilles)\
**Post date:** [Décembre 6, 2024, 8:51 UTC](https://community.gladysassistant.com/t/probleme-bluetooth-sur-pc-ubuntu/9209/19 "2024-12-06T08:51:16Z")

</div>

Salut à tous !

J’ai investigué sur le sujet, et je n’apporte malheureusement pas de bonnes nouvelles ^^

Depuis plusieurs années, Gladys utilise la librairie «&nbsp;Noble&nbsp;», une librairie qui permet d’utiliser le Bluetooth depuis Node.js

Cette librairie a progressivement été abandonnée par les mainteneurs originels (le dernier commit date d’il y a 6 ans) mais a été repris par un collectif, «&nbsp;abandonware&nbsp;».

Nous utilisons la version «&nbsp;abandonware&nbsp;», qui est toujours maintenue, mais de manière légère par quelques membres.

En cherchant dans les issues de cette librairie, on se rend vite compte que depuis une certaine version du Kernel Linux, la librairie ne fonctionne plus.

Il y a de nombreux posts sur le sujet, quelques exemples :

> <https://github.com/abandonware/noble/issues/312>
>
> Hi and \_thank you\_ for keeping this library active! I'm using Ubuntu 20.04 (and …have now updated to Ubuntu 22.04 as I thought it might help, but it didn't). It's a System76 laptop with Bluetooth integrated.
> 
> There are a few quirks I'm dealing with. The first and most unavoidable is that, I can't seem to get past the \`await noble.startScanningAsync();\` call unless I open the Bluetooth Settings in Ubuntu at which point the call magically completes. I think I did all the stuff that README.md indicates I need to do for Linux/Ubuntu, so I think this is pretty strange. Is there an explanation / workaround for that?
> 
> Second unavoidable problem I'm facing is once I \_do\_ get past that call, the \`noble.on('discover', async (peripheral) =\> {\` callback never fires unless I manually disable/enable the Bluetooth in Ubuntu Preferences, sometimes a couple of times (maybe it's a timing issue, I don't know). Is there an explanation / workaround for that?
> 
> Happy to share more details with guidance on how to collect those logs / configuration details.

> <https://github.com/abandonware/noble/issues/341>
>
> Hi,
> 
> Since a week ago, my small noble application cannot work in my Ubunut, wh…ich can scan and connection BLE devices before. But for unknown reason, without any code change in my application, it can no longer work and I found it's because it did not the the "poweredOn" event. But the Bluetooth functionality from the OS point of view is working fine because Ubuntu's bluetooth menu can list and connect to devices as before. 
> 
> Ubuntu version: 20.04 LTS
> Noble version: 1.9.2-25.
> 
> What kind problem could it possible be? Where can I find some debug/log information? Thanks.
> 
> Kr,
> woody

> <https://github.com/abandonware/noble/issues/345>
>
> Hello,
> 
> I recently updated my debian 12 and after the update I'm not able to u…se my usb bluetooth adapter anymore.
> Nothing has changed from code or anything else than the update of some packages.
> 
> After some tests I found that the noble.state is returning "unknown" and never changes to "poweredOn".
> I checked the bluetooth adapter and it seems ok:
> \`\`\`
> root@ws-api:~# hciconfig -a
> hci0: Type: Primary Bus: USB
> BD Address: 00:15:83:EC:CC:A1 ACL MTU: 310:10 SCO MTU: 64:8
> UP RUNNING
> RX bytes:1416 acl:0 sco:0 events:97 errors:0
> TX bytes:4913 acl:0 sco:0 commands:97 errors:0
> 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: PERIPHERAL ACCEPT
> Name: 'ws-api'
> Class: 0x000000
> Service Classes: Unspecified
> Device Class: Miscellaneous,
> HCI Version: 4.0 (0x6) Revision: 0x22bb
> LMP Version: 4.0 (0x6) Subversion: 0x22bb
> Manufacturer: Cambridge Silicon Radio (10)
> \`\`\`
> 
> The status of bluetooth in systemctl is also ok (not giving any warning/error):
> \`\`\`
> root@ws-api:~# systemctl status bluetooth
> ● bluetooth.service - Bluetooth service
> Loaded: loaded (/lib/systemd/system/bluetooth.service; enabled; preset: enabled)
> Drop-In: /etc/systemd/system/bluetooth.service.d
> └─experimental.conf
> Active: active (running) since Thu 2024-11-14 16:43:02 CET; 22s ago
> Docs: man:bluetoothd(8)
> Main PID: 1872 (bluetoothd)
> Status: "Running"
> Tasks: 1 (limit: 2308)
> Memory: 892.0K
> CPU: 21ms
> CGroup: /system.slice/bluetooth.service
> └─1872 /usr/libexec/bluetooth/bluetoothd --experimental
> 
> Nov 14 16:43:02 ws-api systemd\[1\]: Starting bluetooth.service - Bluetooth service...
> Nov 14 16:43:02 ws-api bluetoothd\[1872\]: Bluetooth daemon 5.66
> Nov 14 16:43:02 ws-api systemd\[1\]: Started bluetooth.service - Bluetooth service.
> Nov 14 16:43:02 ws-api bluetoothd\[1872\]: Starting SDP server
> Nov 14 16:43:02 ws-api bluetoothd\[1872\]: Bluetooth management interface 1.22 initialized
> Nov 14 16:43:02 ws-api bluetoothd\[1872\]: Battery Provider Manager created
> Nov 14 16:43:02 ws-api bluetoothd\[1872\]: Adv Monitor Manager created with supported features:0x00000000, enabled features:0x00000000, max number of supported monitors:32, max number of supported patterns:16
> \`\`\`
> 
> I don't see anything weird in the journal neither:
> \`\`\`
> root@ws-api:~# journalctl -xe | grep bluetooth
> Nov 14 16:44:42 ws-api systemd\[1\]: Starting bluetooth.service - Bluetooth service...
> ░░ Subject: A start job for unit bluetooth.service has begun execution
> ░░ A start job for unit bluetooth.service has begun execution.
> Nov 14 16:44:42 ws-api bluetoothd\[389\]: Bluetooth daemon 5.66
> Nov 14 16:44:42 ws-api bluetoothd\[389\]: Starting SDP server
> Nov 14 16:44:42 ws-api systemd\[1\]: Started bluetooth.service - Bluetooth service.
> ░░ Subject: A start job for unit bluetooth.service has finished successfully
> ░░ A start job for unit bluetooth.service has finished successfully.
> Nov 14 16:44:42 ws-api systemd\[1\]: Reached target bluetooth.target - Bluetooth Support.
> ░░ Subject: A start job for unit bluetooth.target has finished successfully
> ░░ A start job for unit bluetooth.target has finished successfully.
> Nov 14 16:44:42 ws-api bluetoothd\[389\]: Bluetooth management interface 1.22 initialized
> Nov 14 16:44:42 ws-api bluetoothd\[389\]: Battery Provider Manager created
> Nov 14 16:44:42 ws-api dbus-daemon\[390\]: \[system\] Activating via systemd: service name='org.freedesktop.hostname1' unit='dbus-org.freedesktop.hostname1.service' requested by ':1.4' (uid=0 pid=389 comm="/usr/libexec/bluetooth/bluetoothd --experimental")
> Nov 14 16:44:42 ws-api bluetoothd\[389\]: Adv Monitor Manager created with supported features:0x00000000, enabled features:0x00000000, max number of supported monitors:32, max number of supported patterns:16
> \`\`\`
> 
> And from bluetoothctl I can connect to device using command line so I don't think the problem is coming from the adapter or the operating system configuration.
> 
> I'm running out of idea and I'm don't know what I can do next to investigate further. Any idea ?
> 
> I also found this opened issue #341 but I'm not sure if it is related to my problem.
> 
> Any help would be reallly appreciated.
> 
> UPDATE 1:
> If I add the DEBUG env variable I can see an error from HCI:
> \`\`\`
> hci onSocketError: EINVAL, Invalid argument +1ms
> \`\`\`
> I'm now investigating what this error could be.
> 
> UPDATE 2:
> After some search with the error from UPDATE 1 I found another issue reported in node-bluetooth-hci-socket: https://github.com/abandonware/node-bluetooth-hci-socket/issues/60
> It's apparently fixed in another repository but according to another user it's not stable (https://github.com/nathankellenicki/node-poweredup/issues/189)
> 
> UPDATE 3:
> On my Debian 12 the kernel "6.1.0-26-amd64" seems to be the latest working one. Starting from "6.1.0-27-amd64" it returns an unknown state and never pass to poweredOn.
> Downgrading the kernel from "6.1.0-27-amd64" to "6.1.0-26-amd64" solved the problem for me. It's not a solution but at least I can have my bluetooth adapter working until we find a real solution.

Pour les voir tous, ça se passe ici : [Issues · abandonware/noble · GitHub](https://github.com/abandonware/noble/issues)

Je vois qu’il y a eu des soucis sur d’autres librairies suite à des changements de Kernel sur Linux :

> <https://github.com/abandonware/node-bluetooth-hci-socket/issues/60>
>
> Hi i'm using Arch linux and after upgrading to 6.9.3 kernel, my script using @ab…andonware/noble stopped working.
> 
> After some investigations I managed to easily reproduce the issue by simply running examples/le-scan-test.js
> And here's the result:
> \`\`\`
> $ sudo node le-scan-test.js
> Error: EINVAL, Invalid argument
> at setFilter (/tmp/a/node-bluetooth-hci-socket/examples/le-scan-test.js:83:22)
> at Object.\<anonymous\> (/tmp/a/node-bluetooth-hci-socket/examples/le-scan-test.js:124:1)
> at Module.\_compile (node:internal/modules/cjs/loader:1159:14)
> at Module.\_extensions..js (node:internal/modules/cjs/loader:1213:10)
> at Module.load (node:internal/modules/cjs/loader:1037:32)
> at Module.\_load (node:internal/modules/cjs/loader:878:12)
> at Function.executeUserEntryPoint \[as runMain\] (node:internal/modules/run\_main:81:12)
> at node:internal/main/run\_main\_module:23:47 {
> errno: 22,
> code: 'EINVAL',
> syscall: 'setsockopt'
> }
> \`\`\`
> Exact kernel :
> \`Linux 6.9.3-arch1-1 #1 SMP PREEMPT\_DYNAMIC Fri, 31 May 2024 15:14:45 +0000 x86\_64 GNU/Linux\`
> 
> I unfortunately have no time to try to rollback to older kernels and find where it broke.

**Qu’est-ce qu’on fait ?**

Le bug a l’air relativement récent (relativement à l’activité du projet noble), je pense que pour l’instant on peut voir si abandonware publie un correctif pour les versions récentes de Linux.

Si cette librairie est véritablement abandonné dans les prochains mois, il faudra trouver une alternative, mais j’ai cherché rapidement et il n’y a vraiment aucune autre librairie, c’est compliqué 😅

**Quel est votre usage ?**

Pour ceux qui voulaient utiliser le Bluetooth dans ce post, que vouliez-vous faire ?

Je peux vous orienter vers des solutions alternatives !

Franchement, la détection de présence via Bluetooth est une méthode que je déconseille de plus en plus.

Autrefois, la majorité des appareils Bluetooth étaient “basiques” : ils diffusaient constamment leur adresse MAC, ce qui les rendait très simples à détecter et à suivre.

Mais aujourd’hui, les appareils modernes comme les smartphones ou les montres connectées intègrent des mécanismes avancés pour éviter le tracking (par souci de confidentialité) et optimiser la consommation de batterie.

Résultat : les scans Bluetooth sur ces dispositifs sont devenus largement inefficaces.

---

<div class="post-metadata">

**Author:** ![gaetanb76](https://gladys-assistant-community.b-cdn.net/user_avatar/community.gladysassistant.com/gaetanb76/32/5911_2.png) [@gaetanb76](https://community.gladysassistant.com/u/gaetanb76)\
**Post date:** [Décembre 6, 2024, 4:59 UTC](https://community.gladysassistant.com/t/probleme-bluetooth-sur-pc-ubuntu/9209/20 "2024-12-06T16:59:32Z")

</div>

Merci @pierre-gilles pour toutes ces recherches.  
Ce que je ne comprends pas c’est que le Bluetooth fonctionne sur le mini-pc (des appareils sont vus), mais pas dans Gladys. Certainement le fait que ceux sont deux librairies différentes, une pour chaque «&nbsp;appareil&nbsp;».  
Perso, je n’ai pas l’utilité du Bluetooth. J’ai des porte clés nut dont je ne me sers pas. La détection de présence n’est pas top avec je trouve.

[Page suivante](https://community.gladysassistant.com/t/probleme-bluetooth-sur-pc-ubuntu/9209.md?page=2)
