How to run Classic Bluetooth SPP with SSP and Passkey entry?

shadowkane
Posts: 6
Joined: Tue May 07, 2019 1:57 pm

How to run Classic Bluetooth SPP with SSP and Passkey entry?

Postby shadowkane » Sun Mar 03, 2024 3:28 pm

Hi
I'm trying to create a classic Bluetooth firmware for ESP32 that uses SPP (serial port profile) and SSP (secure simple pairing). and i'm following this example from espressif github "https://github.com/espressif/esp-idf/tr ... p_acceptor"
I manage to run the application, also i'm able to connect my phone with ESP32 and clearly i'm using numeric comparison (comparing code from ESP32 terminal with the code i'm seeing in the phone) and with the help of SPP android application i can connect to server and send messages. i just wanted to clarify that my code with this configuration is working.

what i'm trying to do now, is to keep using the SPP + SSP but instead of using numeric comparison, i want to use Passkey entry.
in esp_bt_gap_set_security_param(...) i tried all masks "ESP_BT_IO_CAP_IN , OUT, , IO, NONE"
also in esp_spp_start_srv(....) i tried different security type like "ESP_SPP_SEC_AUTHENTICATE" and MITM and 16_DIGITS"
but with no luck.
the only way i manage to pass a key in my phone to connect to the ESP32 bluetooth is by disabling the SSP in bluedroid initialization with configuration. but i want SSP.
I'm not not sure if this is possible to have both at the same time, if this is impossible, can someone explain to me the IO Capability, Secure Simple Pairing tables in this document "https://github.com/espressif/esp-idf/bl ... P32_SSP.md" and what they mean by Passkey entry in the docuement.

Thank you.

Who is online

Users browsing this forum: sirOwlBeak and 80 guests