Skip to content

Commit 1f2ef95

Browse files
author
Amanda Butler
authored
Merge branch 'development' into fix_remove_rollup
2 parents 74aeb4b + 16e0b82 commit 1f2ef95

File tree

185 files changed

+1763
-2688
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

185 files changed

+1763
-2688
lines changed

docs.json

Lines changed: 597 additions & 1057 deletions
Large diffs are not rendered by default.

docs/api/bluetooth/BatteryService.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,19 @@
1-
# BatteryService
1+
## BatteryService
22

33
It is often a requirement for devices operating on battery to report the battery charge level to the user.
44

55
The [Bluetooth Battery Service](https://www.bluetooth.org/docman/handlers/downloaddoc.ashx?doc_id=245138) defines how to expose a battery charge level through a BLE link. It allows a client - usually a smartphone application - of a device to read the current battery charge level and follow its evolution.
66

77
The BatteryService class implements the Bluetooth Battery Service as defined by the Bluetooth SIG. Makers of BLE devices operating on battery can use the API to expose interoperably the charge level of their products.
88

9-
## BatteryService class reference
9+
### BatteryService class reference
1010

1111
[![View code](https://www.mbed.com/embed/?type=library)](https://os.mbed.com/docs/mbed-os/development/mbed-os-api-doxy/class_battery_service.html)
1212

13-
## BatteryService example
13+
### BatteryService example
1414

1515
[![View code](https://www.mbed.com/embed/?url=https://github.com/ARMmbed/mbed-os-example-ble/blob/master/BLE_BatteryLevel/source)](https://github.com/ARMmbed/mbed-os-example-ble/blob/mbed-os-5.14/BLE_BatteryLevel/source/main.cpp)
1616

17-
## Related content
17+
### Related content
1818

1919
- [Bluetooth Battery Service](https://www.bluetooth.org/docman/handlers/downloaddoc.ashx?doc_id=245138) specification.
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
# EnvironmentalService
1+
## EnvironmentalService
22

33
[Add description here.]
44

5-
## EnvironmentalService class reference
5+
### EnvironmentalService class reference
66

77
[![View code](https://os.mbed.com/docs/development/mbed-os-api-doxy/class_environmental_service.html)
88

9-
## EnvironmentalService example
9+
### EnvironmentalService example
1010

1111
[Add example here.]

docs/api/bluetooth/Gap.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# GAP
1+
## GAP
22

33
<span class="notes">**Note:** Some functions, variables or types have been deprecated. Please see the class reference linked below for details.</span>
44

@@ -12,19 +12,19 @@ The other side of the process is the act of scanning, which listens for advertis
1212

1313
Advertising, scanning and connection all have parameters that let you find a compromise between desired power consumption levels, latency and efficiency of these processes.
1414

15-
## Advertising
15+
### Advertising
1616

1717
Advertising consists of broadcasting at a regular interval a small amount of data containing valuable information about the device. Peer devices listening on BLE advertising channels may scan these packets.
1818

1919
Scanners may also request additional information from device advertising by sending a scan request. If the broadcaster accepts scan requests, it can reply with a scan response packet containing additional information.
2020

21-
## Scanning
21+
### Scanning
2222

2323
Scanning consists of listening for peer advertising packets. From a scan, a device can identify devices available in its environment.
2424

2525
If the device scans actively, it sends scan request to scannable advertisers and collects their scan responses.
2626

27-
## Extended and periodic advertising
27+
### Extended and periodic advertising
2828

2929
BLE controllers supporting Bluetooth 5.0 may offer additional advertising and scanning options. Use `isFeatureSupported()` to check feature availability.
3030

@@ -36,13 +36,13 @@ There may be many advertising sets active at one time on a single advertiser. Th
3636

3737
Devices that do not support extended and periodic advertising will not see these advertisements. You may use legacy advertising alongside extended advertising, running at the same time, to support older devices in the environment.
3838

39-
## Privacy
39+
### Privacy
4040

4141
Privacy is a feature that allows a device to avoid being tracked by other (untrusted) devices. The device achieves it by periodically generating a new random address. The random address may be a resolvable random address, enabling trusted devices to recognize it as belonging to the same device. These trusted devices receive an Identity Resolution Key (IRK) during pairing. The SecurityManager handles this and relies on the other device accepting and storing the IRK.
4242

4343
You need to enable privacy by calling `enablePrivacy()` after initializing the SecurityManager because privacy requires SecurityManager to handle IRKs. Set the behavior of privacy enabled devices by using `setCentralPrivacyConfiguration()`, which specifies what the device should be with devices using random addresses, and `setPeripheralPrivacyConfiguration`. Random addresses that privacy enabled devices generate can be of two types: resolvable (by devices who have the IRK) and unresolvable. You can't use unresolvable addresses for connecting and connectable advertising; therefore, use a resolvable one for these, regardless of the privacy configuration.
4444

45-
## Modulation schemes
45+
### Modulation schemes
4646

4747
When supported by the host and controller, you can select different modulation schemes:
4848

@@ -56,7 +56,7 @@ You may set preferred PHYs (separately for RX and TX) using `setPreferredPhys()`
5656

5757
You may query the currently used PHY using `readPhy()`, which returns the result through a call to the registered event handler. You may register the handler with `setEventHandler()`. The events inform about the currently used PHY and of any changes to PHYs, which the controller or the peer may trigger autonomously.
5858

59-
## Data length (over-the-air MTU)
59+
### Data length (over-the-air MTU)
6060

6161
In addition to modulation schemes, Maximum Transmission Unit (MTU) size also strongly affects throughput. Newer controllers allow you to negotiate bigger MTUs. Because each packet contains overhead, bigger packets maximize throughput.
6262

@@ -66,11 +66,11 @@ The default value of data length supported by all controllers is 23 octets. If b
6666

6767
`ATT_MTU` and data length are independent of each other.
6868

69-
## GAP class reference
69+
### GAP class reference
7070

7171
[![View code](https://www.mbed.com/embed/?type=library)](https://os.mbed.com/docs/development/mbed-os-api-doxy/class_gap.html)
7272

73-
## GAP example
73+
### GAP example
7474

7575
Here is an example demonstrating how to use the GAP API to advertise, scan, connect and disconnect and how parameters influence efficiency of these actions.
7676

docs/api/bluetooth/GattClient.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,24 @@
1-
# GattClient
1+
## GattClient
22

33
<span class="notes">**Note:** Some functions, variables or types have been deprecated. Please see the class reference linked below for details.</span>
44

55
You can use Generic Attribute Profile (GATT) to discover services, characteristics and descriptors and to perform operations on them. The interaction happens between two peers, one of which is the client (which initiates interactions) and the other is the server (which responds). You can use Attribute Protocol (ATT) to implement this interaction. `GattClient` defines procedures required for interacting with a remote `GattServer`.
66

7-
## Discovery procedures
7+
### Discovery procedures
88

99
A GattServer hosts a fixed set of services. These services are a logical composition of characteristics that may be discovered, read or written and can broadcast their state to a connected client. These characteristics may also contain metainformation and named characteristic descriptors. A characteristic descriptor may indicate the unit used for a characteristic value, describe the characteristic purpose in a textual form or allow a client to register for update notifications for the characteristic value.
1010

1111
Prior to any interaction with a server characteristic, a GattClient discovers the layout of the services and characteristics present on the server.
1212

1313
The layout of the descriptors of a characteristic may also be issued as an extra discovery step.
1414

15-
## Attribute manipulation
15+
### Attribute manipulation
1616

1717
As a result of the discovery process, the client can start interacting with the characteristic discovered. Depending on the characteristic properties (acquired during discovery), a client can read or write the value of a given characteristic.
1818

1919
Mbed BLE abstracts read and write operations to offer a single API that can be used to read or write characteristic values. The application code does not have to handle the necessary fragmentation or reassembly process if the attribute value to be transported can't fit in a single data packet.
2020

21-
## Attribute Protocol Maximum Transmission Unit (ATT_MTU)
21+
### Attribute Protocol Maximum Transmission Unit (ATT_MTU)
2222

2323
`ATT_MTU` is the maximum size of the attribute protocol packet. Operation on attributes too large to fit into a single packet are split across multiple operations.
2424

@@ -28,16 +28,16 @@ Only `GattClient` can trigger the exchange of `ATT_MTU` between client and serve
2828

2929
`ATT_MTU` is at least 23 octets by default. If a larger size is negotiated, the user application will be informed through the `onAttMtuChange` function called in the `GattClient::EventHandler`. (`GattServer::EventHandler` is also informed.)
3030

31-
## Server initiated events
31+
### Server initiated events
3232

3333
When a server updates a characteristic value, it can forward the new value to any registered clients. Clients may register for these updates on a per-characteristic basis. The server sends the updates by using notifications (no confirmation from client) or indications (client confirms receipt). This mechanism minimizes the number of transactions between a client and a server by avoiding polling.
3434

3535
Clients register for these updates by setting the Client Characteristic Configuration Descriptor (CCCD) value. This is an attribute, and the client needs to discover its descriptor. It is present in the characteristic if its notify or indicate properties are set.
3636

37-
## GattClient class reference
37+
### GattClient class reference
3838

3939
[![View code](https://www.mbed.com/embed/?type=library)](https://os.mbed.com/docs/development/mbed-os-api-doxy/class_gatt_client.html)
4040

41-
## GattClient example
41+
### GattClient example
4242

4343
[![View code](https://www.mbed.com/embed/?url=https://os.mbed.com/teams/mbed-os-examples/code/mbed-os-example-ble-GattClient/)](https://os.mbed.com/teams/mbed-os-examples/code/mbed-os-example-ble-GattClient/file/38639a71a0f1/source/main.cpp)

docs/api/bluetooth/GattServer.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,28 @@
1-
# GattServer
1+
## GattServer
22

33
<span class="notes">**Note:** Some functions, variables or types have been deprecated. Please see the class reference linked below for details.</span>
44

55
You can use Generic Attribute Profile (GATT) to discover services, characteristics and descriptors and to perform operations on them. The interaction happens between two peers, one of which is the client (which initiates interactions) and the other is the server (which responds). You can use Attribute Protocol (ATT) to implement this interaction.
66

77
`GattServer` is a collection of GattServices. These services contain characteristics that a `GattClient` on the peer connected to the device may read or write. These characteristics may also emit updates to subscribed clients when their values change.
88

9-
## Server layout
9+
### Server layout
1010

1111
Application code can add a GattService object to the server with the help of the function `addService()`. That function registers all the GattCharacteristics enclosed in the service, as well as all the characteristic descriptors (see GattAttribute) that these characteristics contain. Service registration assigns a unique handle to the various attributes that are part of the service. The user must use this handle to read or write these components.
1212

1313
There are no defined primitives that remove a single service; however, a call to the function `reset()` removes all services previously registered in the GattServer.
1414

15-
## Characteristic and attributes access
15+
### Characteristic and attributes access
1616

1717
You must access values of the characteristic and the characteristic descriptor present in the GattServer through the handle assigned to them when you registered the service. The GattServer class offers several types of `read()` and `write()` functions that retrieve or mutate an attribute value.
1818

1919
You can query the server by invoking the function `areUpdatesEnabled()` to find out if a client has subscribed to a given characteristic's value update.
2020

21-
## Attribute Protocol Maximum Transmission Unit (ATT_MTU)
21+
### Attribute Protocol Maximum Transmission Unit (ATT_MTU)
2222

2323
The Attribute Protocol Maximum Transmission Unit (`ATT_MTU`) is the maximum size of the attribute protocol packet. For details, please see the [GattClient Documentation](../apis/gattclient.html).
2424

25-
## Events
25+
### Events
2626

2727
You can register several event handlers with the GattServer that it will call to notify you of client (remote application connected to the server) and server activities:
2828

@@ -35,10 +35,10 @@ You can register several event handlers with the GattServer that it will call to
3535

3636
The term characteristic value update represents Characteristic Value Notification and Characteristic Value Indication when the nature of the server initiated is not relevant.
3737

38-
## GattServer class reference
38+
### GattServer class reference
3939

4040
[![View code](https://www.mbed.com/embed/?type=library)](https://os.mbed.com/docs/development/mbed-os-api-doxy/class_gatt_server.html)
4141

42-
## GattServer example
42+
### GattServer example
4343

4444
[![View code](https://www.mbed.com/embed/?url=https://os.mbed.com/teams/mbed-os-examples/code/mbed-os-example-ble-GattServer/)](https://os.mbed.com/teams/mbed-os-examples/code/mbed-os-example-ble-GattServer/file/622c672f6d5f/source/main.cpp)
Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# HeartRateService
1+
## HeartRateService
22

33
People practicing physical activities use heart rate monitors to track their pulse in real time and improve their physical performances.
44

@@ -8,15 +8,15 @@ The HeartRateService class implements the Bluetooth Heart Rate service as define
88

99
<span class="note"> **Note:** The Bluetooth Heart Rate Service is part of the [Bluetooth Heart Rate Profile](https://www.bluetooth.org/docman/handlers/downloaddoc.ashx?doc_id=239865), which defines behaviors that a Bluetooth heart rate sensor expects. You must ensure that your application conforms to the heart rate profile to guarantee interoperability of your heart rate sensors.</span>
1010

11-
## HeartRateService class reference
11+
### HeartRateService class reference
1212

1313
[![View code](https://www.mbed.com/embed/?type=library)](https://os.mbed.com/docs/mbed-os/development/mbed-os-api-doxy/class_heart_rate_service.html)
1414

15-
## HeartRateService example
15+
### HeartRateService example
1616

1717
[![View code](https://www.mbed.com/embed/?url=https://github.com/ARMmbed/mbed-os-example-ble/blob/master/BLE_HeartRate/source)](https://github.com/ARMmbed/mbed-os-example-ble/blob/mbed-os-5.14/BLE_HeartRate/source/main.cpp)
1818

19-
## Related content
19+
### Related content
2020

2121
- [Bluetooth Heart Rate Service](https://www.bluetooth.org/docman/handlers/downloaddoc.ashx?doc_id=239866) specification.
2222
- [Bluetooth Heart Rate Profile](https://www.bluetooth.org/docman/handlers/downloaddoc.ashx?doc_id=239865) specification.

docs/api/bluetooth/SecurityManager.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# SecurityManager
1+
## SecurityManager
22

33
SecurityManager deals with authentication and encryption for the Bluetooth Low Energy link. The pairing and optionally bonding processes provide this. The SecurityManager achieves bonding by saving the pairing information and reusing it on subsequent reconnections. This saves time because the pairing does not have to be performed again.
44

@@ -10,27 +10,27 @@ The SecurityManager stores the keys, permanently if possible, to speed security
1010

1111
Security requests may come explicitly from the user application or implicitly from the GATT server based on attribute requirements.
1212

13-
## Pairing
13+
### Pairing
1414

1515
There are several ways to provide different levels of security during pairing depending on your requirements and the facilities the application provides. The process starts with initializing the SecurityManager with default options for new connections. You can later change some settings per link or globally.
1616

1717
The important settings in the `init()` function are the MITM requirement and IO capabilities. MITM protection prevents an attack where one device can impersonate another device by pairing with both devices at the same time. You can achieve this protection by sharing information between the devices through an independent channel. The IO capabilities of both devices dictate what algorithm is used. For details, see BLUETOOTH SPECIFICATION Version 5.0 | Vol 3, Part H - 2.3.5.1. You can change the IO capabilities after initialization with `setIoCapability()`. This takes effect for all subsequent pairings.
1818

1919
Secure Connections, which relies on elliptical curve cryptography, provides the most secure pairing. Support for Secure Connections depends on both the stack and controller on both sides supporting it. If either side doesn't support it, legacy pairing is used. This is an older standard of pairing. If you require higher security, you can disable legacy pairing by calling `allowLegacyPairing(false);`.
2020

21-
## Out of band (OOB) data used in pairing
21+
### Out of band (OOB) data used in pairing
2222

2323
Sharing this information through IO capabilities means user interaction, which limits the degree of protection due to the limit of the amount of data that you can expect to transfer. Another solution is using out of band (OOB) communication to transfer this data. OOB communication can send more data and make MITM attacks less likely to succeed. The application must exchange OOB data and provide it to the SecurityManager. Use `setOOBDataUsage()` to indicate you want to use it. With this same call, you can set whether the communication channel you are using to transmit the OOB data is itself secure against MITM protection - this sets the level of the link security achieved using pairing that uses this data.
2424

25-
## Signing
25+
### Signing
2626

2727
Applications may require a level of security providing confidence that data transfers are coming from a trusted source. You can achieve this by encrypting the link, which also provides added confidentiality. Encryption is a good choice when a device stays connected but introduces latency due to the need for encrypting the link if the device only connects periodically to transfer data. If you do not require confidentiality, the GATT server may allow writes to happen over an unencrypted link but authenticated by a signature present in each packet. This signature relies on having sent a signing key to the peer during pairing prior to sending any signed packets.
2828

29-
## Persistence of security information
29+
### Persistence of security information
3030

3131
SecurityManager stores all the data required for its operation on active links. Depending on resources available on the device, it also stores data for disconnected devices, which have bonded to be reused when reconnected. If the application has initialized a file system and the SecurityManager has received a file path during the `init()` call, SecurityManager may also provide data persistence across resets. You must enable this by calling `preserveBondingStateOnReset()`. Persistence may fail if abnormally terminated. SecurityManager may also fall back to a nonpersistent implementation if the resources are too limited.
3232

33-
## How to use
33+
### How to use
3434

3535
Call `init()` with your chosen settings before calling any other SecurityManager functions.
3636

@@ -44,11 +44,11 @@ The chosen pairing algorithms depend on the IO capabilities and OOB use settings
4444

4545
The simplest example is a pairing of a device with no IO capabilities and no OOB data available. This does not provide any MITM protection. The pairing (triggered implicitly or called explicitly) results in the generation of an event on the peer calling `pairingRequest()`. The event handler must make a decision (either in the application itself or based on user interaction) whether to accept the pairing and call `acceptPairing()` or `cancelPairing()`. An event calling `pairingResult()` in the EventHandler communicates te result on both peers.
4646

47-
## SecurityManager class reference
47+
### SecurityManager class reference
4848

4949
[![View code](https://www.mbed.com/embed/?type=library)](https://os.mbed.com/docs/development/mbed-os-api-doxy/class_security_manager.html)
5050

51-
## SecurityManager example
51+
### SecurityManager example
5252

5353
The SecurityManager example demonstrates both a central and a peripheral connecting, performing basic pairing and setting up link security.
5454

0 commit comments

Comments
 (0)