This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts
This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

sd_ble_gatts_value_set in S130

The new version of the S130, alpha 0.9 has a different signature for the sd_ble_gatts_value_set function.

sd_ble_gatts_value_set(_handles.value_handle, 0, &value.length, value.data);

becomes:

ble_gatts_value_t p_value;                                                                                           
p_value.len = value.length;                                                                                          
p_value.offset = 0;                                                                                                  
p_value.p_value= value.data;                                                                                         
sd_ble_gatts_value_set(_handles.value_handle, 0, &p_value); 

However, this leads to a 0007 error:

[cs_main_crownstone.cpp : 399 ] Running while ticking..
[cs_BluetoothLE.cpp : 204 ] ERR_CODE: 7 (0x7)

Or as a stack-trace:

#0 app_error_handler (error_code=7, line_num=<optimized out>, p_file_name=0x267d0 "/"...)
at /hd/home/anne/myworkspace/ble/bluenet/src/util/cs_BleError.cpp:23
Read 4 bytes @ address 0x0001ECE4 (Data = 0x1C34E7A8)
Reading 64 bytes @ address 0x20003F40
#1 0x0001ece4 in BLEpp::CharacteristicBase::notify (this=0x20002f70)
at /hd/home/anne/myworkspace/ble/bluenet/src/cs_BluetoothLE.cpp:203
Read 4 bytes @ address 0x000220B0 (Data = 0x2B006DA3)
Reading 64 bytes @ address 0x20003F80
#2 0x000220b0 in operator= (val=<synthetic pointer>, this=<optimized out>)
at /hd/home/anne/myworkspace/ble/bluenet/include/cs_BluetoothLE.h:425
#3 operator= (val=<synthetic pointer>, this=<optimized out>)
at /hd/home/anne/myworkspace/ble/bluenet/include/cs_BluetoothLE.h:546
#4 writeTemperature (temperature=<optimized out>, this=0x20002ca8)
at /hd/home/anne/myworkspace/ble/bluenet/src/services/cs_GeneralService.cpp:323
Read 4 bytes @ address 0x0002319E (Data = 0xFC47F000)
Reading 64 bytes @ address 0x20003FC0
#5 GeneralService::tick (this=this@entry=0x20002ca8)
at /hd/home/anne/myworkspace/ble/bluenet/src/services/cs_GeneralService.cpp:330
#6 0x0002319e in main () at /hd/home/anne/myworkspace/ble/bluenet/src/cs_main_crownstone.cpp:407

In other words: NRF_ERROR_INVALID_PARAM.

Am I doing something weird here?

Parents Reply Children
No Data
Related