From 7c4db9dc71fe83e63b4bbabcdbd4b0df5a485ff0 Mon Sep 17 00:00:00 2001 From: Matthias Ringwald Date: Thu, 3 Dec 2020 20:27:49 +0100 Subject: [PATCH] sm_pairing examples: report pairing started event --- example/sm_pairing_central.c | 3 +++ example/sm_pairing_peripheral.c | 3 +++ 2 files changed, 6 insertions(+) diff --git a/example/sm_pairing_central.c b/example/sm_pairing_central.c index 8bf0a6ace..bf4b78d0f 100644 --- a/example/sm_pairing_central.c +++ b/example/sm_pairing_central.c @@ -280,6 +280,9 @@ static void sm_packet_handler(uint8_t packet_type, uint16_t channel, uint8_t *pa printf("Sending fixed passkey %"PRIu32"\n", (uint32_t) FIXED_PASSKEY); sm_passkey_input(sm_event_passkey_input_number_get_handle(packet), FIXED_PASSKEY); break; + case SM_EVENT_PAIRING_STARTED: + printf("Pairing started\n"); + break; case SM_EVENT_PAIRING_COMPLETE: switch (sm_event_pairing_complete_get_status(packet)){ case ERROR_CODE_SUCCESS: diff --git a/example/sm_pairing_peripheral.c b/example/sm_pairing_peripheral.c index be92a2801..4e5a8dd19 100644 --- a/example/sm_pairing_peripheral.c +++ b/example/sm_pairing_peripheral.c @@ -228,6 +228,9 @@ static void packet_handler (uint8_t packet_type, uint16_t channel, uint8_t *pack sm_event_identity_created_get_address(packet, addr); printf("Identity resolving failed\n"); break; + case SM_EVENT_PAIRING_STARTED: + printf("Pairing started\n"); + break; case SM_EVENT_PAIRING_COMPLETE: switch (sm_event_pairing_complete_get_status(packet)){ case ERROR_CODE_SUCCESS: