nRF5 SDK 17.2.0, nRF52840
Okay, I am just so lost. I am trying to set a characteristic's gatts value BEFORE connecting such that it is a 192 byte array. However when I read the characteristic's data on lightblue, it's just 8 bytes long. I have adjusted the MTU and I get confirmation of this via RTT to a length of 250ish bytes so that seems okay. I've looked through tutorials and am just getting nowhere.
This is an example of how I am trying to set the data BEFORE connecting to the other device. The custom_value arg is just me passing the name of the array.
uint32_t ble_diaper_data_update_temperature(ble_diaper_t *p_diaper, uint8_t *custom_value) { ble_gatts_value_t value; ret_code_t err_code; // Initialize value struct. memset(&value, 0, sizeof(value)); value.offset = 0; value.len = sizeof(custom_value)/sizeof(custom_value[0]); value.p_value = custom_value; err_code = sd_ble_gatts_value_set(p_diaper->conn_handle, p_diaper->temp_handles.value_handle, &value); VERIFY_SUCCESS(err_code); return err_code; }