From 150ffeb60a30be712de86bbc6bc0d1bdc86cf203 Mon Sep 17 00:00:00 2001 From: Matthias Ringwald Date: Thu, 8 Oct 2015 15:41:32 +0200 Subject: [PATCH] report notifications and indications --- test/pts/ble_central_test.c | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/test/pts/ble_central_test.c b/test/pts/ble_central_test.c index 69af9d0f3..5a70286ce 100644 --- a/test/pts/ble_central_test.c +++ b/test/pts/ble_central_test.c @@ -535,6 +535,16 @@ void handle_gatt_client_event(le_event_t * event){ break; } break; + case GATT_NOTIFICATION: + value = (le_characteristic_value_event_t *) event; + printf("Notification handle 0x%04x, value: ", value->value_handle); + printf_hexdump(value->blob, value->blob_length); + break; + case GATT_INDICATION: + value = (le_characteristic_value_event_t *) event; + printf("Indication handle 0x%04x, value: ", value->value_handle); + printf_hexdump(value->blob, value->blob_length); + break; default: break; } @@ -911,15 +921,16 @@ static int ui_process_data_request(char buffer){ } printf("%c", buffer); - fflush(stdout); if (ui_value_pos & 1){ ui_value_data[ui_value_pos >> 1] |= hex; + printf(" "); } else { ui_value_data[ui_value_pos >> 1] = hex << 4; } ui_value_pos++; + fflush(stdout); return 0; }