- 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.
26 lines
749 B
C
26 lines
749 B
C
/*
|
|
* bt_classic.h -- Classic Bluetooth GAP/SSP + SPP peripheral.
|
|
*/
|
|
|
|
#pragma once
|
|
|
|
#include <stdbool.h>
|
|
#include <stdint.h>
|
|
#include "cJSON.h"
|
|
|
|
void bt_classic_init(void);
|
|
|
|
/* Command handlers (dispatched from cmd_dispatcher) */
|
|
void cmd_classic_enable(const char *id, cJSON *params);
|
|
void cmd_classic_disable(const char *id, cJSON *params);
|
|
void cmd_classic_set_discoverable(const char *id, cJSON *params);
|
|
void cmd_classic_pair_respond(const char *id, cJSON *params);
|
|
void cmd_classic_set_ssp_mode(const char *id, cJSON *params);
|
|
|
|
/* State query */
|
|
bool bt_classic_is_enabled(void);
|
|
|
|
/* Called by configure command to set IO capabilities */
|
|
void bt_classic_set_io_cap(const char *io_cap_str);
|
|
void bt_classic_set_device_class(uint32_t cod_raw);
|