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