maniacx / Airpod-Battery-Monitor

A Gnome extension for monitoring battery level of AirPods and Beats Bluetooth headset
https://extensions.gnome.org/extension/6778/airpod-battery-monitor/
GNU General Public License v3.0
27 stars 7 forks source link

Airpods Gen 2 Not Detected on Fedora 40 (Gnome 46) #20

Open thapa-sabin opened 2 months ago

thapa-sabin commented 2 months ago

The battery indicator worked flawlessly on Gnome 43.9 on Debian, but it no longer works on Gnome 46 on Fedora.

Gnome 43.9

image

Gnome 46

image My Bluetooth is on dual mode. ControllerMode = dual

maniacx commented 2 months ago

Hello thapa-sabin. Can you run file test.js from readme in Fedora and post the output here?

You will find test.js here https://maniacx.github.io/Airpod-Battery-Monitor/bugs-feature-request#script-for-getting-manufacturer-data

thapa-sabin commented 2 months ago

Fedora 40, Gnome 46 Here is what the output is for test.js copied from the terminal

Gjs-Message: 13:26:06.932: JS LOG: StartDiscoveryAsync
Gjs-Message: 13:26:16.714: JS LOG: Scanning Bluetooth devices...
Gjs-Message: 13:26:16.714: JS LOG: No information about objects was obtained.
Gjs-Message: 13:26:21.710: JS LOG: StopDiscoveryAsync
Gjs-Message: 13:26:31.711: JS LOG: StartDiscoveryAsync
Gjs-Message: 13:26:46.717: JS LOG: Scanning Bluetooth devices...
Gjs-Message: 13:26:46.717: JS LOG: No information about objects was obtained.

Tell me if you meant to ask for logs instead. I will post the output here.

maniacx commented 2 months ago

Can you run the command bluetoothctl and use scan le or scan on to start discovery and see if it detected your airpods. You may have to wait around 30 seconds cause sometimes it takes time to scan. After scanning bluetooth devices, use scan off to stop discovery

Before running bluetoothctl, close Gnome-settings bluetooth page if you have opened it and also disable this extension.

You can refer the screencast posted here how to do it? https://maniacx.github.io/Airpod-Battery-Monitor/bugs-feature-request

If any Airpods are scanned it will display, with Manufacturer Key is 0x04C (76) and Manufacturer Data starts with 0719 or 0713.

Also besides that, did you change any other settings/config file with bluetooth or runinng any scripts with bluetooth?

thapa-sabin commented 2 months ago

Here is what I get

[bluetooth]# [CHG] Device 9C:FC:28:37:FE:8F ManufacturerData.Key: 0x004c (76)
[bluetooth]# [CHG] Device 9C:FC:28:37:FE:8F ManufacturerData.Value:
[bluetooth]#   07 0f 00 0f 20 9c fc 28 37 fe 8f 35 d9 dc 2e 02  .... ..(7..5....
[bluetooth]#   00

And also this when the Airpods stop blinking its white led

[bluetooth]# [NEW] Device 47:A1:B9:A0:1B:26 47-A1-B9-A0-1B-26
[bluetooth]# [CHG] Device 47:A1:B9:A0:1B:26 RSSI: 0xffffffa2 (-94)
[bluetooth]# [DEL] Device 9C:FC:28:27:E9:73 9C-FC-28-27-E9-73
[bluetooth]# [DEL] Device 9C:FC:28:37:FE:8F AirPods
[bluetooth]# [CHG] Device 47:A1:B9:A0:1B:26 RSSI: 0xffffffa2 (-94)

No, I have not changed anything, it is a completely new install of Fedora Workstation 40.

thapa-sabin commented 2 months ago

Maybe this will be helpful too

[bluetooth]# [CHG] Device 9C:FC:28:37:FE:8F Class: 0x00240418 (2360344)
[bluetooth]# [CHG] Device 9C:FC:28:37:FE:8F Icon: audio-headphones
[bluetooth]# [CHG] Device 9C:FC:28:37:FE:8F Modalias: bluetooth:v004Cp200Fd0400

For the most part, bluetoothctl after scan le gives this output

[bluetooth]# [CHG] Device 9C:FC:28:27:E9:73 RSSI: 0xffffffde (-34)
[bluetooth]# [CHG] Device 9C:FC:28:37:FE:8F RSSI: 0xffffffe0 (-32)
[bluetooth]# [CHG] Device 9C:FC:28:37:FE:8F RSSI: 0xffffffde (-34)
[bluetooth]# [CHG] Device 9C:FC:28:27:E9:73 RSSI: 0xffffffdf (-33)
[bluetooth]# [CHG] Device 9C:FC:28:37:FE:8F RSSI: 0xffffffe2 (-30)
[bluetooth]# [CHG] Device 9C:FC:28:27:E9:73 RSSI: 0xffffffe0 (-32)
[bluetooth]# [CHG] Device 47:A1:B9:A0:1B:26 RSSI: 0xffffffa0 (-96)
[bluetooth]# [CHG] Device 9C:FC:28:37:FE:8F RSSI: 0xffffffe2 (-30)
[bluetooth]# [CHG] Device 9C:FC:28:27:E9:73 RSSI: 0xffffffe0 (-32)
[bluetooth]# [CHG] Device 9C:FC:28:27:E9:73 RSSI: 0xffffffdf (-33)
[bluetooth]# [CHG] Device 9C:FC:28:37:FE:8F RSSI: 0xffffffe0 (-32)
[bluetooth]# [CHG] Device 9C:FC:28:27:E9:73 RSSI: 0xffffffe0 (-32)
[bluetooth]# [CHG] Device 9C:FC:28:37:FE:8F RSSI: 0xffffffe0 (-32)
[bluetooth]# [CHG] Device 9C:FC:28:27:E9:73 RSSI: 0xffffffdf (-33)
[bluetooth]# [CHG] Device 9C:FC:28:37:FE:8F RSSI: 0xffffffde (-34)
[bluetooth]# [CHG] Device 9C:FC:28:27:E9:73 RSSI: 0xffffffde (-34)
[bluetooth]# [CHG] Device 9C:FC:28:27:E9:73 RSSI: 0xffffffe0 (-32)
[bluetooth]# [CHG] Device 9C:FC:28:37:FE:8F RSSI: 0xffffffe2 (-30)
[bluetooth]# [CHG] Device 47:A1:B9:A0:1B:26 RSSI: 0xffffff9f (-97)
thapa-sabin commented 2 months ago

Here is what I get when I pair the device

[CHG] Device 9C:FC:28:37:FE:8F Connected: yes
[AirPods]# [CHG] Device 9C:FC:28:37:FE:8F Bonded: yes
[AirPods]# [CHG] Device 9C:FC:28:37:FE:8F Modalias: bluetooth:v004Cp200FdC141
[AirPods]# [CHG] Device 9C:FC:28:37:FE:8F UUIDs: XXXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX
[AirPods]# [CHG] Device 9C:FC:28:37:FE:8F ServicesResolved: yes
[AirPods]# [CHG] Device 9C:FC:28:37:FE:8F Paired: yes
[AirPods]# [CHG] Device 9C:FC:28:37:FE:8F Trusted: yes
[AirPods]# [NEW] Endpoint /org/bluez/hci0/dev_9C_FC_28_37_FE_8F/sep1 
[AirPods]# [NEW] Endpoint /org/bluez/hci0/dev_9C_FC_28_37_FE_8F/sep2 
[AirPods]# [NEW] Endpoint /org/bluez/hci0/dev_9C_FC_28_37_FE_8F/sep3 
[AirPods]# [NEW] Transport /org/bluez/hci0/dev_9C_FC_28_37_FE_8F/sep2/fd2 
[AirPods]# [CHG] Transport /org/bluez/hci0/dev_9C_FC_28_37_FE_8F/sep2/fd2 Delay: 0x05dc (1500)
[AirPods]# [CHG] Transport /org/bluez/hci0/dev_9C_FC_28_37_FE_8F/sep2/fd2 Volume: 0x003b (59)
[AirPods]# [CHG] Device 47:A1:B9:A0:1B:26 RSSI: 0xffffffa3 (-93)
maniacx commented 2 months ago

[bluetooth]# [CHG] Device 9C:FC:28:37:FE:8F ManufacturerData.Key: 0x004c (76) [bluetooth]# [CHG] Device 9C:FC:28:37:FE:8F ManufacturerData.Value: [bluetooth]# 07 0f 00 0f 20 9c fc 28 37 fe 8f 35 d9 dc 2e 02 .... ..(7..5.... [bluetooth]# 00

Interesting. Seem like your Airpods (If it is an Airpod and not other device like iphone or any other apple devices) detects have manufacturing code starting with 0704 unlike other Airpod which starts with 0719 or 0713

Was the Airpods in pairing mode when you ran bluetoothctl>scan le?

Although the ip address in discovery matches the ipaddress of Airpods which is usually not the case, unless bluez or airpods updates have changed something or Airpods was in Pairing mode.

Can you do another test for me.

I want to confirm the Manufaturer data starting with 070F is your Airpod.

If you have any other apple devices, turn off thier bluetooth temporarily, so that they dont get scanned during discovery. (this is optional, if you do not want to turn off bluetooth its ok, )

With the airpods already paired and connected to Fedora 40, run bluetoothctl>scan le again See if it discovers the device with Manufaturer data starting with Manufaturer data starting with 07 0f Pay attention to the RSSI value as well.

If it discovers Manufaturer data starting with 07 0f. scan off Now turn off airpod. And keep it far away from the laptop/desktop. Run scan le again Check if the Manufacturer Data starting with 070F is found again. If found note the RSSI.

RSSI is the signal strength of bluetooth. If airpods are near you will read a lower negative number example -31 If airpods are far away, it would read a higher negative value , example -90

This would also confirm that device with 0704 are your airpods.

thapa-sabin commented 2 months ago

I am away from my laptop at this moment, and I am on my second machine running Debian 12. All the values look familiar. Here is what bluetoothctl gives me (Airpods has been paired to this machine previously, and is paired to it, but I have simply not connected my airpods to it at the moment.

[CHG] Device 9C:FC:28:37:FE:8F ManufacturerData Key: 0x004c
[CHG] Device 9C:FC:28:37:FE:8F ManufacturerData Value:
  07 0f 00 0f 20 9c fc 28 37 fe 8f 35 e4 e4 23 01  .... ..(7..5..#.
  00   

The ManufactererData Key looks to be the same. And these look to be similar too

[NEW] Endpoint /org/bluez/hci0/dev_9C_FC_28_37_FE_8F/sep1 
[NEW] Endpoint /org/bluez/hci0/dev_9C_FC_28_37_FE_8F/sep2 
[NEW] Endpoint /org/bluez/hci0/dev_9C_FC_28_37_FE_8F/sep3 
[NEW] Transport /org/bluez/hci0/dev_9C_FC_28_37_FE_8F/sep1/fd0 
[CHG] Transport /org/bluez/hci0/dev_9C_FC_28_37_FE_8F/sep1/fd0 Delay: 0x05dc (1500)
[CHG] Transport /org/bluez/hci0/dev_9C_FC_28_37_FE_8F/sep1/fd0 Volume: 0x0040 (64)

And for some odd reason, the extension simply works on Debian 12 (Gnome 43.9). PS: The screenshot of Debian 12 that I originally posted was on the same device that runs Fedora 40 right now on Gnome 46. What I mean is that the extension worked on Debian 12. but not on Fedora 40 on the same machine. Also, thanks for the prompt response. I will try everything you just said as soon as possible.

thapa-sabin commented 2 months ago

As you can see. image The extension is able to detect my Airpods and show the battery percentage accurately on my second machine running Debian 12.

Also: I do not use any other Apple devices, except for these Second Generation Airpods.

maniacx commented 2 months ago

Can you please run test.js on debian (second machine).

thapa-sabin commented 2 months ago

I followed the same instructions as before and ran test.js wiith the extension disabled, and the bluetooth off.

Gjs-Message: 05:46:54.006: JS LOG: StartDiscoveryAsync
Gjs-Message: 05:46:54.007: JS LOG: Ignored exception from dbus method: Gio.IOErrorEnum: GDBus.Error:org.bluez.Error.NotReady: Resource Not Ready
Gjs-Message: 05:46:54.007: JS LOG: StartDiscoveryAsync failed 
Gjs-Message: 05:47:03.955: JS LOG: Scanning Bluetooth devices...
Gjs-Message: 05:47:03.956: JS LOG: No information about objects was obtained.
Gjs-Message: 05:47:08.938: JS LOG: StopDiscoveryAsync
Gjs-Message: 05:47:08.940: JS LOG: StopDiscoveryAsync failed
Gjs-Message: 05:47:18.948: JS LOG: StartDiscoveryAsync
Gjs-Message: 05:47:18.949: JS LOG: Ignored exception from dbus method: Gio.IOErrorEnum: GDBus.Error:org.bluez.Error.NotReady: Resource Not Ready
Gjs-Message: 05:47:18.950: JS LOG: StartDiscoveryAsync failed 
Gjs-Message: 05:47:33.959: JS LOG: Scanning Bluetooth devices...
Gjs-Message: 05:47:33.960: JS LOG: No information about objects was obtained.
Gjs-Message: 05:47:38.942: JS LOG: StopDiscoveryAsync
Gjs-Message: 05:47:38.947: JS LOG: StopDiscoveryAsync failed
Gjs-Message: 05:47:48.947: JS LOG: StartDiscoveryAsync
Gjs-Message: 05:47:48.948: JS LOG: Ignored exception from dbus method: Gio.IOErrorEnum: GDBus.Error:org.bluez.Error.NotReady: Resource Not Ready
Gjs-Message: 05:47:48.949: JS LOG: StartDiscoveryAsync failed 

Here is what I get with it on

Gjs-Message: 05:50:29.953: JS LOG: Scanning Bluetooth devices...
Gjs-Message: 05:50:29.955: JS LOG: ------------------------------------------
Gjs-Message: 05:50:29.955: JS LOG: ManufacturerData                   : 0719010f2055aab3010004d51bc4905d3b933304b4bc052bc74992
Gjs-Message: 05:50:29.955: JS LOG: Rssi                               : -33
Gjs-Message: 05:50:29.956: JS LOG: Model 4 Character                  : 0f20
Gjs-Message: 05:50:29.956: JS LOG: Model 1 Character                  : f
Gjs-Message: 05:50:29.956: JS LOG: Left Battery Level                 : 100
Gjs-Message: 05:50:29.956: JS LOG: Right Battery Level                : 100
Gjs-Message: 05:50:29.956: JS LOG: Case Battery Level                 : 30
Gjs-Message: 05:50:29.956: JS LOG: Single Battery Level               : 100
Gjs-Message: 05:50:29.956: JS LOG: Left Battery Charging Status       : true
Gjs-Message: 05:50:29.956: JS LOG: Right Battery Charging Status      : true
Gjs-Message: 05:50:29.956: JS LOG: Case Battery Charging Status       : false
Gjs-Message: 05:50:29.956: JS LOG: Single Battery Charging Status     : true
Gjs-Message: 05:50:29.956: JS LOG: ------------------------------------------

I unpaired the Airpods, and with the Bluetooth still on, I ran test.js again. It gave the same output:

Gjs-Message: 05:52:48.272: JS LOG: StartDiscoveryAsync
Gjs-Message: 05:52:58.960: JS LOG: Scanning Bluetooth devices...
Gjs-Message: 05:52:58.963: JS LOG: ------------------------------------------
Gjs-Message: 05:52:58.963: JS LOG: ManufacturerData                   : 0719010f2055a9b301000083a0156a858579cc60b5fc054416924a
Gjs-Message: 05:52:58.964: JS LOG: Rssi                               : -31
Gjs-Message: 05:52:58.964: JS LOG: Model 4 Character                  : 0f20
Gjs-Message: 05:52:58.964: JS LOG: Model 1 Character                  : f
Gjs-Message: 05:52:58.964: JS LOG: Left Battery Level                 : 90
Gjs-Message: 05:52:58.964: JS LOG: Right Battery Level                : 100
Gjs-Message: 05:52:58.964: JS LOG: Case Battery Level                 : 30
Gjs-Message: 05:52:58.964: JS LOG: Single Battery Level               : 90
Gjs-Message: 05:52:58.964: JS LOG: Left Battery Charging Status       : true
Gjs-Message: 05:52:58.964: JS LOG: Right Battery Charging Status      : true
Gjs-Message: 05:52:58.964: JS LOG: Case Battery Charging Status       : false
Gjs-Message: 05:52:58.964: JS LOG: Single Battery Charging Status     : true
Gjs-Message: 05:52:58.964: JS LOG: ------------------------------------------

Do you need something from the Fedora machine? I have access to it now. I originally ran test.js with the bluetooth off, because that's what I got out off the README. Oh, and I would also like to add that the extension worked well on Debian sid on Gnome 44.9. Could it just be a Gnome 46 issue?

thapa-sabin commented 2 months ago

No luck on my main machine (Fedora 40)

Gjs-Message: 06:15:15.901: JS LOG: StartDiscoveryAsync
Gjs-Message: 06:15:25.703: JS LOG: Scanning Bluetooth devices...
Gjs-Message: 06:15:25.704: JS LOG: No information about objects was obtained.
Gjs-Message: 06:15:30.697: JS LOG: StopDiscoveryAsync
Gjs-Message: 06:15:40.698: JS LOG: StartDiscoveryAsync
Gjs-Message: 06:15:55.704: JS LOG: Scanning Bluetooth devices...
Gjs-Message: 06:15:55.705: JS LOG: No information about objects was obtained.
Gjs-Message: 06:16:00.697: JS LOG: StopDiscoveryAsync
Gjs-Message: 06:16:10.698: JS LOG: StartDiscoveryAsync
Gjs-Message: 06:16:25.705: JS LOG: Scanning Bluetooth devices...
Gjs-Message: 06:16:25.706: JS LOG: No information about objects was obtained.
Gjs-Message: 06:16:30.697: JS LOG: StopDiscoveryAsync
Gjs-Message: 06:16:40.698: JS LOG: StartDiscoveryAsync
Gjs-Message: 06:16:55.705: JS LOG: Scanning Bluetooth devices...
Gjs-Message: 06:16:55.705: JS LOG: No information about objects was obtained.
Gjs-Message: 06:17:00.697: JS LOG: StopDiscoveryAsync
Gjs-Message: 06:17:10.698: JS LOG: StartDiscoveryAsync
Gjs-Message: 06:17:25.699: JS LOG: Scanning Bluetooth devices...
Gjs-Message: 06:17:25.699: JS LOG: No information about objects was obtained.
Gjs-Message: 06:17:30.697: JS LOG: StopDiscoveryAsync
Gjs-Message: 06:17:40.698: JS LOG: StartDiscoveryAsync
Gjs-Message: 06:17:55.702: JS LOG: Scanning Bluetooth devices...
Gjs-Message: 06:17:55.703: JS LOG: No information about objects was obtained.
Gjs-Message: 06:18:00.697: JS LOG: StopDiscoveryAsync
Gjs-Message: 06:18:10.698: JS LOG: StartDiscoveryAsync
Gjs-Message: 06:18:25.701: JS LOG: Scanning Bluetooth devices...
Gjs-Message: 06:18:25.701: JS LOG: No information about objects was obtained.
Gjs-Message: 06:18:30.697: JS LOG: StopDiscoveryAsync
Gjs-Message: 06:18:40.698: JS LOG: StartDiscoveryAsync
Gjs-Message: 06:18:55.704: JS LOG: Scanning Bluetooth devices...
Gjs-Message: 06:18:55.704: JS LOG: No information about objects was obtained.
Gjs-Message: 06:19:00.696: JS LOG: StopDiscoveryAsync
Gjs-Message: 06:19:10.697: JS LOG: StartDiscoveryAsync
Gjs-Message: 06:19:25.702: JS LOG: Scanning Bluetooth devices...
Gjs-Message: 06:19:25.702: JS LOG: No information about objects was obtained.
Gjs-Message: 06:19:30.697: JS LOG: StopDiscoveryAsync

I ran test.js with the Bluetooth on, and the Airpods unpaired, but in pairing mode.

maniacx commented 2 months ago

Can you use screenshot tool on debian to record a video (screencast) and record on terminal when you use bluetoothctl > scan le and upload it here If possible on both Debian and Fedora.

On debian running test.js shows the Manufacturer key as 0719010f2055a9b301000083a0156a858579cc60b5fc054416924a

So Try first on debian, and there should be a device with Manufacturers key starting with 0719. it will definitely show when running bluettoothctl > scan le.

Also on debian and Fedora. Could you run the command

bluetoothctl info 9C:FC:28:37:FE:8F

Sorry if it is too much of task for you. I am just trying to pin point where is the issue. So far your previous results of bluetoothctl start le shows different on both debian as well as fedora.

Note: Keep running scan le for 30 seconds, it will show you multiple devices at least on debian one device will definately show up with 0719**0f20 (first 4 digits will be 0719 ( device identiy type = airpods), and digit 7,8,9,10 will be 0f20 (model identity type = airpod 2nd Gen)

If it shows up on debian, then try it on Fedora. See if bluettoothctl > scan le discovers device with manufacturer key 0719**0f20. If it does. then we have to figure out could be extension problem If it doesnt show, I could be some issues with bluez of configuration of bluez.

Also post me the output of cat /etc/bluetooth/main.confon fedora

thapa-sabin commented 2 months ago

Sure no problem! This is a great project. Its practical, and very useful, and I will definitely try my best to help figure out what the problem is.

Here is what I get when I do bluetoothctl and scan le followed by test.js debian: Screencast from 2024-05-23 16-55-01.webm

I apologize for the sluggishness. There were a lot of things I was trying to follow, while holding down the pairing button every so often. I had originally unpaired my Airpods, but test.js gave me nothing, so I paired it back. I will be doing the same thing on and posting the attaching the video along with the output of cat /etc/bluetooth/main.conf in the next comment.

thapa-sabin commented 2 months ago

Same thing on Fedora:

https://github.com/maniacx/Airpod-Battery-Monitor/assets/76477949/9e93826a-243a-4349-b3a9-7067ce754263

(I just noticed I had the extension turned back on. I have posted the video performing the same set of tasks below.)

I am not knowledgeable enough to comment on anything going on here, but I feel like Fedora recognizes both the sticks of my Airpods as two different devices. I could be wrong though, but the different address 48:2E:D7:78:1F:47 instead of just the 9C:FC:28:37:FE:8F I was getting on debian is not from one of my devices. Also, I just noticed a different address starting with 9, which is 9C:FC:28:27:E9:73.

Edit: Here is me performing the same set of tasks with the extension disabled. I no longer get the weird 48:2E:D7:78:1F:47 address.

Video: https://github.com/maniacx/Airpod-Battery-Monitor/assets/76477949/c6c378ad-d7e2-4087-ab77-5f2e1d140458

Here is the output of cat /etc/bluetooth/main.conf

[General]

# Default adapter name
# Defaults to 'BlueZ X.YZ'
#Name = BlueZ

# Default device class. Only the major and minor device class bits are
# considered. Defaults to '0x000000'.
#Class = 0x000100

# How long to stay in discoverable mode before going back to non-discoverable
# The value is in seconds. Default is 180, i.e. 3 minutes.
# 0 = disable timer, i.e. stay discoverable forever
#DiscoverableTimeout = 0

# Always allow pairing even if there are no agent registered
# Possible values: true, false
# Default: false
#AlwaysPairable = false

# How long to stay in pairable mode before going back to non-discoverable
# The value is in seconds. Default is 0.
# 0 = disable timer, i.e. stay pairable forever
#PairableTimeout = 0

# Use vendor id source (assigner), vendor, product and version information for
# DID profile support. The values are separated by ":" and assigner, VID, PID
# and version.
# Possible vendor id source values: bluetooth, usb (default) or false (disabled)
#DeviceID = bluetooth:1234:5678:abcd

# Do reverse service discovery for previously unknown devices that connect to
# us. For BR/EDR this option is really only needed for qualification since the
# BITE tester doesn't like us doing reverse SDP for some test cases, for LE
# this disables the GATT client functionally so it can be used in system which
# can only operate as peripheral (see also GATT Client option).
# Defaults to 'true'.
#ReverseServiceDiscovery = true

# Enable name resolving after inquiry. Set it to 'false' if you don't need
# remote devices name and want shorter discovery cycle. Defaults to 'true'.
#NameResolving = true

# Enable runtime persistency of debug link keys. Default is false which
# makes debug link keys valid only for the duration of the connection
# that they were created for.
#DebugKeys = false

# Restricts all controllers to the specified transport. Default value
# is "dual", i.e. both BR/EDR and LE enabled (when supported by the HW).
# Possible values: "dual", "bredr", "le"
#ControllerMode = dual

# Maximum number of controllers allowed to be exposed to the system.
# Default=0 (unlimited)
#MaxControllers=0

# Enables Multi Profile Specification support. This allows to specify if
# system supports only Multiple Profiles Single Device (MPSD) configuration
# or both Multiple Profiles Single Device (MPSD) and Multiple Profiles Multiple
# Devices (MPMD) configurations.
# Possible values: "off", "single", "multiple"
#MultiProfile = off

# Permanently enables the Fast Connectable setting for adapters that
# support it. When enabled other devices can connect faster to us,
# however the tradeoff is increased power consumptions. This feature
# will fully work only on kernel version 4.1 and newer. Defaults to
# 'false'.
#FastConnectable = false

# Default privacy setting.
# Enables use of private address.
# Possible values for LE mode: "off", "network/on", "device"
# Possible values for Dual mode: "off", "network/on", "device",
# "limited-network", "limited-device"
#
# - off: Local privacy disabled.
#
# - network/on: A device will only accept advertising packets from peer
# devices that contain private addresses. It may not be compatible with some
# legacy devices since it requires the use of RPA(s) all the time.
#
# - device: A device in device privacy mode is only concerned about the
# privacy of the device and will accept advertising packets from peer devices
# that contain their Identity Address as well as ones that contain a private
# address, even if the peer device has distributed its IRK in the past.

# - limited-network: Apply Limited Discoverable Mode to advertising, which
# follows the same policy as to BR/EDR that publishes the identity address when
# discoverable, and Network Privacy Mode for scanning.
#
# - limited-device: Apply Limited Discoverable Mode to advertising, which
# follows the same policy as to BR/EDR that publishes the identity address when
# discoverable, and Device Privacy Mode for scanning.
#
# Defaults to "off"
#Privacy = off

# Specify the policy to the JUST-WORKS repairing initiated by peer
# Possible values: "never", "confirm", "always"
# Defaults to "never"
#JustWorksRepairing = never

# How long to keep temporary devices around
# The value is in seconds. Default is 30.
# 0 = disable timer, i.e. never keep temporary devices
#TemporaryTimeout = 30

# Enables the device to issue an SDP request to update known services when
# profile is connected. Defaults to true.
#RefreshDiscovery = true

# Default Secure Connections setting.
# Enables the Secure Connections setting for adapters that support it. It
# provides better crypto algorithms for BT links and also enables CTKD (cross
# transport key derivation) during pairing on any link.
# Possible values: "off", "on", "only"
# - "off": Secure Connections are disabled
# - "on": Secure Connections are enabled when peer device supports them
# - "only": we allow only Secure Connections
# Defaults to "on"
#SecureConnections = on

# Enables D-Bus experimental interfaces
# Possible values: true or false
#Experimental = false

# Enables kernel experimental features, alternatively a list of UUIDs
# can be given.
# Possible values: true,false,<UUID List>
# Possible UUIDS:
# d4992530-b9ec-469f-ab01-6c481c47da1c (BlueZ Experimental Debug)
# 671b10b5-42c0-4696-9227-eb28d1b049d6 (BlueZ Experimental Simultaneous Central and Peripheral)
# 15c0a148-c273-11ea-b3de-0242ac130004 (BlueZ Experimental LL privacy)
# 330859bc-7506-492d-9370-9a6f0614037f (BlueZ Experimental Bluetooth Quality Report)
# a6695ace-ee7f-4fb9-881a-5fac66c629af (BlueZ Experimental Offload Codecs)
# 6fbaf188-05e0-496a-9885-d6ddfdb4e03e (BlueZ Experimental ISO socket)
# 69518c4c-b69f-4679-8bc1-c021b47b5733 (BlueZ Experimental Poll Errqueue)
# Defaults to false.
#KernelExperimental = false

# The duration to avoid retrying to resolve a peer's name, if the previous
# try failed.
# The value is in seconds. Default is 300, i.e. 5 minutes.
#RemoteNameRequestRetryDelay = 300

[BR]
# The following values are used to load default adapter parameters for BR/EDR.
# BlueZ loads the values into the kernel before the adapter is powered if the
# kernel supports the MGMT_LOAD_DEFAULT_PARAMETERS command. If a value isn't
# provided, the kernel will be initialized to it's default value.  The actual
# value will vary based on the kernel version and thus aren't provided here.
# The Bluetooth Core Specification should be consulted for the meaning and valid
# domain of each of these values.

# BR/EDR Page scan activity configuration
#PageScanType=
#PageScanInterval=
#PageScanWindow=

# BR/EDR Inquiry scan activity configuration
#InquiryScanType=
#InquiryScanInterval=
#InquiryScanWindow=

# BR/EDR Link supervision timeout
#LinkSupervisionTimeout=

# BR/EDR Page Timeout
#PageTimeout=

# BR/EDR Sniff Intervals
#MinSniffInterval=
#MaxSniffInterval=

[LE]
# The following values are used to load default adapter parameters for LE.
# BlueZ loads the values into the kernel before the adapter is powered if the
# kernel supports the MGMT_LOAD_DEFAULT_PARAMETERS command. If a value isn't
# provided, the kernel will be initialized to it's default value.  The actual
# value will vary based on the kernel version and thus aren't provided here.
# The Bluetooth Core Specification should be consulted for the meaning and valid
# domain of each of these values.
# LE advertisement interval (used for legacy advertisement interface only)
#MinAdvertisementInterval=
#MaxAdvertisementInterval=
#MultiAdvertisementRotationInterval=

# LE scanning parameters used for passive scanning supporting auto connect
# scenarios
#ScanIntervalAutoConnect=
#ScanWindowAutoConnect=

# LE scanning parameters used for passive scanning supporting wake from suspend
# scenarios
#ScanIntervalSuspend=
#ScanWindowSuspend=

# LE scanning parameters used for active scanning supporting discovery
# proceedure
#ScanIntervalDiscovery=
#ScanWindowDiscovery=

# LE scanning parameters used for passive scanning supporting the advertisement
# monitor Apis
#ScanIntervalAdvMonitor=
#ScanWindowAdvMonitor=

# LE scanning parameters used for connection establishment.
#ScanIntervalConnect=
#ScanWindowConnect=

# LE default connection parameters.  These values are superceeded by any
# specific values provided via the Load Connection Parameters interface
#MinConnectionInterval=
#MaxConnectionInterval=
#ConnectionLatency=
#ConnectionSupervisionTimeout=
#Autoconnecttimeout=

# Scan duration during interleaving scan. Only used when scanning for ADV
# monitors. The units are msec.
# Default: 300
#AdvMonAllowlistScanDuration=
# Default: 500
#AdvMonNoFilterScanDuration=

# Enable/Disable Advertisement Monitor interleave scan for power saving.
# 0: disable
# 1: enable
# Defaults to 1
#EnableAdvMonInterleaveScan=

[GATT]
# GATT attribute cache.
# Possible values:
# always: Always cache attributes even for devices not paired, this is
# recommended as it is best for interoperability, with more consistent
# reconnection times and enables proper tracking of notifications for all
# devices.
# yes: Only cache attributes of paired devices.
# no: Never cache attributes
# Default: always
#Cache = always

# Minimum required Encryption Key Size for accessing secured characteristics.
# Possible values: 0 and 7-16. 0 means don't care.
# Defaults to 0
#KeySize = 0

# Exchange MTU size.
# Possible values: 23-517
# Defaults to 517
#ExchangeMTU = 517

# Number of ATT channels
# Possible values: 1-5 (1 disables EATT)
# Default to 1
#Channels = 1

[CSIS]
# SIRK - Set Identification Resolution Key which is common for all the
# sets. They SIRK key is used to identify its sets. This can be any
# 128 bit value or a string value (e.g. product name) which is then hashed.
# Possible Values:
# 16 byte hexadecimal value: 861FAE703ED681F0C50B34155B6434FB
# String value: "My Product Name"
# Defaults to none
#SIRK =

# SIRK Encryption
# Possible values:
# true: Encrypt SIRK when read
# false: Do not encrypt SIRK when read. (plaintext)
# Defaults to true
#Encryption = true

# Total no of sets belongs to this Profile
# Defaults to 0
#Size = 0

# Rank for the device
# Defaults to 0
#Rank = 0

# This enables the GATT client functionally, so it can be disabled in system
# which can only operate as a peripheral.
# Defaults to 'true'.
#Client = true

[AVDTP]
# AVDTP L2CAP Signalling Channel Mode.
# Possible values:
# basic: Use L2CAP Basic Mode
# ertm: Use L2CAP Enhanced Retransmission Mode
#SessionMode = basic

# AVDTP L2CAP Transport Channel Mode.
# Possible values:
# basic: Use L2CAP Basic Mode
# streaming: Use L2CAP Streaming Mode
#StreamMode = basic

[Policy]
#
# The ReconnectUUIDs defines the set of remote services that should try
# to be reconnected to in case of a link loss (link supervision
# timeout). The policy plugin should contain a sane set of values by
# default, but this list can be overridden here. By setting the list to
# empty the reconnection feature gets disabled.
#ReconnectUUIDs=00001112-0000-1000-8000-00805f9b34fb,0000111f-0000-1000-8000-00805f9b34fb,0000110a-0000-1000-8000-00805f9b34fb,0000110b-0000-1000-8000-00805f9b34fb

# ReconnectAttempts define the number of attempts to reconnect after a link
# lost. Setting the value to 0 disables reconnecting feature.
#ReconnectAttempts=7

# ReconnectIntervals define the set of intervals in seconds to use in between
# attempts.
# If the number of attempts defined in ReconnectAttempts is bigger than the
# set of intervals the last interval is repeated until the last attempt.
#ReconnectIntervals=1,2,4,8,16,32,64

# AutoEnable defines option to enable all controllers when they are found.
# This includes adapters present on start as well as adapters that are plugged
# in later on. Defaults to 'true'.
#AutoEnable=true

# Audio devices that were disconnected due to suspend will be reconnected on
# resume. ResumeDelay determines the delay between when the controller
# resumes from suspend and a connection attempt is made. A longer delay is
# better for better co-existence with Wi-Fi.
# The value is in seconds.
# Default: 2
#ResumeDelay = 2

[AdvMon]
# Default RSSI Sampling Period. This is used when a client registers an
# advertisement monitor and leaves the RSSISamplingPeriod unset.
# Possible values:
# 0x00       Report all advertisements
# N = 0xXX   Report advertisements every N x 100 msec (range: 0x01 to 0xFE)
# 0xFF       Report only one advertisement per device during monitoring period
# Default: 0xFF
#RSSISamplingPeriod=0xFF

Do I need to run cat /etc/bluetooth/main.conf again?

thapa-sabin commented 2 months ago

I think the output of bluetoothctl info 9C:FC:28:37:FE:8F on both devices look the same for the most part. On Debian (Second Machine):

❯ bluetoothctl info 9C:FC:28:37:FE:8F
Device 9C:FC:28:37:FE:8F (public)
    Name: AirPods
    Alias: AirPods
    Class: 0x00240418
    Icon: audio-headphones
    Paired: yes
    Bonded: yes
    Trusted: yes
    Blocked: no
    Connected: no
    LegacyPairing: no
    UUID: Service Discovery Serve.. (00001000-0000-1000-8000-00805f9b34fb)
    UUID: Audio Sink                (0000110b-0000-1000-8000-00805f9b34fb)
    UUID: A/V Remote Control Target (0000110c-0000-1000-8000-00805f9b34fb)
    UUID: Advanced Audio Distribu.. (0000110d-0000-1000-8000-00805f9b34fb)
    UUID: A/V Remote Control        (0000110e-0000-1000-8000-00805f9b34fb)
    UUID: Handsfree                 (0000111e-0000-1000-8000-00805f9b34fb)
    UUID: PnP Information           (00001200-0000-1000-8000-00805f9b34fb)
    UUID: Vendor specific           (74ec2172-0bad-4d01-8f77-997b2be0722a)
    Modalias: bluetooth:v004Cp200Fd0400
    ManufacturerData Key: 0x004c
    ManufacturerData Value:
  07 0f 00 0f 20 9c fc 28 37 fe 8f 35 e4 e4 1a 01  .... ..(7..5....
  00 

On Fedora:

❯ bluetoothctl info 9C:FC:28:37:FE:8F
Device 9C:FC:28:37:FE:8F (public)
    Name: AirPods
    Alias: AirPods
    Class: 0x00240418 (2360344)
    Icon: audio-headphones
    Paired: yes
    Bonded: yes
    Trusted: yes
    Blocked: no
    Connected: yes
    LegacyPairing: no
    UUID: Service Discovery Serve.. (00001000-0000-1000-8000-00805f9b34fb)
    UUID: Audio Sink                (0000110b-0000-1000-8000-00805f9b34fb)
    UUID: A/V Remote Control Target (0000110c-0000-1000-8000-00805f9b34fb)
    UUID: A/V Remote Control        (0000110e-0000-1000-8000-00805f9b34fb)
    UUID: Handsfree                 (0000111e-0000-1000-8000-00805f9b34fb)
    UUID: PnP Information           (00001200-0000-1000-8000-00805f9b34fb)
    UUID: Vendor specific           (74ec2172-0bad-4d01-8f77-997b2be0722a)
    Modalias: bluetooth:v004Cp200FdC141
    ManufacturerData.Key: 0x004c (76)
    ManufacturerData.Value:
  07 0f 00 0f 20 9c fc 28 37 fe 8f 35 e4 e4 18 01  .... ..(7..5....
  00                                               .               
    RSSI: 0xffffffcc (-52)

Also, I have dual-boot on the Fedora machine. This might not really matter, but I do have Bluetooth off on Windows, and have previously paired the Airpods on my Windows instance.

tacsist commented 2 months ago

It seems that I am experiencing the same issue on Arch Gnome 46 with both APgen2, as well as, AP Max. I might be able to provide you with debug, but you'll need to handhold me :p image

maniacx commented 2 months ago

It seems that I am experiencing the same issue on Arch Gnome 46 with both APgen2, as well as, AP Max. I might be able to provide you with debug, but you'll need to handhold me :p image

Hello @tacsist Happy to help, but could you open a new issue, that way this post doesnt get mixed up with two different issues. When opening an new issue on github, please run test.js and post your bluez configuaration by using command

cat /etc/bluetooth/main.conf
maniacx commented 2 months ago

Ok. I think there is some confusion here. Lets go step by step.

First lets work on debian and see how it behaves with your airpods.

  1. Disable the extension.

  2. Connect the airpod, make sure both airpods are connected, you can play some music to ensure it is connected. (DO NOT KEEP AIRPODS IN PAIRING MODE) Note the MAC ADDRESS of the airpods Screenshot from 2024-05-23 12-28-47

  3. After connecting the Airpod. Close Gnome bluetooth settings windows as show in picture below. (Reason, Gnomes Bluetooth settings also turns Discovery mode ON, so keeping it open will always keep discovery /scanning on) Screenshot from 2024-05-23 12-25-57

  4. Now run command

    bluetoothctl info (MAC ADDRESS of AIRPOD YOU NOTED DOWN EARLIER)
  5. Open terminal window and do screencast recording.

  6. Run bluetoothctl and scan le wait for 1 minute. Do not exit or turn off scanning.

Post the screencast here and the result of bluetoothctl info

thapa-sabin commented 2 months ago

I am sorry for replying so late. I got busy with other things. I turned off the extension, and connected my airpods (And noted down the address). I exited out of Bluetooth settings as well. This is all on Debian.

The recording below should contain everything you asked for (Please feel free to tell me if you need anything else): Screencast from 2024-05-25 19-20-09.webm

PS: I did scan le with the Airpods connected.

maniacx commented 1 month ago

I am sorry for replying so late. I got busy with other things.

Thanks. No problem.

Strangest thing is Manufacturers data shows on connected Airpods public MAC address. and it may or may not contain Battery information (requires some reverse engineering).

Little explaination. The extension and test.js relies on BLE beacon that Airpods broadcast which contain Manufacturers data, and this manufacturers data, contains Battery information which some developers manage to reverse enginneer it. When this BLE beacon is broadcasted it uses random MAC address.

May be debian has blocked it, displaying of manufacturer key or data while scanning using bluetoothctl.

Anyways lets focus on Fedora. I really have no clue, but just to tell you to try and experiment different settings in /etc/bluetooth/main.conf

1. First would be to explicitiy define ControllerMode = dual by removing the #

# Restricts all controllers to the specified transport. Default value
# is "dual", i.e. both BR/EDR and LE enabled (when supported by the HW).
# Possible values: "dual", "bredr", "le"
ControllerMode = dual

then run

sudo systemctl restart bluetooth

the run test.js for one minute and see if it discovers it displays an output with battery info (It doesnt matter is airpods are connected or not as long as the are powered on and out of case)

2 If test.js still doesnt work, define ControllerMode = le by removing the #

# Restricts all controllers to the specified transport. Default value
# is "dual", i.e. both BR/EDR and LE enabled (when supported by the HW).
# Possible values: "dual", "bredr", "le"
ControllerMode = le

then run

sudo systemctl restart bluetooth

the run test.js for one minute Note in this case I think you wont be able to pair some bluetooth device , may be even not airpods. It doesnt matter is airpods are connected or not as long as the are powered on and out of case, test.js should give an output.

3 If test.js still doesnt work, set controller back to dual mode.

# Restricts all controllers to the specified transport. Default value
# is "dual", i.e. both BR/EDR and LE enabled (when supported by the HW).
# Possible values: "dual", "bredr", "le"
ControllerMode = dual

Also in main.conf set experimental = true

# Enables D-Bus experimental interfaces
# Possible values: true or false
Experimental = true

then run

sudo systemctl restart bluetooth

the run test.js for one minute

4. With ControllerMode = dual and Experimental = true, set kernelExperimental = true.

# Enables kernel experimental features, alternatively a list of UUIDs
# can be given.
# Possible values: true,false,<UUID List>
# Possible UUIDS:
# d4992530-b9ec-469f-ab01-6c481c47da1c (BlueZ Experimental Debug)
# 671b10b5-42c0-4696-9227-eb28d1b049d6 (BlueZ Experimental Simultaneous Central and Peripheral)
# 15c0a148-c273-11ea-b3de-0242ac130004 (BlueZ Experimental LL privacy)
# 330859bc-7506-492d-9370-9a6f0614037f (BlueZ Experimental Bluetooth Quality Report)
# a6695ace-ee7f-4fb9-881a-5fac66c629af (BlueZ Experimental Offload Codecs)
# 6fbaf188-05e0-496a-9885-d6ddfdb4e03e (BlueZ Experimental ISO socket)
# 69518c4c-b69f-4679-8bc1-c021b47b5733 (BlueZ Experimental Poll Errqueue)
# Defaults to false.
KernelExperimental = true

then run

sudo systemctl restart bluetooth

the run test.js for one minute

If test.js works with any one or more combination of those setting, extension will work.

thapa-sabin commented 1 month ago

I think I tried everything, but test.js still did not give any output: https://github.com/maniacx/Airpod-Battery-Monitor/assets/76477949/95a12bc8-2ed1-41a6-870b-9839373ad6b4

I enabled the extension, and unsurprisingly, I got nothing. image

Its just surprising that I am having this issue on Gnome 46, and not on 43.9 or 44.9. I could blame it all to the mediatek card that I have on my laptop, but that doesn't seem to be the problem here.

maniacx commented 1 month ago

On Fedora Can you run the modified test.js let it complete at least 2 start and stop discovery cycles.

test-disable-le-filter.zip

gjs-console test-disable-le-filter.js

and post its outputs

Note: Keep 'ControllerMode = dual and 'Experimental = true' in main.conf

thapa-sabin commented 1 month ago

Here you go: I have kept ControllerMode as dual, ans Experimental as true, except for kernelExperimental which is set to false. It seems to be actually giving something now, so that's really good. https://github.com/maniacx/Airpod-Battery-Monitor/assets/76477949/9167fc30-84b1-45fb-bc75-73baa9848816

maniacx commented 1 month ago

Can you post the text of the result instead of Screencast. It is difficult to read the results

thapa-sabin commented 1 month ago

Sure! I ran it for at least 2 start and stop discovery cycles. Here is the output:

Gjs-Message: 21:36:06.539: JS LOG: StartDiscoveryAsync
Gjs-Message: 21:36:16.714: JS LOG: Scanning Bluetooth devices...
Gjs-Message: 21:36:16.714: JS LOG: xxxxxxxxxxxxx New Object xxxxxxxxxxxxxxxx
Gjs-Message: 21:36:16.714: JS LOG: { org.freedesktop.DBus.Introspectable: {}, org.bluez.AgentManager1: {}, org.bluez.ProfileManager1: {} }
Gjs-Message: 21:36:16.714: JS LOG: xxxxxxxxxxxxx New Object xxxxxxxxxxxxxxxx
Gjs-Message: 21:36:16.714: JS LOG: { org.freedesktop.DBus.Introspectable: {}, org.bluez.Adapter1: { Address: {}, AddressType: {}, Name: {}, Alias: {}, Class: {}, Powered: {}, PowerState: {}, Discoverable: {}, DiscoverableTimeout: {}, Pairable: {}, PairableTimeout: {}, Discovering: {}, UUIDs: {}, Modalias: {}, Roles: {}, Manufacturer: {}, Version: {} }, org.freedesktop.DBus.Properties: {}, org.bluez.BatteryProviderManager1: {}, org.bluez.GattManager1: {}, org.bluez.AdvertisementMonitorManager1: { SupportedMonitorTypes: {}, SupportedFeatures: {} }, org.bluez.Media1: { SupportedUUIDs: {} }, org.bluez.NetworkServer1: {}, org.bluez.LEAdvertisingManager1: { ActiveInstances: {}, SupportedInstances: {}, SupportedIncludes: {}, SupportedSecondaryChannels: {}, SupportedFeatures: {}, SupportedCapabilities: {} } }
Gjs-Message: 21:36:16.714: JS LOG: xxxxxxxxxxxxx New Object xxxxxxxxxxxxxxxx
Gjs-Message: 21:36:16.714: JS LOG: { org.freedesktop.DBus.Introspectable: {}, org.bluez.Device1: { Address: {}, AddressType: {}, Name: {}, Alias: {}, Class: {}, Icon: {}, Paired: {}, Bonded: {}, Trusted: {}, Blocked: {}, LegacyPairing: {}, Connected: {}, UUIDs: {}, Modalias: {}, Adapter: {}, ServicesResolved: {} }, org.freedesktop.DBus.Properties: {}, org.bluez.MediaControl1: { Connected: {} } }
Gjs-Message: 21:36:16.714: JS LOG: address = 9C:FC:28:37:FE:8F
Gjs-Message: 21:36:16.714: JS LOG: AddressType = public
Gjs-Message: 21:36:16.714: JS LOG: rssi = undefined
Gjs-Message: 21:36:16.714: JS LOG:  
Gjs-Message: 21:36:16.714: JS LOG:  
Gjs-Message: 21:36:16.714: JS LOG: xxxxxxxxxxxxx New Object xxxxxxxxxxxxxxxx
Gjs-Message: 21:36:16.714: JS LOG: { org.freedesktop.DBus.Introspectable: {}, org.bluez.MediaTransport1: { Device: {}, UUID: {}, Codec: {}, Configuration: {}, State: {}, Delay: {}, Volume: {} }, org.freedesktop.DBus.Properties: {} }
Gjs-Message: 21:36:16.714: JS LOG: xxxxxxxxxxxxx New Object xxxxxxxxxxxxxxxx
Gjs-Message: 21:36:16.714: JS LOG: { org.freedesktop.DBus.Introspectable: {}, org.bluez.MediaEndpoint1: { UUID: {}, Codec: {}, Capabilities: {}, Device: {}, DelayReporting: {} }, org.freedesktop.DBus.Properties: {} }
Gjs-Message: 21:36:16.714: JS LOG: xxxxxxxxxxxxx New Object xxxxxxxxxxxxxxxx
Gjs-Message: 21:36:16.714: JS LOG: { org.freedesktop.DBus.Introspectable: {}, org.bluez.MediaEndpoint1: { UUID: {}, Codec: {}, Capabilities: {}, Device: {}, DelayReporting: {} }, org.freedesktop.DBus.Properties: {} }
Gjs-Message: 21:36:16.714: JS LOG: xxxxxxxxxxxxx New Object xxxxxxxxxxxxxxxx
Gjs-Message: 21:36:16.714: JS LOG: { org.freedesktop.DBus.Introspectable: {}, org.bluez.MediaEndpoint1: { UUID: {}, Codec: {}, Capabilities: {}, Device: {}, DelayReporting: {} }, org.freedesktop.DBus.Properties: {} }
Gjs-Message: 21:36:16.714: JS LOG: No information about objects was obtained.
Gjs-Message: 21:36:21.709: JS LOG: StopDiscoveryAsync
Gjs-Message: 21:36:31.709: JS LOG: StartDiscoveryAsync
Gjs-Message: 21:36:46.716: JS LOG: Scanning Bluetooth devices...
Gjs-Message: 21:36:46.716: JS LOG: xxxxxxxxxxxxx New Object xxxxxxxxxxxxxxxx
Gjs-Message: 21:36:46.716: JS LOG: { org.freedesktop.DBus.Introspectable: {}, org.bluez.AgentManager1: {}, org.bluez.ProfileManager1: {} }
Gjs-Message: 21:36:46.717: JS LOG: xxxxxxxxxxxxx New Object xxxxxxxxxxxxxxxx
Gjs-Message: 21:36:46.717: JS LOG: { org.freedesktop.DBus.Introspectable: {}, org.bluez.Adapter1: { Address: {}, AddressType: {}, Name: {}, Alias: {}, Class: {}, Powered: {}, PowerState: {}, Discoverable: {}, DiscoverableTimeout: {}, Pairable: {}, PairableTimeout: {}, Discovering: {}, UUIDs: {}, Modalias: {}, Roles: {}, Manufacturer: {}, Version: {} }, org.freedesktop.DBus.Properties: {}, org.bluez.BatteryProviderManager1: {}, org.bluez.GattManager1: {}, org.bluez.AdvertisementMonitorManager1: { SupportedMonitorTypes: {}, SupportedFeatures: {} }, org.bluez.Media1: { SupportedUUIDs: {} }, org.bluez.NetworkServer1: {}, org.bluez.LEAdvertisingManager1: { ActiveInstances: {}, SupportedInstances: {}, SupportedIncludes: {}, SupportedSecondaryChannels: {}, SupportedFeatures: {}, SupportedCapabilities: {} } }
Gjs-Message: 21:36:46.717: JS LOG: xxxxxxxxxxxxx New Object xxxxxxxxxxxxxxxx
Gjs-Message: 21:36:46.717: JS LOG: { org.freedesktop.DBus.Introspectable: {}, org.bluez.Device1: { Address: {}, AddressType: {}, Name: {}, Alias: {}, Class: {}, Icon: {}, Paired: {}, Bonded: {}, Trusted: {}, Blocked: {}, LegacyPairing: {}, Connected: {}, UUIDs: {}, Modalias: {}, Adapter: {}, ServicesResolved: {} }, org.freedesktop.DBus.Properties: {}, org.bluez.MediaControl1: { Connected: {} } }
Gjs-Message: 21:36:46.717: JS LOG: address = 9C:FC:28:37:FE:8F
Gjs-Message: 21:36:46.717: JS LOG: AddressType = public
Gjs-Message: 21:36:46.717: JS LOG: rssi = undefined
Gjs-Message: 21:36:46.717: JS LOG:  
Gjs-Message: 21:36:46.717: JS LOG:  
Gjs-Message: 21:36:46.717: JS LOG: xxxxxxxxxxxxx New Object xxxxxxxxxxxxxxxx
Gjs-Message: 21:36:46.718: JS LOG: { org.freedesktop.DBus.Introspectable: {}, org.bluez.MediaTransport1: { Device: {}, UUID: {}, Codec: {}, Configuration: {}, State: {}, Delay: {}, Volume: {} }, org.freedesktop.DBus.Properties: {} }
Gjs-Message: 21:36:46.718: JS LOG: xxxxxxxxxxxxx New Object xxxxxxxxxxxxxxxx
Gjs-Message: 21:36:46.718: JS LOG: { org.freedesktop.DBus.Introspectable: {}, org.bluez.MediaEndpoint1: { UUID: {}, Codec: {}, Capabilities: {}, Device: {}, DelayReporting: {} }, org.freedesktop.DBus.Properties: {} }
Gjs-Message: 21:36:46.718: JS LOG: xxxxxxxxxxxxx New Object xxxxxxxxxxxxxxxx
Gjs-Message: 21:36:46.718: JS LOG: { org.freedesktop.DBus.Introspectable: {}, org.bluez.MediaEndpoint1: { UUID: {}, Codec: {}, Capabilities: {}, Device: {}, DelayReporting: {} }, org.freedesktop.DBus.Properties: {} }
Gjs-Message: 21:36:46.718: JS LOG: xxxxxxxxxxxxx New Object xxxxxxxxxxxxxxxx
Gjs-Message: 21:36:46.718: JS LOG: { org.freedesktop.DBus.Introspectable: {}, org.bluez.MediaEndpoint1: { UUID: {}, Codec: {}, Capabilities: {}, Device: {}, DelayReporting: {} }, org.freedesktop.DBus.Properties: {} }
Gjs-Message: 21:36:46.718: JS LOG: No information about objects was obtained.
Gjs-Message: 21:36:51.709: JS LOG: StopDiscoveryAsync
Gjs-Message: 21:37:01.710: JS LOG: StartDiscoveryAsync
Gjs-Message: 21:37:16.716: JS LOG: Scanning Bluetooth devices...
Gjs-Message: 21:37:16.716: JS LOG: xxxxxxxxxxxxx New Object xxxxxxxxxxxxxxxx
Gjs-Message: 21:37:16.717: JS LOG: { org.freedesktop.DBus.Introspectable: {}, org.bluez.AgentManager1: {}, org.bluez.ProfileManager1: {} }
Gjs-Message: 21:37:16.717: JS LOG: xxxxxxxxxxxxx New Object xxxxxxxxxxxxxxxx
Gjs-Message: 21:37:16.717: JS LOG: { org.freedesktop.DBus.Introspectable: {}, org.bluez.Adapter1: { Address: {}, AddressType: {}, Name: {}, Alias: {}, Class: {}, Powered: {}, PowerState: {}, Discoverable: {}, DiscoverableTimeout: {}, Pairable: {}, PairableTimeout: {}, Discovering: {}, UUIDs: {}, Modalias: {}, Roles: {}, Manufacturer: {}, Version: {} }, org.freedesktop.DBus.Properties: {}, org.bluez.BatteryProviderManager1: {}, org.bluez.GattManager1: {}, org.bluez.AdvertisementMonitorManager1: { SupportedMonitorTypes: {}, SupportedFeatures: {} }, org.bluez.Media1: { SupportedUUIDs: {} }, org.bluez.NetworkServer1: {}, org.bluez.LEAdvertisingManager1: { ActiveInstances: {}, SupportedInstances: {}, SupportedIncludes: {}, SupportedSecondaryChannels: {}, SupportedFeatures: {}, SupportedCapabilities: {} } }
Gjs-Message: 21:37:16.717: JS LOG: xxxxxxxxxxxxx New Object xxxxxxxxxxxxxxxx
Gjs-Message: 21:37:16.717: JS LOG: { org.freedesktop.DBus.Introspectable: {}, org.bluez.Device1: { Address: {}, AddressType: {}, Name: {}, Alias: {}, Class: {}, Icon: {}, Paired: {}, Bonded: {}, Trusted: {}, Blocked: {}, LegacyPairing: {}, Connected: {}, UUIDs: {}, Modalias: {}, Adapter: {}, ServicesResolved: {} }, org.freedesktop.DBus.Properties: {}, org.bluez.MediaControl1: { Connected: {} } }
Gjs-Message: 21:37:16.718: JS LOG: address = 9C:FC:28:37:FE:8F
Gjs-Message: 21:37:16.718: JS LOG: AddressType = public
Gjs-Message: 21:37:16.718: JS LOG: rssi = undefined
Gjs-Message: 21:37:16.718: JS LOG:  
Gjs-Message: 21:37:16.718: JS LOG:  
Gjs-Message: 21:37:16.718: JS LOG: xxxxxxxxxxxxx New Object xxxxxxxxxxxxxxxx
Gjs-Message: 21:37:16.718: JS LOG: { org.freedesktop.DBus.Introspectable: {}, org.bluez.MediaTransport1: { Device: {}, UUID: {}, Codec: {}, Configuration: {}, State: {}, Delay: {}, Volume: {} }, org.freedesktop.DBus.Properties: {} }
Gjs-Message: 21:37:16.718: JS LOG: xxxxxxxxxxxxx New Object xxxxxxxxxxxxxxxx
Gjs-Message: 21:37:16.718: JS LOG: { org.freedesktop.DBus.Introspectable: {}, org.bluez.MediaEndpoint1: { UUID: {}, Codec: {}, Capabilities: {}, Device: {}, DelayReporting: {} }, org.freedesktop.DBus.Properties: {} }
Gjs-Message: 21:37:16.718: JS LOG: xxxxxxxxxxxxx New Object xxxxxxxxxxxxxxxx
Gjs-Message: 21:37:16.718: JS LOG: { org.freedesktop.DBus.Introspectable: {}, org.bluez.MediaEndpoint1: { UUID: {}, Codec: {}, Capabilities: {}, Device: {}, DelayReporting: {} }, org.freedesktop.DBus.Properties: {} }
Gjs-Message: 21:37:16.718: JS LOG: xxxxxxxxxxxxx New Object xxxxxxxxxxxxxxxx
Gjs-Message: 21:37:16.718: JS LOG: { org.freedesktop.DBus.Introspectable: {}, org.bluez.MediaEndpoint1: { UUID: {}, Codec: {}, Capabilities: {}, Device: {}, DelayReporting: {} }, org.freedesktop.DBus.Properties: {} }
Gjs-Message: 21:37:16.718: JS LOG: No information about objects was obtained.
Gjs-Message: 21:37:21.709: JS LOG: StopDiscoveryAsync
maniacx commented 1 month ago

Seems like for some reason BLE devices are not detected.. or is off despite settings ControllerMode = dual

try this command and Post the output in text when you run it

sudo btmgmt le on

Then run the gjs-console test-disable-le-filter.js again and post the output in text.

thapa-sabin commented 1 month ago

Here is the output of sudo btmgmt le on

hci0 Set Low Energy complete, settings: powered ssp br/edr le secure-conn wide-band-speech cis-central cis-peripheral iso-broadcaster sync-receive

PS: Do I need to restart bluetooth services after this- and before running gjs-console test-disable-le-filter.js again? Here is the output of gjs-console test-disable-le-filter.js:

Gjs-Message: 09:17:51.025: JS LOG: StartDiscoveryAsync
Gjs-Message: 09:18:01.700: JS LOG: Scanning Bluetooth devices...
Gjs-Message: 09:18:01.700: JS LOG: xxxxxxxxxxxxx New Object xxxxxxxxxxxxxxxx
Gjs-Message: 09:18:01.700: JS LOG: { org.freedesktop.DBus.Introspectable: {}, org.bluez.AgentManager1: {}, org.bluez.ProfileManager1: {} }
Gjs-Message: 09:18:01.701: JS LOG: xxxxxxxxxxxxx New Object xxxxxxxxxxxxxxxx
Gjs-Message: 09:18:01.701: JS LOG: { org.freedesktop.DBus.Introspectable: {}, org.bluez.Adapter1: { Address: {}, AddressType: {}, Name: {}, Alias: {}, Class: {}, Powered: {}, PowerState: {}, Discoverable: {}, DiscoverableTimeout: {}, Pairable: {}, PairableTimeout: {}, Discovering: {}, UUIDs: {}, Modalias: {}, Roles: {}, Manufacturer: {}, Version: {} }, org.freedesktop.DBus.Properties: {}, org.bluez.BatteryProviderManager1: {}, org.bluez.GattManager1: {}, org.bluez.AdvertisementMonitorManager1: { SupportedMonitorTypes: {}, SupportedFeatures: {} }, org.bluez.Media1: { SupportedUUIDs: {} }, org.bluez.NetworkServer1: {}, org.bluez.LEAdvertisingManager1: { ActiveInstances: {}, SupportedInstances: {}, SupportedIncludes: {}, SupportedSecondaryChannels: {}, SupportedFeatures: {}, SupportedCapabilities: {} } }
Gjs-Message: 09:18:01.701: JS LOG: xxxxxxxxxxxxx New Object xxxxxxxxxxxxxxxx
Gjs-Message: 09:18:01.701: JS LOG: { org.freedesktop.DBus.Introspectable: {}, org.bluez.Device1: { Address: {}, AddressType: {}, Alias: {}, Paired: {}, Bonded: {}, Trusted: {}, Blocked: {}, LegacyPairing: {}, RSSI: {}, Connected: {}, UUIDs: {}, Adapter: {}, ManufacturerData: {}, ServicesResolved: {}, AdvertisingFlags: {} }, org.freedesktop.DBus.Properties: {} }
Gjs-Message: 09:18:01.702: JS LOG: address = 57:0A:D2:BC:F2:7C
Gjs-Message: 09:18:01.702: JS LOG: AddressType = random
Gjs-Message: 09:18:01.702: JS LOG: rssi = -88
Gjs-Message: 09:18:01.702: JS LOG:  
Gjs-Message: 09:18:01.702: JS LOG:  
Gjs-Message: 09:18:01.702: JS LOG: xxxxxxxxxxxxx New Object xxxxxxxxxxxxxxxx
Gjs-Message: 09:18:01.702: JS LOG: { org.freedesktop.DBus.Introspectable: {}, org.bluez.Device1: { Address: {}, AddressType: {}, Alias: {}, Paired: {}, Bonded: {}, Trusted: {}, Blocked: {}, LegacyPairing: {}, RSSI: {}, Connected: {}, UUIDs: {}, Adapter: {}, ManufacturerData: {}, TxPower: {}, ServicesResolved: {}, AdvertisingFlags: {} }, org.freedesktop.DBus.Properties: {} }
Gjs-Message: 09:18:01.702: JS LOG: address = 54:24:EF:B7:58:EF
Gjs-Message: 09:18:01.702: JS LOG: AddressType = random
Gjs-Message: 09:18:01.702: JS LOG: rssi = -86
Gjs-Message: 09:18:01.702: JS LOG:  
Gjs-Message: 09:18:01.702: JS LOG:  
Gjs-Message: 09:18:01.702: JS LOG: xxxxxxxxxxxxx New Object xxxxxxxxxxxxxxxx
Gjs-Message: 09:18:01.702: JS LOG: { org.freedesktop.DBus.Introspectable: {}, org.bluez.Device1: { Address: {}, AddressType: {}, Name: {}, Alias: {}, Class: {}, Icon: {}, Paired: {}, Bonded: {}, Trusted: {}, Blocked: {}, LegacyPairing: {}, Connected: {}, UUIDs: {}, Modalias: {}, Adapter: {}, ServicesResolved: {} }, org.freedesktop.DBus.Properties: {}, org.bluez.MediaControl1: { Connected: {} } }
Gjs-Message: 09:18:01.702: JS LOG: address = 9C:FC:28:37:FE:8F
Gjs-Message: 09:18:01.702: JS LOG: AddressType = public
Gjs-Message: 09:18:01.702: JS LOG: rssi = undefined
Gjs-Message: 09:18:01.702: JS LOG:  
Gjs-Message: 09:18:01.702: JS LOG:  
Gjs-Message: 09:18:01.702: JS LOG: xxxxxxxxxxxxx New Object xxxxxxxxxxxxxxxx
Gjs-Message: 09:18:01.703: JS LOG: { org.freedesktop.DBus.Introspectable: {}, org.bluez.MediaEndpoint1: { UUID: {}, Codec: {}, Capabilities: {}, Device: {}, DelayReporting: {} }, org.freedesktop.DBus.Properties: {} }
Gjs-Message: 09:18:01.703: JS LOG: xxxxxxxxxxxxx New Object xxxxxxxxxxxxxxxx
Gjs-Message: 09:18:01.703: JS LOG: { org.freedesktop.DBus.Introspectable: {}, org.bluez.MediaEndpoint1: { UUID: {}, Codec: {}, Capabilities: {}, Device: {}, DelayReporting: {} }, org.freedesktop.DBus.Properties: {} }
Gjs-Message: 09:18:01.703: JS LOG: xxxxxxxxxxxxx New Object xxxxxxxxxxxxxxxx
Gjs-Message: 09:18:01.703: JS LOG: { org.freedesktop.DBus.Introspectable: {}, org.bluez.MediaTransport1: { Device: {}, UUID: {}, Codec: {}, Configuration: {}, State: {}, Delay: {}, Volume: {}, Endpoint: {} }, org.freedesktop.DBus.Properties: {} }
Gjs-Message: 09:18:01.703: JS LOG: xxxxxxxxxxxxx New Object xxxxxxxxxxxxxxxx
Gjs-Message: 09:18:01.703: JS LOG: { org.freedesktop.DBus.Introspectable: {}, org.bluez.MediaEndpoint1: { UUID: {}, Codec: {}, Capabilities: {}, Device: {}, DelayReporting: {} }, org.freedesktop.DBus.Properties: {} }
Gjs-Message: 09:18:01.703: JS LOG: No information about objects was obtained.
Gjs-Message: 09:18:06.690: JS LOG: StopDiscoveryAsync
Gjs-Message: 09:18:16.692: JS LOG: StartDiscoveryAsync
Gjs-Message: 09:18:31.701: JS LOG: Scanning Bluetooth devices...
Gjs-Message: 09:18:31.701: JS LOG: xxxxxxxxxxxxx New Object xxxxxxxxxxxxxxxx
Gjs-Message: 09:18:31.702: JS LOG: { org.freedesktop.DBus.Introspectable: {}, org.bluez.AgentManager1: {}, org.bluez.ProfileManager1: {} }
Gjs-Message: 09:18:31.702: JS LOG: xxxxxxxxxxxxx New Object xxxxxxxxxxxxxxxx
Gjs-Message: 09:18:31.702: JS LOG: { org.freedesktop.DBus.Introspectable: {}, org.bluez.Adapter1: { Address: {}, AddressType: {}, Name: {}, Alias: {}, Class: {}, Powered: {}, PowerState: {}, Discoverable: {}, DiscoverableTimeout: {}, Pairable: {}, PairableTimeout: {}, Discovering: {}, UUIDs: {}, Modalias: {}, Roles: {}, Manufacturer: {}, Version: {} }, org.freedesktop.DBus.Properties: {}, org.bluez.BatteryProviderManager1: {}, org.bluez.GattManager1: {}, org.bluez.AdvertisementMonitorManager1: { SupportedMonitorTypes: {}, SupportedFeatures: {} }, org.bluez.Media1: { SupportedUUIDs: {} }, org.bluez.NetworkServer1: {}, org.bluez.LEAdvertisingManager1: { ActiveInstances: {}, SupportedInstances: {}, SupportedIncludes: {}, SupportedSecondaryChannels: {}, SupportedFeatures: {}, SupportedCapabilities: {} } }
Gjs-Message: 09:18:31.702: JS LOG: xxxxxxxxxxxxx New Object xxxxxxxxxxxxxxxx
Gjs-Message: 09:18:31.702: JS LOG: { org.freedesktop.DBus.Introspectable: {}, org.bluez.Device1: { Address: {}, AddressType: {}, Alias: {}, Paired: {}, Bonded: {}, Trusted: {}, Blocked: {}, LegacyPairing: {}, RSSI: {}, Connected: {}, UUIDs: {}, Adapter: {}, ManufacturerData: {}, ServicesResolved: {}, AdvertisingFlags: {} }, org.freedesktop.DBus.Properties: {} }
Gjs-Message: 09:18:31.702: JS LOG: address = 57:0A:D2:BC:F2:7C
Gjs-Message: 09:18:31.702: JS LOG: AddressType = random
Gjs-Message: 09:18:31.703: JS LOG: rssi = -88
Gjs-Message: 09:18:31.703: JS LOG:  
Gjs-Message: 09:18:31.703: JS LOG:  
Gjs-Message: 09:18:31.703: JS LOG: xxxxxxxxxxxxx New Object xxxxxxxxxxxxxxxx
Gjs-Message: 09:18:31.703: JS LOG: { org.freedesktop.DBus.Introspectable: {}, org.bluez.Device1: { Address: {}, AddressType: {}, Alias: {}, Paired: {}, Bonded: {}, Trusted: {}, Blocked: {}, LegacyPairing: {}, RSSI: {}, Connected: {}, UUIDs: {}, Adapter: {}, ManufacturerData: {}, TxPower: {}, ServicesResolved: {}, AdvertisingFlags: {} }, org.freedesktop.DBus.Properties: {} }
Gjs-Message: 09:18:31.703: JS LOG: address = 54:24:EF:B7:58:EF
Gjs-Message: 09:18:31.703: JS LOG: AddressType = random
Gjs-Message: 09:18:31.703: JS LOG: rssi = -95
Gjs-Message: 09:18:31.703: JS LOG:  
Gjs-Message: 09:18:31.703: JS LOG:  
Gjs-Message: 09:18:31.703: JS LOG: xxxxxxxxxxxxx New Object xxxxxxxxxxxxxxxx
Gjs-Message: 09:18:31.703: JS LOG: { org.freedesktop.DBus.Introspectable: {}, org.bluez.Device1: { Address: {}, AddressType: {}, Name: {}, Alias: {}, Class: {}, Icon: {}, Paired: {}, Bonded: {}, Trusted: {}, Blocked: {}, LegacyPairing: {}, Connected: {}, UUIDs: {}, Modalias: {}, Adapter: {}, ServicesResolved: {} }, org.freedesktop.DBus.Properties: {}, org.bluez.MediaControl1: { Connected: {} } }
Gjs-Message: 09:18:31.703: JS LOG: address = 9C:FC:28:37:FE:8F
Gjs-Message: 09:18:31.703: JS LOG: AddressType = public
Gjs-Message: 09:18:31.703: JS LOG: rssi = undefined
Gjs-Message: 09:18:31.703: JS LOG:  
Gjs-Message: 09:18:31.703: JS LOG:  
Gjs-Message: 09:18:31.703: JS LOG: xxxxxxxxxxxxx New Object xxxxxxxxxxxxxxxx
Gjs-Message: 09:18:31.703: JS LOG: { org.freedesktop.DBus.Introspectable: {}, org.bluez.MediaEndpoint1: { UUID: {}, Codec: {}, Capabilities: {}, Device: {}, DelayReporting: {} }, org.freedesktop.DBus.Properties: {} }
Gjs-Message: 09:18:31.703: JS LOG: xxxxxxxxxxxxx New Object xxxxxxxxxxxxxxxx
Gjs-Message: 09:18:31.703: JS LOG: { org.freedesktop.DBus.Introspectable: {}, org.bluez.MediaEndpoint1: { UUID: {}, Codec: {}, Capabilities: {}, Device: {}, DelayReporting: {} }, org.freedesktop.DBus.Properties: {} }
Gjs-Message: 09:18:31.703: JS LOG: xxxxxxxxxxxxx New Object xxxxxxxxxxxxxxxx
Gjs-Message: 09:18:31.703: JS LOG: { org.freedesktop.DBus.Introspectable: {}, org.bluez.MediaTransport1: { Device: {}, UUID: {}, Codec: {}, Configuration: {}, State: {}, Delay: {}, Volume: {}, Endpoint: {} }, org.freedesktop.DBus.Properties: {} }
Gjs-Message: 09:18:31.703: JS LOG: xxxxxxxxxxxxx New Object xxxxxxxxxxxxxxxx
Gjs-Message: 09:18:31.703: JS LOG: { org.freedesktop.DBus.Introspectable: {}, org.bluez.MediaEndpoint1: { UUID: {}, Codec: {}, Capabilities: {}, Device: {}, DelayReporting: {} }, org.freedesktop.DBus.Properties: {} }
Gjs-Message: 09:18:31.703: JS LOG: No information about objects was obtained.
Gjs-Message: 09:18:36.693: JS LOG: StopDiscoveryAsync
Gjs-Message: 09:18:46.693: JS LOG: StartDiscoveryAsync
Gjs-Message: 09:19:01.702: JS LOG: Scanning Bluetooth devices...
Gjs-Message: 09:19:01.702: JS LOG: xxxxxxxxxxxxx New Object xxxxxxxxxxxxxxxx
Gjs-Message: 09:19:01.702: JS LOG: { org.freedesktop.DBus.Introspectable: {}, org.bluez.AgentManager1: {}, org.bluez.ProfileManager1: {} }
Gjs-Message: 09:19:01.702: JS LOG: xxxxxxxxxxxxx New Object xxxxxxxxxxxxxxxx
Gjs-Message: 09:19:01.703: JS LOG: { org.freedesktop.DBus.Introspectable: {}, org.bluez.Adapter1: { Address: {}, AddressType: {}, Name: {}, Alias: {}, Class: {}, Powered: {}, PowerState: {}, Discoverable: {}, DiscoverableTimeout: {}, Pairable: {}, PairableTimeout: {}, Discovering: {}, UUIDs: {}, Modalias: {}, Roles: {}, Manufacturer: {}, Version: {} }, org.freedesktop.DBus.Properties: {}, org.bluez.BatteryProviderManager1: {}, org.bluez.GattManager1: {}, org.bluez.AdvertisementMonitorManager1: { SupportedMonitorTypes: {}, SupportedFeatures: {} }, org.bluez.Media1: { SupportedUUIDs: {} }, org.bluez.NetworkServer1: {}, org.bluez.LEAdvertisingManager1: { ActiveInstances: {}, SupportedInstances: {}, SupportedIncludes: {}, SupportedSecondaryChannels: {}, SupportedFeatures: {}, SupportedCapabilities: {} } }
Gjs-Message: 09:19:01.703: JS LOG: xxxxxxxxxxxxx New Object xxxxxxxxxxxxxxxx
Gjs-Message: 09:19:01.703: JS LOG: { org.freedesktop.DBus.Introspectable: {}, org.bluez.Device1: { Address: {}, AddressType: {}, Alias: {}, Paired: {}, Bonded: {}, Trusted: {}, Blocked: {}, LegacyPairing: {}, RSSI: {}, Connected: {}, UUIDs: {}, Adapter: {}, ManufacturerData: {}, TxPower: {}, ServicesResolved: {}, AdvertisingFlags: {} }, org.freedesktop.DBus.Properties: {} }
Gjs-Message: 09:19:01.703: JS LOG: address = 54:24:EF:B7:58:EF
Gjs-Message: 09:19:01.703: JS LOG: AddressType = random
Gjs-Message: 09:19:01.703: JS LOG: rssi = -93
Gjs-Message: 09:19:01.703: JS LOG:  
Gjs-Message: 09:19:01.703: JS LOG:  
Gjs-Message: 09:19:01.703: JS LOG: xxxxxxxxxxxxx New Object xxxxxxxxxxxxxxxx
Gjs-Message: 09:19:01.703: JS LOG: { org.freedesktop.DBus.Introspectable: {}, org.bluez.Device1: { Address: {}, AddressType: {}, Name: {}, Alias: {}, Class: {}, Icon: {}, Paired: {}, Bonded: {}, Trusted: {}, Blocked: {}, LegacyPairing: {}, Connected: {}, UUIDs: {}, Modalias: {}, Adapter: {}, ServicesResolved: {} }, org.freedesktop.DBus.Properties: {}, org.bluez.MediaControl1: { Connected: {} } }
Gjs-Message: 09:19:01.703: JS LOG: address = 9C:FC:28:37:FE:8F
Gjs-Message: 09:19:01.703: JS LOG: AddressType = public
Gjs-Message: 09:19:01.703: JS LOG: rssi = undefined
Gjs-Message: 09:19:01.703: JS LOG:  
Gjs-Message: 09:19:01.703: JS LOG:  
Gjs-Message: 09:19:01.704: JS LOG: xxxxxxxxxxxxx New Object xxxxxxxxxxxxxxxx
Gjs-Message: 09:19:01.704: JS LOG: { org.freedesktop.DBus.Introspectable: {}, org.bluez.MediaEndpoint1: { UUID: {}, Codec: {}, Capabilities: {}, Device: {}, DelayReporting: {} }, org.freedesktop.DBus.Properties: {} }
Gjs-Message: 09:19:01.704: JS LOG: xxxxxxxxxxxxx New Object xxxxxxxxxxxxxxxx
Gjs-Message: 09:19:01.704: JS LOG: { org.freedesktop.DBus.Introspectable: {}, org.bluez.MediaEndpoint1: { UUID: {}, Codec: {}, Capabilities: {}, Device: {}, DelayReporting: {} }, org.freedesktop.DBus.Properties: {} }
Gjs-Message: 09:19:01.704: JS LOG: xxxxxxxxxxxxx New Object xxxxxxxxxxxxxxxx
Gjs-Message: 09:19:01.704: JS LOG: { org.freedesktop.DBus.Introspectable: {}, org.bluez.MediaTransport1: { Device: {}, UUID: {}, Codec: {}, Configuration: {}, State: {}, Delay: {}, Volume: {}, Endpoint: {} }, org.freedesktop.DBus.Properties: {} }
Gjs-Message: 09:19:01.704: JS LOG: xxxxxxxxxxxxx New Object xxxxxxxxxxxxxxxx
Gjs-Message: 09:19:01.704: JS LOG: { org.freedesktop.DBus.Introspectable: {}, org.bluez.MediaEndpoint1: { UUID: {}, Codec: {}, Capabilities: {}, Device: {}, DelayReporting: {} }, org.freedesktop.DBus.Properties: {} }
Gjs-Message: 09:19:01.704: JS LOG: No information about objects was obtained.
Gjs-Message: 09:19:06.693: JS LOG: StopDiscoveryAsync
maniacx commented 1 month ago

It seems like LE is on now as I can see many, random MAC address, unlike before. But for some reason it is still not detecting Airpods.

It is definitely not gnome-shell / extension issue, but somethings has changes with updated versions kernel/bluez compatibility with mediatek.

I would suggest, if you still have debian running on the same machine that is running fedora, you could run these the following command below, on debian and on fedora compare it. In fact you could post it here.

bluetoothctl version
bluetoothctl show
btmgmt info
btmgmt extinfo
btmgmt secinfo
btmgmt expinfo
sudo btmgmt advinfo

If you do not have debian installed, you could run a live-iso/cd of debian without installing (I am not sure if debian distributes a live-cd version of it though).

Also interestingly a different manufacturer data is available in you public address, however I do not know if it contains battery info, but that we will look at it after we solve the current problem, cause it would be a lot of experimenting, guess work and time consuming thing.

thapa-sabin commented 1 month ago

I do not have Debian running on the same machine as Fedora, and it unfortunately does not come with a live-cd version either. I have an older kernel version as well on my Fedora machine. I could test things out there for starters. Right now, I am on 6.8.11, but I believe I can try working with an older version and see how that goes (Although its not that old). And if that doesn't do the trick, I will find a distribution that uses an older version of Gnome with Debian as the base, and see how that goes. And I will of course, post everything here as well. This will however, take a bit of time. I have been kind of busy as of late, sorry about that, and thanks for taking the time to go through everything and replying.

maniacx commented 1 month ago

That your time, no problem.

And here are livecd images for Debian to boot using usb. Unfortunately they are quite huge 3+gb unlike fedora which is only around 2gb..

https://cdimage.debian.org/debian-cd/current-live/amd64/iso-hybrid/

thapa-sabin commented 1 month ago

That's absolutely fine. I didn't know they even existed. Thanks!

VitaliyInshakov commented 1 month ago

Hi! Do you have any updates about fixing this issues? I have same trouble with my airpods gen 3 and fedora 40 (gnome 46)

maniacx commented 1 month ago

@VitaliyInshakov is your bluetooth device mediatek?

ARdgzC commented 1 month ago

@VitaliyInshakov is your bluetooth device mediatek?

My device is mediatek whats wrong with it? I experiencing same issue :(

VitaliyInshakov commented 1 month ago

@maniacx Good question :) How can I check it? I just install fresh version of Fedora on my PC

maniacx commented 1 week ago

Hey I completed forgot about this issue?

@thapa-sabin @tacsist @ARdgzC @VitaliyInshakov


  1. I am uploading a new test file: test-remove-rssi.zip

It will output the kernel, os, bluez version and the bluetooth adapter. Also removed the filter that blocks unknown apple devices for displaying manufacturer data.

Download and extract in your downloads folder. Connect the airpods/beats headphone Open terminal run

gjs-console /home/$USER/Downloads/test-remove-rssi.js

Wait for it to display StopDiscoveryAsync Post the output here.


  1. As soon as you see the script reporting battery levels, check the airpods battery level in your iphone or android phone just to make sure that the level reported by the script are correct. Post the battery level of you airpod here.

  1. In terminal Post the output of
    bluetoothctl info XX:XX:XX:XX:XX:XX

    Where XX:XX:XX:XX:XX:XX is the MAC address of airpods

thapa-sabin commented 4 days ago

Sorry, I gave up trying to make it work on Fedora. I now just use my phone that has CAPod in it.

thapa-sabin commented 4 days ago

I can try this on a live-cd, if possible to help you out. I no longer use Fedora either, I had to switch to a Ubuntu-based distribution.

maniacx commented 4 days ago

No problem. It's OK, don't bother about the live cd it is too time consuming and hassle.

Instead, if you can get the information I requested posted here. https://github.com/maniacx/Airpod-Battery-Monitor/issues/20#issuecomment-2226763241

It would give me a better understanding on how airpods are detected on mtk chipset . Run the script in ubuntu in the post and other commands mentioned and your current battery level of the airpod when you ran the script.

Btw, is the extension working on ubuntu?

Edit: oh ubuntu based distribution? Which one? I though ubuntu.

ARdgzC commented 4 days ago

Unfortunately the output of the script does not show any information about the airpods.

[ardgzc@rigel:Downloads]$ gjs-console /home/$USER/Downloads/test-remove-rssi.js
Gjs-Message: 13:05:39.687: JS LOG: Kernel: 6.9.9-200.fc40.x86_64
Gjs-Message: 13:05:39.689: JS LOG: GLib.SpawnError: Failed to execute child process “lsb_release” (No such file or directory)
Gjs-Message: 13:05:39.690: JS LOG: TypeError: os is undefined
Gjs-Message: 13:05:39.690: JS LOG:  
Gjs-Message: 13:05:39.690: JS LOG:  
Gjs-Message: 13:05:39.690: JS LOG: StartDiscoveryAsync
Gjs-Message: 13:05:50.097: JS LOG: Scanning Bluetooth devices...
Gjs-Message: 13:05:50.098: JS LOG: Device = 13 AddressType = public rssi = undefined connected = true
Gjs-Message: 13:05:50.098: JS LOG:  
Gjs-Message: 13:05:50.098: JS LOG:  
Gjs-Message: 13:05:50.098: JS LOG: No information about objects was obtained.
Gjs-Message: 13:05:55.088: JS LOG: StopDiscoveryAsync
Gjs-Message: 13:06:05.089: JS LOG: StartDiscoveryAsync
Gjs-Message: 13:06:20.096: JS LOG: Scanning Bluetooth devices...
Gjs-Message: 13:06:20.096: JS LOG: Device = 13 AddressType = public rssi = undefined connected = true
Gjs-Message: 13:06:20.096: JS LOG:  
Gjs-Message: 13:06:20.097: JS LOG:  
Gjs-Message: 13:06:20.097: JS LOG: No information about objects was obtained.
Gjs-Message: 13:06:25.089: JS LOG: StopDiscoveryAsync
Gjs-Message: 13:06:35.089: JS LOG: StartDiscoveryAsync
Gjs-Message: 13:06:50.096: JS LOG: Scanning Bluetooth devices...
Gjs-Message: 13:06:50.096: JS LOG: Device = 13 AddressType = public rssi = undefined connected = true
Gjs-Message: 13:06:50.096: JS LOG:  
Gjs-Message: 13:06:50.096: JS LOG:  
Gjs-Message: 13:06:50.096: JS LOG: No information about objects was obtained.
Gjs-Message: 13:06:55.089: JS LOG: StopDiscoveryAsync
Gjs-Message: 13:07:05.087: JS LOG: StartDiscoveryAsync
Gjs-Message: 13:07:20.093: JS LOG: Scanning Bluetooth devices...
Gjs-Message: 13:07:20.094: JS LOG: Device = 13 AddressType = public rssi = undefined connected = true
Gjs-Message: 13:07:20.094: JS LOG:  
Gjs-Message: 13:07:20.094: JS LOG:  
Gjs-Message: 13:07:20.094: JS LOG: No information about objects was obtained.
Gjs-Message: 13:07:25.088: JS LOG: StopDiscoveryAsync
Gjs-Message: 13:07:35.089: JS LOG: StartDiscoveryAsync
Gjs-Message: 13:07:50.095: JS LOG: Scanning Bluetooth devices...
Gjs-Message: 13:07:50.095: JS LOG: Device = 13 AddressType = public rssi = undefined connected = true
Gjs-Message: 13:07:50.095: JS LOG:  
Gjs-Message: 13:07:50.095: JS LOG:  
Gjs-Message: 13:07:50.095: JS LOG: No information about objects was obtained.
Gjs-Message: 13:07:55.089: JS LOG: StopDiscoveryAsync
Gjs-Message: 13:08:05.089: JS LOG: StartDiscoveryAsync
Gjs-Message: 13:08:20.095: JS LOG: Scanning Bluetooth devices...
Gjs-Message: 13:08:20.095: JS LOG: Device = 13 AddressType = public rssi = undefined connected = true
Gjs-Message: 13:08:20.095: JS LOG:  
Gjs-Message: 13:08:20.095: JS LOG:  
Gjs-Message: 13:08:20.095: JS LOG: No information about objects was obtained.
Gjs-Message: 13:08:25.088: JS LOG: StopDiscoveryAsync
Gjs-Message: 13:08:35.089: JS LOG: StartDiscoveryAsync
Gjs-Message: 13:08:50.096: JS LOG: Scanning Bluetooth devices...
Gjs-Message: 13:08:50.096: JS LOG: Device = 13 AddressType = public rssi = undefined connected = true
Gjs-Message: 13:08:50.096: JS LOG:  
Gjs-Message: 13:08:50.096: JS LOG:  
Gjs-Message: 13:08:50.096: JS LOG: No information about objects was obtained.
Gjs-Message: 13:08:55.089: JS LOG: StopDiscoveryAsync
Gjs-Message: 13:09:05.089: JS LOG: StartDiscoveryAsync
Gjs-Message: 13:09:20.094: JS LOG: Scanning Bluetooth devices...
Gjs-Message: 13:09:20.094: JS LOG: Device = 13 AddressType = public rssi = undefined connected = true
Gjs-Message: 13:09:20.094: JS LOG:  
Gjs-Message: 13:09:20.094: JS LOG:  
Gjs-Message: 13:09:20.094: JS LOG: No information about objects was obtained.
Gjs-Message: 13:09:25.088: JS LOG: StopDiscoveryAsync

bluetoothctl info output

[ardgzc@rigel:Downloads]$ bluetoothctl info 74:15:F5:07:4F:48
Device 74:15:F5:07:4F:48 (public)
    Name: AirPods Pro
    Alias: AirPods Pro
    Class: 0x00240418 (2360344)
    Icon: audio-headphones
    Paired: yes
    Bonded: yes
    Trusted: yes
    Blocked: no
    Connected: yes
    LegacyPairing: no
    UUID: Service Discovery Serve.. (00001000-0000-1000-8000-00805f9b34fb)
    UUID: Audio Sink                (0000110b-0000-1000-8000-00805f9b34fb)
    UUID: A/V Remote Control Target (0000110c-0000-1000-8000-00805f9b34fb)
    UUID: Advanced Audio Distribu.. (0000110d-0000-1000-8000-00805f9b34fb)
    UUID: A/V Remote Control        (0000110e-0000-1000-8000-00805f9b34fb)
    UUID: Handsfree                 (0000111e-0000-1000-8000-00805f9b34fb)
    UUID: PnP Information           (00001200-0000-1000-8000-00805f9b34fb)
    UUID: Vendor specific           (74ec2172-0bad-4d01-8f77-997b2be0722a)
    Modalias: bluetooth:v004Cp2014dA43A

Just in case :

[ardgzc@rigel:Downloads]$ cat /etc/bluetooth/main.conf
[General]

# Default adapter name
# Defaults to 'BlueZ X.YZ'
#Name = BlueZ

# Default device class. Only the major and minor device class bits are
# considered. Defaults to '0x000000'.
#Class = 0x000100

# How long to stay in discoverable mode before going back to non-discoverable
# The value is in seconds. Default is 180, i.e. 3 minutes.
# 0 = disable timer, i.e. stay discoverable forever
#DiscoverableTimeout = 0

# Always allow pairing even if there are no agent registered
# Possible values: true, false
# Default: false
#AlwaysPairable = false

# How long to stay in pairable mode before going back to non-discoverable
# The value is in seconds. Default is 0.
# 0 = disable timer, i.e. stay pairable forever
#PairableTimeout = 0

# Use vendor id source (assigner), vendor, product and version information for
# DID profile support. The values are separated by ":" and assigner, VID, PID
# and version.
# Possible vendor id source values: bluetooth, usb (default) or false (disabled)
#DeviceID = bluetooth:1234:5678:abcd

# Do reverse service discovery for previously unknown devices that connect to
# us. For BR/EDR this option is really only needed for qualification since the
# BITE tester doesn't like us doing reverse SDP for some test cases, for LE
# this disables the GATT client functionally so it can be used in system which
# can only operate as peripheral (see also GATT Client option).
# Defaults to 'true'.
#ReverseServiceDiscovery = true

# Enable name resolving after inquiry. Set it to 'false' if you don't need
# remote devices name and want shorter discovery cycle. Defaults to 'true'.
#NameResolving = true

# Enable runtime persistency of debug link keys. Default is false which
# makes debug link keys valid only for the duration of the connection
# that they were created for.
#DebugKeys = false

# Restricts all controllers to the specified transport. Default value
# is "dual", i.e. both BR/EDR and LE enabled (when supported by the HW).
# Possible values: "dual", "bredr", "le"
ControllerMode = dual

# Maximum number of controllers allowed to be exposed to the system.
# Default=0 (unlimited)
#MaxControllers=0

# Enables Multi Profile Specification support. This allows to specify if
# system supports only Multiple Profiles Single Device (MPSD) configuration
# or both Multiple Profiles Single Device (MPSD) and Multiple Profiles Multiple
# Devices (MPMD) configurations.
# Possible values: "off", "single", "multiple"
#MultiProfile = off

# Permanently enables the Fast Connectable setting for adapters that
# support it. When enabled other devices can connect faster to us,
# however the tradeoff is increased power consumptions. This feature
# will fully work only on kernel version 4.1 and newer. Defaults to
# 'false'.
#FastConnectable = false

# Default privacy setting.
# Enables use of private address.
# Possible values for LE mode: "off", "network/on", "device"
# Possible values for Dual mode: "off", "network/on", "device",
# "limited-network", "limited-device"
#
# - off: Local privacy disabled.
#
# - network/on: A device will only accept advertising packets from peer
# devices that contain private addresses. It may not be compatible with some
# legacy devices since it requires the use of RPA(s) all the time.
#
# - device: A device in device privacy mode is only concerned about the
# privacy of the device and will accept advertising packets from peer devices
# that contain their Identity Address as well as ones that contain a private
# address, even if the peer device has distributed its IRK in the past.

# - limited-network: Apply Limited Discoverable Mode to advertising, which
# follows the same policy as to BR/EDR that publishes the identity address when
# discoverable, and Network Privacy Mode for scanning.
#
# - limited-device: Apply Limited Discoverable Mode to advertising, which
# follows the same policy as to BR/EDR that publishes the identity address when
# discoverable, and Device Privacy Mode for scanning.
#
# Defaults to "off"
#Privacy = off

# Specify the policy to the JUST-WORKS repairing initiated by peer
# Possible values: "never", "confirm", "always"
# Defaults to "never"
#JustWorksRepairing = never

# How long to keep temporary devices around
# The value is in seconds. Default is 30.
# 0 = disable timer, i.e. never keep temporary devices
#TemporaryTimeout = 30

# Enables the device to issue an SDP request to update known services when
# profile is connected. Defaults to true.
#RefreshDiscovery = true

# Default Secure Connections setting.
# Enables the Secure Connections setting for adapters that support it. It
# provides better crypto algorithms for BT links and also enables CTKD (cross
# transport key derivation) during pairing on any link.
# Possible values: "off", "on", "only"
# - "off": Secure Connections are disabled
# - "on": Secure Connections are enabled when peer device supports them
# - "only": we allow only Secure Connections
# Defaults to "on"
#SecureConnections = on

# Enables D-Bus experimental interfaces
# Possible values: true or false
#Experimental = true

# Enables D-Bus testing interfaces
# Possible values: true or false
#Testing = false

# Enables kernel experimental features, alternatively a list of UUIDs
# can be given.
# Possible values: true,false,<UUID List>
# Possible UUIDS:
# d4992530-b9ec-469f-ab01-6c481c47da1c (BlueZ Experimental Debug)
# 671b10b5-42c0-4696-9227-eb28d1b049d6 (BlueZ Experimental Simultaneous Central and Peripheral)
# 15c0a148-c273-11ea-b3de-0242ac130004 (BlueZ Experimental LL privacy)
# 330859bc-7506-492d-9370-9a6f0614037f (BlueZ Experimental Bluetooth Quality Report)
# a6695ace-ee7f-4fb9-881a-5fac66c629af (BlueZ Experimental Offload Codecs)
# 6fbaf188-05e0-496a-9885-d6ddfdb4e03e (BlueZ Experimental ISO socket)
# 69518c4c-b69f-4679-8bc1-c021b47b5733 (BlueZ Experimental Poll Errqueue)
# Defaults to false.
KernelExperimental = true

# The duration to avoid retrying to resolve a peer's name, if the previous
# try failed.
# The value is in seconds. Default is 300, i.e. 5 minutes.
#RemoteNameRequestRetryDelay = 300

[BR]
# The following values are used to load default adapter parameters for BR/EDR.
# BlueZ loads the values into the kernel before the adapter is powered if the
# kernel supports the MGMT_LOAD_DEFAULT_PARAMETERS command. If a value isn't
# provided, the kernel will be initialized to it's default value.  The actual
# value will vary based on the kernel version and thus aren't provided here.
# The Bluetooth Core Specification should be consulted for the meaning and valid
# domain of each of these values.

# BR/EDR Page scan activity configuration
#PageScanType=
#PageScanInterval=
#PageScanWindow=

# BR/EDR Inquiry scan activity configuration
#InquiryScanType=
#InquiryScanInterval=
#InquiryScanWindow=

# BR/EDR Link supervision timeout
#LinkSupervisionTimeout=

# BR/EDR Page Timeout
#PageTimeout=

# BR/EDR Sniff Intervals
#MinSniffInterval=
#MaxSniffInterval=

[LE]
# The following values are used to load default adapter parameters for LE.
# BlueZ loads the values into the kernel before the adapter is powered if the
# kernel supports the MGMT_LOAD_DEFAULT_PARAMETERS command. If a value isn't
# provided, the kernel will be initialized to it's default value.  The actual
# value will vary based on the kernel version and thus aren't provided here.
# The Bluetooth Core Specification should be consulted for the meaning and valid
# domain of each of these values.
# LE advertisement interval (used for legacy advertisement interface only)
#MinAdvertisementInterval=
#MaxAdvertisementInterval=
#MultiAdvertisementRotationInterval=

# LE scanning parameters used for passive scanning supporting auto connect
# scenarios
#ScanIntervalAutoConnect=
#ScanWindowAutoConnect=

# LE scanning parameters used for passive scanning supporting wake from suspend
# scenarios
#ScanIntervalSuspend=
#ScanWindowSuspend=

# LE scanning parameters used for active scanning supporting discovery
# proceedure
#ScanIntervalDiscovery=
#ScanWindowDiscovery=

# LE scanning parameters used for passive scanning supporting the advertisement
# monitor Apis
#ScanIntervalAdvMonitor=
#ScanWindowAdvMonitor=

# LE scanning parameters used for connection establishment.
#ScanIntervalConnect=
#ScanWindowConnect=

# LE default connection parameters.  These values are superceeded by any
# specific values provided via the Load Connection Parameters interface
#MinConnectionInterval=
#MaxConnectionInterval=
#ConnectionLatency=
#ConnectionSupervisionTimeout=
#Autoconnecttimeout=

# Scan duration during interleaving scan. Only used when scanning for ADV
# monitors. The units are msec.
# Default: 300
#AdvMonAllowlistScanDuration=
# Default: 500
#AdvMonNoFilterScanDuration=

# Enable/Disable Advertisement Monitor interleave scan for power saving.
# 0: disable
# 1: enable
# Defaults to 1
#EnableAdvMonInterleaveScan=

[GATT]
# GATT attribute cache.
# Possible values:
# always: Always cache attributes even for devices not paired, this is
# recommended as it is best for interoperability, with more consistent
# reconnection times and enables proper tracking of notifications for all
# devices.
# yes: Only cache attributes of paired devices.
# no: Never cache attributes
# Default: always
#Cache = always

# Minimum required Encryption Key Size for accessing secured characteristics.
# Possible values: 0 and 7-16. 0 means don't care.
# Defaults to 0
#KeySize = 0

# Exchange MTU size.
# Possible values: 23-517
# Defaults to 517
#ExchangeMTU = 517

# Number of ATT channels
# Possible values: 1-5 (1 disables EATT)
# Default to 1
#Channels = 1

[CSIS]
# SIRK - Set Identification Resolution Key which is common for all the
# sets. They SIRK key is used to identify its sets. This can be any
# 128 bit value or a string value (e.g. product name) which is then hashed.
# Possible Values:
# 16 byte hexadecimal value: 861FAE703ED681F0C50B34155B6434FB
# String value: "My Product Name"
# Defaults to none
#SIRK =

# SIRK Encryption
# Possible values:
# true: Encrypt SIRK when read
# false: Do not encrypt SIRK when read. (plaintext)
# Defaults to true
#Encryption = true

# Total no of sets belongs to this Profile
# Defaults to 0
#Size = 0

# Rank for the device
# Defaults to 0
#Rank = 0

# This enables the GATT client functionally, so it can be disabled in system
# which can only operate as a peripheral.
# Defaults to 'true'.
#Client = true

[AVDTP]
# AVDTP L2CAP Signalling Channel Mode.
# Possible values:
# basic: Use L2CAP Basic Mode
# ertm: Use L2CAP Enhanced Retransmission Mode
#SessionMode = basic

# AVDTP L2CAP Transport Channel Mode.
# Possible values:
# basic: Use L2CAP Basic Mode
# streaming: Use L2CAP Streaming Mode
#StreamMode = basic

[Policy]
#
# The ReconnectUUIDs defines the set of remote services that should try
# to be reconnected to in case of a link loss (link supervision
# timeout). The policy plugin should contain a sane set of values by
# default, but this list can be overridden here. By setting the list to
# empty the reconnection feature gets disabled.
#ReconnectUUIDs=00001112-0000-1000-8000-00805f9b34fb,0000111f-0000-1000-8000-00805f9b34fb,0000110a-0000-1000-8000-00805f9b34fb,0000110b-0000-1000-8000-00805f9b34fb

# ReconnectAttempts define the number of attempts to reconnect after a link
# lost. Setting the value to 0 disables reconnecting feature.
#ReconnectAttempts=7

# ReconnectIntervals define the set of intervals in seconds to use in between
# attempts.
# If the number of attempts defined in ReconnectAttempts is bigger than the
# set of intervals the last interval is repeated until the last attempt.
#ReconnectIntervals=1,2,4,8,16,32,64

# AutoEnable defines option to enable all controllers when they are found.
# This includes adapters present on start as well as adapters that are plugged
# in later on. Defaults to 'true'.
#AutoEnable=true

# Audio devices that were disconnected due to suspend will be reconnected on
# resume. ResumeDelay determines the delay between when the controller
# resumes from suspend and a connection attempt is made. A longer delay is
# better for better co-existence with Wi-Fi.
# The value is in seconds.
# Default: 2
#ResumeDelay = 2

[AdvMon]
# Default RSSI Sampling Period. This is used when a client registers an
# advertisement monitor and leaves the RSSISamplingPeriod unset.
# Possible values:
# 0x00       Report all advertisements
# N = 0xXX   Report advertisements every N x 100 msec (range: 0x01 to 0xFE)
# 0xFF       Report only one advertisement per device during monitoring period
# Default: 0xFF
#RSSISamplingPeriod=0xFF
ARdgzC commented 4 days ago

My battery leves are Case 75%, both airpods 100%

It shows data only with the airpods not paired


[ardgzc@rigel:~]$ gjs-console /home/$USER/Downloads/test-remove-rssi.js
Gjs-Message: 13:23:11.647: JS LOG: Kernel: 6.9.9-200.fc40.x86_64
Gjs-Message: 13:23:11.650: JS LOG: GLib.SpawnError: Failed to execute child process “lsb_release” (No such file or directory)
Gjs-Message: 13:23:11.650: JS LOG: TypeError: os is undefined
Gjs-Message: 13:23:11.650: JS LOG:  
Gjs-Message: 13:23:11.650: JS LOG:  
Gjs-Message: 13:23:11.650: JS LOG: StartDiscoveryAsync
Gjs-Message: 13:23:22.097: JS LOG: Scanning Bluetooth devices...
Gjs-Message: 13:23:22.097: JS LOG: Device = 14 AddressType = public rssi = -52 connected = false
Gjs-Message: 13:23:22.097: JS LOG:  
Gjs-Message: 13:23:22.097: JS LOG:  
Gjs-Message: 13:23:22.097: JS LOG: No information about objects was obtained.
Gjs-Message: 13:23:27.088: JS LOG: StopDiscoveryAsync
Gjs-Message: 13:23:37.085: JS LOG: StartDiscoveryAsync
Gjs-Message: 13:23:52.096: JS LOG: Scanning Bluetooth devices...
Gjs-Message: 13:23:52.096: JS LOG: Device = 14 AddressType = public rssi = -76 connected = false
Gjs-Message: 13:23:52.096: JS LOG:  
Gjs-Message: 13:23:52.096: JS LOG:  
Gjs-Message: 13:23:52.097: JS LOG: Device = 17 AddressType = public rssi = -42 connected = false
Gjs-Message: 13:23:52.097: JS LOG:  
Gjs-Message: 13:23:52.097: JS LOG:  
Gjs-Message: 13:23:52.097: JS LOG: rawData.length = 27
Gjs-Message: 13:23:52.098: JS LOG: ------------------------------------------
Gjs-Message: 13:23:52.098: JS LOG: Device                             : 17
Gjs-Message: 13:23:52.098: JS LOG: ManufacturerData                   : 071907142095e4e42872deccb0663d3927ffdaddc981580cb82495
Gjs-Message: 13:23:52.098: JS LOG: Rssi                               : -42
Gjs-Message: 13:23:52.098: JS LOG: Model 4 Character                  : 1420
Gjs-Message: 13:23:52.098: JS LOG: Model 1 Character                  : 4
Gjs-Message: 13:23:52.098: JS LOG: Left Battery Level                 : 40
Gjs-Message: 13:23:52.098: JS LOG: Right Battery Level                : 100
Gjs-Message: 13:23:52.098: JS LOG: Case Battery Level                 : 40
Gjs-Message: 13:23:52.098: JS LOG: Single Battery Level               : 40
Gjs-Message: 13:23:52.098: JS LOG: Left Battery Charging Status       : false
Gjs-Message: 13:23:52.098: JS LOG: Right Battery Charging Status      : true
Gjs-Message: 13:23:52.098: JS LOG: Case Battery Charging Status       : true
Gjs-Message: 13:23:52.098: JS LOG: Single Battery Charging Status     : false
Gjs-Message: 13:23:52.098: JS LOG: ------------------------------------------
Gjs-Message: 13:23:57.088: JS LOG: StopDiscoveryAsync
maniacx commented 3 days ago

My battery leves are Case 75%, both airpods 100%

It shows data only with the airpods not paired


[ardgzc@rigel:~]$ gjs-console /home/$USER/Downloads/test-remove-rssi.js
Gjs-Message: 13:23:11.647: JS LOG: Kernel: 6.9.9-200.fc40.x86_64
Gjs-Message: 13:23:11.650: JS LOG: GLib.SpawnError: Failed to execute child process “lsb_release” (No such file or directory)
Gjs-Message: 13:23:11.650: JS LOG: TypeError: os is undefined
Gjs-Message: 13:23:11.650: JS LOG:  
Gjs-Message: 13:23:11.650: JS LOG:  
Gjs-Message: 13:23:11.650: JS LOG: StartDiscoveryAsync
Gjs-Message: 13:23:22.097: JS LOG: Scanning Bluetooth devices...
Gjs-Message: 13:23:22.097: JS LOG: Device = 14 AddressType = public rssi = -52 connected = false
Gjs-Message: 13:23:22.097: JS LOG:  
Gjs-Message: 13:23:22.097: JS LOG:  
Gjs-Message: 13:23:22.097: JS LOG: No information about objects was obtained.
Gjs-Message: 13:23:27.088: JS LOG: StopDiscoveryAsync
Gjs-Message: 13:23:37.085: JS LOG: StartDiscoveryAsync
Gjs-Message: 13:23:52.096: JS LOG: Scanning Bluetooth devices...
Gjs-Message: 13:23:52.096: JS LOG: Device = 14 AddressType = public rssi = -76 connected = false
Gjs-Message: 13:23:52.096: JS LOG:  
Gjs-Message: 13:23:52.096: JS LOG:  
Gjs-Message: 13:23:52.097: JS LOG: Device = 17 AddressType = public rssi = -42 connected = false
Gjs-Message: 13:23:52.097: JS LOG:  
Gjs-Message: 13:23:52.097: JS LOG:  
Gjs-Message: 13:23:52.097: JS LOG: rawData.length = 27
Gjs-Message: 13:23:52.098: JS LOG: ------------------------------------------
Gjs-Message: 13:23:52.098: JS LOG: Device                             : 17
Gjs-Message: 13:23:52.098: JS LOG: ManufacturerData                   : 071907142095e4e42872deccb0663d3927ffdaddc981580cb82495
Gjs-Message: 13:23:52.098: JS LOG: Rssi                               : -42
Gjs-Message: 13:23:52.098: JS LOG: Model 4 Character                  : 1420
Gjs-Message: 13:23:52.098: JS LOG: Model 1 Character                  : 4
Gjs-Message: 13:23:52.098: JS LOG: Left Battery Level                 : 40
Gjs-Message: 13:23:52.098: JS LOG: Right Battery Level                : 100
Gjs-Message: 13:23:52.098: JS LOG: Case Battery Level                 : 40
Gjs-Message: 13:23:52.098: JS LOG: Single Battery Level               : 40
Gjs-Message: 13:23:52.098: JS LOG: Left Battery Charging Status       : false
Gjs-Message: 13:23:52.098: JS LOG: Right Battery Charging Status      : true
Gjs-Message: 13:23:52.098: JS LOG: Case Battery Charging Status       : true
Gjs-Message: 13:23:52.098: JS LOG: Single Battery Charging Status     : false
Gjs-Message: 13:23:52.098: JS LOG: ------------------------------------------
Gjs-Message: 13:23:57.088: JS LOG: StopDiscoveryAsync

Hey @ARdgzC
Thanks for the info. I have opened up a new issue, lets discuss this here https://github.com/maniacx/Airpod-Battery-Monitor/issues/26