This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts
This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Error Code 0x3004

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.

  • John, thanks for the response. It is helpful and I appreciate you taking the time. That makes a lot of sense and I will implement something similar in my project. How did you go about determining what that error code means?

  • 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.

  • Thanks John. This is great. I am having the exactly the same problem and traced down to this error. Again, thanks. devzone is awesome.

  • Glad it helped. I'm a fan of the devzone as well.

Related