I am trying to send 20 notifications inside a loop. I am able to send 7 of these and receive the following error. What does this mean? Also, is there a central document that lists error codes? I have not been able to find one.
In the 6.0.0 version of the S110 stack, that is a BLE_ERROR_NO_TX_BUFFERS error. The radio can only queue up so many transmit buffers before it runs out of space. I believe that it is 6 transmit packets that it can hold.
You have to wait for a BLE_EVT_TX_COMPLETE before you can request to transmit another packet.
What I do is to transmit many packets quickly is to request the packet transmits until I get a BLE_ERROR_NO_TX_BUFFERS. I exit the transmission code but set some flags that indicate that there is more data to transmit and that there are no buffers. When the BLE_EVT_TX_COMPLETE event comes up from the stack it clears the out of buffers flag and returns to main. The main loop calls a function that checks for more data to transmit and that buffers are available. It stuffs as many packets as it can onto the radio until another BLE_ERROR_NO_TX_BUFFERS error is received. Repeat until all data is transferred.
You can find the base numbers of the various errors in nrf_err.h, this happens to be a NRF_ERROR_STK_BASE_NUM (0x3000). Then look in ble_err.h and you can see that BLE_ERROR_NO_TX_BUFFERS is NRF_ERROR_STK_BASE_NUM+0x004. The errors are also in the documentation provided with the SDK, but you do have to click around to find them all.
You can find the base numbers of the various errors in nrf_err.h, this happens to be a NRF_ERROR_STK_BASE_NUM (0x3000). Then look in ble_err.h and you can see that BLE_ERROR_NO_TX_BUFFERS is NRF_ERROR_STK_BASE_NUM+0x004. The errors are also in the documentation provided with the SDK, but you do have to click around to find them all.