I noticed that updating the value of a BLE characteristic with setValue(buf, len) is quite “slow”, it takes about 90ms when a device is connected and receiving the characteristics notifications. If no device is connected, the update takes < 1ms.
Is this caused by the NRF hardware or softdevice or is it the DeviceOS which takes this time?
@nils are you hosting a mesh network on that device? Bluetooth and Mesh share a radio so there will be some delays. You can remove it by using the particle mesh remove <device ID/name> to see if that makes a difference.
Any update on this? I tried changing the BleTXRxType to NACK in setValue thinking it might have been waiting for an acknowledge, but it still 93 on my Boron, deviceOS 1.4.4 with Mesh.off().
I am also curious for an update on this topic. I am using an Argon and seeing typical times of around 80ms when calling .setValue(). However, as the BLE signal is weakened or if there is obstructions between my phone and the Argon, I have seen times as long as 10 seconds. This also blocks the rest of my code while transmitting. Is there a way to have .setValue() not block the rest of the code?