-
Notifications
You must be signed in to change notification settings - Fork 300
Replies: 2 comments · 25 replies
-
BlueZ caches the services, so if you don't provide a Services Changed or GATT Database attribute, it won't always pick up new services. See https://bleak.readthedocs.io/en/latest/troubleshooting.html#id4 for how to clear the cache. |
Beta Was this translation helpful? Give feedback.
All reactions
-
Beta Was this translation helpful? Give feedback.
All reactions
-
also checked on the system level Any ideas how to solve that? fyi |
Beta Was this translation helpful? Give feedback.
All reactions
-
Can you share the full log output? And also inspect the |
Beta Was this translation helpful? Give feedback.
All reactions
-
here comes the log
I also like to share the bluetoothctrl log.
You can see that the python module perfectly reflects what I am manually doing. So all good from your module side. Since my GATT service & characteristic are no standard - no ones knows how to resolve them. Alter reading around, I think that I found what is missing. Its a dbus object called "org.bluez.GattProfile1" (https://git.kernel.org/pub/scm/bluetooth/bluez.git/tree/doc/gatt-api.txt). Till now I have no idea how to create and publish some kind of profile that let the bluez and its deamon resolve my service. my service looks like
Guess we might an extension to the |
Beta Was this translation helpful? Give feedback.
All reactions
-
when looking into the bluepy it seems that they are doing a manual recovery - via find(https://github.com/IanHarvey/bluepy/blob/master/bluepy/bluepy-helper.c#L630). Maybe that is missing |
Beta Was this translation helpful? Give feedback.
All reactions
-
I just realized this program is wrong. There should only be one top-level run loop and everything run inside of it. Trying to use anything outside of the loop is not going to work right. Try running the service explorer example. You may need to use this version since IIRC the develop branch has changes that require new features that haven't been released yet. |
Beta Was this translation helpful? Give feedback.
All reactions
-
This says it is for automatic connecting. In Bleak we use manual connecting. Going back to this comment, I think BlueZ is picking up the custom service UUID from the advertising data but it is not seeing the custom service when enumerating the device after connection. BlueZ uses different BLE commands to enumerate devices compared to Windows and Android. So, I have a strong suspicion that the firmware on the device is not fully compatible with BlueZ. Logging packets with Wireshark will probably shed some light on this. |
Beta Was this translation helpful? Give feedback.
All reactions
-
good point Thats my understanding. Please correct me :) Currently I would like to have a function at the bluezdbus backend that I can call, that is registering my service uuid. After I- guess bluez is recovering the characteristics + service into dbus nodes |
Beta Was this translation helpful? Give feedback.
All reactions
-
Capturing packets with wireshark is the only way to see what is really going on. |
Beta Was this translation helpful? Give feedback.
All reactions
-
I done some testing. So it unlikely that there is a wrong gatt database @ peripheral. When looking abit deeper into pyblue, I am seeing that they found a way to discover services Any thoughts on that? |
Beta Was this translation helpful? Give feedback.
All reactions
-
capture Bluetooth packets and compare them - it is the best way to see the difference |
Beta Was this translation helpful? Give feedback.
All reactions
This discussion was converted from issue #1203 on January 18, 2023 16:37.
-
bluetoothctl -v
) in case of Linux: 5.65Description
I like to connect to a peripheral that offers a special GATT service.
Output
What I Did
I have a device with an own primary GATT service. I can connect and use it via NRFconnect perfectly.
Before I used the bluepy. Now I like to try bleak. So I try to rebuild a simple connection write/notify example.
Is this a bug or did I understood the bleak concept wrongly?
Beta Was this translation helpful? Give feedback.
All reactions