fix(ble): Increased the length of addr_str in ble_get_started nimble examples

This commit is contained in:
Yuhan Wei 2024-08-30 11:38:25 +08:00
parent 42e852a165
commit 77c17de379
4 changed files with 5 additions and 5 deletions

View File

@ -92,7 +92,7 @@ static void start_advertising(void) {
void adv_init(void) {
/* Local variables */
int rc = 0;
char addr_str[12] = {0};
char addr_str[18] = {0};
/* Make sure we have proper BT identity address set */
rc = ble_hs_util_ensure_addr(0);

View File

@ -27,7 +27,7 @@ inline static void format_addr(char *addr_str, uint8_t addr[]) {
static void print_conn_desc(struct ble_gap_conn_desc *desc) {
/* Local variables */
char addr_str[12] = {0};
char addr_str[18] = {0};
/* Connection handle */
ESP_LOGI(TAG, "connection handle: %d", desc->conn_handle);
@ -218,7 +218,7 @@ static int gap_event_handler(struct ble_gap_event *event, void *arg) {
void adv_init(void) {
/* Local variables */
int rc = 0;
char addr_str[12] = {0};
char addr_str[18] = {0};
/* Make sure we have proper BT identity address set */
rc = ble_hs_util_ensure_addr(0);

View File

@ -27,7 +27,7 @@ inline static void format_addr(char *addr_str, uint8_t addr[]) {
static void print_conn_desc(struct ble_gap_conn_desc *desc) {
/* Local variables */
char addr_str[12] = {0};
char addr_str[18] = {0};
/* Connection handle */
ESP_LOGI(TAG, "connection handle: %d", desc->conn_handle);

View File

@ -28,7 +28,7 @@ inline static void format_addr(char *addr_str, uint8_t addr[]) {
static void print_conn_desc(struct ble_gap_conn_desc *desc) {
/* Local variables */
char addr_str[12] = {0};
char addr_str[18] = {0};
/* Connection handle */
ESP_LOGI(TAG, "connection handle: %d", desc->conn_handle);