i try use BLE custom service with de API, but the propiertis for characteristics only accept CHR_PROPS_NOTIFY/CHR_PROPS_READ, I don’t know if with the new firmware the API can accept write characteristics or is it under development.
bslc.setProperties((RAK_CHARS_PROPERTIES) (RAK_CHR_PROPS_WRITE | RAK_CHR_PROPS_READ));
bslc.setPermission(RAK_SET_OPEN);
bslc.setFixedLen(1);
bslc.setWriteCallback(send_callback);
bslc.begin();
delay(1000);
uint8_t sensor_location = 2;
bslc.write(&sensor_location); // Set the characteristic to 'Wrist' (2)
Please be aware that these additions can cause problems. Testing is your responsibility. Also, I will inform R&D team to add this feature for next releases.
Thanks for your response, can you explain me where’s this files to replace, I use de vscode for programming RAK, this files is a files for library of RAK11720 or how I will to replace this files?
For calling the write characteristic I use .setWriteCallback(send_callback);? Can you explain me with a example plis?
At the end, you must change following files with my version (I shared previously.):
…/cores/apollo3/component/core/mcu/apollo3/uhal/uhal_cus.c
…/cores/apollo3/component/rui_v3_api/RAKBleUart.h
Again, the better way is to wait following RUI3 versions.