add BLE bonding
Some checks failed
ESP-IDF Build / build (esp32, latest) (push) Failing after 46s
ESP-IDF Build / build (esp32, release-v5.4) (push) Failing after 46s
ESP-IDF Build / build (esp32, release-v5.5) (push) Failing after 45s
ESP-IDF Build / build (esp32c3, latest) (push) Failing after 45s
ESP-IDF Build / build (esp32c3, release-v5.4) (push) Failing after 45s
ESP-IDF Build / build (esp32c3, release-v5.5) (push) Failing after 45s
ESP-IDF Build / build (esp32c5, latest) (push) Failing after 45s
ESP-IDF Build / build (esp32c5, release-v5.4) (push) Failing after 45s
ESP-IDF Build / build (esp32c5, release-v5.5) (push) Failing after 45s
ESP-IDF Build / build (esp32c6, latest) (push) Failing after 45s
ESP-IDF Build / build (esp32c6, release-v5.4) (push) Failing after 45s
ESP-IDF Build / build (esp32c6, release-v5.5) (push) Failing after 45s
ESP-IDF Build / build (esp32h2, latest) (push) Failing after 46s
ESP-IDF Build / build (esp32h2, release-v5.4) (push) Failing after 45s
ESP-IDF Build / build (esp32h2, release-v5.5) (push) Failing after 45s
ESP-IDF Build / build (esp32p4, latest) (push) Failing after 45s
ESP-IDF Build / build (esp32p4, release-v5.4) (push) Failing after 45s
ESP-IDF Build / build (esp32p4, release-v5.5) (push) Failing after 52s
ESP-IDF Build / build (esp32s3, latest) (push) Failing after 56s
ESP-IDF Build / build (esp32s3, release-v5.4) (push) Failing after 46s
ESP-IDF Build / build (esp32s3, release-v5.5) (push) Failing after 45s

Signed-off-by: Peter Siegmund <mars3142@users.noreply.github.com>
This commit is contained in:
2025-09-20 20:26:23 +02:00
parent 07f955d949
commit 8a2c0a60d5
13 changed files with 524 additions and 73 deletions

View File

@@ -1,3 +1,15 @@
#pragma once
#include "host/ble_hs.h"
#include "sdkconfig.h"
typedef struct
{
uint16_t conn_handle;
bool is_connected;
} ble_connection_t;
extern ble_connection_t g_connections[CONFIG_BT_NIMBLE_MAX_CONNECTIONS];
void remote_control_init(void);
bool is_any_device_connected(void);

View File

@@ -14,8 +14,7 @@ extern const ble_uuid128_t gatt_svr_chr_uart_rx_uuid;
// TX Characteristic UUID: 6E400003-B5A3-F393-E0A9-E50E24DCCA9E
extern const ble_uuid128_t gatt_svr_chr_uart_tx_uuid;
extern uint16_t conn_handle;
extern uint16_t tx_chr_val_handle;
extern uint16_t tx_chr_val_handle; // This is still needed as it's set once by the stack
int gatt_svr_chr_uart_access(uint16_t conn_handle, uint16_t attr_handle, struct ble_gatt_access_ctxt *ctxt, void *arg);
void send_ble_data(const char *data);