Skip to content

Commit 91b0633

Browse files
committed
Merge pull request #90 in SA/ble_examples from feature/LPRFAPPS-933-Throughput-on-2.30-SDK to develop
Squashed commit of the following: commit ed06572b0f0e59a70cd5eeac4fbd55e560c5c072 Author: Marie Hernes <[email protected]> Date: Fri Feb 8 11:50:02 2019 +0100 Final updates. commit 96f6e4b24dc7bd0f401346e6f52b8fe33749c87a Author: Marie Hernes <[email protected]> Date: Mon Feb 4 09:37:15 2019 +0100 Update based on feed-back. commit 789488c9d4d1bd9400aa1401bcaf7f632ca86ee8 Author: Marie Hernes <[email protected]> Date: Wed Jan 30 12:37:28 2019 +0100 Changes to docs. commit aefdc2eb284b27397fba061db2c06137a3db5c6f Author: Marie Hernes <[email protected]> Date: Wed Jan 30 12:13:53 2019 +0100 Small correction to docs. commit f647585d25e356c569f0c32b7103437c193dcfab Author: Marie Hernes <[email protected]> Date: Wed Jan 30 12:01:59 2019 +0100 Small correction to tables. commit 6b0acdaca61e427c081b9304532882fed017abe6 Author: Marie Hernes <[email protected]> Date: Wed Jan 30 11:53:11 2019 +0100 Small correction to tables. commit 591151cc3f2b4630a51805133b32b55a38126d25 Author: Marie Hernes <[email protected]> Date: Wed Jan 30 11:51:22 2019 +0100 Small correction to readme. commit 0970f4dd44f0944f1eac34e569b95e48b91d2f98 Author: Marie Hernes <[email protected]> Date: Wed Jan 30 11:50:13 2019 +0100 Small correction to readme. commit 1d8288fcd800032fa2e743c7532e73594b54b1cb Author: Marie Hernes <[email protected]> Date: Wed Jan 30 10:22:25 2019 +0100 Updated to Sharp 128 boosterpack. commit 8106a390b33b743e38d40aeb51e064b983f0c726 Author: Marie Hernes <[email protected]> Date: Wed Jan 30 08:35:28 2019 +0100 Add throguhput demo to overview. commit c02f01d644cbaa9f990af715da9cefe97e3fc394 Author: Marie Hernes <[email protected]> Date: Tue Jan 29 14:14:43 2019 +0100 Remove build errors for central. commit 7fb7da733ccc6b9e9d256289179b67b04458acc4 Author: Marie Hernes <[email protected]> Date: Tue Jan 29 12:54:57 2019 +0100 Remove build errors. commit f9ab893506de2ecf9fdbff3d5a784839a4eb9f9a Author: Marie Hernes <[email protected]> Date: Tue Jan 29 10:58:14 2019 +0100 Initial add of projects and services.
1 parent 239d387 commit 91b0633

39 files changed

+14060
-0
lines changed

README.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ For examples for other SDK versions and platforms, see table below.
4343
<li><a href="#full-duplex-bidirectional-audio-demo">Full Duplex Bidirectional Audio Demo (Central/Peripheral)</li>
4444
<li><a href="#i2s-echo">I2S Echo</li>
4545
<li><a href="#serial-port-profile-spp">Serial Port Profile</li>
46+
<li><a href="#bluetooth-5-throughput-demo">Bluetooth 5 Throughput Demo</li>
4647
</ul>
4748
</td>
4849
</tr>
@@ -277,6 +278,21 @@ The example also supports Bluetooth 5 demonstrating the BLE-Stack's support for
277278
* [CCS Project Files](examples/rtos/CC26X2R1_LAUNCHXL/ble5apps/spp_ble_server/tirtos/ccs)
278279
* [Source](examples/rtos/CC26X2R1_LAUNCHXL/ble5apps/spp_ble_server/src)
279280

281+
### Bluetooth 5 Throughput Demo
282+
283+
Showcase a high (near theoretical max) data throughput over Bluetooth 5. The demo
284+
can be run with two CC26x2 Launchpads, or one CC26x2 Launchpad and one smartphone
285+
with the Simplelink Starter app.
286+
287+
* throughput\_peripheral
288+
* [Documentation](examples/rtos/CC26X2R1_LAUNCHXL/ble5apps/throughput_peripheral/readme.md)
289+
* [CCS Project Files](examples/rtos/CC26X2R1_LAUNCHXL/ble5apps/throughput_peripheral/tirtos/ccs)
290+
* [Source](examples/rtos/CC26X2R1_LAUNCHXL/ble5apps/throughput_peripheral/src)
291+
* throughput\_central
292+
* [Documentation](examples/rtos/CC26X2R1_LAUNCHXL/ble5apps/throughput_central/readme.md)
293+
* [CCS Project Files](examples/rtos/CC26X2R1_LAUNCHXL/ble5apps/throughput_central/tirtos/ccs)
294+
* [Source](examples/rtos/CC26X2R1_LAUNCHXL/ble5apps/throughput_central/src)
295+
280296
## References
281297

282298
The following reference pages may be helpful during general Bluetooth Low
Lines changed: 112 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,112 @@
1+
# Bluetooth 5 Throughput Central
2+
3+
## Functional Overview
4+
5+
This project is meant to be used on a SimpleLink CC26x2R1 LaunchPad along with a
6+
Bluetooth 5 Throughput Peripheral to demonstrate what throughput can be
7+
achieved using TI SimpleLink Bluetooth 5 devices.
8+
9+
This project is based on the Simple Central application found in the BLE5-stack
10+
component of the SDK.
11+
12+
This demo demonstrates how to achieve a high data throughput over Bluetooth low
13+
energy. The project also showcases the different settings of Bluetooth 5, such as
14+
the different PHY-settings:
15+
- LE 1M PHY
16+
- LE 2M PHY
17+
- LE Coded PHYs
18+
Two different versions of the Coded PHY are available: S=2 and S=8 coding. In
19+
addition to these features, the demo allows for selecting two different packet
20+
sizes (27 B and 251 B), along with RSSI reading.
21+
22+
When connected to the Throughput Peripheral, the user can run the throughput
23+
demo, transferring data using GATT Notifications. The user can
24+
control the PHY, PDU size and connection interval used in the connection.
25+
26+
The Peripheral generates data and sends it to the Central where the average and
27+
instant throughput rates are calculated and shown.
28+
29+
The following changes have been made to the Simple Central example:
30+
- Added support for a custom profile called Throughput Profile
31+
- Updated menu with options to adjust PDU size
32+
- Included throughput calculation
33+
- Removed auto PHY-switch feature
34+
- Changed default MTU size
35+
- Added filtering of discovered devices by UUID
36+
- Added display options for LCD
37+
38+
## Project Hardware
39+
- 1 CC26x2R1 Launchpad (http://www.ti.com/tool/LAUNCHXL-CC26X2R1)
40+
- 1 UART Terminal on PC or 1 BOOSTXL-SHARP128 LCD boosterpack (http://www.ti.com/tool/BOOSTXL-SHARP128)
41+
42+
To use the Launchpad with the LCD boosterpack, add the following predefined
43+
symbols:
44+
45+
BOARD_DISPLAY_USE_LCD=1
46+
BOARD_DISPLAY_USE_UART=0
47+
BOARD_DISPLAY_USE_UART_ANSI=0
48+
49+
## Two Button Menu
50+
51+
The Two Button Menu system is designed to utilize the two push buttons available
52+
on the CC26X2R1 LaunchPad. The left button (BTN1) is always used to cycle
53+
between options. The right button (BTN2) is used to activate the selected action
54+
or item.
55+
56+
The Two Button Menu is set up by default to utilize the back channel UART
57+
present on the LaunchPad as its display.
58+
59+
## Running the demo
60+
61+
1. Build and load the projects:
62+
- First build 'ble5_throughput_central_cc26x2r1lp_app'
63+
- Next build and load 'ble5_throughput_central_cc26x2r1lp_app'
64+
65+
2. Connect to the Launchpad via PuTTY (or some other serial console emulator).
66+
67+
3. After connecting to the device with the serial console, the Two Button Menu
68+
will appear. Here, you can either select scanning PHY (the Peripheral
69+
advertises on both 1M and Coded PHY) or scan for devices.
70+
Select "Discover Devices" to scan for devices. By default, the central
71+
filters devices by the advertised service UUIDs, looking for the Throughput
72+
Service.
73+
74+
4. While discovering, the device lists the address of the discovered devices
75+
which advertise with the Throughput Service UUID. After it has finished
76+
scanning, the number of devices which fulfill the criteria is displayed.
77+
78+
5. To connect to a discovered device, select "Connect To" followed by the
79+
device to connect to.
80+
81+
6. After connecting, the peripheral sends a connection parameter request to the
82+
central, updating the connection interval from the default 100 ms to the
83+
desired connection interval. By default, this is 200 ms.
84+
85+
7. Select "Work With" followed by the address of the device to communicate with.
86+
The devices will then exchange MTU, set the initial PDU size and set the
87+
initial PHY. After this has been set, the RSSI reading will start
88+
printing the current RSSI every second.
89+
90+
8. Select and press "Toggle Throughput" to start sending data from the Peripheral
91+
to the Central. The Instant Rate and Average Rate will now be displayed and
92+
updated to show the calculated throughput.
93+
94+
9. While connected, the PDU size and PHY can be changed by selecting their
95+
corresponding menus, "Set Conn Phy" or "Set Conn PDU", followed by selecting
96+
the desired option. This can be done while throughput is off as well as on.
97+
98+
10. To disconnect from the device, select Disconnect.
99+
100+
## Throughput calculation
101+
When the Central receives a ATT_HANDLE_VALUE_NOTI-event, it adds the length of
102+
the notification packet received to a variable called bytesRecvd. This variable
103+
is displayed every second as the Instant Throughput. It is also added
104+
to a circular buffer for average throughput calculation, and the average throughput
105+
is also displayed every second.
106+
107+
## More information
108+
109+
For more information regarding how the throughput is generated and sent, the different
110+
connection parameters and how they affect throughput, see the readme for Throughput
111+
Peripheral:
112+
[Throughput Peripheral readme](./../throughput_peripheral/readme.md)

0 commit comments

Comments
 (0)