esp-idf/examples/bluetooth/bluedroid/classic_bt/bt_spp_acceptor
2021-06-02 03:03:07 +00:00
..
main components/bt: Set discoverable after create server 2021-06-02 03:03:07 +00:00
CMakeLists.txt build_app: make multi target support readable 2020-04-09 16:40:57 +08:00
ESP32_SSP.md Update bt_discovery demo and README 2021-01-27 14:17:12 +08:00
Makefile Bluetooth examples restructuring 2019-07-01 19:21:57 +08:00
README.md Update bt_discovery demo and README 2021-01-27 14:17:12 +08:00
sdkconfig.defaults examples: fix sdkconfig warnings 2019-11-21 15:36:06 +01:00

Supported Targets ESP32

ESP-IDF BT-SPP-ACCEPTOR demo

This is the demo for user to use ESP_APIs to create a Serial Port Protocol (SPP) acceptor and we aggregate Secure Simple Pair (SSP) into this demo to show how to use SPP when creating your own APPs.

How to use example

Hardware Required

This example is designed to run on commonly available ESP32 development board, e.g. ESP32-DevKitC.

To operate it should be connected to an SPP Initiator running on a smartphone or on another ESP32 development board.

Configure the project

idf.py menuconfig

Build and Flash

Build the project and flash it to the board, then run monitor tool to view serial output:

idf.py -p PORT flash monitor

(Replace PORT with the name of the serial port to use.)

(To exit the serial monitor, type Ctrl-].)

See the Getting Started Guide for full steps to configure and use ESP-IDF to build projects.

Example Description

After the program started, bt_spp_initator will connect it and send data.

Trouble shooting

  • Acceptor is expected to start before bt_spp_initator start.

  • To see the information of data, users shall set SPP_SHOW_MODE as SPP_SHOW_DATA or SPP_SHOW_SPEED in code(should be same with bt_spp_initator).

  • We also show the Security Simple Pair in this SPP demo. Users can set the IO Capability and Security Mode for their device (security level is fixed level 4). The default security mode of this demo is ESP_SPP_SEC_AUTHENTICATE which support MITM (Man In The Middle) protection. For more information about Security Simple Pair on ESP32, please refer to ESP32_SSP.