From 88f16140f81255efb1f7708f6b35cab8c9d4cb8e Mon Sep 17 00:00:00 2001 From: Harald Barth Date: Sun, 18 Sep 2022 23:18:40 +0200 Subject: [PATCH] document Bluetooth on ESP32 (SERIAL_BT_COMMANDS) --- SerialManager.cpp | 1 + config.example.h | 19 +++++++++++++++++++ 2 files changed, 20 insertions(+) diff --git a/SerialManager.cpp b/SerialManager.cpp index 9e14ea3..372cc85 100644 --- a/SerialManager.cpp +++ b/SerialManager.cpp @@ -65,6 +65,7 @@ void SerialManager::init() { #endif #ifdef SERIAL_BT_COMMANDS { + //SerialBT.setPin("6666"); // choose other pin uint64_t chipid = ESP.getEfuseMac(); char idstr[16] = {0}; snprintf(idstr, 15, "DCCEX-%08X", diff --git a/config.example.h b/config.example.h index d6d60dc..7909f0a 100644 --- a/config.example.h +++ b/config.example.h @@ -196,5 +196,24 @@ The configuration file for DCC-EX Command Station //#define SERIAL1_COMMANDS //#define SERIAL2_COMMANDS //#define SERIAL3_COMMANDS +// +// BLUETOOTH SERIAL ON ESP32 +// On ESP32 you have the possibility to use the builtin BT serial to connect to +// the CS. +// +// The CS shows up as a pairable BT Clasic device. Name is "DCCEX-hexnumber". +// BT is as an additional serial port, debug messages are still sent over USB, +// not BT serial. +// +// If you enable this there are some implications: +// 1. WiFi will sleep more (as WiFi and BT share the radio. So WiFi performance +// may suffer +// 2. The app will be bigger that 1.2MB, so the default partition scheme will not +// work any more. You need to choose a partition scheme with 2MB (or bigger). +// For example "NO OTA (2MB APP, 2MB SPIFFS)" in the Arduino IDE. +// 3. There is no securuity (PIN) implemented. Everyone in radio range can pair +// with your CS. +// +//#define SERIAL_BT_COMMANDS /////////////////////////////////////////////////////////////////////////////////////