1

in Bluetooth, I am going to send a big file which divides into 3 packets (p1, p2, p3). Each packet has the max ATT payloads.

My question is that in one connection interval, there would be a Master-slave request and then the slave would send all the packets of the file one after each other with Interframe Space (IFS) between every two packets (M -> S, IFPS, S->M(p1), IFPS, S->M(p2), IFPS, S->M(p3))?

or there it is like (M -> S, IFPS, S->M(p1), IFPS, M -> S, IFPS, S->M(p2), IFPS,M -> S, IFPS, S->M(p3), IFPS)?

Talia
  • 2,947
  • 4
  • 17
  • 28

1 Answers1

0

In Bluetooth Low Energy, every packet in a connection is acknowledged. This is mentioned in the Bluetooth Specification, v5.2, Vol 1, Part A, Section 3.1.3.2 (LE reliability):

Like BR/EDR, in poor RF environments, the LE system should be considered inherently unreliable. To counteract this, the system provides levels of protection at each layer. The LL packet uses a 24-bit cyclic redundancy error check (CRC) to cover the contents of the packet payload. If the CRC verification fails on the packet payload, the packet is not acknowledged by the receiver and the packet gets retransmitted by the sender.

So if the choice is between one of the two examples you provided, the more accurate one would be:-

(M -> S, IFPS, S->M(p1), IFPS, M -> S, IFPS, S->M(p2), IFPS,M -> S, IFPS, S->M(p3), IFPS)

However, it's not as clear cut as this because most of this happens under the hood in the baseband layer and there are other things to consider (e.g. number of packets per connection interval). If you haven't seen them already, have a look at the following links to get a better picture of how throughput is measured in BLE:-

Youssif Saeed
  • 11,789
  • 4
  • 44
  • 72
  • could you please suggest me any other example that you think can perform better? – Talia Jun 03 '21 at 16:37
  • i would like to know how this example works? (M -> S, IFPS, S->M(p1), IFPS, M -> S, IFPS, S->M(p2), IFPS,M -> S, IFPS, S->M(p3), IFPS) when a big file which divides into 3 packets (p1, p2, p3), then it would have sequence numbers and the Master (M) after receiving the P1 can understand that it is not all the data and it will request for the rest? – Talia Jun 03 '21 at 16:41
  • I'm not sure I understand. Maybe post a new question with more details? If you just want to achieve best throughput, please have a look at the links above, especially this one:- https://punchthrough.com/maximizing-ble-throughput-on-ios-and-android/ – Youssif Saeed Jun 03 '21 at 17:37
  • At the end of the day, the delay from the ACK/IFPS is almost negligible, so I recommend proceeding with your design without factoring them in your calculations – Youssif Saeed Jun 03 '21 at 17:38
  • Also please note that the ACK/IFPS are not something you have to do, they happen under the hood by the chip. In other words, in your design you can have the sequence number for p1,p2, and p3, and the master will understand that it will have to wait for p2 and p3 if you write the code on the master to work this way – Youssif Saeed Jun 03 '21 at 17:40