-
Notifications
You must be signed in to change notification settings - Fork 115
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
Method to retrieve remote device path in StartNotify and StopNotify #401
Comments
I don't have time to look at this in detail right now. However I did a project that had four buttons and needed to know which one was activated. Take a look and let me know if you have questions still. Be warned, it doesn't use Bluezero |
Thanks for your quick reply and suggestion. As far as I know, in your project the device runs the python script is the GATT client, thus, it knows which GATT server (the Button) or address (with Dbus path) it writes to or gets notified from. What I want to achieve is in the opposite direction, where the GATT server knows the address of the GATT client to notify. |
OK, I'm not sure I understand the question. The code can see what devices are Examples of monitoring changes in interfaces or properties are at: python-bluezero/bluezero/adapter.py Lines 91 to 103 in 2b0aba8
|
Sorry for the unclear question. I think you got it correctly, I want to design a GATT Server that it knows the address of which devices that use the read, write and notify methods. Thanks to bluez, for read and write methods, this can be done with At first, I wanted to go with LE Secure Connection paring/bonding by using Because of this, I decided to go with unauthenticated connection (without using paring/bonding) and applied an additional software encryption on top of the unauthenticated connection. The GATT server has a characteristic used for authentication (encrypted passcode for example). Whenever a right passcode is written to the server via this characteristic, the client will be able to access other characteristics. To sum up, I want to design a filter to prevent those clients that are not in the whitelist to access the server, which leads to the question I raised above. Thanks for your time and constructive comments. Please let me if you know how to resolve the problem with the unexpected LE Secure Connection pairing/bonding dialog. |
For the unwanted pairing request on ios, could it be the following issue? |
No, in #336 the pairing dialog is sent repeatedly, and I already fixed it by disabling the battery plugin. But this issue is different, the pairing/bonding dialog would pop up just like 2 devices have never been paired, even if they was successfully paired. When I tracked down the btmon trace, the exchange of the Long Term Key was successful, but somehow the iOS device still requested for a new pairing. This also happens when I manually advertised a characteristic with |
I have taken a look at the BlueZ issue you linked to and it seems similar to: This looks like it is something more fundamental than a Bluezero issue so I'm not sure that I can help. I'm not sure how actively issues on the BlueZ github repo are monitored. You might be better raising this on the BlueZ Slack http://www.bluez.org/contact/ |
Thanks for suggestions, I'll try to raise the issue on bluez Slack. Android:
iOS:
|
The re-pairing/re-bonding pop up is because the iOS device I connected to has less secure method (legacy bonding or no Man-In-The-Middle MITM). The solution is to disable LE Secure Connection |
I'm working on a project where I want to know which device uses write, read and notify methods. As for
ReadValue(dict options)
andWriteValue(array{byte} value, dict options)
, the GATT server can retrieve device path throughoptions
.Is there a way for the GATT server to retrieve the device path of the device which invokes
StartNotify()
andStopNotify()
?The text was updated successfully, but these errors were encountered: