Comments (4)
It is possible to force pairing/bonding with the btle.setSecurityLevel() function. When I set the security level to medium after the connection is established, I could see the pairing request/response/key generation in hcidump and my bluetooth device.
btle.connect() btle.setSecurityLevel()
equals
gatttool> connect gatttool> sec-level medium
However, it is not clear to me who controls the storage of the link keys. (I assume it is the bluetoothd daemon)
from bluepy.
Hej,
I have been trying to set security level to medium through gatttool, but it does not react. Same goes if I try to use setSecurityLevel(). What could be the problem?
from bluepy.
I didn't know that I could use setSecurityLevel() to that purpose so I adapted btle.py a bit so that I could call the pair method of bluepy-helper. First I got a nomgmt error, and seeing that mgmt_master would only be created when iface is not None I changed its default in Peripheral to 0 instead. Then, it was still not pairing presenting me with a protoerr result. So, any reason why the pairing won't work this way? (I did execute 'pairable on' beforehand.)
from bluepy.
Hello @clarkli86 I have tried your method and used setSecurityLevel() method but it does not work. Even tried with gatttool command line but no help over there as well.
Can you please explain how you got connected ?
from bluepy.
Related Issues (20)
- bluepy.btle.BTLEManagementError: Failed to execute management command 'scan' HOT 1
- How to get PDU Type?
- Passive scan returns weird connectable
- bluepy-helper crashes HOT 1
- Sampling frequency HOT 6
- thon3
- BluePy not compatible with Python 3.10 or newer
- Multiple Instances of a single Service
- Reading Accelerometer Data from SensorTag CC2650
- Try to use timeout HOT 4
- getting temperature data
- unable to make it work on Python 3.7.3
- Failed to connect to peripheral <my mac address>, addr type: random HOT 4
- Select a host Bluetooth device (the one that starts the connection) HOT 7
- ResourceWarning: unclosed file <_io.TextIOWrapper name=6 encoding='UTF-8'>
- Infinite timeout
- HCI Selection Failure HOT 1
- Help! Loaded everything but doesn't see the camera.
- Unable to set connection parameters and advertasing parameters Thingy:52
- Bluepy and Bookworm HOT 6
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from bluepy.