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

why report error with BLE_ERROR_NO_TX_BUFFERS(0x3004)

Hi, My project need to transmit mass data(maybe over 64kB)to APP once.But the total transmiting time is better not over 30Min.i use your example nRF51_SDK_8.1.0_b6ed55f\examples\ble_peripheral\ble_app_uart.But i meet a problem that calling function ble_nus_string_send() with time interval 200ms, it will report error with BLE_ERROR_NO_TX_BUFFERS(0x3004) after runing dozens of times successfully. if modify time interval 300ms, it run ok all the time. why it report error with BLE_ERROR_NO_TX_BUFFERS(0x3004)? my code will check if return value is NRF_SUCCESS after calling ble_nus_string_send(). if it is NRF_SUCCESS, it will transmit next packet data. part code is as below: if(err_code ==NRF_SUCCESS) { err_code = ble_nus_string_send(&m_nus, data_array, 20);

       if (err_code != NRF_ERROR_INVALID_STATE)
	 {
		          APP_ERROR_CHECK(err_code);
        }

}. i can't search which give error value with BLE_ERROR_NO_TX_BUFFERS in code. is bottom code give it? Another, is select using ble_uart case to tranmist mass data ok because of its limited size 20Byte packet each time? if not, do you give your advice? something like DFU, it can tranmist mass image packet. Thank you.

Parents
  • Hi Leif,

    Which phone did you use to test ? You should also need to check the connection interval of the connection. The smaller the interval the higher the bandwidth. The peripheral can request the central to change to lower connection interval using connection parameter request.

    It's the best to use a sniffer to check the actual connection interval.

    You receive BLE_ERROR_NO_TX_BUFFERS when you have queued a full buffer of application buffer for BLE. Usually 7 packets. Then you have to wait for the packet to be sent otherwise you will receive more BLE_ERROR_NO_TX_BUFFERS error return. You should wait for the BLE_EVT_TX_COMPLETE event that indicate there is packet(s) sent.

    Maximum number of packet per connection event is 6 (with S110) and minimum connection interval is 7.5ms. But not all the phone/tablet support this.

  • Hi Leif, you can have a look at this tutorial here. We have some explanation on the parameters.

Reply Children
No Data
Related