Ryan Malloy dc6078b296 Fix firmware for ESP-IDF v5.3 and hardware-verified operation
- Switch UART0 for protocol I/O (USB bridge), disable ESP-IDF console
- Wire all 21 command handlers into dispatch table (was only 4)
- Add configure command handler (name, io_cap, device_class)
- Add bt_classic_is_enabled()/bt_ble_is_enabled() for live status
- Fix cJSON_False misuse in get_status (type constant, not boolean)
- Fix esp_bt_gap_set_cod() to use esp_bt_cod_t bitfield struct
- Fix auth_cmpl.auth_mode → lk_type for ESP-IDF v5.3
- Replace deprecated esp_bt_dev_set_device_name with stack-specific API
- Remove unused bytes_to_hex, obsolete kconfig symbols
- Use large partition table (1.5MB) for dual-mode BT stack

Verified on ESP32-D0WD-V3 rev 3.1, /dev/ttyUSB4, all commands tested.
2026-02-02 15:30:54 -07:00

22 lines
732 B
C

#pragma once
#include <stdbool.h>
#include "cJSON.h"
/* Initialize BLE subsystem (Bluedroid GATTS) */
void bt_ble_init(void);
/* State query */
bool bt_ble_is_enabled(void);
/* Command handlers (called from cmd_dispatcher) */
void cmd_ble_enable(const char *id, cJSON *params);
void cmd_ble_disable(const char *id, cJSON *params);
void cmd_ble_advertise(const char *id, cJSON *params);
void cmd_ble_set_adv_data(const char *id, cJSON *params);
void cmd_gatt_add_service(const char *id, cJSON *params);
void cmd_gatt_add_characteristic(const char *id, cJSON *params);
void cmd_gatt_set_value(const char *id, cJSON *params);
void cmd_gatt_notify(const char *id, cJSON *params);
void cmd_gatt_clear(const char *id, cJSON *params);