Hi,
My setup :
- nRF52832
- Soft Device S132 v5
- SDK14.2
My use case involve me to send data to to a central device at 50 meters. I need to send only a small data : one int16_t. I have a timer set up to do a SAADC conversion then send data (sd_ble_gatts_hvx) every 20ms.
It's working great on close range. But as soon as I am further than 5 meters I got a NRF_ERROR_RESOURCES.
Since it's not really a problem if I miss few data, my first try was to ignore it :
/* It's not a problem if we loose few data */ if(retval == NRF_ERROR_RESOURCES){ retval = NRF_SUCCESS; } return retval;
It work great meaning that it does crash the board now and it keep sending data but at a very low speed and multiple packet at a time it looks like on the nRF Connect app log.
So I know that this error means that the queue is full. But why is it related to the distance from the central since it's a notification so we do not expect an acknowledgment or anything!?
Also when I go to ~25 meters (outside) not only I have very slow notification update on my central, but I got disconnect (Timeout).
What are the optimizations I can do to increase my range and keep my transmission speed constant?
Thanks