Skip to content

Commit 62eaef7

Browse files
committed
fix(bt/bluedroid): fixed the format error of passkey printing
1 parent f9ea7a4 commit 62eaef7

File tree

13 files changed

+26
-26
lines changed

13 files changed

+26
-26
lines changed

examples/bluetooth/bluedroid/classic_bt/a2dp_sink/main/main.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -104,12 +104,12 @@ static void bt_app_gap_cb(esp_bt_gap_cb_event_t event, esp_bt_gap_cb_param_t *pa
104104
#if (CONFIG_EXAMPLE_A2DP_SINK_SSP_ENABLED == true)
105105
/* when Security Simple Pairing user confirmation requested, this event comes */
106106
case ESP_BT_GAP_CFM_REQ_EVT:
107-
ESP_LOGI(BT_AV_TAG, "ESP_BT_GAP_CFM_REQ_EVT Please compare the numeric value: %"PRIu32, param->cfm_req.num_val);
107+
ESP_LOGI(BT_AV_TAG, "ESP_BT_GAP_CFM_REQ_EVT Please compare the numeric value: %06"PRIu32, param->cfm_req.num_val);
108108
esp_bt_gap_ssp_confirm_reply(param->cfm_req.bda, true);
109109
break;
110110
/* when Security Simple Pairing passkey notified, this event comes */
111111
case ESP_BT_GAP_KEY_NOTIF_EVT:
112-
ESP_LOGI(BT_AV_TAG, "ESP_BT_GAP_KEY_NOTIF_EVT passkey: %"PRIu32, param->key_notif.passkey);
112+
ESP_LOGI(BT_AV_TAG, "ESP_BT_GAP_KEY_NOTIF_EVT passkey: %06"PRIu32, param->key_notif.passkey);
113113
break;
114114
/* when Security Simple Pairing passkey requested, this event comes */
115115
case ESP_BT_GAP_KEY_REQ_EVT:

examples/bluetooth/bluedroid/classic_bt/a2dp_source/main/main.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -271,12 +271,12 @@ static void bt_app_gap_cb(esp_bt_gap_cb_event_t event, esp_bt_gap_cb_param_t *pa
271271
#if (CONFIG_EXAMPLE_SSP_ENABLED == true)
272272
/* when Security Simple Pairing user confirmation requested, this event comes */
273273
case ESP_BT_GAP_CFM_REQ_EVT:
274-
ESP_LOGI(BT_AV_TAG, "ESP_BT_GAP_CFM_REQ_EVT Please compare the numeric value: %"PRIu32, param->cfm_req.num_val);
274+
ESP_LOGI(BT_AV_TAG, "ESP_BT_GAP_CFM_REQ_EVT Please compare the numeric value: %06"PRIu32, param->cfm_req.num_val);
275275
esp_bt_gap_ssp_confirm_reply(param->cfm_req.bda, true);
276276
break;
277277
/* when Security Simple Pairing passkey notified, this event comes */
278278
case ESP_BT_GAP_KEY_NOTIF_EVT:
279-
ESP_LOGI(BT_AV_TAG, "ESP_BT_GAP_KEY_NOTIF_EVT passkey: %"PRIu32, param->key_notif.passkey);
279+
ESP_LOGI(BT_AV_TAG, "ESP_BT_GAP_KEY_NOTIF_EVT passkey: %06"PRIu32, param->key_notif.passkey);
280280
break;
281281
/* when Security Simple Pairing passkey requested, this event comes */
282282
case ESP_BT_GAP_KEY_REQ_EVT:

examples/bluetooth/bluedroid/classic_bt/bt_hid_mouse_device/main/main.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -205,11 +205,11 @@ void esp_bt_gap_cb(esp_bt_gap_cb_event_t event, esp_bt_gap_cb_param_t *param)
205205

206206
#if (CONFIG_EXAMPLE_SSP_ENABLED == true)
207207
case ESP_BT_GAP_CFM_REQ_EVT:
208-
ESP_LOGI(TAG, "ESP_BT_GAP_CFM_REQ_EVT Please compare the numeric value: %"PRIu32, param->cfm_req.num_val);
208+
ESP_LOGI(TAG, "ESP_BT_GAP_CFM_REQ_EVT Please compare the numeric value: %06"PRIu32, param->cfm_req.num_val);
209209
esp_bt_gap_ssp_confirm_reply(param->cfm_req.bda, true);
210210
break;
211211
case ESP_BT_GAP_KEY_NOTIF_EVT:
212-
ESP_LOGI(TAG, "ESP_BT_GAP_KEY_NOTIF_EVT passkey:%"PRIu32, param->key_notif.passkey);
212+
ESP_LOGI(TAG, "ESP_BT_GAP_KEY_NOTIF_EVT passkey:%06"PRIu32, param->key_notif.passkey);
213213
break;
214214
case ESP_BT_GAP_KEY_REQ_EVT:
215215
ESP_LOGI(TAG, "ESP_BT_GAP_KEY_REQ_EVT Please enter passkey!");

examples/bluetooth/bluedroid/classic_bt/bt_l2cap_client/main/main.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -179,12 +179,12 @@ static void esp_bt_gap_cb(esp_bt_gap_cb_event_t event, esp_bt_gap_cb_param_t *pa
179179
#if (CONFIG_EXAMPLE_SSP_ENABLED == true)
180180
/* when Security Simple Pairing user confirmation requested, this event comes */
181181
case ESP_BT_GAP_CFM_REQ_EVT:
182-
ESP_LOGI(L2CAP_TAG, "ESP_BT_GAP_CFM_REQ_EVT Please compare the numeric value: %"PRIu32, param->cfm_req.num_val);
182+
ESP_LOGI(L2CAP_TAG, "ESP_BT_GAP_CFM_REQ_EVT Please compare the numeric value: %06"PRIu32, param->cfm_req.num_val);
183183
esp_bt_gap_ssp_confirm_reply(param->cfm_req.bda, true);
184184
break;
185185
/* when Security Simple Pairing passkey notified, this event comes */
186186
case ESP_BT_GAP_KEY_NOTIF_EVT:
187-
ESP_LOGI(L2CAP_TAG, "ESP_BT_GAP_KEY_NOTIF_EVT passkey: %"PRIu32, param->key_notif.passkey);
187+
ESP_LOGI(L2CAP_TAG, "ESP_BT_GAP_KEY_NOTIF_EVT passkey: %06"PRIu32, param->key_notif.passkey);
188188
break;
189189
/* when Security Simple Pairing passkey requested, this event comes */
190190
case ESP_BT_GAP_KEY_REQ_EVT:

examples/bluetooth/bluedroid/classic_bt/bt_l2cap_server/main/main.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -93,12 +93,12 @@ static void esp_bt_gap_cb(esp_bt_gap_cb_event_t event, esp_bt_gap_cb_param_t *pa
9393
#if (CONFIG_EXAMPLE_SSP_ENABLED == true)
9494
/* when Security Simple Pairing user confirmation requested, this event comes */
9595
case ESP_BT_GAP_CFM_REQ_EVT:
96-
ESP_LOGI(L2CAP_TAG, "ESP_BT_GAP_CFM_REQ_EVT Please compare the numeric value: %"PRIu32, param->cfm_req.num_val);
96+
ESP_LOGI(L2CAP_TAG, "ESP_BT_GAP_CFM_REQ_EVT Please compare the numeric value: %06"PRIu32, param->cfm_req.num_val);
9797
esp_bt_gap_ssp_confirm_reply(param->cfm_req.bda, true);
9898
break;
9999
/* when Security Simple Pairing passkey notified, this event comes */
100100
case ESP_BT_GAP_KEY_NOTIF_EVT:
101-
ESP_LOGI(L2CAP_TAG, "ESP_BT_GAP_KEY_NOTIF_EVT passkey:%"PRIu32, param->key_notif.passkey);
101+
ESP_LOGI(L2CAP_TAG, "ESP_BT_GAP_KEY_NOTIF_EVT passkey:%06"PRIu32, param->key_notif.passkey);
102102
break;
103103
/* when Security Simple Pairing passkey requested, this event comes */
104104
case ESP_BT_GAP_KEY_REQ_EVT:

examples/bluetooth/bluedroid/classic_bt/bt_spp_acceptor/main/main.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -176,11 +176,11 @@ void esp_bt_gap_cb(esp_bt_gap_cb_event_t event, esp_bt_gap_cb_param_t *param)
176176

177177
#if (CONFIG_EXAMPLE_SSP_ENABLED == true)
178178
case ESP_BT_GAP_CFM_REQ_EVT:
179-
ESP_LOGI(SPP_TAG, "ESP_BT_GAP_CFM_REQ_EVT Please compare the numeric value: %"PRIu32, param->cfm_req.num_val);
179+
ESP_LOGI(SPP_TAG, "ESP_BT_GAP_CFM_REQ_EVT Please compare the numeric value: %06"PRIu32, param->cfm_req.num_val);
180180
esp_bt_gap_ssp_confirm_reply(param->cfm_req.bda, true);
181181
break;
182182
case ESP_BT_GAP_KEY_NOTIF_EVT:
183-
ESP_LOGI(SPP_TAG, "ESP_BT_GAP_KEY_NOTIF_EVT passkey:%"PRIu32, param->key_notif.passkey);
183+
ESP_LOGI(SPP_TAG, "ESP_BT_GAP_KEY_NOTIF_EVT passkey:%06"PRIu32, param->key_notif.passkey);
184184
break;
185185
case ESP_BT_GAP_KEY_REQ_EVT:
186186
ESP_LOGI(SPP_TAG, "ESP_BT_GAP_KEY_REQ_EVT Please enter passkey!");

examples/bluetooth/bluedroid/classic_bt/bt_spp_initiator/main/main.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -305,11 +305,11 @@ static void esp_bt_gap_cb(esp_bt_gap_cb_event_t event, esp_bt_gap_cb_param_t *pa
305305

306306
#if (CONFIG_EXAMPLE_SSP_ENABLED == true)
307307
case ESP_BT_GAP_CFM_REQ_EVT:
308-
ESP_LOGI(SPP_TAG, "ESP_BT_GAP_CFM_REQ_EVT Please compare the numeric value: %"PRIu32, param->cfm_req.num_val);
308+
ESP_LOGI(SPP_TAG, "ESP_BT_GAP_CFM_REQ_EVT Please compare the numeric value: %06"PRIu32, param->cfm_req.num_val);
309309
ESP_LOGW(SPP_TAG, "To confirm the value, type `spp ok;`");
310310
break;
311311
case ESP_BT_GAP_KEY_NOTIF_EVT:
312-
ESP_LOGI(SPP_TAG, "ESP_BT_GAP_KEY_NOTIF_EVT passkey:%"PRIu32, param->key_notif.passkey);
312+
ESP_LOGI(SPP_TAG, "ESP_BT_GAP_KEY_NOTIF_EVT passkey:%06"PRIu32, param->key_notif.passkey);
313313
ESP_LOGW(SPP_TAG, "Waiting response...");
314314
break;
315315
case ESP_BT_GAP_KEY_REQ_EVT:

examples/bluetooth/bluedroid/classic_bt/bt_spp_vfs_acceptor/main/main.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -188,11 +188,11 @@ void esp_bt_gap_cb(esp_bt_gap_cb_event_t event, esp_bt_gap_cb_param_t *param)
188188

189189
#if (CONFIG_EXAMPLE_SSP_ENABLED == true)
190190
case ESP_BT_GAP_CFM_REQ_EVT:
191-
ESP_LOGI(SPP_TAG, "ESP_BT_GAP_CFM_REQ_EVT Please compare the numeric value: %"PRIu32, param->cfm_req.num_val);
191+
ESP_LOGI(SPP_TAG, "ESP_BT_GAP_CFM_REQ_EVT Please compare the numeric value: %06"PRIu32, param->cfm_req.num_val);
192192
esp_bt_gap_ssp_confirm_reply(param->cfm_req.bda, true);
193193
break;
194194
case ESP_BT_GAP_KEY_NOTIF_EVT:
195-
ESP_LOGI(SPP_TAG, "ESP_BT_GAP_KEY_NOTIF_EVT passkey:%"PRIu32, param->key_notif.passkey);
195+
ESP_LOGI(SPP_TAG, "ESP_BT_GAP_KEY_NOTIF_EVT passkey:%06"PRIu32, param->key_notif.passkey);
196196
break;
197197
case ESP_BT_GAP_KEY_REQ_EVT:
198198
ESP_LOGI(SPP_TAG, "ESP_BT_GAP_KEY_REQ_EVT Please enter passkey!");

examples/bluetooth/bluedroid/classic_bt/bt_spp_vfs_initiator/main/main.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -267,11 +267,11 @@ static void esp_bt_gap_cb(esp_bt_gap_cb_event_t event, esp_bt_gap_cb_param_t *pa
267267

268268
#if (CONFIG_EXAMPLE_SSP_ENABLED == true)
269269
case ESP_BT_GAP_CFM_REQ_EVT:
270-
ESP_LOGI(SPP_TAG, "ESP_BT_GAP_CFM_REQ_EVT Please compare the numeric value: %"PRIu32, param->cfm_req.num_val);
270+
ESP_LOGI(SPP_TAG, "ESP_BT_GAP_CFM_REQ_EVT Please compare the numeric value: %06"PRIu32, param->cfm_req.num_val);
271271
esp_bt_gap_ssp_confirm_reply(param->cfm_req.bda, true);
272272
break;
273273
case ESP_BT_GAP_KEY_NOTIF_EVT:
274-
ESP_LOGI(SPP_TAG, "ESP_BT_GAP_KEY_NOTIF_EVT passkey:%"PRIu32, param->key_notif.passkey);
274+
ESP_LOGI(SPP_TAG, "ESP_BT_GAP_KEY_NOTIF_EVT passkey:%06"PRIu32, param->key_notif.passkey);
275275
break;
276276
case ESP_BT_GAP_KEY_REQ_EVT:
277277
ESP_LOGI(SPP_TAG, "ESP_BT_GAP_KEY_REQ_EVT Please enter passkey!");

examples/bluetooth/bluedroid/classic_bt/hfp_hf/main/main.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -129,11 +129,11 @@ void esp_bt_gap_cb(esp_bt_gap_cb_event_t event, esp_bt_gap_cb_param_t *param)
129129

130130
#if (CONFIG_EXAMPLE_SSP_ENABLED == true)
131131
case ESP_BT_GAP_CFM_REQ_EVT:
132-
ESP_LOGI(BT_HF_TAG, "ESP_BT_GAP_CFM_REQ_EVT Please compare the numeric value: %"PRIu32, param->cfm_req.num_val);
132+
ESP_LOGI(BT_HF_TAG, "ESP_BT_GAP_CFM_REQ_EVT Please compare the numeric value: %06"PRIu32, param->cfm_req.num_val);
133133
esp_bt_gap_ssp_confirm_reply(param->cfm_req.bda, true);
134134
break;
135135
case ESP_BT_GAP_KEY_NOTIF_EVT:
136-
ESP_LOGI(BT_HF_TAG, "ESP_BT_GAP_KEY_NOTIF_EVT passkey:%"PRIu32, param->key_notif.passkey);
136+
ESP_LOGI(BT_HF_TAG, "ESP_BT_GAP_KEY_NOTIF_EVT passkey:%06"PRIu32, param->key_notif.passkey);
137137
break;
138138
case ESP_BT_GAP_KEY_REQ_EVT:
139139
ESP_LOGI(BT_HF_TAG, "ESP_BT_GAP_KEY_REQ_EVT Please enter passkey!");

0 commit comments

Comments
 (0)