Hardware Reference
In-Depth Information
factors, including but not restricted to bidirectional traffic, protocol overhead, CPU and
radio limitations, and artificial software restrictions.
To illustrate some of these practical restrictions, consider the following basic precon‐
ditions we'll use for a calculation:
• A central (master) device has initiated and established a connection with a periph‐
eral (slave) accessory.
• While in an active connection, the specification defines the connection interval to
be the interval between two consecutive connection events (a data exchange before
going back to an idle state to save power), and this connection interval can be set
to a value between 7.5 ms and 4 s.
“Link Layer” on page 17 and “Roles” on page 36 discuss the different roles within a con‐
nection in detail. For this example, we'll use the nRF51822, a widely available SoC (sys‐
tem on chip) BLE IC manufactured by Nordic Semiconductor that is used in a variety
of BLE accessories on the market. Nordic's radio hardware and BLE stack impose the
following data throughput limitations:
• The nRF51822 can transmit up to six data packets per connection interval (limited
by the IC).
• Each outgoing data packet can contain up to 20 bytes of user data (set by the spec‐
ification unless higher packet sizes are negotiated).
Assuming the shortest connection interval (the frequency at which the master and the
slave exchange packets, described in “Connections” on page 22 ) of 7.5 ms, this provides
a maximum of 133 connection events (a single packet exchange between the two peers)
per second and 120 bytes per connection event (6 packets * 20 user bytes per packet).
Continuously transmitting at the maximum data rate of the nRF51822 would suggest
the following real-world calculation:
133 connection events per second * 120 bytes = 15960 bytes/s
or ~0.125Mbit/s (~125kbit/s)
That's already significantly lower than the theoretical maximum of BLE, but the peer
device you are pushing data to (typically a smart device such as a smartphone or a tablet)
can add further limitations.
Your smartphone or tablet might also be busy talking to other devices, and vendor-
implemented BLE stacks inevitably have their own limitations, which means the central
device might not actually be able to handle data at the maximum data rate either. And
because of multiple other factors, the actual connection interval might be spread out
further or more irregularly than you had originally planned.
Search WWH ::




Custom Search