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

Can you specifically set the amount of packets per interval?

Hi!

I have an implementation running with a peripheral sending notifications to a central at 27.5 ms. They are both configured with HIGH BW. Sending of notifications is activated by pressing a button. I now see that when the button is pressed, the peripheral is able to put 7 packets into the buffer (and an 8th one overflowing it) in the first interval, but then it changes to 6 packets (+ a 7th that overflows the buffer) for the following intervals.

I actually want be able to achieve 6 packets per interval, for each interval, so also for the first one. So my question is, how is this possible?

The figure below illustrates once more the beginning of notification sending and thus the transitions from 7 to 6. Channel 2 is the radio. Channel 0 indicates putting a packet in the TX buffer and is thus first 8 times and then always 7 times. Channel 1 is I2C measurements of an accelerometer in between. image description

Kind regards

Mathias

EDIT 1

image description

Parents
  • I believe it actually transports 6 packets over the radio, note that Tx buffers inside SD aren't necessarily linked to number of packets transported over radio link. Do you have some confidence by looking into radio analyzer/sniffer trace that different numbers are going through the link in each interval? otherwise if you push 7 packets to the stack and then 6 of them are "cleaned" so you can push 6 more it indicates that 6 are going over the radio... can you make some GPIO counter on TX_COMPLETED event if their count corresponds to the numbers?

  • And so each next interval, only 6 tx buffers will be free and available for use? I did what you asked with the GPIO pin in TX_COMPLETE event and added a figure to the question. So as the figure shows, only 6 packets are really send each interval. What's also strange is that the first two intervals are respectively a bit more then 27.5 ms (around 29 ms) and the other one a bit less (around 25 ms). After that all the intervals are 27.5, like they should be. Do you guys maybe know why this could be?

    But the problem for me with the 8 packets until overflow in the first interval is that it also takes more time to measure all that data and put it in the buffer then with 7 until overflow. If all intervals would just be 6 packets and a 7th that overflows, I could choose an even lower connection interval. This is positive because every ms that I don't do I2C, I lose a measurement done by the sensor and a radio event already takes around 5 à 6 ms for 6 packet sending but also because the first interval needs a bit more time, the other intervals have some useless free time left (around 1 à 2 ms) before a radio event happens. But I can't choose a lower connection interval, otherwise I get problems because the first interval that does 8 instead of 7 packets doesn't get enough time then.

Reply
  • And so each next interval, only 6 tx buffers will be free and available for use? I did what you asked with the GPIO pin in TX_COMPLETE event and added a figure to the question. So as the figure shows, only 6 packets are really send each interval. What's also strange is that the first two intervals are respectively a bit more then 27.5 ms (around 29 ms) and the other one a bit less (around 25 ms). After that all the intervals are 27.5, like they should be. Do you guys maybe know why this could be?

    But the problem for me with the 8 packets until overflow in the first interval is that it also takes more time to measure all that data and put it in the buffer then with 7 until overflow. If all intervals would just be 6 packets and a 7th that overflows, I could choose an even lower connection interval. This is positive because every ms that I don't do I2C, I lose a measurement done by the sensor and a radio event already takes around 5 à 6 ms for 6 packet sending but also because the first interval needs a bit more time, the other intervals have some useless free time left (around 1 à 2 ms) before a radio event happens. But I can't choose a lower connection interval, otherwise I get problems because the first interval that does 8 instead of 7 packets doesn't get enough time then.

Children
No Data
Related