-
Notifications
You must be signed in to change notification settings - Fork 269
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Service not detected by BlueZ for a specific device #438
Comments
@bdr99 try running bluetoothd with valgrind to generate a backtrace. |
@Vudentz Sure, here are the logs when running with valgrind: Also, running bluetoothd with valgrind actually fixes the issue, I assume because it allows bluetoothd to continue despite the segfault. Note that the FFF0 service is now showing in bluetoothctl info.
|
@bdr99 please install the debug symbols otherwise valgrind can't decode them:
Btw, any chance to test with the latest to see if still reproducible with it? |
@Vudentz Sorry, I'm not very familiar with BlueZ and am honestly not sure how to do either of those things. Would you mind briefly summarizing the steps? I'm on an Ubuntu 22.04 system by the way. I tried these ways of installing the debug symbols, but they didn't work:
|
Instructions to build BlueZ from source are in the main README. |
Thanks again, @dlech. @Vudentz I tested with the latest master commit, and I am no longer getting a segfault from bluetoothd. However, the original problem still remains, which is that BlueZ does not see the service with UUID 0xFFF0. 5.65 behaves the same as latest master. So, to summarize: 5.64: Segfaults, and service does not show. Here is the output of
Here is the debug log from bluetoothd with the latest master commit, which does not segfault: |
@Vudentz I bisected the segfault to this commit: e0870ce. I noticed that commit only changed the debug logging, so I tried running I've updated the issue title and description to reflect these findings, and I'd appreciate any input you may have for this issue. Please let me know if I can provide any other info. |
@bdr99 Seems like there is some bugs with the last service:
Were you running with: |
@Vudentz Yes, I was testing with the latest commit on the master branch, which includes the change you linked. I think you're on the right track, since the last service is the one that is getting lost. Is there a way we can determine the reason why it is being removed from the list? |
@bdr99 try with the following change: https://patchwork.kernel.org/project/bluetooth/patch/20221215234404.2735181-1-luiz.dentz@gmail.com/ |
@Vudentz Unfortunately, that patch didn't resolve the issue. The debug output is the same as before, I still see the "service disappeared" line after the characteristics are discovered. |
If there are no characteristics to discover, or for some reason bt_gatt_discover_descriptors is skiped, the service should be marked as active. Fixes: bluez#438
If there are no characteristics to discover, or for some reason bt_gatt_discover_descriptors is skiped, or the last attribute is actually a included service the service should be marked as active as there will be no more attributes to be discovered. Fixes: bluez#438
Ive sent a v2: https://patchwork.kernel.org/project/bluetooth/patch/20221216210611.2990552-1-luiz.dentz@gmail.com/ |
@Vudentz That version didn't work either unfortunately. Again, the log output is the same as before, and I don't see the any occurrences of the new |
Hmm, you don't seem to have any included service, not really sure why, can you upload the btmon traces? |
If there are no characteristics to discover, or for some reason bt_gatt_discover_descriptors is skiped, or the last attribute is actually a included service the service should be marked as active as there will be no more attributes to be discovered. Fixes: bluez#438
If there are no characteristics to discover, or for some reason bt_gatt_discover_descriptors is skiped, or the last attribute is actually a included service the service should be removed from pending list as there will be no more attributes to be discovered. Fixes: bluez#438
I already sent this trace to @Vudentz via Slack, but here it is in case anyone else wants to take a look: |
@Vudentz Your v4 patch seems to have fixed the issue for me! https://patchwork.kernel.org/project/bluetooth/patch/20221217011059.3087848-1-luiz.dentz@gmail.com/
|
Operating System: Ubuntu 22.04 (Linux 5.15.0-56-generic)
BlueZ version: latest master
I have a certain device (Eufy Smart Scale P2) which exposes three BLE services. The issue I'm having is that BlueZ can only see the first two, and the third one (UUID 0xFFF0) is not visible. When I ran
sudo bluetoothd --debug --nodetach
to get the debug output, I noticed that all three services are shown in the debug output. But when I runbluetoothctl info
to check the services, I only see two services.I'm pretty new to BlueZ so please let me know what info I can provide to help debug this issue.
Here is a screenshot of nRF connect on my phone, showing all three services:
Here is the output when I run
bluetoothctl info
on the device (notice the FFF0 service is not shown):Here is the debug log output of
bluetoothd
when connecting to the device: bluetoothd_latest_master.logI previously thought this was being caused by a segfault I was seeing in
bluetoothd
, but that turned out to be a red herring, since the segfault was fixed in the latest release but the issue still persists.The text was updated successfully, but these errors were encountered: