Skip to contentSkip to conversation

using d-bus api to set security level

DISCUSSION Don Zickus 2 participants 3 messages Sep 14, 2016 – Sep 15, 2016 Bluetooth drivers

lore
Share & tools
lore

Don Zickus

author
#0 lore raw

Hi,

I am trying to find the equivalent of using gatttool's --sec-level when writing a python script to connect to an LE device over the d-bus API.

It seems like I have to set the Characteristic correctly. But I am missing something obvious when looking through the doc/ api files.

Can someone point me to the right spot? Thanks!

Cheers,
Don

#1 lore raw

Hi Don,

Quoted 9 lines · Don Zickus

Hi,

I am trying to find the equivalent of using gatttool's --sec-level when writing a python script to connect to an LE device over the d-bus API.

It seems like I have to set the Characteristic correctly. But I am missing something obvious when looking through the doc/ api files.

Can someone point me to the right spot? Thanks!

You can call Device1.Pair if you want to authenticate, once the LTK is exchanged it will be used automatically in the next connections.

Signature · 1 line
Luiz Augusto von Dentz
author
#2 lore raw
Quoted 8 lines · Luiz Augusto von Dentz

Hi Don,

Quoted 5 lines · Don Zickus

Hi,

I am trying to find the equivalent of using gatttool's --sec-level when writing a python script to connect to an LE device over the d-bus API.

Quoted 7 lines
Quoted 4 lines

It seems like I have to set the Characteristic correctly. But I am missing something obvious when looking through the doc/ api files.

Can someone point me to the right spot? Thanks!

You can call Device1.Pair if you want to authenticate, once the LTK is exchanged it will be used automatically in the next connections.

Hi Luiz,

Thanks for the response. I guess if the Pair() fails with Authentication failure, that implies the device does not support it? I was playing with this TI sensortag and wanted to double check how it was connecting.

So does the authentication get setup by the agent? And the Pair() to the agent determines if the link will be encrypted?

Cheers,
Don