diff options
| author | Dan Halbert <halbert@halwitz.org> | 2019-01-03 14:16:41 -0500 |
|---|---|---|
| committer | Dan Halbert <halbert@halwitz.org> | 2019-01-03 14:16:41 -0500 |
| commit | 8dea6f53bbba5b76a5ed0965b44ad1bde4640609 (patch) | |
| tree | 8dfeb657c189d5008ea0707ef9d3857892feca8d | |
| parent | ccb3c6fac688eb71724f6874c4436e659451100c (diff) | |
forgot to store data when reading a gatts value
| -rw-r--r-- | ports/nrf/common-hal/bleio/Characteristic.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/ports/nrf/common-hal/bleio/Characteristic.c b/ports/nrf/common-hal/bleio/Characteristic.c index 7a32e4928..9d7007d7d 100644 --- a/ports/nrf/common-hal/bleio/Characteristic.c +++ b/ports/nrf/common-hal/bleio/Characteristic.c @@ -78,6 +78,7 @@ STATIC void gatts_read(bleio_characteristic_obj_t *characteristic) { if (err_code == NRF_SUCCESS) { characteristic->value_data = mp_obj_new_bytearray_of_zeros(gatts_value.len); mp_get_buffer_raise(characteristic->value_data, &bufinfo, MP_BUFFER_WRITE); + gatts_value.p_value = bufinfo.buf; // Read again, with the correct size of buffer. err_code = sd_ble_gatts_value_get(conn_handle, characteristic->handle, &gatts_value); |
