Giter Club home page Giter Club logo

Comments (4)

clarkli86 avatar clarkli86 commented on August 22, 2024

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.

DigitalGabriele avatar DigitalGabriele commented on August 22, 2024

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.

mdehoogh avatar mdehoogh commented on August 22, 2024

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.

abhishek-v-pandey avatar abhishek-v-pandey commented on August 22, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.