FastLED
3.10.8
Loading...
Searching...
No Matches
AutoResearchBle.h
Go to the documentation of this file.
1
// examples/AutoResearch/AutoResearchBle.h
2
//
3
// BLE autoresearch for ESP32: GATT server for JSON-RPC over BLE.
4
// Used by `bash autoresearch --ble`.
5
//
6
// The ESP32 starts a BLE GATT server with a custom service.
7
// The host Python script connects via Bleak and tests
8
// bidirectional JSON-RPC communication (ping/pong).
9
//
10
// NOTE: BLE transport creation/destruction is handled by
11
// AutoResearchRemoteControl::startBleRemote()/stopBleRemote().
12
// This file provides state accessors only.
13
14
#pragma once
15
16
#include "
fl/stl/stdint.h
"
17
18
// FL_IS_RP2040 / FL_IS_RP2350 for the advertising-name default below.
19
#include "platforms/is_platform.h"
20
21
// BLE configuration constants
22
//
23
// The advertising name is what a host scan matches on, so it has to name the
24
// board that actually answered. It was hardcoded "FastLED-C6", which meant an
25
// RP2350W advertised under a C6 name and the scan log reported the wrong chip.
26
#ifndef AUTORESEARCH_BLE_DEVICE_NAME
27
#if defined(FL_IS_RP2350)
28
#define AUTORESEARCH_BLE_DEVICE_NAME "FastLED-RP2350"
29
#elif defined(FL_IS_RP2040)
30
#define AUTORESEARCH_BLE_DEVICE_NAME "FastLED-RP2040"
31
#else
32
#define AUTORESEARCH_BLE_DEVICE_NAME "FastLED-C6"
33
#endif
34
#endif
35
37
struct
AutoResearchBleState
{
38
bool
ble_server_active
=
false
;
39
};
40
43
AutoResearchBleState
&
getBleState
();
getBleState
AutoResearchBleState & getBleState()
Get current BLE autoresearch state.
AutoResearchBleState::ble_server_active
bool ble_server_active
Definition
AutoResearchBle.h:38
AutoResearchBleState
State for BLE autoresearch.
Definition
AutoResearchBle.h:37
stdint.h
examples
AutoResearch
AutoResearchBle.h
Generated on Sun Oct 18 2026 00:56:49 for FastLED by
1.13.2