mirror of
https://github.com/espressif/esp-idf.git
synced 2025-07-31 19:24:33 +02:00
Merge branch 'fix/fix_length_ble_get_started_example_v5.2' into 'release/v5.2'
fix(ble): Increased the length of addr_str in ble_get_started nimble examples (v5.2) See merge request espressif/esp-idf!33210
This commit is contained in:
@@ -205,7 +205,7 @@ static void on_stack_sync(void) {
|
|||||||
void adv_init(void) {
|
void adv_init(void) {
|
||||||
/* Local variables */
|
/* Local variables */
|
||||||
int rc = 0;
|
int rc = 0;
|
||||||
char addr_str[12] = {0};
|
char addr_str[18] = {0};
|
||||||
|
|
||||||
/* Make sure we have proper BT identity address set */
|
/* Make sure we have proper BT identity address set */
|
||||||
rc = ble_hs_util_ensure_addr(0);
|
rc = ble_hs_util_ensure_addr(0);
|
||||||
|
@@ -92,7 +92,7 @@ static void start_advertising(void) {
|
|||||||
void adv_init(void) {
|
void adv_init(void) {
|
||||||
/* Local variables */
|
/* Local variables */
|
||||||
int rc = 0;
|
int rc = 0;
|
||||||
char addr_str[12] = {0};
|
char addr_str[18] = {0};
|
||||||
|
|
||||||
/* Make sure we have proper BT identity address set */
|
/* Make sure we have proper BT identity address set */
|
||||||
rc = ble_hs_util_ensure_addr(0);
|
rc = ble_hs_util_ensure_addr(0);
|
||||||
|
@@ -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) {
|
static void print_conn_desc(struct ble_gap_conn_desc *desc) {
|
||||||
/* Local variables */
|
/* Local variables */
|
||||||
char addr_str[12] = {0};
|
char addr_str[18] = {0};
|
||||||
|
|
||||||
/* Connection handle */
|
/* Connection handle */
|
||||||
ESP_LOGI(TAG, "connection handle: %d", desc->conn_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) {
|
void adv_init(void) {
|
||||||
/* Local variables */
|
/* Local variables */
|
||||||
int rc = 0;
|
int rc = 0;
|
||||||
char addr_str[12] = {0};
|
char addr_str[18] = {0};
|
||||||
|
|
||||||
/* Make sure we have proper BT identity address set */
|
/* Make sure we have proper BT identity address set */
|
||||||
rc = ble_hs_util_ensure_addr(0);
|
rc = ble_hs_util_ensure_addr(0);
|
||||||
|
@@ -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) {
|
static void print_conn_desc(struct ble_gap_conn_desc *desc) {
|
||||||
/* Local variables */
|
/* Local variables */
|
||||||
char addr_str[12] = {0};
|
char addr_str[18] = {0};
|
||||||
|
|
||||||
/* Connection handle */
|
/* Connection handle */
|
||||||
ESP_LOGI(TAG, "connection handle: %d", desc->conn_handle);
|
ESP_LOGI(TAG, "connection handle: %d", desc->conn_handle);
|
||||||
@@ -259,7 +259,7 @@ static int gap_event_handler(struct ble_gap_event *event, void *arg) {
|
|||||||
void adv_init(void) {
|
void adv_init(void) {
|
||||||
/* Local variables */
|
/* Local variables */
|
||||||
int rc = 0;
|
int rc = 0;
|
||||||
char addr_str[12] = {0};
|
char addr_str[18] = {0};
|
||||||
|
|
||||||
/* Make sure we have proper BT identity address set (random preferred) */
|
/* Make sure we have proper BT identity address set (random preferred) */
|
||||||
rc = ble_hs_util_ensure_addr(0);
|
rc = ble_hs_util_ensure_addr(0);
|
||||||
|
@@ -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) {
|
static void print_conn_desc(struct ble_gap_conn_desc *desc) {
|
||||||
/* Local variables */
|
/* Local variables */
|
||||||
char addr_str[12] = {0};
|
char addr_str[18] = {0};
|
||||||
|
|
||||||
/* Connection handle */
|
/* Connection handle */
|
||||||
ESP_LOGI(TAG, "connection handle: %d", desc->conn_handle);
|
ESP_LOGI(TAG, "connection handle: %d", desc->conn_handle);
|
||||||
@@ -322,7 +322,7 @@ static int gap_event_handler(struct ble_gap_event *event, void *arg) {
|
|||||||
void adv_init(void) {
|
void adv_init(void) {
|
||||||
/* Local variables */
|
/* Local variables */
|
||||||
int rc = 0;
|
int rc = 0;
|
||||||
char addr_str[12] = {0};
|
char addr_str[18] = {0};
|
||||||
|
|
||||||
/* Make sure we have proper BT identity address set */
|
/* Make sure we have proper BT identity address set */
|
||||||
set_random_addr();
|
set_random_addr();
|
||||||
|
Reference in New Issue
Block a user