README.md (277e512c6ebe4d2708137a04f187d5a036a7654b) README.md (87521db17403b35edbf887b6a9e0e8e6d0798701)
1# Bluetooth: btstack
1# BTstack Port for Zephyr RTOS
2
3## Overview
4
2
3## Overview
4
5This sample demonstrates Bluetooth functionality utilizing btstack.
5This port targets any platform supported by Zephyr that either contains a built-in Bluetooth Controller
6or is connected to an external Controller via one of the supported Zephyr HCI Transports drivers (see `zephyr/drivers/bluetooth/hci`)
6
7
7## Requirements
8## Status
8
9
9* A board with Bluetooth LE support
10Tested with nRF52 DK (PCA10040) and nRF52840 DK (PC10056) boards only. It uses the fixed static random BD ADDR stored in NRF_FICR, which will not compile on non nRF SoCs.
10
11
12
11## Building and Running
12
13## Building and Running
14
13first step needs only be done once.
14Step two every time.
15The first step needs to done once. Step two is needed every time to setup the environment.
15
16
16### 1. Build environment preconditions
17### 1. Build Environment Preconditions
18
17Follow the getting started [guide](https://docs.zephyrproject.org/latest/develop/getting_started/index.html)
19Follow the getting started [guide](https://docs.zephyrproject.org/latest/develop/getting_started/index.html)
18till you can build samples.
19Then update 'env.sh' accordingly.
20until you are able to build an example.
20
21
22Then update the `ZEPHYR_ROOT` variable in `env.sh` to point to your `zephyrproject`. Defaults to `~/zephyrproject`
23
24
21### 2. Prepare the build environmet
25### 2. Prepare the build environmet
22before beeing able to build this sample the environment needs to be prepared with:
26
27To setup your environment to build a BTstack example, run the provided setup in `env.sh`.
28
23```sh
24source env.sh
25```
26
29```sh
30source env.sh
31```
32
27### 3. Building samples
28You can build using:
33### 3. Build Example
34
35You can build an example using:
29```sh
30west build -b nrf52840dk_nrf52840
31```
36```sh
37west build -b nrf52840dk_nrf52840
38```
32to change zephyr platform settings use:
39
40`nrf52840dk_nrf52840` selected the Nordic nRF52840 DK. For the older nRF52 DK with nRF52832, you can specify nrf52dk_nrf52832.
41To get a list of all supported Zephyr targets, run `west boards`
42
43To change zephyr platform settings use:
33```sh
34west build -b nrf52840dk_nrf52840 -t menuconfig
35```
44```sh
45west build -b nrf52840dk_nrf52840 -t menuconfig
46```
36to build a different example:
47
48To build a different example, e.g. the `gatt_streamer_server`, set the EXAMPLE environment variable:
37```sh
38EXAMPLE=gatt_streamer_server west build -b nrf52840dk_nrf52840
39```
49```sh
50EXAMPLE=gatt_streamer_server west build -b nrf52840dk_nrf52840
51```
52
53### 4. Flash Example
54
55To flash a connected board:
56```sh
57west flash
58```
59
60
61## TODO
62
63- Read NRF_FICR on Nordic SoCs
64- Allow/document use of Zephyr HCI Drivers
65
66