mirror of
https://github.com/bluekitchen/btstack.git
synced 2025-01-29 12:32:54 +00:00
report notifications and indications
This commit is contained in:
parent
b826f55995
commit
150ffeb60a
@ -535,6 +535,16 @@ void handle_gatt_client_event(le_event_t * event){
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
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:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -911,15 +921,16 @@ static int ui_process_data_request(char buffer){
|
|||||||
}
|
}
|
||||||
|
|
||||||
printf("%c", buffer);
|
printf("%c", buffer);
|
||||||
fflush(stdout);
|
|
||||||
|
|
||||||
if (ui_value_pos & 1){
|
if (ui_value_pos & 1){
|
||||||
ui_value_data[ui_value_pos >> 1] |= hex;
|
ui_value_data[ui_value_pos >> 1] |= hex;
|
||||||
|
printf(" ");
|
||||||
} else {
|
} else {
|
||||||
ui_value_data[ui_value_pos >> 1] = hex << 4;
|
ui_value_data[ui_value_pos >> 1] = hex << 4;
|
||||||
}
|
}
|
||||||
ui_value_pos++;
|
ui_value_pos++;
|
||||||
|
|
||||||
|
fflush(stdout);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user