apache / apache/mynewt-nimble

Passkey/password pairing with NimBLE?

Open
#1,193 7 comments 0 reactions 0 assignees View on GitHub
Dominant language
C
Stars
893
Forks
512
Avg merge
13d 31m
Merged PRs (30d)
7

Description

Hello,
I have the following question. I have a BLE device based on ESP32. It does not have input or output capabilities. I am using ESP-IDF and the NimBLE stack, which I'm very pleased with so far.
I want to do password authentication as follows:
1. User pairs to the ESP32 device from a smartphone app.
2. User generates a passkey or password and sends it to the ESP32 device, which in turn sets it as a password for pairing.
3. The next time a user wants to connect, the ESP32 device sends him a request for password.
4. If he enters the correct password, he pairs to the device. If not, he cannot pair.

Is this possible with the NimBLE stack and is there example code for this scenario?
Thank you in advance.

P.S. obviously I read the part about security in BLE user guide ([https://mynewt.apache.org/latest/network/ble_sec.html](url)), but there were no examples on exactly how to implement passkey pairing.

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with the BLE security user guide linked in the issue and the NimBLE security APIs used by ESP-IDF. The issue names no repository file, entry point, or test, so first establish whether the requested pairing flow is supported and where an example would belong. Done means documenting the supported approach or its limitation with a reproducible example if appropriate.

Written by the indexing model from the issue text.

Assessment

Tech stack
c
Domain
embedded-iot, security
Issue type
Documentation
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.