-
Notifications
You must be signed in to change notification settings - Fork 491
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
random address not working #27
Comments
Hello Spedemon, And when I invoked the Peripheral constructor: and that worked fine. I have also added a few goodies to btle and to the bluepy helper to support disconnection and reconnection to the same device, this is useful to perform test automation. We I get a chance, I will try to post those changes to the development repo. Have you looked at the Intel Community forum for Edison before posting your question (https://communities.intel.com/community/makers/edison)? If not, it may be worthwile for other Edison users if you could add your experience with bluepy in there (eventually a link to the current forum thread). Thanks |
Hi Luis, |
Hi Luis, Thank you, that solves the problem, now this Python command is successful: conn = btle.Peripheral("CA:5B:3F:37:1D:A1","random") However, note that the following command causes an exception: python btle.py CA:5B:3F:37:1D:A1 random The error occurs when one requests the characteristics of the service with index 0: conn = btle.Peripheral("CA:5B:3F:37:1D:A1","random") Is there a reason why this occurs with random addresses only? Stefano |
Ciao Stefano, The 'random' notion is only used at connection time so if your connection was successful, you should correctly retrieve the services and characteristics. It is difficult for me with so little information to really help you. A few hints:
Good luck, Louis PS: Quando avvrai trovato la soluzione, puoi condividerla sul forum Edison? Grazie |
If you want to share your btle.py with me, I can help you fix it. Louis |
Hi Luis, thank you very much for your help. With the fix that you suggested, I can do what I need, however something is not right. After modifying btle.py according to your suggestion, the following runs successfully with 'do_get_characteristics_service_0 = False' but fails with 'do_get_characteristics_service_0=True': import btle Grazie! Nei prossimi giorni cercherò di postare nel forum Edison. |
Hello Stefano,Since I do not have your setup, it is difficult for me to have an idea of the problem. But I will try to eventually give you some hints:- what is the size of the "services" returned by conn.getServices(), is it 1 or something else- could there be a permission problem on the service 0 that would require pairing
Hi Luis, thank you very much for your help. With the fix that you suggested, I can do what I need, however something is not right. After modifying btle.py according to your suggestion, the following runs successfully with 'do_get_characteristics_service_0 = False' but fails with 'do_get_characteristics_service_0=True': import btle |
I had the same problem with heart rate sensor Tacx (device name: Tacx HRB 04741)
it seems to work fine:
I'm not sure what all those P.S. Those errors are the result of an attempt to read characteristic that doesn't support READ only NOTIFY |
Add 'random' address type (Solve issue #27) + some other changes
Hi Ian, |
Hi, p = Peripheral("C8:0F:10:77:3C:38","public") Kindly help |
I am using bluepy on Debian (on the Intel Edison i386 board). While there is no problem connecting to BLE devices that expose a 'public' address (it works just fine with the TI SensorTag and with the RedBearLab BLE Mini), there is a problem (main.BTLEException: Failed to connect to peripheral) connecting to devices that expose a 'random' address (e.g. the RedBearLab BLE Blend Micro).
Please note that 'gatttool -b xx:xx:xx:xx:xx:xx -I' connects to a device with 'public' address and 'gatttool -b xx:xx:xx:xx:xx:xx -I -t random' to a device with 'random' address.
The text was updated successfully, but these errors were encountered: