This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

throughput manage (BLE_ERROR_NO_TX_PACKETS)

Hello,

First of all I know that many questions were posted here about this topic but I am posting mine because I couldn't figure out how to solve my issue and I am looking for new ideas.

I am working on a project of throughput data from sensors to my central via nRF51822 through a notifying service (SDK12.2, S130).

My central is an iOS app, and my throughput data are given from STM32 via UART but am sure I get them correctly. Also am using a simple buffer not fifo.

            MIN_CONN_INTERVAL               MSEC_TO_UNITS(20, UNIT_1_25_MS)  
            MAX_CONN_INTERVAL               MSEC_TO_UNITS(40, UNIT_1_25_MS) 
            SLAVE_LATENCY                   3   

first of all I was adding packets to the TX buffer, faster than they can be sent out, and I got "BLE_ERROR_NO_TX_PACKETS " error. so I tried to make sure that my TX task is complete before initiating next one with this implementation:

  do{  
          err_code = ble_data_send(&m_data_send, data_packet);
           nrf_delay_ms(2);
    }while(err_code== BLE_ERROR_NO_TX_PACKETS);

But I still have the same problem.

What am I missing?

Is there any problem with my implementation?

Is there any example of maximum throughput manage?

Can this be a cause of my central ?

thank you in advance devzone community. PS: if you want I can give more details.

Parents
    1. I get that you are using sd_ble_gatts_hvx(). I meant what is the numerical value of the throughput you are getting.

    2. If you have loss of data this is probably an error in implementation. Could you edit your question and include some more code? Or even better, your complete project so I can test it here.

    3. Ok.

    4. Not really a good way to do it. If you get BLE_ERROR_NO_TX_PACKETS you should wait for the BLE_EVT_TX_COMPLETE event before calling sd_ble_gatts_hvx() again.

    5. Ok. How did you calculate? What number did you get?

Reply
    1. I get that you are using sd_ble_gatts_hvx(). I meant what is the numerical value of the throughput you are getting.

    2. If you have loss of data this is probably an error in implementation. Could you edit your question and include some more code? Or even better, your complete project so I can test it here.

    3. Ok.

    4. Not really a good way to do it. If you get BLE_ERROR_NO_TX_PACKETS you should wait for the BLE_EVT_TX_COMPLETE event before calling sd_ble_gatts_hvx() again.

    5. Ok. How did you calculate? What number did you get?

Children
No Data
Related