Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 0 additions & 34 deletions docs/api/connectivity/bluetooth/BLE.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,40 +52,6 @@ The class's member functions can be divided by purpose:
1. Construct a service class and add it to the BLE stack.
1. Push notifications when the characteristic's value changes.

## Tracing

To debug issues (or to understand what the stack is doing) it may be helpful to enable tracing.

Traces can be turned on by overriding configuration options in you mbed_app.json:

```
"target_overrides": {
"*": {
"mbed-trace.enable": true,
"mbed-trace.max-level": "TRACE_LEVEL_DEBUG",
"cordio.trace-hci-packets": true,
"cordio.trace-cordio-wsf-traces": true,
"ble.trace-human-readable-enums": true
}
}
```

and compiling your application with `--profile debug`. Please note that with all options enabled your application may become too big - disable some options or lower the `mbed-trace.max-level`. Detailed documentation is available in the tracing [README.md](https://github.com/ARMmbed/mbed-os/blob/master/platform/mbed-trace/README.md).

All BLE modules contain tracing, each of the modules prefixed with a unique tag:
- `BLE ` - general BLE traces
- `BLGP` - GAP
- `BLGS` - GATT Server
- `BLGC` - GATT Client
- `BLSM` - Security Manager
- `BLDB` - Security Database
- `BLHC` - HCI
- `BLCO` - Cordio stack
- `BLDM` - GAP pal
- `BLAT` - ATT client

Any contributions to BLE should include appropriate tracing code.

## BLE class reference

[![View code](https://www.mbed.com/embed/?type=library)](https://os.mbed.com/docs/mbed-os/development/mbed-os-api-doxy/classble_1_1_b_l_e.html)
Expand Down
15 changes: 15 additions & 0 deletions docs/api/connectivity/bluetooth/BatteryService.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# BatteryService

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

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.

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.

## BatteryService class reference

[![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)

## Related content

- [Bluetooth Battery Service](https://www.bluetooth.org/docman/handlers/downloaddoc.ashx?doc_id=245138) specification.
11 changes: 11 additions & 0 deletions docs/api/connectivity/bluetooth/EnvironmentalService.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# EnvironmentalService

[Add description here.]

## EnvironmentalService class reference

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

## EnvironmentalService example

[Add example here.]
18 changes: 18 additions & 0 deletions docs/api/connectivity/bluetooth/HeartRateService.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# HeartRateService

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

The [Bluetooth Heart Rate Service](https://www.bluetooth.org/docman/handlers/downloaddoc.ashx?doc_id=239866) defines how data from a heart rate sensor should be exposed through a BLE link. The standard nature of the service allows seamless operations between collectors - usually smartphone applications - and heart rate monitors conforming to the service.

The HeartRateService class implements the Bluetooth Heart Rate service as defined by the Bluetooth body. Makers of BLE enabled fitness devices can use it to expose interoperably heart rate sensor data.

<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>

## HeartRateService class reference

[![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)

## Related content

- [Bluetooth Heart Rate Service](https://www.bluetooth.org/docman/handlers/downloaddoc.ashx?doc_id=239866) specification.
- [Bluetooth Heart Rate Profile](https://www.bluetooth.org/docman/handlers/downloaddoc.ashx?doc_id=239865) specification.
8 changes: 0 additions & 8 deletions docs/contributing/guidelines/style.md
Original file line number Diff line number Diff line change
Expand Up @@ -163,14 +163,6 @@ Below is an example of typical namespace use in a source file:

All functions and methods should contain documentation using Doxygen.

### Tracing

Mbed OS offers a tracing facility through `mbed-trace/mbed_trace.h`. It offers several levels of tracing and toggling groups.

For details please refer to the documentation in the [README.md](https://github.com/ARMmbed/mbed-os/blob/master/platform/mbed-trace/README.md) file in the Mbed OS repository.

Please consider adding traces to your code. Make sure the group you use is unique. If the module you're working on already has traces, adding traces with your changes is required.

## Compiler settings

All C and C++ code submitted to Mbed OS must compile with GCC Arm Embedded and Arm Compiler 6. Mbed OS:
Expand Down