Skip to content

Commit 8dea6f5

Browse files
committed
forgot to store data when reading a gatts value
1 parent ccb3c6f commit 8dea6f5

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

ports/nrf/common-hal/bleio/Characteristic.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,7 @@ STATIC void gatts_read(bleio_characteristic_obj_t *characteristic) {
7878
if (err_code == NRF_SUCCESS) {
7979
characteristic->value_data = mp_obj_new_bytearray_of_zeros(gatts_value.len);
8080
mp_get_buffer_raise(characteristic->value_data, &bufinfo, MP_BUFFER_WRITE);
81+
gatts_value.p_value = bufinfo.buf;
8182

8283
// Read again, with the correct size of buffer.
8384
err_code = sd_ble_gatts_value_get(conn_handle, characteristic->handle, &gatts_value);

0 commit comments

Comments
 (0)