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.
Hello, I got the same problem and I have implémented the same flag for the BLE_EVT_TX_COMPLETE :
case BLE_EVT_TX_COMPLETE :
my_flag= true;
break;
but this slows down the streaming so much. the stack ACK is slow compared to streaming data..
Hello, I got the same problem and I have implémented the same flag for the BLE_EVT_TX_COMPLETE :
case BLE_EVT_TX_COMPLETE :
my_flag= true;
break;
but this slows down the streaming so much. the stack ACK is slow compared to streaming data..