BleSppUart is try to support basic function (BetaFlight configurator) of SpeedyBee App.
Supported Targets | ESP32 | ESP32-C2 | ESP32-C3 | ESP32-H2 | ESP32-S3 |
---|---|---|---|---|---|
TBD | Tested | TBD | TBD | TBD | TBD |
ESP-IDF GATT SERVER SPP Example is based.
esp-idf-v5.0 \examples\bluetooth\bluedroid\ble\ ble_spp_server
$ mkdir test
$ cd test
$ git clone git@github.com:espressif/esp-idf.git
$ cd esp-idf
$ git checkout release/v5.0
$ ./install.sh
$ cd ..
$ git clone git@github.com:lida2003/BleSppUart.git
$ cd esp-idf
$ . ./export.sh
$ cd BleSppUart
$ idf.py set-target ESP32
$ idf.py build
Note: try idf.py set-target target, if you have other module or dev boards.
$ idf.py -p /dev/ttyUSB0 flash monitor
Note: change ttyUSBx, x=serial port of the ttl module.
Current test result shows BLE-SPP UART is NOT supporting SpeedyBee.
So my premire rootcause is SpeedyBee has it's own protocol between mobile app and BLE SPP device through self defined truncate package format, detailed info see Connecting SpeedyBee or BetaFlightConfigurator with self make SPP device
Hope SpeedyBee can share more info.
Wich suggests using multi packet transmission of communication frame. Since I didn't see any other value negotiated. So I think 23 is used for SpeedyBee.
Full MTU package
'#' + '#' + total_num + current_num + rx_buffer[(spp_mtu_size-7)]
Last package
'#' + '#' + total_num + current_num + rx_buffer[(event.size - (current_num - 1)*(spp_mtu_size - 7))]
There are multi-times request for long packet response. it seems ok with UUI, API version and FC version msp commands. Not Compatible with SpeedyBee App #1