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

can't send packet in specified time interval

Hi all.

I want to send my packets in the negotiated time interval.

I sat the NRF_SDH_BLE_GAP_EVENT_LENGTH to 6.

The negotiated TI is 36 ms.

the results are 

1- the number of packets when I receive the hvx_complete event is always 1. (in the picture). 

2- some times I get NRF_ERROR_RESOURCES. (error number 19 in the picture).

3- in android, I get packets in unstable time distances.

so why I get errors(for resource in NRF) and time is not stable while the TI is less than the time that I call hvx_send ?

please help.

thanks all.

Parents Reply
  • ali_dehghan_nayeri said:
    yes, debug is enabled.

    Are you getting any error messages in your log, when you have DEBUG defined?

    ali_dehghan_nayeri said:
    can you adwise me for changing that?

    If you intend to send multiple packets each connection event, you will indeed need to have a queue size longer than 1. If you are not explicitly setting the queue size anywhere in your code it will use the default value, which is 1. This means that only 1 packet can be queued for sending each connection event. If you would like to change this, you can use the sd_ble_cfg_set function to do so. You can see how this could be done in the answer by my colleague Petter in this ticket. You must make this configuration before enabling the SoftDevice, as mentioned in the functions API reference.

    Are you familiar with the nRF Sniffer tool? It is a powerful tool to wield when developing with BLE, as it lets you see all the on-air BLE traffic. It would help a lot if you could setup a sniffer, to see how many packets are being sent every connection event.

    Best regards,
    Karl

Children
No Data
Related