xref: /nrf52832-nimble/packages/NimBLE-latest/docs/index.rst (revision 042d53a763ad75cb1465103098bb88c245d95138)
1BLE User Guide
2----------------
3
4Apache Mynewt offers the world's first fully open-source Bluetooth Low
5Energy (BLE) or Bluetooth Smart stack fully compliant with Bluetooth 5
6specifications with support for Bluetooth Mesh. It is called NimBLE.
7
8BLE technology operates in the unlicensed industrial, scientific and
9medical (ISM) band at 2.4 to 2.485 GHz which is available in most
10countries. It uses a spread spectrum, frequency hopping, full-duplex
11signal. BLE FHSS employs 40 2-MHz-wide channels to ensure greater
12reliability over longer distances. It also features 0-dBm (1 mW) power
13output and a typical maximum range of 50 meters. With Bluetooth 5
14specification range can be increased 4 times and speed 2 time.
15
16.. toctree::
17   :hidden:
18   :titlesonly:
19
20   ble_sec
21   ble_setup/ble_setup_intro
22   ble_hs/ble_hs
23   btshell Usage API <btshell/btshell_api>
24   mesh/index
25
26.. contents::
27    :local:
28    :depth: 2
29
30Note that BLE is not compatible with standard Bluetooth.
31
32Features
33~~~~~~~~
34
35NimBLE complies with Bluetooth Core Specification 5.0 which makes it an
36ideal wireless technology for the Internet of Things (IoT).
37
38-  LE Advertising Extensions
39-  2Msym/s PHY for higher throughput
40-  Coded PHY for LE Long Range
41-  High Duty Cycle Non-Connectable Advertising
42-  Channel Selection Algorithm #2 to utilize channels in more efficient
43   way.
44-  LE Privacy 1.2 for frequent changes to the device address to make it
45   difficult to track for outsiders
46-  LE Secure Connections featuring FIPS-compliant algorithms.
47-  LE Data Length Extension for higher throughput
48-  **Coming Soon**: Assigning an Internet Protocol (IP) address
49   (complaint with the IPv6 or 6LoWPAN standard) to a Bluetooth device
50   through Internet Protocol Support Profile (IPSP)
51
52The Bluetooth 5 is backward compatible with previous Bluetooth version
534.2 which is also supported by Apache Mynewt.
54
55Bluetooth Mesh features
56~~~~~~~~~~~~~~~~~~~~~~~
57
58Bluetooth Mesh is a great addition to and opens a wide range of new
59possibilities for the IoT connectivity space. NimBLE fully supports the
60following Bluetooth Mesh features:
61
62-  Advertising and GATT bearers
63-  PB-GATT and PB-ADV provisioning
64-  Foundation Models (server role)
65-  Relay support
66-  GATT Proxy
67
68Components
69~~~~~~~~~~
70
71A Bluetooth low energy stack (NimBLE included) consists of two
72components with several subcomponents:
73
74-  **Controller**
75
76   -  **Physical Layer**: adaptive frequency-hopping Gaussian Frequency
77      Shift Keying (GFSK) radio using 40 RF channels (0-39), with 2 MHz
78      spacing.
79   -  **Link Layer**: with one of five states (Standby, Advertising,
80      Scanning, Initiating, Connection states) active at any time
81
82-  **Host**
83
84   -  **Logical Link Control and Adaptation Protocol (L2CAP)**: provides
85      logical channels, named L2CAP channels, which are multiplexed over
86      one or more logical links to provide packet segmentation and
87      reassembly, flow control, error control, streaming, QoS etc.
88   -  **Security Manager (SM)**: uses Security Manager Protocol (SMP)
89      for pairing and transport specific key distribution for securing
90      radio communication
91   -  **Attribute protocol (ATT)**: allows a device (*Server*) to expose
92      certain pieces of data, known as *Attributes*, to another device
93      (*Client*)
94   -  **Generic Attribute Profile (GATT)**: a framework for using the
95      ATT protocol to exchange attributes encapsulated as
96      *Characteristics* or *Services*
97   -  **Generic Access Profile (GAP)**: a base profile which all
98      Bluetooth devices implement, which in the case of LE, defines the
99      Physical Layer, Link Layer, L2CAP, Security Manager, Attribute
100      Protocol and Generic Attribute Profile.
101   -  **Host Controller Interface (HCI)**: the interface between the
102      host and controller either through software API or by a hardware
103      interface such as SPI, UART or USB.
104
105Subsequent chapters in this manual will go into the details of the
106implementation of each component, APIs available, and things to consider
107while designing a NimBLE app.
108
109Example NimBLE projects
110~~~~~~~~~~~~~~~~~~~~~~~
111
112Mynewt comes with two built-in projects that allow users to play with
113NimBLE, try the tutorials out with, and see how to use available
114services.
115
1161. **btshell** : A simple shell application which provides a basic
117   interface to the host-side of the BLE stack.
1182. **bleprph**: A basic peripheral device with no user interface. It
119   advertises automatically on startup, and resumes advertising whenever
120   a connection is terminated. It supports a maximum of one connection.
1213. **blemesh**: A sample application for Bluetooth Mesh Node using
122   on/off model.
123