You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@mynewt.apache.org by Aditya Xavier <ad...@me.com> on 2018/06/07 09:53:44 UTC
Apache Mynewt Passkey Authentication
Hi all,
I wanted to create an application which would request a Mobile connecting to it a Passkey which when provided correctly would allow the gatt connections to work.
1. Is this even possible ?
2. How do I achieve this, I have gone through several examples like btshell etc but could not figure out the direction.
Thanks,
Aditya Xavier.
Re: Apache Mynewt Passkey Authentication
Posted by Łukasz Rymanowski <lu...@codecoup.pl>.
Hi,
Please have a look on
https://mynewt.apache.org/network/ble/btshell/btshell_GAP/ at Security part
Regarding your questsion:
1) yes
2) In example below my device is peripheral with iocapa=DisplayOnly. We are
already connected with connection handle = 1.
* security-set-data mitm_flag=1 io_capabilities=0 our_key_dist=7
their_key_dist=7 bonding=1 sc=1
* security-start conn=1
After this you should see on the console:
` passkey action event; action=3'
Here is actually a place where we should improve with documentation.
Action=3 means Display, but btshell does not generate passkey for you.
Instead you need to provide it by calling:
auth-passkey conn=1 action=3 key=<your key e.g. 111111>
Then provide same on your phone and you are done.
BTW. Action types you can find in ble_sm.h
Hope that helps
\Łukasz
On Thu, 7 Jun 2018 at 11:54, Aditya Xavier <ad...@me.com> wrote:
> Hi all,
>
> I wanted to create an application which would request a Mobile connecting
> to it a Passkey which when provided correctly would allow the gatt
> connections to work.
>
> 1. Is this even possible ?
> 2. How do I achieve this, I have gone through several examples like
> btshell etc but could not figure out the direction.
>
>
> Thanks,
> Aditya Xavier.