You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mynewt.apache.org by GitBox <gi...@apache.org> on 2018/01/16 06:20:27 UTC

[GitHub] aditihilbert closed pull request #733: BLE user guide

aditihilbert closed pull request #733: BLE user guide
URL: https://github.com/apache/mynewt-core/pull/733
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/docs/network/ble/ble_hs/ble_att.rst b/docs/network/ble/ble_hs/ble_att.rst
new file mode 100644
index 000000000..f4b5074ea
--- /dev/null
+++ b/docs/network/ble/ble_hs/ble_att.rst
@@ -0,0 +1,22 @@
+NimBLE Host ATT Client Reference
+--------------------------------
+
+Introduction
+~~~~~~~~~~~~
+
+The Attribute Protocol (ATT) is a mid-level protocol that all BLE devices use to exchange data. Data is exchanged when
+an ATT client reads or writes an attribute belonging to an ATT server. Any device that needs to send or receive data
+must support both the client and server functionality of the ATT protocol. The only devices which do not support ATT
+are the most basic ones: broadcasters and observers (i.e., beaconing devices and listening devices).
+
+Most ATT functionality is not interesting to an application. Rather than use ATT directly, an application uses the
+higher level GATT profile, which sits directly above ATT in the host. NimBLE exposes the few bits of ATT functionality
+which are not encompassed by higher level GATT functions. This section documents the ATT functionality that the NimBLE
+host exposes to the application.
+
+Header
+~~~~~~
+
+.. code-block:: cpp
+
+    #include "host/ble_hs.h"
diff --git a/docs/network/ble/ble_hs/ble_att/ble_att.rst b/docs/network/ble/ble_hs/ble_att/ble_att.rst
deleted file mode 100644
index 034ee6d43..000000000
--- a/docs/network/ble/ble_hs/ble_att/ble_att.rst
+++ /dev/null
@@ -1,76 +0,0 @@
-NimBLE Host ATT Client Reference
---------------------------------
-
-Introduction
-~~~~~~~~~~~~
-
-The Attribute Protocol (ATT) is a mid-level protocol that all BLE
-devices use to exchange data. Data is exchanged when an ATT client reads
-or writes an attribute belonging to an ATT server. Any device that needs
-to send or receive data must support both the client and server
-functionality of the ATT protocol. The only devices which do not support
-ATT are the most basic ones: broadcasters and observers (i.e., beaconing
-devices and listening devices).
-
-Most ATT functionality is not interesting to an application. Rather than
-use ATT directly, an application uses the higher level GATT profile,
-which sits directly above ATT in the host. NimBLE exposes the few bits
-of ATT functionality which are not encompassed by higher level GATT
-functions. This section documents the ATT functionality that the NimBLE
-host exposes to the application.
-
-Header
-~~~~~~
-
-.. code:: c
-
-    #include "host/ble_hs.h"
-
-Definitions
-~~~~~~~~~~~
-
-None.
-
-Functions
-~~~~~~~~~
-
-+-------------+----------------+
-| Function    | Description    |
-+=============+================+
-| `ble\_att\_ | Retrieves the  |
-| mtu <functi | ATT MTU of the |
-| ons/ble_att | specified      |
-| _mtu.html>`__ | connection.    |
-+-------------+----------------+
-| `ble\_att\_ | Retrieves the  |
-| preferred\_ | preferred ATT  |
-| mtu <functi | MTU.           |
-| ons/ble_att |                |
-| _preferred_ |                |
-| mtu.html>`__  |                |
-+-------------+----------------+
-| `ble\_att\_ | Sets the       |
-| set\_prefer | preferred ATT  |
-| red\_mtu <f | MTU; the       |
-| unctions/bl | device will    |
-| e_att_set_p | indicate this  |
-| referred_mt | value in all   |
-| u.html>`__    | subseqeunt ATT |
-|             | MTU exchanges. |
-+-------------+----------------+
-| `ble\_att\_ | Reads a        |
-| svr\_read\_ | locally        |
-| local <func | registered     |
-| tions/ble_a | attribute.     |
-| tt_svr_read |                |
-| _local.html>` |                |
-| __          |                |
-+-------------+----------------+
-| `ble\_att\_ | Writes a       |
-| svr\_write\ | locally        |
-| _local <fun | registered     |
-| ctions/ble_ | attribute.     |
-| att_svr_wri |                |
-| te_local.md |                |
-| >`__        |                |
-+-------------+----------------+
diff --git a/docs/network/ble/ble_hs/ble_att/functions/ble_att_mtu.rst b/docs/network/ble/ble_hs/ble_att/functions/ble_att_mtu.rst
deleted file mode 100644
index 2dbf05126..000000000
--- a/docs/network/ble/ble_hs/ble_att/functions/ble_att_mtu.rst
+++ /dev/null
@@ -1,28 +0,0 @@
-ble\_att\_mtu
--------------
-
-.. code:: c
-
-    uint16_t
-    ble_att_mtu(uint16_t conn_handle)
-
-Description
-~~~~~~~~~~~
-
-Retrieves the ATT MTU of the specified connection. If an MTU exchange
-for this connection has occurred, the MTU is the lower of the two peers'
-preferred values. Otherwise, the MTU is the default value of 23.
-
-Parameters
-~~~~~~~~~~
-
-+----------------+------------------------------------------+
-| *Parameter*    | *Description*                            |
-+================+==========================================+
-| conn\_handle   | The handle of the connection to query.   |
-+----------------+------------------------------------------+
-
-Returned values
-~~~~~~~~~~~~~~~
-
-The specified connection's ATT MTU, or 0 if there is no such connection.
diff --git a/docs/network/ble/ble_hs/ble_att/functions/ble_att_preferred_mtu.rst b/docs/network/ble/ble_hs/ble_att/functions/ble_att_preferred_mtu.rst
deleted file mode 100644
index 2ed87f588..000000000
--- a/docs/network/ble/ble_hs/ble_att/functions/ble_att_preferred_mtu.rst
+++ /dev/null
@@ -1,23 +0,0 @@
-ble\_att\_preferred\_mtu
-------------------------
-
-.. code:: c
-
-    uint16_t
-    ble_att_preferred_mtu(void)
-
-Description
-~~~~~~~~~~~
-
-Retrieves the preferred ATT MTU. This is the value indicated by the
-device during an ATT MTU exchange.
-
-Parameters
-~~~~~~~~~~
-
-None
-
-Returned values
-~~~~~~~~~~~~~~~
-
-The preferred ATT MTU.
diff --git a/docs/network/ble/ble_hs/ble_att/functions/ble_att_set_preferred_mtu.rst b/docs/network/ble/ble_hs/ble_att/functions/ble_att_set_preferred_mtu.rst
deleted file mode 100644
index b792b8f9c..000000000
--- a/docs/network/ble/ble_hs/ble_att/functions/ble_att_set_preferred_mtu.rst
+++ /dev/null
@@ -1,38 +0,0 @@
-ble\_att\_set\_preferred\_mtu
------------------------------
-
-.. code:: c
-
-    int
-    ble_att_set_preferred_mtu(uint16_t mtu)
-
-Description
-~~~~~~~~~~~
-
-Sets the preferred ATT MTU; the device will indicate this value in all
-subseqeunt ATT MTU exchanges. The ATT MTU of a connection is equal to
-the lower of the two peers' preferred MTU values. The ATT MTU is what
-dictates the maximum size of any message sent during a GATT procedure.
-The specified MTU must be within the following range: [23,
-BLE\_ATT\_MTU\_MAX]. 23 is a minimum imposed by the Bluetooth
-specification; BLE\_ATT\_MTU\_MAX is a NimBLE compile-time setting.
-
-Parameters
-~~~~~~~~~~
-
-+---------------+--------------------------+
-| *Parameter*   | *Description*            |
-+===============+==========================+
-| mtu           | The preferred ATT MTU.   |
-+---------------+--------------------------+
-
-Returned values
-~~~~~~~~~~~~~~~
-
-+-------------------+--------------------------------------------------------+
-| *Value*           | *Condition*                                            |
-+===================+========================================================+
-| 0                 | Success.                                               |
-+-------------------+--------------------------------------------------------+
-| BLE\_HS\_EINVAL   | The specifeid value is not within the allowed range.   |
-+-------------------+--------------------------------------------------------+
diff --git a/docs/network/ble/ble_hs/ble_att/functions/ble_att_svr_read_local.rst b/docs/network/ble/ble_hs/ble_att/functions/ble_att_svr_read_local.rst
deleted file mode 100644
index 030d8dbf0..000000000
--- a/docs/network/ble/ble_hs/ble_att/functions/ble_att_svr_read_local.rst
+++ /dev/null
@@ -1,50 +0,0 @@
-ble\_att\_svr\_read\_local
---------------------------
-
-.. code:: c
-
-    int
-    ble_att_svr_read_local(
-              uint16_t   attr_handle,
-        struct os_mbuf **out_om
-    )
-
-Description
-~~~~~~~~~~~
-
-Reads a locally registered attribute. If the specified attribute handle
-coresponds to a GATT characteristic value or descriptor, the read is
-performed by calling the registered GATT access callback.
-
-Parameters
-~~~~~~~~~~
-
-+----------------+------------------+
-| *Parameter*    | *Description*    |
-+================+==================+
-| attr\_handle   | The 16-bit       |
-|                | handle of the    |
-|                | attribute to     |
-|                | read.            |
-+----------------+------------------+
-| out\_om        | On success, this |
-|                | is made to point |
-|                | to a             |
-|                | newly-allocated  |
-|                | mbuf containing  |
-|                | the attribute    |
-|                | data read.       |
-+----------------+------------------+
-
-Returned values
-~~~~~~~~~~~~~~~
-
-+-----------------------------------------------------------------------+--------------------------------------------------+
-| *Value*                                                               | *Condition*                                      |
-+=======================================================================+==================================================+
-| 0                                                                     | Success.                                         |
-+-----------------------------------------------------------------------+--------------------------------------------------+
-| `ATT return code <../../ble_hs_return_codes/#return-codes-att>`__     | The attribute access callback reports failure.   |
-+-----------------------------------------------------------------------+--------------------------------------------------+
-| `Core return code <../../ble_hs_return_codes/#return-codes-core>`__   | Unexpected error.                                |
-+-----------------------------------------------------------------------+--------------------------------------------------+
diff --git a/docs/network/ble/ble_hs/ble_att/functions/ble_att_svr_write_local.rst b/docs/network/ble/ble_hs/ble_att/functions/ble_att_svr_write_local.rst
deleted file mode 100644
index 940f62862..000000000
--- a/docs/network/ble/ble_hs/ble_att/functions/ble_att_svr_write_local.rst
+++ /dev/null
@@ -1,42 +0,0 @@
-ble\_att\_svr\_write\_local
----------------------------
-
-.. code:: c
-
-    int
-    ble_att_svr_write_local(
-              uint16_t  attr_handle,
-        struct os_mbuf *om
-    )
-
-Description
-~~~~~~~~~~~
-
-Writes a locally registered attribute. This function consumes the
-supplied mbuf regardless of the outcome. If the specified attribute
-handle coresponds to a GATT characteristic value or descriptor, the
-write is performed by calling the registered GATT access callback.
-
-Parameters
-~~~~~~~~~~
-
-+----------------+------------------------------------------------+
-| *Parameter*    | *Description*                                  |
-+================+================================================+
-| attr\_handle   | The 16-bit handle of the attribute to write.   |
-+----------------+------------------------------------------------+
-| om             | The value to write to the attribute.           |
-+----------------+------------------------------------------------+
-
-Returned values
-~~~~~~~~~~~~~~~
-
-+-----------------------------------------------------------------------+--------------------------------------------------+
-| *Value*                                                               | *Condition*                                      |
-+=======================================================================+==================================================+
-| 0                                                                     | Success.                                         |
-+-----------------------------------------------------------------------+--------------------------------------------------+
-| `ATT return code <../../ble_hs_return_codes/#return-codes-att>`__     | The attribute access callback reports failure.   |
-+-----------------------------------------------------------------------+--------------------------------------------------+
-| `Core return code <../../ble_hs_return_codes/#return-codes-core>`__   | Unexpected error.                                |
-+-----------------------------------------------------------------------+--------------------------------------------------+
diff --git a/docs/network/ble/ble_hs/ble_att/mdtoc.rst b/docs/network/ble/ble_hs/ble_att/mdtoc.rst
deleted file mode 100644
index d0bca668b..000000000
--- a/docs/network/ble/ble_hs/ble_att/mdtoc.rst
+++ /dev/null
@@ -1,10 +0,0 @@
-::
-
-            - 'ATT':
-                - toc: 'network/ble/ble_hs/ble_att/ble_att.md'
-                - 'Functions':
-                    - 'ble_att_mtu': 'network/ble/ble_hs/ble_att/functions/ble_att_mtu.md'
-                    - 'ble_att_preferred_mtu': 'network/ble/ble_hs/ble_att/functions/ble_att_preferred_mtu.md'
-                    - 'ble_att_set_preferred_mtu': 'network/ble/ble_hs/ble_att/functions/ble_att_set_preferred_mtu.md'
-                    - 'ble_att_svr_read_local': 'network/ble/ble_hs/ble_att/functions/ble_att_svr_read_local.md'
-                    - 'ble_att_svr_write_local': 'network/ble/ble_hs/ble_att/functions/ble_att_svr_write_local.md'
diff --git a/docs/network/ble/ble_hs/ble_gap.rst b/docs/network/ble/ble_hs/ble_gap.rst
new file mode 100644
index 000000000..4daeef81f
--- /dev/null
+++ b/docs/network/ble/ble_hs/ble_gap.rst
@@ -0,0 +1,14 @@
+NimBLE Host GAP Reference
+-------------------------
+
+Introduction
+~~~~~~~~~~~~
+
+The Generic Access Profile (GAP) is responsible for all connecting, advertising, scanning, and connection updating operations.
+
+Header
+~~~~~~
+
+.. code-block:: cpp
+
+    #include "host/ble_hs.h"
diff --git a/docs/network/ble/ble_hs/ble_gap/ble_gap.rst b/docs/network/ble/ble_hs/ble_gap/ble_gap.rst
deleted file mode 100644
index f858571f9..000000000
--- a/docs/network/ble/ble_hs/ble_gap/ble_gap.rst
+++ /dev/null
@@ -1,241 +0,0 @@
-NimBLE Host GAP Reference
--------------------------
-
-Introduction
-~~~~~~~~~~~~
-
-The Generic Access Profile (GAP) is responsible for all connecting,
-advertising, scanning, and connection updating operations.
-
-Header
-~~~~~~
-
-.. code:: c
-
-    #include "host/ble_hs.h"
-
-Definitions
-~~~~~~~~~~~
-
-`BLE host GAP definitions <definitions/ble_gap_defs.html>`__
-
-Functions
-~~~~~~~~~
-
-+-------------+----------------+
-| Function    | Description    |
-+=============+================+
-| `ble\_gap\_ | Indicates      |
-| adv\_active | whether an     |
-|  <functions | advertisement  |
-| /ble_gap_ad | procedure is   |
-| v_active.md | currently in   |
-| >`__        | progress.      |
-+-------------+----------------+
-| `ble\_gap\_ | Configures the |
-| adv\_rsp\_s | data to        |
-| et\_data <f | include in     |
-| unctions/bl | subsequent     |
-| e_gap_adv_r | scan           |
-| sp_set_data | responses.     |
-| .html>`__     |                |
-+-------------+----------------+
-| `ble\_gap\_ | Configures the |
-| adv\_rsp\_s | fields to      |
-| et\_fields  | include in     |
-| <functions/ | subsequent     |
-| ble_gap_adv | scan           |
-| _rsp_set_fi | responses.     |
-| elds.html>`__ |                |
-+-------------+----------------+
-| `ble\_gap\_ | Configures the |
-| adv\_set\_d | data to        |
-| ata <functi | include in     |
-| ons/ble_gap | subsequent     |
-| _adv_set_da | advertisements |
-| ta.html>`__   | .              |
-+-------------+----------------+
-| `ble\_gap\_ | Configures the |
-| adv\_set\_f | fields to      |
-| ields <func | include in     |
-| tions/ble_g | subsequent     |
-| ap_adv_set_ | advertisements |
-| fields.html>` | .              |
-| __          |                |
-+-------------+----------------+
-| `ble\_gap\_ |                |
-| adv\_set\_p | [experimental] |
-| hys <functi | Configures     |
-| ons/ble_gap | primary and    |
-| _adv_set_ph | secondary PHYs |
-| ys.html>`__   | to use in      |
-|             | subsequent     |
-|             | extended       |
-|             | advertisements |
-|             | from Bluetooth |
-|             | 5.             |
-+-------------+----------------+
-| `ble\_gap\_ |                |
-| adv\_set\_t | [experimental] |
-| x\_power <f | Configures Tx  |
-| unctions/bl | Power level to |
-| e_gap_adv_s | use in         |
-| et_tx_power | subsequent     |
-| .html>`__     | extended       |
-|             | advertisements |
-|             | from Bluetooth |
-|             | 5.             |
-+-------------+----------------+
-| `ble\_gap\_ | Initiates      |
-| adv\_start  | advertising.   |
-| <functions/ |                |
-| ble_gap_adv |                |
-| _start.html>` |                |
-| __          |                |
-+-------------+----------------+
-| `ble\_gap\_ | Stops the      |
-| adv\_stop < | currently-acti |
-| functions/b | ve             |
-| le_gap_adv_ | advertising    |
-| stop.html>`__ | procedure.     |
-+-------------+----------------+
-| `ble\_gap\_ | Indicates      |
-| conn\_activ | whether a      |
-| e <function | connect        |
-| s/ble_gap_c | procedure is   |
-| onn_active. | currently in   |
-| md>`__      | progress.      |
-+-------------+----------------+
-| `ble\_gap\_ | Aborts a       |
-| conn\_cance | connect        |
-| l <function | procedure in   |
-| s/ble_gap_c | progress.      |
-| onn_cancel. |                |
-| md>`__      |                |
-+-------------+----------------+
-| `ble\_gap\_ | Searches for a |
-| conn\_find  | connection     |
-| <functions/ | with the       |
-| ble_gap_con | specified      |
-| n_find.html>` | handle.        |
-| __          |                |
-+-------------+----------------+
-| `ble\_gap\_ | Retrieves the  |
-| conn\_rssi  | most-recently  |
-| <functions/ | measured RSSI  |
-| ble_gap_con | for the        |
-| n_rssi.html>` | specified      |
-| __          | connection.    |
-+-------------+----------------+
-| `ble\_gap\_ | Initiates a    |
-| connect <fu | connect        |
-| nctions/ble | procedure.     |
-| _gap_connec |                |
-| t.html>`__    |                |
-+-------------+----------------+
-| `ble\_gap\_ |                |
-| ext\_connec | [experimental] |
-| t <function | Same as above  |
-| s/ble_gap_e | but using      |
-| xt_connect. | extended       |
-| md>`__      | connect from   |
-|             | Bluetooth 5.   |
-+-------------+----------------+
-| `ble\_gap\_ | Performs the   |
-| disc <funct | Limited or     |
-| ions/ble_ga | General        |
-| p_disc.html>` | Discovery      |
-| __          | Procedures.    |
-+-------------+----------------+
-| `ble\_gap\_ |                |
-| ext\_disc < | [experimental] |
-| functions/b | Same as above  |
-| le_gap_ext_ | but using      |
-| disc.html>`__ | extended       |
-|             | advertising    |
-|             | from Bluetooth |
-|             | 5.             |
-+-------------+----------------+
-| `ble\_gap\_ | Indicates      |
-| disc\_activ | whether a      |
-| e <function | discovery      |
-| s/ble_gap_d | procedure is   |
-| isc_active. | currently in   |
-| md>`__      | progress.      |
-+-------------+----------------+
-| `ble\_gap\_ | Cancels the    |
-| disc\_cance | discovery      |
-| l <function | procedure      |
-| s/ble_gap_d | currently in   |
-| isc_cancel. | progress.      |
-| md>`__      |                |
-+-------------+----------------+
-| `ble\_gap\_ | Initiates the  |
-| security\_i | GAP encryption |
-| nitiate <fu | procedure.     |
-| nctions/ble |                |
-| _gap_securi |                |
-| ty_initiate |                |
-| .html>`__     |                |
-+-------------+----------------+
-| `ble\_gap\_ | Configures a   |
-| set\_event\ | connection to  |
-| _cb <functi | use the        |
-| ons/ble_gap | specified GAP  |
-| _set_event_ | event          |
-| cb.html>`__   | callback.      |
-+-------------+----------------+
-| `ble\_gap\_ | Terminates an  |
-| terminate < | established    |
-| functions/b | connection.    |
-| le_gap_term |                |
-| inate.html>`_ |                |
-| _           |                |
-+-------------+----------------+
-| `ble\_gap\_ | Initiates a    |
-| update\_par | connection     |
-| ams <functi | parameter      |
-| ons/ble_gap | update         |
-| _update_par | procedure.     |
-| ams.html>`__  |                |
-+-------------+----------------+
-| `ble\_gap\_ | Overwrites the |
-| wl\_set <fu | controller's   |
-| nctions/ble | white list     |
-| _gap_wl_set | with the       |
-| .html>`__     | specified      |
-|             | contents.      |
-+-------------+----------------+
-| `ble\_gap\_ | Set privacy    |
-| set\_priv\_ | mode for peer  |
-| mode <funct | device.        |
-| ions/ble_ga |                |
-| p_set_priv_ |                |
-| mode.html>`__ |                |
-+-------------+----------------+
-| `ble\_gap\_ | Read PHY on    |
-| read\_le\_p | the            |
-| hy <functio | connections.   |
-| ns/ble_gap_ |                |
-| read_le_phy |                |
-| .html>`__     |                |
-+-------------+----------------+
-| `ble\_gap\_ | Set default    |
-| set\_prefer | prefered PHY   |
-| ed\_default | mode for new   |
-| \_le\_phy < | connections.   |
-| functions/b |                |
-| le_gap_set_ |                |
-| prefered_de |                |
-| fault_le_ph |                |
-| y.html>`__    |                |
-+-------------+----------------+
-| `ble\_gap\_ | Set prefered   |
-| set\_prefer | PHY mode for   |
-| ed\_le\_phy | the            |
-|  <functions | connections.   |
-| /ble_gap_se |                |
-| t_prefered_ |                |
-| le_phy.html>` |                |
-| __          |                |
-+-------------+----------------+
diff --git a/docs/network/ble/ble_hs/ble_gap/definitions/ble_gap_defs.rst b/docs/network/ble/ble_hs/ble_gap/definitions/ble_gap_defs.rst
deleted file mode 100644
index 56f27666a..000000000
--- a/docs/network/ble/ble_hs/ble_gap/definitions/ble_gap_defs.rst
+++ /dev/null
@@ -1,582 +0,0 @@
-GAP events
-----------
-
-.. code:: c
-
-    typedef int ble_gap_event_fn(struct ble_gap_event *ctxt, void *arg);
-
-.. code:: c
-
-    #define BLE_GAP_EVENT_CONNECT               0
-    #define BLE_GAP_EVENT_DISCONNECT            1
-    #define BLE_GAP_EVENT_CONN_CANCEL           2
-    #define BLE_GAP_EVENT_CONN_UPDATE           3
-    #define BLE_GAP_EVENT_CONN_UPDATE_REQ       4
-    #define BLE_GAP_EVENT_L2CAP_UPDATE_REQ      5
-    #define BLE_GAP_EVENT_TERM_FAILURE          6
-    #define BLE_GAP_EVENT_DISC                  7
-    #define BLE_GAP_EVENT_DISC_COMPLETE         8
-    #define BLE_GAP_EVENT_ADV_COMPLETE          9
-    #define BLE_GAP_EVENT_ENC_CHANGE            10
-    #define BLE_GAP_EVENT_PASSKEY_ACTION        11
-    #define BLE_GAP_EVENT_NOTIFY_RX             12
-    #define BLE_GAP_EVENT_NOTIFY_TX             13
-    #define BLE_GAP_EVENT_SUBSCRIBE             14
-    #define BLE_GAP_EVENT_MTU                   15
-    #define BLE_GAP_EVENT_IDENTITY_RESOLVED     16
-    #define BLE_GAP_EVENT_REPEAT_PAIRING        17
-
-.. code:: c
-
-    /**
-     * Represents a GAP-related event.  When such an event occurs, the host
-     * notifies the application by passing an instance of this structure to an
-     * application-specified callback.
-     */
-    struct ble_gap_event {
-        /**
-         * Indicates the type of GAP event that occurred.  This is one of the
-         * BLE_GAP_EVENT codes.
-         */
-        uint8_t type;
-
-        /**
-         * A discriminated union containing additional details concerning the GAP
-         * event.  The 'type' field indicates which member of the union is valid.
-         */
-        union {
-            /**
-             * Represents a connection attempt.  Valid for the following event
-             * types:
-             *     o BLE_GAP_EVENT_CONNECT
-             */
-            struct {
-                /**
-                 * The status of the connection attempt;
-                 *     o 0: the connection was successfully established.
-                 *     o BLE host error code: the connection attempt failed for
-                 *       the specified reason.
-                 */
-                int status;
-
-                /** The handle of the relevant connection. */
-                uint16_t conn_handle;
-            } connect;
-
-            /**
-             * Represents a terminated connection.  Valid for the following event
-             * types:
-             *     o BLE_GAP_EVENT_DISCONNECT
-             */
-            struct {
-                /**
-                 * A BLE host return code indicating the reason for the
-                 * disconnect.
-                 */
-                int reason;
-
-                /** Information about the connection prior to termination. */
-                struct ble_gap_conn_desc conn;
-            } disconnect;
-
-            /**
-             * Represents an advertising report received during a discovery
-             * procedure.  Valid for the following event types:
-             *     o BLE_GAP_EVENT_DISC
-             */
-            struct ble_gap_disc_desc disc;
-
-    #if MYNEWT_VAL(BLE_EXT_ADV)
-            /**
-             * Represents an extended advertising report received during a discovery
-             * procedure.  Valid for the following event types:
-             *     o BLE_GAP_EVENT_EXT_DISC
-             */
-            struct ble_gap_ext_disc_desc ext_disc;
-    #endif
-            /**
-             * Represents an attempt to update a connection's parameters.  If the
-             * attempt was successful, the connection's descriptor reflects the
-             * updated parameters.
-             *
-             * Valid for the following event types:
-             *     o BLE_GAP_EVENT_CONN_UPDATE
-             */
-            struct {
-                /**
-                 * The result of the connection update attempt;
-                 *     o 0: the connection was successfully updated.
-                 *     o BLE host error code: the connection update attempt failed
-                 *       for the specified reason.
-                 */
-                int status;
-
-                /** The handle of the relevant connection. */
-                uint16_t conn_handle;
-            } conn_update;
-
-            /**
-             * Represents a peer's request to update the connection parameters.
-             * This event is generated when a peer performs any of the following
-             * procedures:
-             *     o L2CAP Connection Parameter Update Procedure
-             *     o Link-Layer Connection Parameters Request Procedure
-             *
-             * To reject the request, return a non-zero HCI error code.  The value
-             * returned is the reject reason given to the controller.
-             *
-             * Valid for the following event types:
-             *     o BLE_GAP_EVENT_L2CAP_UPDATE_REQ
-             *     o BLE_GAP_EVENT_CONN_UPDATE_REQ
-             */
-            struct {
-                /**
-                 * Indicates the connection parameters that the peer would like to
-                 * use.
-                 */
-                const struct ble_gap_upd_params *peer_params;
-
-                /**
-                 * Indicates the connection parameters that the local device would
-                 * like to use.  The application callback should fill this in.  By
-                 * default, this struct contains the requested parameters (i.e.,
-                 * it is a copy of 'peer_params').
-                 */
-                struct ble_gap_upd_params *self_params;
-
-                /** The handle of the relevant connection. */
-                uint16_t conn_handle;
-            } conn_update_req;
-
-            /**
-             * Represents a failed attempt to terminate an established connection.
-             * Valid for the following event types:
-             *     o BLE_GAP_EVENT_TERM_FAILURE
-             */
-            struct {
-                /**
-                 * A BLE host return code indicating the reason for the failure.
-                 */
-                int status;
-
-                /** The handle of the relevant connection. */
-                uint16_t conn_handle;
-            } term_failure;
-
-            /**
-             * Represents an attempt to change the encrypted state of a
-             * connection.  If the attempt was successful, the connection
-             * descriptor reflects the updated encrypted state.
-             *
-             * Valid for the following event types:
-             *     o BLE_GAP_EVENT_ENC_CHANGE
-             */
-            struct {
-                /**
-                 * Indicates the result of the encryption state change attempt;
-                 *     o 0: the encrypted state was successfully updated;
-                 *     o BLE host error code: the encryption state change attempt
-                 *       failed for the specified reason.
-                 */
-                int status;
-
-                /** The handle of the relevant connection. */
-                uint16_t conn_handle;
-            } enc_change;
-
-            /**
-             * Represents a passkey query needed to complete a pairing procedure.
-             *
-             * Valid for the following event types:
-             *     o BLE_GAP_EVENT_PASSKEY_ACTION
-             */
-            struct {
-                /** Contains details about the passkey query. */
-                struct ble_gap_passkey_params params;
-
-                /** The handle of the relevant connection. */
-                uint16_t conn_handle;
-            } passkey;
-
-            /**
-             * Represents a received ATT notification or indication.
-             *
-             * Valid for the following event types:
-             *     o BLE_GAP_EVENT_NOTIFY_RX
-             */
-            struct {
-                /**
-                 * The contents of the notification or indication.  If the
-                 * application wishes to retain this mbuf for later use, it must
-                 * set this pointer to NULL to prevent the stack from freeing it.
-                 */
-                struct os_mbuf *om;
-
-                /** The handle of the relevant ATT attribute. */
-                uint16_t attr_handle;
-
-                /** The handle of the relevant connection. */
-                uint16_t conn_handle;
-
-                /**
-                 * Whether the received command is a notification or an
-                 * indication;
-                 *     o 0: Notification;
-                 *     o 1: Indication.
-                 */
-                uint8_t indication:1;
-            } notify_rx;
-
-            /**
-             * Represents a transmitted ATT notification or indication, or a
-             * completed indication transaction.
-             *
-             * Valid for the following event types:
-             *     o BLE_GAP_EVENT_NOTIFY_TX
-             */
-            struct {
-                /**
-                 * The status of the notification or indication transaction;
-                 *     o 0:                 Command successfully sent;
-                 *     o BLE_HS_EDONE:      Confirmation (indication ack) received;
-                 *     o BLE_HS_ETIMEOUT:   Confirmation (indication ack) never
-                 *                              received;
-                 *     o Other return code: Error.
-                 */
-                int status;
-
-                /** The handle of the relevant connection. */
-                uint16_t conn_handle;
-
-                /** The handle of the relevant characterstic value. */
-                uint16_t attr_handle;
-
-                /**
-                 * Whether the transmitted command is a notification or an
-                 * indication;
-                 *     o 0: Notification;
-                 *     o 1: Indication.
-                 */
-                uint8_t indication:1;
-            } notify_tx;
-
-            /**
-             * Represents a state change in a peer's subscription status.  In this
-             * comment, the term "update" is used to refer to either a notification
-             * or an indication.  This event is triggered by any of the following
-             * occurrences:
-             *     o Peer enables or disables updates via a CCCD write.
-             *     o Connection is about to be terminated and the peer is
-             *       subscribed to updates.
-             *     o Peer is now subscribed to updates after its state was restored
-             *       from persistence.  This happens when bonding is restored.
-             *
-             * Valid for the following event types:
-             *     o BLE_GAP_EVENT_SUBSCRIBE
-             */
-            struct {
-                /** The handle of the relevant connection. */
-                uint16_t conn_handle;
-
-                /** The value handle of the relevant characteristic. */
-                uint16_t attr_handle;
-
-                /** One of the BLE_GAP_SUBSCRIBE_REASON codes. */
-                uint8_t reason;
-
-                /** Whether the peer was previously subscribed to notifications. */
-                uint8_t prev_notify:1;
-
-                /** Whether the peer is currently subscribed to notifications. */
-                uint8_t cur_notify:1;
-
-                /** Whether the peer was previously subscribed to indications. */
-                uint8_t prev_indicate:1;
-
-                /** Whether the peer is currently subscribed to indications. */
-                uint8_t cur_indicate:1;
-            } subscribe;
-
-            /**
-             * Represents a change in an L2CAP channel's MTU.
-             *
-             * Valid for the following event types:
-             *     o BLE_GAP_EVENT_MTU
-             */
-            struct {
-                /** The handle of the relevant connection. */
-                uint16_t conn_handle;
-
-                /**
-                 * Indicates the channel whose MTU has been updated; either
-                 * BLE_L2CAP_CID_ATT or the ID of a connection-oriented channel.
-                 */
-                uint16_t channel_id;
-
-                /* The channel's new MTU. */
-                uint16_t value;
-            } mtu;
-
-            /**
-             * Represents a change in peer's identity. This is issued after
-             * successful pairing when Identity Address Information was received.
-             *
-             * Valid for the following event types:
-             *     o BLE_GAP_EVENT_IDENTITY_RESOLVED
-             */
-            struct {
-                /** The handle of the relevant connection. */
-                uint16_t conn_handle;
-            } identity_resolved;
-
-            /**
-             * Represents a peer's attempt to pair despite a bond already existing.
-             * The application has two options for handling this event type:
-             *     o Retry: Return BLE_GAP_REPEAT_PAIRING_RETRY after deleting the
-             *              conflicting bond.  The stack will verify the bond has
-             *              been deleted and continue the pairing procedure.  If
-             *              the bond is still present, this event will be reported
-             *              again.
-             *     o Ignore: Return BLE_GAP_REPEAT_PAIRING_IGNORE.  The stack will
-             *               silently ignore the pairing request.
-             *
-             * Valid for the following event types:
-             *     o BLE_GAP_EVENT_REPEAT_PAIRING
-             */
-            struct ble_gap_repeat_pairing repeat_pairing;
-
-            /**
-             * Represents a change of PHY. This is issue after successful
-             * change on PHY.
-             */
-            struct {
-                int status;
-                uint16_t conn_handle;
-
-                /**
-                 * Indicates enabled TX/RX PHY. Possible values:
-                 *     o BLE_GAP_LE_PHY_1M
-                 *     o BLE_GAP_LE_PHY_2M
-                 *     o BLE_GAP_LE_PHY_CODED
-                 */
-                uint8_t tx_phy;
-                uint8_t rx_phy;
-            } phy_updated;
-        };
-    };
-
-.. code:: c
-
-    #define BLE_GAP_CONN_MODE_NON               0
-    #define BLE_GAP_CONN_MODE_DIR               1
-    #define BLE_GAP_CONN_MODE_UND               2
-
-.. code:: c
-
-    #define BLE_GAP_DISC_MODE_NON               0
-    #define BLE_GAP_DISC_MODE_LTD               1
-    #define BLE_GAP_DISC_MODE_GEN               2
-
-.. code:: c
-
-    /*** Reason codes for the subscribe GAP event. */
-
-    /** Peer's CCCD subscription state changed due to a descriptor write. */
-    #define BLE_GAP_SUBSCRIBE_REASON_WRITE      1
-
-    /** Peer's CCCD subscription state cleared due to connection termination. */
-    #define BLE_GAP_SUBSCRIBE_REASON_TERM       2
-
-    /**
-     * Peer's CCCD subscription state changed due to restore from persistence
-     * (bonding restored).
-     */
-    #define BLE_GAP_SUBSCRIBE_REASON_RESTORE    3
-
-.. code:: c
-
-    struct ble_gap_sec_state {
-        unsigned encrypted:1;
-        unsigned authenticated:1;
-        unsigned bonded:1;
-        unsigned key_size:5;
-    };
-
-.. code:: c
-
-    /**
-     * conn_mode:                   One of the following constants:
-     *                                  o BLE_GAP_CONN_MODE_NON
-     *                                      (non-connectable; 3.C.9.3.2).
-     *                                  o BLE_GAP_CONN_MODE_DIR
-     *                                      (directed-connectable; 3.C.9.3.3).
-     *                                  o BLE_GAP_CONN_MODE_UND
-     *                                      (undirected-connectable; 3.C.9.3.4).
-     * disc_mode:                   One of the following constants:
-     *                                  o BLE_GAP_DISC_MODE_NON
-     *                                      (non-discoverable; 3.C.9.2.2).
-     *                                  o BLE_GAP_DISC_MODE_LTD
-     *                                      (limited-discoverable; 3.C.9.2.3).
-     *                                  o BLE_GAP_DISC_MODE_GEN
-     *                                      (general-discoverable; 3.C.9.2.4).
-     */
-    struct ble_gap_adv_params {
-        /*** Mandatory fields. */
-        uint8_t conn_mode;
-        uint8_t disc_mode;
-
-        /*** Optional fields; assign 0 to make the stack calculate them. */
-        uint16_t itvl_min;
-        uint16_t itvl_max;
-        uint8_t channel_map;
-        uint8_t filter_policy;
-        uint8_t high_duty_cycle:1;
-    };
-
-.. code:: c
-
-    #define BLE_GAP_ROLE_MASTER                 0
-    #define BLE_GAP_ROLE_SLAVE                  1
-
-.. code:: c
-
-    struct ble_gap_conn_desc {
-        struct ble_gap_sec_state sec_state;
-        ble_addr_t our_id_addr;
-        ble_addr_t peer_id_addr;
-        ble_addr_t our_ota_addr;
-        ble_addr_t peer_ota_addr;
-        uint16_t conn_handle;
-        uint16_t conn_itvl;
-        uint16_t conn_latency;
-        uint16_t supervision_timeout;
-        uint8_t role;
-        uint8_t master_clock_accuracy;
-    };
-
-.. code:: c
-
-
-    struct ble_gap_conn_params {
-        uint16_t scan_itvl;
-        uint16_t scan_window;
-        uint16_t itvl_min;
-        uint16_t itvl_max;
-        uint16_t latency;
-        uint16_t supervision_timeout;
-        uint16_t min_ce_len;
-        uint16_t max_ce_len;
-    };
-
-.. code:: c
-
-    struct ble_gap_ext_disc_params {
-        uint16_t itvl;
-        uint16_t window;
-        uint8_t passive:1;
-    };
-
-.. code:: c
-
-    struct ble_gap_disc_params {
-        uint16_t itvl;
-        uint16_t window;
-        uint8_t filter_policy;
-        uint8_t limited:1;
-        uint8_t passive:1;
-        uint8_t filter_duplicates:1;
-    };
-
-.. code:: c
-
-    struct ble_gap_upd_params {
-        uint16_t itvl_min;
-        uint16_t itvl_max;
-        uint16_t latency;
-        uint16_t supervision_timeout;
-        uint16_t min_ce_len;
-        uint16_t max_ce_len;
-    };
-
-.. code:: c
-
-    struct ble_gap_passkey_params {
-        uint8_t action;
-        uint32_t numcmp;
-    };
-
-.. code:: c
-
-    struct ble_gap_disc_desc {
-        /*** Common fields. */
-        uint8_t event_type;
-        uint8_t length_data;
-        ble_addr_t addr;
-        int8_t rssi;
-        uint8_t *data;
-
-        /***
-         * LE direct advertising report fields; direct_addr is BLE_ADDR_ANY if
-         * direct address fields are not present.
-         */
-        ble_addr_t direct_addr;
-    };
-
-.. code:: c
-
-    struct ble_gap_repeat_pairing {
-        /** The handle of the relevant connection. */
-        uint16_t conn_handle;
-
-        /** Properties of the existing bond. */
-        uint8_t cur_key_size;
-        uint8_t cur_authenticated:1;
-        uint8_t cur_sc:1;
-
-        /**
-         * Properties of the imminent secure link if the pairing procedure is
-         * allowed to continue.
-         */
-        uint8_t new_key_size;
-        uint8_t new_authenticated:1;
-        uint8_t new_sc:1;
-        uint8_t new_bonding:1;
-    };
-
-.. code:: c
-
-    struct ble_gap_disc_desc {
-        /*** Common fields. */
-        uint8_t event_type;
-        uint8_t length_data;
-        ble_addr_t addr;
-        int8_t rssi;
-        uint8_t *data;
-
-        /***
-         * LE direct advertising report fields; direct_addr is BLE_ADDR_ANY if
-         * direct address fields are not present.
-         */
-        ble_addr_t direct_addr;
-    };
-
-.. code:: c
-
-    struct ble_gap_repeat_pairing {
-        /** The handle of the relevant connection. */
-        uint16_t conn_handle;
-
-        /** Properties of the existing bond. */
-        uint8_t cur_key_size;
-        uint8_t cur_authenticated:1;
-        uint8_t cur_sc:1;
-
-        /**
-         * Properties of the imminent secure link if the pairing procedure is
-         * allowed to continue.
-         */
-        uint8_t new_key_size;
-        uint8_t new_authenticated:1;
-        uint8_t new_sc:1;
-        uint8_t new_bonding:1;
-    };
diff --git a/docs/network/ble/ble_hs/ble_gap/functions/ble_gap_adv_active.rst b/docs/network/ble/ble_hs/ble_gap/functions/ble_gap_adv_active.rst
deleted file mode 100644
index 13d36beb9..000000000
--- a/docs/network/ble/ble_hs/ble_gap/functions/ble_gap_adv_active.rst
+++ /dev/null
@@ -1,28 +0,0 @@
-ble\_gap\_adv\_active
----------------------
-
-.. code:: c
-
-    int
-    ble_gap_adv_active(void)
-
-Description
-~~~~~~~~~~~
-
-Indicates whether an advertisement procedure is currently in progress.
-
-Parameters
-~~~~~~~~~~
-
-None
-
-Returned values
-~~~~~~~~~~~~~~~
-
-+-----------+-------------------------------------------+
-| *Value*   | *Condition*                               |
-+===========+===========================================+
-| 0         | No advertisement procedure in progress.   |
-+-----------+-------------------------------------------+
-| 1         | Advertisement procedure in progress.      |
-+-----------+-------------------------------------------+
diff --git a/docs/network/ble/ble_hs/ble_gap/functions/ble_gap_adv_rsp_set_data.rst b/docs/network/ble/ble_hs/ble_gap/functions/ble_gap_adv_rsp_set_data.rst
deleted file mode 100644
index 5b3ed19ff..000000000
--- a/docs/network/ble/ble_hs/ble_gap/functions/ble_gap_adv_rsp_set_data.rst
+++ /dev/null
@@ -1,39 +0,0 @@
-ble\_gap\_adv\_rsp\_set\_data
------------------------------
-
-.. code:: c
-
-    int
-    ble_gap_adv_rsp_set_data(
-        const uint8_t *data,
-                  int  data_len
-    )
-
-Description
-~~~~~~~~~~~
-
-Configures the data to include in subsequent scan responses.
-
-Parameters
-~~~~~~~~~~
-
-+---------------+---------------------------------------------+
-| *Parameter*   | *Description*                               |
-+===============+=============================================+
-| data          | Buffer containing the scan response data.   |
-+---------------+---------------------------------------------+
-| data\_len     | The size of the response data, in bytes.    |
-+---------------+---------------------------------------------+
-
-Returned values
-~~~~~~~~~~~~~~~
-
-+-----------------------------------------------------------------------+-------------------------------+
-| *Value*                                                               | *Condition*                   |
-+=======================================================================+===============================+
-| 0                                                                     | Success.                      |
-+-----------------------------------------------------------------------+-------------------------------+
-| BLE\_HS\_EBUSY                                                        | Advertising is in progress.   |
-+-----------------------------------------------------------------------+-------------------------------+
-| `Core return code <../../ble_hs_return_codes/#return-codes-core>`__   | Unexpected error.             |
-+-----------------------------------------------------------------------+-------------------------------+
diff --git a/docs/network/ble/ble_hs/ble_gap/functions/ble_gap_adv_rsp_set_fields.rst b/docs/network/ble/ble_hs/ble_gap/functions/ble_gap_adv_rsp_set_fields.rst
deleted file mode 100644
index c4a87286d..000000000
--- a/docs/network/ble/ble_hs/ble_gap/functions/ble_gap_adv_rsp_set_fields.rst
+++ /dev/null
@@ -1,35 +0,0 @@
-ble\_gap\_adv\_rsp\_set\_fields
--------------------------------
-
-.. code:: c
-
-    int
-    ble_gap_adv_rsp_set_fields(const struct ble_hs_adv_fields *rsp_fields)
-
-Description
-~~~~~~~~~~~
-
-Configures the fields to include in subsequent scan responses. This is a
-convenience wrapper for ble\_gap\_adv\_rsp\_set\_data().
-
-Parameters
-~~~~~~~~~~
-
-+---------------+-------------------------------------+
-| *Parameter*   | *Description*                       |
-+===============+=====================================+
-| adv\_fields   | Specifies the scan response data.   |
-+---------------+-------------------------------------+
-
-Returned values
-~~~~~~~~~~~~~~~
-
-+-----------------------------------------------------------------------+-------------------------------+
-| *Value*                                                               | *Condition*                   |
-+=======================================================================+===============================+
-| 0                                                                     | Success.                      |
-+-----------------------------------------------------------------------+-------------------------------+
-| BLE\_HS\_EBUSY                                                        | Advertising is in progress.   |
-+-----------------------------------------------------------------------+-------------------------------+
-| `Core return code <../../ble_hs_return_codes/#return-codes-core>`__   | Unexpected error.             |
-+-----------------------------------------------------------------------+-------------------------------+
diff --git a/docs/network/ble/ble_hs/ble_gap/functions/ble_gap_adv_set_data.rst b/docs/network/ble/ble_hs/ble_gap/functions/ble_gap_adv_set_data.rst
deleted file mode 100644
index ac8823ac2..000000000
--- a/docs/network/ble/ble_hs/ble_gap/functions/ble_gap_adv_set_data.rst
+++ /dev/null
@@ -1,39 +0,0 @@
-ble\_gap\_adv\_set\_data
-------------------------
-
-.. code:: c
-
-    int
-    ble_gap_adv_set_data(
-        const uint8_t *data,
-                  int  data_len
-    )
-
-Description
-~~~~~~~~~~~
-
-Configures the data to include in subsequent advertisements.
-
-Parameters
-~~~~~~~~~~
-
-+---------------+-----------------------------------------------+
-| *Parameter*   | *Description*                                 |
-+===============+===============================================+
-| data          | Buffer containing the advertising data.       |
-+---------------+-----------------------------------------------+
-| data\_len     | The size of the advertising data, in bytes.   |
-+---------------+-----------------------------------------------+
-
-Returned values
-~~~~~~~~~~~~~~~
-
-+-----------------------------------------------------------------------+-------------------------------+
-| *Value*                                                               | *Condition*                   |
-+=======================================================================+===============================+
-| 0                                                                     | Success.                      |
-+-----------------------------------------------------------------------+-------------------------------+
-| BLE\_HS\_EBUSY                                                        | Advertising is in progress.   |
-+-----------------------------------------------------------------------+-------------------------------+
-| `Core return code <../../ble_hs_return_codes/#return-codes-core>`__   | Unexpected error.             |
-+-----------------------------------------------------------------------+-------------------------------+
diff --git a/docs/network/ble/ble_hs/ble_gap/functions/ble_gap_adv_set_fields.rst b/docs/network/ble/ble_hs/ble_gap/functions/ble_gap_adv_set_fields.rst
deleted file mode 100644
index ce4b2d523..000000000
--- a/docs/network/ble/ble_hs/ble_gap/functions/ble_gap_adv_set_fields.rst
+++ /dev/null
@@ -1,49 +0,0 @@
-ble\_gap\_adv\_set\_fields
---------------------------
-
-.. code:: c
-
-    int
-    ble_gap_adv_set_fields(const struct ble_hs_adv_fields *adv_fields)
-
-Description
-~~~~~~~~~~~
-
-Configures the fields to include in subsequent advertisements. This is a
-convenience wrapper for ble\_gap\_adv\_set\_data().
-
-Parameters
-~~~~~~~~~~
-
-+---------------+-------------------------------------+
-| *Parameter*   | *Description*                       |
-+===============+=====================================+
-| adv\_fields   | Specifies the advertisement data.   |
-+---------------+-------------------------------------+
-
-Returned values
-~~~~~~~~~~~~~~~
-
-+------------+----------------+
-| *Value*    | *Condition*    |
-+============+================+
-| 0          | Success.       |
-+------------+----------------+
-| BLE\_HS\_E | Advertising is |
-| BUSY       | in progress.   |
-+------------+----------------+
-| BLE\_HS\_E | The specified  |
-| MSGSIZE    | data is too    |
-|            | large to fit   |
-|            | in an          |
-|            | advertisement. |
-+------------+----------------+
-| `Core      | Unexpected     |
-| return     | error.         |
-| code <../. |                |
-| ./ble_hs_r |                |
-| eturn_code |                |
-| s/#return- |                |
-| codes-core |                |
-| >`__       |                |
-+------------+----------------+
diff --git a/docs/network/ble/ble_hs/ble_gap/functions/ble_gap_adv_set_phys.rst b/docs/network/ble/ble_hs/ble_gap/functions/ble_gap_adv_set_phys.rst
deleted file mode 100644
index c28a1b0f3..000000000
--- a/docs/network/ble/ble_hs/ble_gap/functions/ble_gap_adv_set_phys.rst
+++ /dev/null
@@ -1,107 +0,0 @@
-ble\_gap\_adv\_set\_phys [experimental] 
-----------------------------------------
-
-.. code:: c
-
-    int
-    ble_gap_adv_set_phys(uint8_t primary_phy, uint8_t secondary_phy)
-
-Description
-~~~~~~~~~~~
-
-Set primary and secondary PHYs for extended advertising procedure.
-
-Parameters
-~~~~~~~~~~
-
-None
-
-+---------------+-----------------+
-| *Parameter*   | *Description*   |
-+===============+=================+
-+---------------+-----------------+
-
-\| primary\_phy \| Primary PHY to use for extended advertising
-procedure.
-
-.. raw:: html
-
-   <ul>
-
-.. raw:: html
-
-   <li>
-
-BLE\_HCI\_LE\_1M
-
-.. raw:: html
-
-   </li>
-
-.. raw:: html
-
-   <li>
-
-BLE\_HCI\_LE\_CODED
-
-.. raw:: html
-
-   </li>
-
-.. raw:: html
-
-   </ul>
-
-\| \| secondary\_phy \| Secondary PHY to use for extended advertising
-procedure.
-
-.. raw:: html
-
-   <ul>
-
-.. raw:: html
-
-   <li>
-
-BLE\_HCI\_LE\_1M
-
-.. raw:: html
-
-   </li>
-
-.. raw:: html
-
-   <li>
-
-BLE\_HCI\_LE\_2M
-
-.. raw:: html
-
-   </li>
-
-.. raw:: html
-
-   <li>
-
-BLE\_HCI\_LE\_CODED
-
-.. raw:: html
-
-   </li>
-
-.. raw:: html
-
-   </ul>
-
-\|
-
-Returned values
-~~~~~~~~~~~~~~~
-
-+-----------------------------------------------------------------------+---------------------+
-| *Value*                                                               | *Condition*         |
-+=======================================================================+=====================+
-| 0                                                                     | Success.            |
-+-----------------------------------------------------------------------+---------------------+
-| `Core return code <../../ble_hs_return_codes/#return-codes-core>`__   | Unexpected error.   |
-+-----------------------------------------------------------------------+---------------------+
diff --git a/docs/network/ble/ble_hs/ble_gap/functions/ble_gap_adv_set_tx_power.rst b/docs/network/ble/ble_hs/ble_gap/functions/ble_gap_adv_set_tx_power.rst
deleted file mode 100644
index 26c08cab8..000000000
--- a/docs/network/ble/ble_hs/ble_gap/functions/ble_gap_adv_set_tx_power.rst
+++ /dev/null
@@ -1,34 +0,0 @@
-ble\_gap\_adv\_set\_tx\_power [experimental] 
----------------------------------------------
-
-.. code:: c
-
-    int
-    ble_gap_adv_set_tx_power(int8_t  tx_power)
-
-Description
-~~~~~~~~~~~
-
-Set Tx Power level for extended advertising procedure.
-
-Parameters
-~~~~~~~~~~
-
-None
-
-+---------------+-------------------------------------------------------------+
-| *Parameter*   | *Description*                                               |
-+===============+=============================================================+
-| tx\_power     | Tx Power level to use for extended advertising procedure.   |
-+---------------+-------------------------------------------------------------+
-
-Returned values
-~~~~~~~~~~~~~~~
-
-+-----------------------------------------------------------------------+---------------------+
-| *Value*                                                               | *Condition*         |
-+=======================================================================+=====================+
-| 0                                                                     | Success.            |
-+-----------------------------------------------------------------------+---------------------+
-| `Core return code <../../ble_hs_return_codes/#return-codes-core>`__   | Unexpected error.   |
-+-----------------------------------------------------------------------+---------------------+
diff --git a/docs/network/ble/ble_hs/ble_gap/functions/ble_gap_adv_start.rst b/docs/network/ble/ble_hs/ble_gap/functions/ble_gap_adv_start.rst
deleted file mode 100644
index 308e4283e..000000000
--- a/docs/network/ble/ble_hs/ble_gap/functions/ble_gap_adv_start.rst
+++ /dev/null
@@ -1,102 +0,0 @@
-ble\_gap\_adv\_start
---------------------
-
-.. code:: c
-
-    int
-    ble_gap_adv_start(
-                                uint8_t  own_addr_type,
-                       const ble_addr_t *direct_addr,
-                                int32_t  duration_ms,
-        const struct ble_gap_adv_params *adv_params,
-                       ble_gap_event_fn *cb,
-                                   void *cb_arg
-    )
-
-Description
-~~~~~~~~~~~
-
-Initiates advertising.
-
-Parameters
-~~~~~~~~~~
-
-+---------------+-----------------+
-| *Parameter*   | *Description*   |
-+===============+=================+
-+---------------+-----------------+
-
-\| own\_addr\_type \| The type of address the stack should use for
-itself. Valid values are:
-
-.. raw:: html
-
-   <ul>
-
-.. raw:: html
-
-   <li>
-
-BLE\_OWN\_ADDR\_PUBLIC
-
-.. raw:: html
-
-   </li>
-
-.. raw:: html
-
-   <li>
-
-BLE\_OWN\_ADDR\_RANDOM
-
-.. raw:: html
-
-   </li>
-
-.. raw:: html
-
-   <li>
-
-BLE\_OWN\_ADDR\_RPA\_PUBLIC\_DEFAULT
-
-.. raw:: html
-
-   </li>
-
-.. raw:: html
-
-   <li>
-
-BLE\_OWN\_ADDR\_RPA\_RANDOM\_DEFAULT
-
-.. raw:: html
-
-   </li>
-
-.. raw:: html
-
-   </ul>
-
-\| \| direct\_addr \| The peer's address for directed advertising. This
-parameter shall be non-NULL if directed advertising is being used. \| \|
-duration\_ms \| The duration of the advertisement procedure. On
-expiration, the procedure ends and a BLE\_GAP\_EVENT\_ADV\_COMPLETE
-event is reported. Units are milliseconds. Specify BLE\_HS\_FOREVER for
-no expiration. \| \| adv\_params \| Additional arguments specifying the
-particulars of the advertising procedure. \| \| cb \| The callback to
-associate with this advertising procedure. If advertising ends, the
-event is reported through this callback. If advertising results in a
-connection, the connection inherits this callback as its event-reporting
-mechanism. \| \| cb\_arg \| The optional argument to pass to the
-callback function. \|
-
-Returned values
-~~~~~~~~~~~~~~~
-
-+-----------------------------------------------------------------------+---------------------+
-| *Value*                                                               | *Condition*         |
-+=======================================================================+=====================+
-| 0                                                                     | Success.            |
-+-----------------------------------------------------------------------+---------------------+
-| `Core return code <../../ble_hs_return_codes/#return-codes-core>`__   | Unexpected error.   |
-+-----------------------------------------------------------------------+---------------------+
diff --git a/docs/network/ble/ble_hs/ble_gap/functions/ble_gap_adv_stop.rst b/docs/network/ble/ble_hs/ble_gap/functions/ble_gap_adv_stop.rst
deleted file mode 100644
index 1b7bff4ff..000000000
--- a/docs/network/ble/ble_hs/ble_gap/functions/ble_gap_adv_stop.rst
+++ /dev/null
@@ -1,32 +0,0 @@
-ble\_gap\_adv\_stop
--------------------
-
-.. code:: c
-
-    int
-    ble_gap_adv_stop(void)
-
-Description
-~~~~~~~~~~~
-
-Stops the currently-active advertising procedure. A success return code
-indicates that advertising has been fully aborted; a new advertising
-procedure can be initiated immediately.
-
-Parameters
-~~~~~~~~~~
-
-None
-
-Returned values
-~~~~~~~~~~~~~~~
-
-+-----------------------------------------------------------------------+---------------------------------------------+
-| *Value*                                                               | *Condition*                                 |
-+=======================================================================+=============================================+
-| 0                                                                     | Success.                                    |
-+-----------------------------------------------------------------------+---------------------------------------------+
-| BLE\_HS\_EALREADY                                                     | There is no active advertising procedure.   |
-+-----------------------------------------------------------------------+---------------------------------------------+
-| `Core return code <../../ble_hs_return_codes/#return-codes-core>`__   | Unexpected error.                           |
-+-----------------------------------------------------------------------+---------------------------------------------+
diff --git a/docs/network/ble/ble_hs/ble_gap/functions/ble_gap_conn_active.rst b/docs/network/ble/ble_hs/ble_gap/functions/ble_gap_conn_active.rst
deleted file mode 100644
index e38269a2c..000000000
--- a/docs/network/ble/ble_hs/ble_gap/functions/ble_gap_conn_active.rst
+++ /dev/null
@@ -1,28 +0,0 @@
-ble\_gap\_conn\_active
-----------------------
-
-.. code:: c
-
-    int
-    ble_gap_conn_active(void)
-
-Description
-~~~~~~~~~~~
-
-Indicates whether a connect procedure is currently in progress.
-
-Parameters
-~~~~~~~~~~
-
-None
-
-Returned values
-~~~~~~~~~~~~~~~
-
-+-----------+-------------------------------------+
-| *Value*   | *Condition*                         |
-+===========+=====================================+
-| 0         | No connect procedure in progress.   |
-+-----------+-------------------------------------+
-| 1         | Connect procedure in progress.      |
-+-----------+-------------------------------------+
diff --git a/docs/network/ble/ble_hs/ble_gap/functions/ble_gap_conn_cancel.rst b/docs/network/ble/ble_hs/ble_gap/functions/ble_gap_conn_cancel.rst
deleted file mode 100644
index b4d2385b0..000000000
--- a/docs/network/ble/ble_hs/ble_gap/functions/ble_gap_conn_cancel.rst
+++ /dev/null
@@ -1,28 +0,0 @@
-ble\_gap\_conn\_cancel
-----------------------
-
-.. code:: c
-
-    int
-    ble_gap_conn_cancel(void)
-
-Description
-~~~~~~~~~~~
-
-Aborts a connect procedure in progress.
-
-Parameters
-~~~~~~~~~~
-
-None
-
-Returned values
-~~~~~~~~~~~~~~~
-
-+-----------------------------------------------------------------------+---------------------+
-| *Value*                                                               | *Condition*         |
-+=======================================================================+=====================+
-| 0                                                                     | Success.            |
-+-----------------------------------------------------------------------+---------------------+
-| `Core return code <../../ble_hs_return_codes/#return-codes-core>`__   | Unexpected error.   |
-+-----------------------------------------------------------------------+---------------------+
diff --git a/docs/network/ble/ble_hs/ble_gap/functions/ble_gap_conn_find.rst b/docs/network/ble/ble_hs/ble_gap/functions/ble_gap_conn_find.rst
deleted file mode 100644
index 37015dccb..000000000
--- a/docs/network/ble/ble_hs/ble_gap/functions/ble_gap_conn_find.rst
+++ /dev/null
@@ -1,49 +0,0 @@
-ble\_gap\_conn\_find
---------------------
-
-.. code:: c
-
-    int
-    ble_gap_conn_find(
-                        uint16_t  handle,
-        struct ble_gap_conn_desc *out_desc
-    )
-
-Description
-~~~~~~~~~~~
-
-Searches for a connection with the specified handle. If a matching
-connection is found, the supplied connection descriptor is filled
-correspondingly.
-
-Parameters
-~~~~~~~~~~
-
-+----------------+------------------+
-| *Parameter*    | *Description*    |
-+================+==================+
-| handle         | The connection   |
-|                | handle to search |
-|                | for.             |
-+----------------+------------------+
-| out\_desc      | On success, this |
-|                | is populated     |
-|                | with information |
-|                | relating to the  |
-|                | matching         |
-|                | connection. Pass |
-|                | NULL if you      |
-|                | don't need this  |
-|                | information.     |
-+----------------+------------------+
-
-Returned values
-~~~~~~~~~~~~~~~
-
-+---------------------+-------------------------------------+
-| *Value*             | *Condition*                         |
-+=====================+=====================================+
-| 0                   | Success.                            |
-+---------------------+-------------------------------------+
-| BLE\_HS\_ENOTCONN   | No matching connection was found.   |
-+---------------------+-------------------------------------+
diff --git a/docs/network/ble/ble_hs/ble_gap/functions/ble_gap_conn_rssi.rst b/docs/network/ble/ble_hs/ble_gap/functions/ble_gap_conn_rssi.rst
deleted file mode 100644
index 6132a23b7..000000000
--- a/docs/network/ble/ble_hs/ble_gap/functions/ble_gap_conn_rssi.rst
+++ /dev/null
@@ -1,40 +0,0 @@
-ble\_gap\_conn\_rssi
---------------------
-
-.. code:: c
-
-    int
-    ble_gap_conn_rssi(
-        uint16_t  conn_handle,
-          int8_t *out_rssi
-    )
-
-Description
-~~~~~~~~~~~
-
-Retrieves the most-recently measured RSSI for the specified connection.
-A connection's RSSI is updated whenever a data channel PDU is received.
-
-Parameters
-~~~~~~~~~~
-
-+----------------+---------------------------------------------------+
-| *Parameter*    | *Description*                                     |
-+================+===================================================+
-| conn\_handle   | Specifies the connection to query.                |
-+----------------+---------------------------------------------------+
-| out\_rssi      | On success, the retrieved RSSI is written here.   |
-+----------------+---------------------------------------------------+
-
-Returned values
-~~~~~~~~~~~~~~~
-
-+-----------------------------------------------------------------------+----------------------------------------+
-| *Value*                                                               | *Condition*                            |
-+=======================================================================+========================================+
-| 0                                                                     | Success.                               |
-+-----------------------------------------------------------------------+----------------------------------------+
-| `HCI return code <../../ble_hs_return_codes/#return-codes-hci>`__     | The controller rejected the request.   |
-+-----------------------------------------------------------------------+----------------------------------------+
-| `Core return code <../../ble_hs_return_codes/#return-codes-core>`__   | Unexpected error.                      |
-+-----------------------------------------------------------------------+----------------------------------------+
diff --git a/docs/network/ble/ble_hs/ble_gap/functions/ble_gap_connect.rst b/docs/network/ble/ble_hs/ble_gap/functions/ble_gap_connect.rst
deleted file mode 100644
index 7a6cacb7b..000000000
--- a/docs/network/ble/ble_hs/ble_gap/functions/ble_gap_connect.rst
+++ /dev/null
@@ -1,125 +0,0 @@
-ble\_gap\_connect
------------------
-
-.. code:: c
-
-    int
-    ble_gap_connect(
-                                 uint8_t  own_addr_type,
-                        const ble_addr_t *peer_addr,
-                                 int32_t  duration_ms,
-        const struct ble_gap_conn_params *conn_params,
-                        ble_gap_event_fn *cb,
-                                    void *cb_arg
-    )
-
-Description
-~~~~~~~~~~~
-
-Initiates a connect procedure.
-
-Parameters
-~~~~~~~~~~
-
-+---------------+-----------------+
-| *Parameter*   | *Description*   |
-+===============+=================+
-+---------------+-----------------+
-
-\| own\_addr\_type \| The type of address the stack should use for
-itself during connection establishment.
-
-.. raw:: html
-
-   <ul>
-
-.. raw:: html
-
-   <li>
-
-BLE\_OWN\_ADDR\_PUBLIC
-
-.. raw:: html
-
-   </li>
-
-.. raw:: html
-
-   <li>
-
-BLE\_OWN\_ADDR\_RANDOM
-
-.. raw:: html
-
-   </li>
-
-.. raw:: html
-
-   <li>
-
-BLE\_OWN\_ADDR\_RPA\_PUBLIC\_DEFAULT
-
-.. raw:: html
-
-   </li>
-
-.. raw:: html
-
-   <li>
-
-BLE\_OWN\_ADDR\_RPA\_RANDOM\_DEFAULT
-
-.. raw:: html
-
-   </li>
-
-.. raw:: html
-
-   </ul>
-
-\| \| peer\_addr \| The address of the peer to connect to. If this
-parameter is NULL, the white list is used. \| \| duration\_ms \| The
-duration of the discovery procedure. On expiration, the procedure ends
-and a BLE\_GAP\_EVENT\_DISC\_COMPLETE event is reported. Units are
-milliseconds. \| \| conn\_params \| Additional arguments specifying the
-particulars of the connect procedure. Specify null for default values.
-\| \| cb \| The callback to associate with this connect procedure. When
-the connect procedure completes, the result is reported through this
-callback. If the connect procedure succeeds, the connection inherits
-this callback as its event-reporting mechanism. \| \| cb\_arg \| The
-optional argument to pass to the callback function. \|
-
-Returned values
-~~~~~~~~~~~~~~~
-
-+------------+----------------+
-| *Value*    | *Condition*    |
-+============+================+
-| 0          | Success.       |
-+------------+----------------+
-| BLE\_HS\_E | A connection   |
-| ALREADY    | attempt is     |
-|            | already in     |
-|            | progress.      |
-+------------+----------------+
-| BLE\_HS\_E | Initiating a   |
-| BUSY       | connection is  |
-|            | not possible   |
-|            | because        |
-|            | scanning is in |
-|            | progress.      |
-+------------+----------------+
-| BLE\_HS\_E | The specified  |
-| DONE       | peer is        |
-|            | already        |
-|            | connected.     |
-+------------+----------------+
-| `Core      | Unexpected     |
-| return     | error.         |
-| code <../. |                |
-| ./ble_hs_r |                |
-| eturn_code |                |
-| s/#return- |                |
-| codes-core |                |
-| >`__       |                |
-+------------+----------------+
diff --git a/docs/network/ble/ble_hs/ble_gap/functions/ble_gap_disc.rst b/docs/network/ble/ble_hs/ble_gap/functions/ble_gap_disc.rst
deleted file mode 100644
index 95ad43451..000000000
--- a/docs/network/ble/ble_hs/ble_gap/functions/ble_gap_disc.rst
+++ /dev/null
@@ -1,98 +0,0 @@
-ble\_gap\_disc
---------------
-
-.. code:: c
-
-    int
-    ble_gap_disc(
-                                 uint8_t  own_addr_type,
-                                 int32_t  duration_ms,
-        const struct ble_gap_disc_params *disc_params,
-                        ble_gap_event_fn *cb,
-                                    void *cb_arg
-    )
-
-Description
-~~~~~~~~~~~
-
-Performs the Limited or General Discovery Procedures.
-
-Parameters
-~~~~~~~~~~
-
-+---------------+-----------------+
-| *Parameter*   | *Description*   |
-+===============+=================+
-+---------------+-----------------+
-
-\| own\_addr\_type \| The type of address the stack should use for
-itself when sending scan requests. Valid values are:
-
-.. raw:: html
-
-   <ul>
-
-.. raw:: html
-
-   <li>
-
-BLE\_ADDR\_TYPE\_PUBLIC
-
-.. raw:: html
-
-   </li>
-
-.. raw:: html
-
-   <li>
-
-BLE\_ADDR\_TYPE\_RANDOM
-
-.. raw:: html
-
-   </li>
-
-.. raw:: html
-
-   <li>
-
-BLE\_ADDR\_TYPE\_RPA\_PUB\_DEFAULT
-
-.. raw:: html
-
-   </li>
-
-.. raw:: html
-
-   <li>
-
-BLE\_ADDR\_TYPE\_RPA\_RND\_DEFAULT
-
-.. raw:: html
-
-   </li>
-
-.. raw:: html
-
-   </ul>
-
-This parameter is ignored unless active scanning is being used. \| \|
-duration\_ms \| The duration of the discovery procedure. On expiration,
-the procedure ends and a BLE\_GAP\_EVENT\_DISC\_COMPLETE event is
-reported. Units are milliseconds. Specify BLE\_HS\_FOREVER for no
-expiration. \| \| disc\_params \| Additional arguments specifying the
-particulars of the discovery procedure. \| \| cb \| The callback to
-associate with this discovery procedure. Advertising reports and
-discovery termination events are reported through this callback. \| \|
-cb\_arg \| The optional argument to pass to the callback function. \|
-
-Returned values
-~~~~~~~~~~~~~~~
-
-+-----------------------------------------------------------------------+---------------------+
-| *Value*                                                               | *Condition*         |
-+=======================================================================+=====================+
-| 0                                                                     | Success.            |
-+-----------------------------------------------------------------------+---------------------+
-| `Core return code <../../ble_hs_return_codes/#return-codes-core>`__   | Unexpected error.   |
-+-----------------------------------------------------------------------+---------------------+
diff --git a/docs/network/ble/ble_hs/ble_gap/functions/ble_gap_disc_active.rst b/docs/network/ble/ble_hs/ble_gap/functions/ble_gap_disc_active.rst
deleted file mode 100644
index f094983a0..000000000
--- a/docs/network/ble/ble_hs/ble_gap/functions/ble_gap_disc_active.rst
+++ /dev/null
@@ -1,28 +0,0 @@
-ble\_gap\_disc\_active
-----------------------
-
-.. code:: c
-
-    int
-    ble_gap_disc_active(void)
-
-Description
-~~~~~~~~~~~
-
-Indicates whether a discovery procedure is currently in progress.
-
-Parameters
-~~~~~~~~~~
-
-None
-
-Returned values
-~~~~~~~~~~~~~~~
-
-+-----------+---------------------------------------+
-| *Value*   | *Condition*                           |
-+===========+=======================================+
-| 0         | No discovery procedure in progress.   |
-+-----------+---------------------------------------+
-| 1         | Discovery procedure in progress.      |
-+-----------+---------------------------------------+
diff --git a/docs/network/ble/ble_hs/ble_gap/functions/ble_gap_disc_cancel.rst b/docs/network/ble/ble_hs/ble_gap/functions/ble_gap_disc_cancel.rst
deleted file mode 100644
index b739da50f..000000000
--- a/docs/network/ble/ble_hs/ble_gap/functions/ble_gap_disc_cancel.rst
+++ /dev/null
@@ -1,32 +0,0 @@
-ble\_gap\_disc\_cancel
-----------------------
-
-.. code:: c
-
-    int
-    ble_gap_disc_cancel(void)
-
-Description
-~~~~~~~~~~~
-
-Cancels the discovery procedure currently in progress. A success return
-code indicates that scanning has been fully aborted; a new discovery or
-connect procedure can be initiated immediately.
-
-Parameters
-~~~~~~~~~~
-
-None
-
-Returned values
-~~~~~~~~~~~~~~~
-
-+-----------------------------------------------------------------------+----------------------------------------------+
-| *Value*                                                               | *Condition*                                  |
-+=======================================================================+==============================================+
-| 0                                                                     | Success.                                     |
-+-----------------------------------------------------------------------+----------------------------------------------+
-| BLE\_HS\_EALREADY                                                     | There is no discovery procedure to cancel.   |
-+-----------------------------------------------------------------------+----------------------------------------------+
-| `Core return code <../../ble_hs_return_codes/#return-codes-core>`__   | Unexpected error.                            |
-+-----------------------------------------------------------------------+----------------------------------------------+
diff --git a/docs/network/ble/ble_hs/ble_gap/functions/ble_gap_ext_connect.rst b/docs/network/ble/ble_hs/ble_gap/functions/ble_gap_ext_connect.rst
deleted file mode 100644
index 90ab0318e..000000000
--- a/docs/network/ble/ble_hs/ble_gap/functions/ble_gap_ext_connect.rst
+++ /dev/null
@@ -1,114 +0,0 @@
-ble\_gap\_ext\_connect [experimental] 
---------------------------------------
-
-.. code:: c
-
-    int
-    ble_gap_ext_connect(
-                                 uint8_t  own_addr_type,
-                        const ble_addr_t  *peer_addr,
-                                 int32_t  duration_ms,
-                                 uint8_t  phy_mask,
-        const struct ble_gap_conn_params  *phy_1m_conn_params,
-        const struct ble_gap_conn_params  *phy_2m_conn_params,
-        const struct ble_gap_conn_params  *phy_coded_conn_params,
-                        ble_gap_event_fn  *cb,
-                                    void  *cb_arg
-    )
-
-Description
-~~~~~~~~~~~
-
-Initiates a connect procedure.
-
-Parameters
-~~~~~~~~~~
-
-+---------------+-----------------+
-| *Parameter*   | *Description*   |
-+===============+=================+
-+---------------+-----------------+
-
-\| own\_addr\_type \| The type of address the stack should use for
-itself during connection establishment.
-
-.. raw:: html
-
-   <ul>
-
-.. raw:: html
-
-   <li>
-
-BLE\_ADDR\_TYPE\_PUBLIC
-
-.. raw:: html
-
-   </li>
-
-.. raw:: html
-
-   <li>
-
-BLE\_ADDR\_TYPE\_RANDOM
-
-.. raw:: html
-
-   </li>
-
-.. raw:: html
-
-   <li>
-
-BLE\_ADDR\_TYPE\_RPA\_PUB\_DEFAULT
-
-.. raw:: html
-
-   </li>
-
-.. raw:: html
-
-   <li>
-
-BLE\_ADDR\_TYPE\_RPA\_RND\_DEFAULT
-
-.. raw:: html
-
-   </li>
-
-.. raw:: html
-
-   </ul>
-
-\| \| peer\_addr \| The identity address of the peer to connect to.
-White list is used when this parameters is set to NULL. \| \|
-duration\_ms \| The duration of the discovery procedure. On expiration,
-the procedure ends and a BLE\_GAP\_EVENT\_DISC\_COMPLETE event is
-reported. Units are milliseconds. \| \| phy\_mask \| Define on which
-PHYs connection attempt should be done \| \| phy\_1m\_conn\_params \|
-Additional arguments specifying the particulars of the connect
-procedure. When BLE\_GAP\_LE\_PHY\_1M\_MASK is set in phy\_mask this
-parameter can be specify to null for default values. \| \|
-phy\_2m\_conn\_params \| Additional arguments specifying the particulars
-of the connect procedure. When BLE\_GAP\_LE\_PHY\_2M\_MASK is set in
-phy\_mask this parameter can be specify to null for default values. \|
-\| phy\_coded\_conn\_params \| Additional arguments specifying the
-particulars of the connect procedure. When
-BLE\_GAP\_LE\_PHY\_CODED\_MASK is set in phy\_mask this parameter can be
-specify to null for default values. \| \| cb \| The callback to
-associate with this connect procedure. When the connect procedure
-completes, the result is reported through this callback. If the connect
-procedure succeeds, the connection inherits this callback as its
-event-reporting mechanism. \| \| cb\_arg \| The optional argument to
-pass to the callback function. \|
-
-Returned values
-~~~~~~~~~~~~~~~
-
-+-----------------------------------------------------------------------+---------------------+
-| *Value*                                                               | *Condition*         |
-+=======================================================================+=====================+
-| 0                                                                     | Success.            |
-+-----------------------------------------------------------------------+---------------------+
-| `Core return code <../../ble_hs_return_codes/#return-codes-core>`__   | Unexpected error.   |
-+-----------------------------------------------------------------------+---------------------+
diff --git a/docs/network/ble/ble_hs/ble_gap/functions/ble_gap_ext_disc.rst b/docs/network/ble/ble_hs/ble_gap/functions/ble_gap_ext_disc.rst
deleted file mode 100644
index 42d5c69f1..000000000
--- a/docs/network/ble/ble_hs/ble_gap/functions/ble_gap_ext_disc.rst
+++ /dev/null
@@ -1,111 +0,0 @@
-ble\_gap\_ext\_disc   [experimental] 
------------------------------------
-
-.. code:: c
-
-    int
-    ble_gap_ext_disc(
-                                     uint8_t  own_addr_type,
-                                    uint16_t  duration,
-                                    uint16_t  period,
-                                     uint8_t  filter_duplicates,
-                                     uint8_t  filter_policy,
-                                     uint8_t  limited,
-        const struct ble_gap_ext_disc_params  *uncoded_params,
-        const struct ble_gap_ext_disc_params  *coded_params
-            const struct ble_gap_disc_params  *disc_params,
-                            ble_gap_event_fn  *cb,
-                                        void  *cb_arg
-    )
-
-Description
-~~~~~~~~~~~
-
-Performs the Limited or General Discovery Procedures.
-
-Parameters
-~~~~~~~~~~
-
-+---------------+-----------------+
-| *Parameter*   | *Description*   |
-+===============+=================+
-+---------------+-----------------+
-
-\| own\_addr\_type \| The type of address the stack should use for
-itself when sending scan requests. Valid values are:
-
-.. raw:: html
-
-   <ul>
-
-.. raw:: html
-
-   <li>
-
-BLE\_ADDR\_TYPE\_PUBLIC
-
-.. raw:: html
-
-   </li>
-
-.. raw:: html
-
-   <li>
-
-BLE\_ADDR\_TYPE\_RANDOM
-
-.. raw:: html
-
-   </li>
-
-.. raw:: html
-
-   <li>
-
-BLE\_ADDR\_TYPE\_RPA\_PUB\_DEFAULT
-
-.. raw:: html
-
-   </li>
-
-.. raw:: html
-
-   <li>
-
-BLE\_ADDR\_TYPE\_RPA\_RND\_DEFAULT
-
-.. raw:: html
-
-   </li>
-
-.. raw:: html
-
-   </ul>
-
-This parameter is ignored unless active scanning is being used. \| \|
-duration \| The duration of the discovery procedure. On expiration, the
-procedure ends and a BLE\_GAP\_EVENT\_DISC\_COMPLETE event is reported.
-Unit is 10ms. Specify 0 for no expiration. \| \| period \| Time interval
-between each scan (valid when duration non-zero). \| \|
-filter\_duplicates \| Filter duplicates flag. \| \| filter\_policy \|
-Filter policy as specified by Bluetooth specification. \| \| limited \|
-Enables limited discovery. \| \| uncoded\_params \| Additional arguments
-specifying the particulars of the discovery procedure for uncoded PHY.
-Specify NULL if discovery is not needed on uncoded PHY \| \|
-coded\_params \| Additional arguments specifying the particulars of the
-discovery procedure for coded PHY. Specify NULL if discovery os not
-needed on coded PHY \| \| cb \| The callback to associate with this
-discovery procedure. Advertising reports and discovery termination
-events are reported through this callback. \| \| cb\_arg \| The optional
-argument to pass to the callback function. \|
-
-Returned values
-~~~~~~~~~~~~~~~
-
-+-----------------------------------------------------------------------+---------------------+
-| *Value*                                                               | *Condition*         |
-+=======================================================================+=====================+
-| 0                                                                     | Success.            |
-+-----------------------------------------------------------------------+---------------------+
-| `Core return code <../../ble_hs_return_codes/#return-codes-core>`__   | Unexpected error.   |
-+-----------------------------------------------------------------------+---------------------+
diff --git a/docs/network/ble/ble_hs/ble_gap/functions/ble_gap_read_le_phy.rst b/docs/network/ble/ble_hs/ble_gap/functions/ble_gap_read_le_phy.rst
deleted file mode 100644
index 3ed9bd86c..000000000
--- a/docs/network/ble/ble_hs/ble_gap/functions/ble_gap_read_le_phy.rst
+++ /dev/null
@@ -1,122 +0,0 @@
-ble\_gap\_read\_le\_phy
------------------------
-
-.. code:: c
-
-    int
-    ble_gap_read_le_phy(
-            uint16_t conn_handle,
-             uint8_t *tx_phy,
-             uint8_t *rx_phy
-    )
-
-Description
-~~~~~~~~~~~
-
-Read PHY on given connection.
-
-Parameters
-~~~~~~~~~~
-
-+----------------+------------------+
-| *Parameter*    | *Description*    |
-+================+==================+
-| conn\_handle   | The handle       |
-|                | corresponding to |
-|                | the connection   |
-|                | to on which PHY  |
-|                | is read.         |
-+----------------+------------------+
-
-\| tx\_phy \| Tx PHY. One of:
-
-.. raw:: html
-
-   <ul>
-
-.. raw:: html
-
-   <li>
-
-BLE\_GAP\_LE\_PHY\_1M
-
-.. raw:: html
-
-   </li>
-
-.. raw:: html
-
-   <li>
-
-BLE\_GAP\_LE\_PHY\_2M
-
-.. raw:: html
-
-   </li>
-
-.. raw:: html
-
-   <li>
-
-BLE\_GAP\_LE\_PHY\_CODED
-
-.. raw:: html
-
-   </li>
-
-.. raw:: html
-
-   </ul>
-
-\| \| rx\_phy \| Rx PHY. One of:
-
-.. raw:: html
-
-   <ul>
-
-.. raw:: html
-
-   <li>
-
-BLE\_GAP\_LE\_PHY\_1M
-
-.. raw:: html
-
-   </li>
-
-.. raw:: html
-
-   <li>
-
-BLE\_GAP\_LE\_PHY\_2M
-
-.. raw:: html
-
-   </li>
-
-.. raw:: html
-
-   <li>
-
-BLE\_GAP\_LE\_PHY\_CODED
-
-.. raw:: html
-
-   </li>
-
-.. raw:: html
-
-   </ul>
-
-\|
-
-Returned values
-~~~~~~~~~~~~~~~
-
-+-----------------------------------------------------------------------+---------------------+
-| *Value*                                                               | *Condition*         |
-+=======================================================================+=====================+
-| 0                                                                     | Success.            |
-+-----------------------------------------------------------------------+---------------------+
-| `Core return code <../../ble_hs_return_codes/#return-codes-core>`__   | Unexpected error.   |
-+-----------------------------------------------------------------------+---------------------+
diff --git a/docs/network/ble/ble_hs/ble_gap/functions/ble_gap_security_initiate.rst b/docs/network/ble/ble_hs/ble_gap/functions/ble_gap_security_initiate.rst
deleted file mode 100644
index 731c3129c..000000000
--- a/docs/network/ble/ble_hs/ble_gap/functions/ble_gap_security_initiate.rst
+++ /dev/null
@@ -1,52 +0,0 @@
-ble\_gap\_security\_initiate
-----------------------------
-
-.. code:: c
-
-    int
-    ble_gap_security_initiate(uint16_t conn_handle)
-
-Description
-~~~~~~~~~~~
-
-Initiates the GAP encryption procedure.
-
-Parameters
-~~~~~~~~~~
-
-+----------------+----------------------------------------------------------+
-| *Parameter*    | *Description*                                            |
-+================+==========================================================+
-| conn\_handle   | The handle corresponding to the connection to encrypt.   |
-+----------------+----------------------------------------------------------+
-
-Returned values
-~~~~~~~~~~~~~~~
-
-+------------+----------------+
-| *Value*    | *Condition*    |
-+============+================+
-| 0          | Success.       |
-+------------+----------------+
-| BLE\_HS\_E | The there is   |
-| NOTCONN    | no connection  |
-|            | with the       |
-|            | specified      |
-|            | handle.        |
-+------------+----------------+
-| BLE\_HS\_E | An encrpytion  |
-| ALREADY    | procedure for  |
-|            | this           |
-|            | connection is  |
-|            | already in     |
-|            | progress.      |
-+------------+----------------+
-| `Core      | Unexpected     |
-| return     | error.         |
-| code <../. |                |
-| ./ble_hs_r |                |
-| eturn_code |                |
-| s/#return- |                |
-| codes-core |                |
-| >`__       |                |
-+------------+----------------+
diff --git a/docs/network/ble/ble_hs/ble_gap/functions/ble_gap_set_event_cb.rst b/docs/network/ble/ble_hs/ble_gap/functions/ble_gap_set_event_cb.rst
deleted file mode 100644
index 251bfa516..000000000
--- a/docs/network/ble/ble_hs/ble_gap/functions/ble_gap_set_event_cb.rst
+++ /dev/null
@@ -1,43 +0,0 @@
-ble\_gap\_set\_event\_cb
-------------------------
-
-.. code:: c
-
-    int
-    ble_gap_set_event_cb(
-                uint16_t  conn_handle,
-        ble_gap_event_fn *cb,
-                    void *cb_arg
-    )
-
-Description
-~~~~~~~~~~~
-
-Configures a connection to use the specified GAP event callback. A
-connection's GAP event callback is first specified when the connection
-is created, either via advertising or initiation. This function replaces
-the callback that was last configured.
-
-Parameters
-~~~~~~~~~~
-
-+----------------+----------------------------------------------------+
-| *Parameter*    | *Description*                                      |
-+================+====================================================+
-| conn\_handle   | The handle of the connection to configure.         |
-+----------------+----------------------------------------------------+
-| cb             | The callback to associate with the connection.     |
-+----------------+----------------------------------------------------+
-| cb\_arg        | An optional argument that the callback receives.   |
-+----------------+----------------------------------------------------+
-
-Returned values
-~~~~~~~~~~~~~~~
-
-+---------------------+-----------------------------------------------------+
-| *Value*             | *Condition*                                         |
-+=====================+=====================================================+
-| 0                   | Success.                                            |
-+---------------------+-----------------------------------------------------+
-| BLE\_HS\_ENOTCONN   | There is no connection with the specified handle.   |
-+---------------------+-----------------------------------------------------+
diff --git a/docs/network/ble/ble_hs/ble_gap/functions/ble_gap_set_prefered_default_le_phy.rst b/docs/network/ble/ble_hs/ble_gap/functions/ble_gap_set_prefered_default_le_phy.rst
deleted file mode 100644
index 9edc0d98d..000000000
--- a/docs/network/ble/ble_hs/ble_gap/functions/ble_gap_set_prefered_default_le_phy.rst
+++ /dev/null
@@ -1,116 +0,0 @@
-ble\_gap\_set\_prefered\_default\_le\_phy
------------------------------------------
-
-.. code:: c
-
-    int
-    ble_gap_set_prefered_default_le_phy(
-                uint8_t tx_phys_mask,
-                uint8_t rx_phys_mask
-    )
-
-Description
-~~~~~~~~~~~
-
-Set prefered default LE PHY mask. It is used for new connections.
-
-Parameters
-~~~~~~~~~~
-
-+---------------+-----------------+
-| *Parameter*   | *Description*   |
-+===============+=================+
-+---------------+-----------------+
-
-\| tx\_phys\_mask \| Prefered tx PHY mask is a bit mask of:
-
-.. raw:: html
-
-   <ul>
-
-.. raw:: html
-
-   <li>
-
-BLE\_GAP\_LE\_PHY\_1M\_MASK
-
-.. raw:: html
-
-   </li>
-
-.. raw:: html
-
-   <li>
-
-BLE\_GAP\_LE\_PHY\_2M\_MASK
-
-.. raw:: html
-
-   </li>
-
-.. raw:: html
-
-   <li>
-
-BLE\_GAP\_LE\_PHY\_CODED\_MASK
-
-.. raw:: html
-
-   </li>
-
-.. raw:: html
-
-   </ul>
-
-\| \| rx\_phys\_mask \| Prefered rx PHY mask is a bit mask of:
-
-.. raw:: html
-
-   <ul>
-
-.. raw:: html
-
-   <li>
-
-BLE\_GAP\_LE\_PHY\_1M\_MASK
-
-.. raw:: html
-
-   </li>
-
-.. raw:: html
-
-   <li>
-
-BLE\_GAP\_LE\_PHY\_2M\_MASK
-
-.. raw:: html
-
-   </li>
-
-.. raw:: html
-
-   <li>
-
-BLE\_GAP\_LE\_PHY\_CODED\_MASK
-
-.. raw:: html
-
-   </li>
-
-.. raw:: html
-
-   </ul>
-
-\|
-
-Returned values
-~~~~~~~~~~~~~~~
-
-+-----------------------------------------------------------------------+---------------------+
-| *Value*                                                               | *Condition*         |
-+=======================================================================+=====================+
-| 0                                                                     | Success.            |
-+-----------------------------------------------------------------------+---------------------+
-| `Core return code <../../ble_hs_return_codes/#return-codes-core>`__   | Unexpected error.   |
-+-----------------------------------------------------------------------+---------------------+
diff --git a/docs/network/ble/ble_hs/ble_gap/functions/ble_gap_set_prefered_le_phy.rst b/docs/network/ble/ble_hs/ble_gap/functions/ble_gap_set_prefered_le_phy.rst
deleted file mode 100644
index 6e91f715b..000000000
--- a/docs/network/ble/ble_hs/ble_gap/functions/ble_gap_set_prefered_le_phy.rst
+++ /dev/null
@@ -1,161 +0,0 @@
-ble\_gap\_set\_prefered\_le\_phy
---------------------------------
-
-.. code:: c
-
-    int
-    ble_gap_set_prefered_le_phy(
-                uint16_t conn_handle,
-                 uint8_t tx_phys_mask,
-                 uint8_t rx_phys_mask,
-                 uint16_t phy_opts
-    )
-
-Description
-~~~~~~~~~~~
-
-Set prefered LE PHY mask for given connection.
-
-Parameters
-~~~~~~~~~~
-
-+----------------+------------------+
-| *Parameter*    | *Description*    |
-+================+==================+
-| conn\_handle   | The handle       |
-|                | corresponding to |
-|                | the connection   |
-|                | where new PHY    |
-|                | mask should be   |
-|                | applied.         |
-+----------------+------------------+
-
-\| tx\_phys\_mask \| Prefered tx PHY mask is a bit mask of:
-
-.. raw:: html
-
-   <ul>
-
-.. raw:: html
-
-   <li>
-
-BLE\_GAP\_LE\_PHY\_1M\_MASK
-
-.. raw:: html
-
-   </li>
-
-.. raw:: html
-
-   <li>
-
-BLE\_GAP\_LE\_PHY\_2M\_MASK
-
-.. raw:: html
-
-   </li>
-
-.. raw:: html
-
-   <li>
-
-BLE\_GAP\_LE\_PHY\_CODED\_MASK
-
-.. raw:: html
-
-   </li>
-
-.. raw:: html
-
-   </ul>
-
-\| \| rx\_phys\_mask \| Prefered rx PHY mask is a bit mask of:
-
-.. raw:: html
-
-   <ul>
-
-.. raw:: html
-
-   <li>
-
-BLE\_GAP\_LE\_PHY\_1M\_MASK
-
-.. raw:: html
-
-   </li>
-
-.. raw:: html
-
-   <li>
-
-BLE\_GAP\_LE\_PHY\_2M\_MASK
-
-.. raw:: html
-
-   </li>
-
-.. raw:: html
-
-   <li>
-
-BLE\_GAP\_LE\_PHY\_CODED\_MASK
-
-.. raw:: html
-
-   </li>
-
-.. raw:: html
-
-   </ul>
-
-\| \| phy\_opts \| PHY options for coded PHY. One of:
-
-.. raw:: html
-
-   <ul>
-
-.. raw:: html
-
-   <li>
-
-BLE\_GAP\_LE\_PHY\_CODED\_ANY
-
-.. raw:: html
-
-   </li>
-
-.. raw:: html
-
-   <li>
-
-BLE\_GAP\_LE\_PHY\_CODED\_S2
-
-.. raw:: html
-
-   </li>
-
-.. raw:: html
-
-   <li>
-
-BLE\_GAP\_LE\_PHY\_CODED\_S8
-
-.. raw:: html
-
-   </li>
-
-.. raw:: html
-
-   </ul>
-
-\| ### Returned values
-
-+-----------------------------------------------------------------------+---------------------+
-| *Value*                                                               | *Condition*         |
-+=======================================================================+=====================+
-| 0                                                                     | Success.            |
-+-----------------------------------------------------------------------+---------------------+
-| `Core return code <../../ble_hs_return_codes/#return-codes-core>`__   | Unexpected error.   |
-+-----------------------------------------------------------------------+---------------------+
diff --git a/docs/network/ble/ble_hs/ble_gap/functions/ble_gap_set_priv_mode.rst b/docs/network/ble/ble_hs/ble_gap/functions/ble_gap_set_priv_mode.rst
deleted file mode 100644
index 739a4d5b1..000000000
--- a/docs/network/ble/ble_hs/ble_gap/functions/ble_gap_set_priv_mode.rst
+++ /dev/null
@@ -1,78 +0,0 @@
-ble\_gap\_set\_priv\_mode
--------------------------
-
-.. code:: c
-
-    int
-    ble_gap_set_priv_mode(
-            const ble_addr_t *peer_addr,
-                     uint8_t  priv_mode
-    )
-
-Description
-~~~~~~~~~~~
-
-Set privacy mode for given device.
-
-If device mode is used, then Nimble accepts both the peer's identity
-address and a resolvable private address.
-
-If network mode is used, then Nimble accepts only resolvable private
-address.
-
-Parameters
-~~~~~~~~~~
-
-+----------------+------------------+
-| *Parameter*    | *Description*    |
-+================+==================+
-| peer\_addr     | The identity     |
-|                | address of the   |
-|                | peer for which   |
-|                | privacy mode     |
-|                | shall be         |
-|                | changed.         |
-+----------------+------------------+
-
-\| priv\_mode \| The privacy mode. One of:
-
-.. raw:: html
-
-   <ul>
-
-.. raw:: html
-
-   <li>
-
-BLE\_GAP\_PRIVATE\_MODE\_NETWORK
-
-.. raw:: html
-
-   </li>
-
-.. raw:: html
-
-   <li>
-
-BLE\_GAP\_PRIVATE\_MODE\_DEVICE
-
-.. raw:: html
-
-   </li>
-
-.. raw:: html
-
-   </ul>
-
-\|
-
-Returned values
-~~~~~~~~~~~~~~~
-
-+-----------------------------------------------------------------------+---------------------+
-| *Value*                                                               | *Condition*         |
-+=======================================================================+=====================+
-| 0                                                                     | Success.            |
-+-----------------------------------------------------------------------+---------------------+
-| `Core return code <../../ble_hs_return_codes/#return-codes-core>`__   | Unexpected error.   |
-+-----------------------------------------------------------------------+---------------------+
diff --git a/docs/network/ble/ble_hs/ble_gap/functions/ble_gap_terminate.rst b/docs/network/ble/ble_hs/ble_gap/functions/ble_gap_terminate.rst
deleted file mode 100644
index ac95b84bc..000000000
--- a/docs/network/ble/ble_hs/ble_gap/functions/ble_gap_terminate.rst
+++ /dev/null
@@ -1,39 +0,0 @@
-ble\_gap\_terminate
--------------------
-
-.. code:: c
-
-    int
-    ble_gap_terminate(
-        uint16_t conn_handle,
-         uint8_t hci_reason
-    )
-
-Description
-~~~~~~~~~~~
-
-Terminates an established connection.
-
-Parameters
-~~~~~~~~~~
-
-+----------------+-----------------------------------------------------------------+
-| *Parameter*    | *Description*                                                   |
-+================+=================================================================+
-| conn\_handle   | The handle corresponding to the connection to terminate.        |
-+----------------+-----------------------------------------------------------------+
-| hci\_reason    | The HCI error code to indicate as the reason for termination.   |
-+----------------+-----------------------------------------------------------------+
-
-Returned values
-~~~~~~~~~~~~~~~
-
-+-----------------------------------------------------------------------+-----------------------------------------------------+
-| *Value*                                                               | *Condition*                                         |
-+=======================================================================+=====================================================+
-| 0                                                                     | Success.                                            |
-+-----------------------------------------------------------------------+-----------------------------------------------------+
-| BLE\_HS\_ENOTCONN                                                     | There is no connection with the specified handle.   |
-+-----------------------------------------------------------------------+-----------------------------------------------------+
-| `Core return code <../../ble_hs_return_codes/#return-codes-core>`__   | Unexpected error.                                   |
-+-----------------------------------------------------------------------+-----------------------------------------------------+
diff --git a/docs/network/ble/ble_hs/ble_gap/functions/ble_gap_update_params.rst b/docs/network/ble/ble_hs/ble_gap/functions/ble_gap_update_params.rst
deleted file mode 100644
index 42db1b4e3..000000000
--- a/docs/network/ble/ble_hs/ble_gap/functions/ble_gap_update_params.rst
+++ /dev/null
@@ -1,62 +0,0 @@
-ble\_gap\_update\_params
-------------------------
-
-.. code:: c
-
-    int
-    ble_gap_update_params(
-                               uint16_t  conn_handle,
-        const struct ble_gap_upd_params *params
-    )
-
-Description
-~~~~~~~~~~~
-
-Initiates a connection parameter update procedure.
-
-Parameters
-~~~~~~~~~~
-
-+----------------+---------------------------------------------------------+
-| *Parameter*    | *Description*                                           |
-+================+=========================================================+
-| conn\_handle   | The handle corresponding to the connection to update.   |
-+----------------+---------------------------------------------------------+
-| params         | The connection parameters to attempt to update to.      |
-+----------------+---------------------------------------------------------+
-
-Returned values
-~~~~~~~~~~~~~~~
-
-+------------+----------------+
-| *Value*    | *Condition*    |
-+============+================+
-| 0          | Success.       |
-+------------+----------------+
-| BLE\_HS\_E | The there is   |
-| NOTCONN    | no connection  |
-|            | with the       |
-|            | specified      |
-|            | handle.        |
-+------------+----------------+
-| BLE\_HS\_E | A connection   |
-| ALREADY    | update         |
-|            | procedure for  |
-|            | this           |
-|            | connection is  |
-|            | already in     |
-|            | progress.      |
-+------------+----------------+
-| BLE\_HS\_E | Requested      |
-| INVAL      | parameters are |
-|            | invalid.       |
-+------------+----------------+
-| `Core      | Unexpected     |
-| return     | error.         |
-| code <../. |                |
-| ./ble_hs_r |                |
-| eturn_code |                |
-| s/#return- |                |
-| codes-core |                |
-| >`__       |                |
-+------------+----------------+
diff --git a/docs/network/ble/ble_hs/ble_gap/functions/ble_gap_wl_set.rst b/docs/network/ble/ble_hs/ble_gap/functions/ble_gap_wl_set.rst
deleted file mode 100644
index fe300a3b9..000000000
--- a/docs/network/ble/ble_hs/ble_gap/functions/ble_gap_wl_set.rst
+++ /dev/null
@@ -1,37 +0,0 @@
-ble\_gap\_wl\_set
------------------
-
-.. code:: c
-
-    int
-    ble_gap_wl_set(
-        const ble_addr_t *addrs,
-                 uint8_t  white_list_count
-    )
-
-Description
-~~~~~~~~~~~
-
-Overwrites the controller's white list with the specified contents.
-
-Parameters
-~~~~~~~~~~
-
-+----------------------+--------------------------------------------+
-| *Parameter*          | *Description*                              |
-+======================+============================================+
-| addrs                | The entries to write to the white list.    |
-+----------------------+--------------------------------------------+
-| white\_list\_count   | The number of entries in the white list.   |
-+----------------------+--------------------------------------------+
-
-Returned values
-~~~~~~~~~~~~~~~
-
-+-----------------------------------------------------------------------+---------------------+
-| *Value*                                                               | *Condition*         |
-+=======================================================================+=====================+
-| 0                                                                     | Success.            |
-+-----------------------------------------------------------------------+---------------------+
-| `Core return code <../../ble_hs_return_codes/#return-codes-core>`__   | Unexpected error.   |
-+-----------------------------------------------------------------------+---------------------+
diff --git a/docs/network/ble/ble_hs/ble_gap/mdtoc.rst b/docs/network/ble/ble_hs/ble_gap/mdtoc.rst
deleted file mode 100644
index 68e017684..000000000
--- a/docs/network/ble/ble_hs/ble_gap/mdtoc.rst
+++ /dev/null
@@ -1,28 +0,0 @@
-::
-
-            - 'GAP':
-                - toc: 'network/ble/ble_hs/ble_gap/ble_gap.md'
-                - 'Definitions':
-                    - 'GAP definitions': 'network/ble/ble_hs/ble_gap/definitions/ble_gap_defs.md'
-                - 'Functions':
-                    - 'ble_gap_adv_active': 'network/ble/ble_hs/ble_gap/functions/ble_gap_adv_active.md'
-                    - 'ble_gap_adv_rsp_set_data': 'network/ble/ble_hs/ble_gap/functions/ble_gap_adv_rsp_set_data.md'
-                    - 'ble_gap_adv_rsp_set_fields': 'network/ble/ble_hs/ble_gap/functions/ble_gap_adv_rsp_set_fields.md'
-                    - 'ble_gap_adv_set_data': 'network/ble/ble_hs/ble_gap/functions/ble_gap_adv_set_data.md'
-                    - 'ble_gap_adv_set_fields': 'network/ble/ble_hs/ble_gap/functions/ble_gap_adv_set_fields.md'
-                    - 'ble_gap_adv_set_phys': 'network/ble/ble_hs/ble_gap/functions/ble_gap_adv_set_phys.md'
-                    - 'ble_gap_adv_start': 'network/ble/ble_hs/ble_gap/functions/ble_gap_adv_start.md'
-                    - 'ble_gap_adv_stop': 'network/ble/ble_hs/ble_gap/functions/ble_gap_adv_stop.md'
-                    - 'ble_gap_conn_active': 'network/ble/ble_hs/ble_gap/functions/ble_gap_conn_active.md'
-                    - 'ble_gap_conn_cancel': 'network/ble/ble_hs/ble_gap/functions/ble_gap_conn_cancel.md'
-                    - 'ble_gap_conn_find': 'network/ble/ble_hs/ble_gap/functions/ble_gap_conn_find.md'
-                    - 'ble_gap_conn_rssi': 'network/ble/ble_hs/ble_gap/functions/ble_gap_conn_rssi.md'
-                    - 'ble_gap_connect': 'network/ble/ble_hs/ble_gap/functions/ble_gap_connect.md'
-                    - 'ble_gap_disc': 'network/ble/ble_hs/ble_gap/functions/ble_gap_disc.md'
-                    - 'ble_gap_disc_active': 'network/ble/ble_hs/ble_gap/functions/ble_gap_disc_active.md'
-                    - 'ble_gap_disc_cancel': 'network/ble/ble_hs/ble_gap/functions/ble_gap_disc_cancel.md'
-                    - 'ble_gap_security_initiate': 'network/ble/ble_hs/ble_gap/functions/ble_gap_security_initiate.md'
-                    - 'ble_gap_set_event_cb': 'network/ble/ble_hs/ble_gap/functions/ble_gap_set_event_cb.md'
-                    - 'ble_gap_terminate': 'network/ble/ble_hs/ble_gap/functions/ble_gap_terminate.md'
-                    - 'ble_gap_update_params': 'network/ble/ble_hs/ble_gap/functions/ble_gap_update_params.md'
-                    - 'ble_gap_wl_set': 'network/ble/ble_hs/ble_gap/functions/ble_gap_wl_set.md'
diff --git a/docs/network/ble/ble_hs/ble_gattc.rst b/docs/network/ble/ble_hs/ble_gattc.rst
new file mode 100644
index 000000000..3ed1fc0ad
--- /dev/null
+++ b/docs/network/ble/ble_hs/ble_gattc.rst
@@ -0,0 +1,15 @@
+NimBLE Host GATT Client Reference
+---------------------------------
+
+Introduction
+~~~~~~~~~~~~
+
+The Generic Attribute Profile (GATT) manages all activities involving services, characteristics, and descriptors. The
+client half of the GATT API initiates GATT procedures.
+
+Header
+~~~~~~
+
+.. code-block:: cpp
+
+    #include "host/ble_hs.h"
diff --git a/docs/network/ble/ble_hs/ble_gattc/ble_gattc.rst b/docs/network/ble/ble_hs/ble_gattc/ble_gattc.rst
deleted file mode 100644
index 54bb28ce9..000000000
--- a/docs/network/ble/ble_hs/ble_gattc/ble_gattc.rst
+++ /dev/null
@@ -1,188 +0,0 @@
-NimBLE Host GATT Client Reference
----------------------------------
-
-Introduction
-~~~~~~~~~~~~
-
-The Generic Attribute Profile (GATT) manages all activities involving
-services, characteristics, and descriptors. The client half of the GATT
-API initiates GATT procedures.
-
-Header
-~~~~~~
-
-.. code:: c
-
-    #include "host/ble_hs.h"
-
-Definitions
-~~~~~~~~~~~
-
-`BLE host GATT client definitions <definitions/ble_gattc_defs.html>`__
-
-Functions
-~~~~~~~~~
-
-+-------------+----------------+
-| Function    | Description    |
-+=============+================+
-| `ble\_gattc | Initiates GATT |
-| \_disc\_all | procedure:     |
-| \_chrs <fun | Discover All   |
-| ctions/ble_ | Characteristic |
-| gattc_disc_ | s              |
-| all_chrs.md | of a Service.  |
-| >`__        |                |
-+-------------+----------------+
-| `ble\_gattc | Initiates GATT |
-| \_disc\_all | procedure:     |
-| \_dscs <fun | Discover All   |
-| ctions/ble_ | Characteristic |
-| gattc_disc_ | Descriptors.   |
-| all_dscs.md |                |
-| >`__        |                |
-+-------------+----------------+
-| `ble\_gattc | Initiates GATT |
-| \_disc\_all | procedure:     |
-| \_svcs <fun | Discover All   |
-| ctions/ble_ | Primary        |
-| gattc_disc_ | Services.      |
-| all_svcs.md |                |
-| >`__        |                |
-+-------------+----------------+
-| `ble\_gattc | Initiates GATT |
-| \_disc\_chr | procedure:     |
-| s\_by\_uuid | Discover       |
-|  <functions | Characteristic |
-| /ble_gattc_ | s              |
-| disc_chrs_b | by UUID.       |
-| y_uuid.html>` |                |
-| __          |                |
-+-------------+----------------+
-| `ble\_gattc | Initiates GATT |
-| \_disc\_svc | procedure:     |
-| \_by\_uuid  | Discover       |
-| <functions/ | Primary        |
-| ble_gattc_d | Service by     |
-| isc_svc_by_ | Service UUID.  |
-| uuid.html>`__ |                |
-+-------------+----------------+
-| `ble\_gattc | Initiates GATT |
-| \_exchange\ | procedure:     |
-| _mtu <funct | Exchange MTU.  |
-| ions/ble_ga |                |
-| ttc_exchang |                |
-| e_mtu.html>`_ |                |
-| _           |                |
-+-------------+----------------+
-| `ble\_gattc | Initiates GATT |
-| \_find\_inc | procedure:     |
-| \_svcs <fun | Find Included  |
-| ctions/ble_ | Services.      |
-| gattc_find_ |                |
-| inc_svcs.md |                |
-| >`__        |                |
-+-------------+----------------+
-| `ble\_gattc | Sends a        |
-| \_indicate  | characteristic |
-| <functions/ | indication.    |
-| ble_gattc_i |                |
-| ndicate.html> |                |
-| `__         |                |
-+-------------+----------------+
-| `ble\_gattc | Sends a        |
-| \_indicate\ | characteristic |
-| _custom <fu | indication.    |
-| nctions/ble |                |
-| _gattc_indi |                |
-| cate_custom |                |
-| .html>`__     |                |
-+-------------+----------------+
-| `ble\_gattc | Sends a        |
-| \_notify <f | characteristic |
-| unctions/bl | notification.  |
-| e_gattc_not |                |
-| ify.html>`__  |                |
-+-------------+----------------+
-| `ble\_gattc | Sends a        |
-| \_notify\_c | "free-form"    |
-| ustom <func | characteristic |
-| tions/ble_g | notification.  |
-| attc_notify |                |
-| _custom.html> |                |
-| `__         |                |
-+-------------+----------------+
-| `ble\_gattc | Initiates GATT |
-| \_read <fun | procedure:     |
-| ctions/ble_ | Read           |
-| gattc_read. | Characteristic |
-| md>`__      | Value.         |
-+-------------+----------------+
-| `ble\_gattc | Initiates GATT |
-| \_read\_by\ | procedure:     |
-| _uuid <func | Read Using     |
-| tions/ble_g | Characteristic |
-| attc_read_b | UUID.          |
-| y_uuid.html>` |                |
-| __          |                |
-+-------------+----------------+
-| `ble\_gattc | Initiates GATT |
-| \_read\_lon | procedure:     |
-| g <function | Read Long      |
-| s/ble_gattc | Characteristic |
-| _read_long. | Values.        |
-| md>`__      |                |
-+-------------+----------------+
-| `ble\_gattc | Initiates GATT |
-| \_read\_mul | procedure:     |
-| t <function | Read Multiple  |
-| s/ble_gattc | Characteristic |
-| _read_mult. | Values.        |
-| md>`__      |                |
-+-------------+----------------+
-| `ble\_gattc | Initiates GATT |
-| \_write <fu | procedure:     |
-| nctions/ble | Write          |
-| _gattc_writ | Characteristic |
-| e.html>`__    | Value.         |
-+-------------+----------------+
-| `ble\_gattc | Initiates GATT |
-| \_write\_fl | procedure:     |
-| at <functio | Write          |
-| ns/ble_gatt | Characteristic |
-| c_write_fla | Value (flat    |
-| t.html>`__    | buffer         |
-|             | version).      |
-+-------------+----------------+
-| `ble\_gattc | Initiates GATT |
-| \_write\_lo | procedure:     |
-| ng <functio | Write Long     |
-| ns/ble_gatt | Characteristic |
-| c_write_lon | Values.        |
-| g.html>`__    |                |
-+-------------+----------------+
-| `ble\_gattc | Initiates GATT |
-| \_write\_no | procedure:     |
-| \_rsp <func | Write Without  |
-| tions/ble_g | Response.      |
-| attc_write_ |                |
-| no_rsp.html>` |                |
-| __          |                |
-+-------------+----------------+
-| `ble\_gattc | Initiates GATT |
-| \_write\_no | procedure:     |
-| \_rsp\_flat | Write Without  |
-|  <functions | Response.      |
-| /ble_gattc_ |                |
-| write_no_rs |                |
-| p_flat.html>` |                |
-| __          |                |
-+-------------+----------------+
-| `ble\_gattc | Initiates GATT |
-| \_write\_re | procedure:     |
-| liable <fun | Reliable       |
-| ctions/ble_ | Writes.        |
-| gattc_write |                |
-| _reliable.m |                |
-| d>`__       |                |
-+-------------+----------------+
diff --git a/docs/network/ble/ble_hs/ble_gattc/definitions/ble_gattc_defs.rst b/docs/network/ble/ble_hs/ble_gattc/definitions/ble_gattc_defs.rst
deleted file mode 100644
index 25c3274d9..000000000
--- a/docs/network/ble/ble_hs/ble_gattc/definitions/ble_gattc_defs.rst
+++ /dev/null
@@ -1,92 +0,0 @@
-GATT Client Definitions
------------------------
-
-.. code:: c
-
-    struct ble_gatt_error {
-        uint16_t status;
-        uint16_t att_handle;
-    };
-
-.. code:: c
-
-    struct ble_gatt_svc {
-        uint16_t start_handle;
-        uint16_t end_handle;
-        ble_uuid_any_t uuid;
-    };
-
-.. code:: c
-
-    struct ble_gatt_attr {
-        uint16_t handle;
-        uint16_t offset;
-        struct os_mbuf *om;
-    };
-
-.. code:: c
-
-    struct ble_gatt_chr {
-        uint16_t def_handle;
-        uint16_t val_handle;
-        uint8_t properties;
-        ble_uuid_any_t uuid;
-    };
-
-.. code:: c
-
-    struct ble_gatt_dsc {
-        uint16_t handle;
-        ble_uuid_any_t uuid;
-    };
-
-.. code:: c
-
-    typedef int ble_gatt_mtu_fn(uint16_t conn_handle,
-                                const struct ble_gatt_error *error,
-                                uint16_t mtu, void *arg);
-
-.. code:: c
-
-    typedef int ble_gatt_disc_svc_fn(uint16_t conn_handle,
-                                     const struct ble_gatt_error *error,
-                                     const struct ble_gatt_svc *service,
-                                     void *arg);
-
-.. code:: c
-
-    /**
-     * The host will free the attribute mbuf automatically after the callback is
-     * executed.  The application can take ownership of the mbuf and prevent it
-     * from being freed by assigning NULL to attr->om.
-     */
-    typedef int ble_gatt_attr_fn(uint16_t conn_handle,
-                                 const struct ble_gatt_error *error,
-                                 struct ble_gatt_attr *attr,
-                                 void *arg);
-
-.. code:: c
-
-    /**
-     * The host will free the attribute mbufs automatically after the callback is
-     * executed.  The application can take ownership of the mbufs and prevent them
-     * from being freed by assigning NULL to each attribute's om field.
-     */
-    typedef int ble_gatt_reliable_attr_fn(uint16_t conn_handle,
-                                          const struct ble_gatt_error *error,
-                                          struct ble_gatt_attr *attrs,
-                                          uint8_t num_attrs, void *arg);
-
-.. code:: c
-
-    typedef int ble_gatt_chr_fn(uint16_t conn_handle,
-                                const struct ble_gatt_error *error,
-                                const struct ble_gatt_chr *chr, void *arg);
-
-.. code:: c
-
-    typedef int ble_gatt_dsc_fn(uint16_t conn_handle,
-                                const struct ble_gatt_error *error,
-                                uint16_t chr_def_handle,
-                                const struct ble_gatt_dsc *dsc,
-                                void *arg);
diff --git a/docs/network/ble/ble_hs/ble_gattc/functions/ble_gattc_disc_all_chrs.rst b/docs/network/ble/ble_hs/ble_gattc/functions/ble_gattc_disc_all_chrs.rst
deleted file mode 100644
index d119d49cd..000000000
--- a/docs/network/ble/ble_hs/ble_gattc/functions/ble_gattc_disc_all_chrs.rst
+++ /dev/null
@@ -1,65 +0,0 @@
-ble\_gattc\_disc\_all\_chrs
----------------------------
-
-.. code:: c
-
-    int
-    ble_gattc_disc_all_chrs(
-               uint16_t  conn_handle,
-               uint16_t  start_handle,
-               uint16_t  end_handle,
-        ble_gatt_chr_fn *cb,
-                   void *cb_arg
-    )
-
-Description
-~~~~~~~~~~~
-
-Initiates GATT procedure: Discover All Characteristics of a Service.
-
-Parameters
-~~~~~~~~~~
-
-+----------------+------------------+
-| *Parameter*    | *Description*    |
-+================+==================+
-| conn\_handle   | The connection   |
-|                | over which to    |
-|                | execute the      |
-|                | procedure.       |
-+----------------+------------------+
-| start\_handle  | The handle to    |
-|                | begin the search |
-|                | at (generally    |
-|                | the service      |
-|                | definition       |
-|                | handle).         |
-+----------------+------------------+
-| end\_handle    | The handle to    |
-|                | end the search   |
-|                | at (generally    |
-|                | the last handle  |
-|                | in the service). |
-+----------------+------------------+
-| cb             | The function to  |
-|                | call to report   |
-|                | procedure status |
-|                | updates; null    |
-|                | for no callback. |
-+----------------+------------------+
-| cb\_arg        | The optional     |
-|                | argument to pass |
-|                | to the callback  |
-|                | function.        |
-+----------------+------------------+
-
-Returned values
-~~~~~~~~~~~~~~~
-
-+-----------------------------------------------------------------------+---------------------+
-| *Value*                                                               | *Condition*         |
-+=======================================================================+=====================+
-| 0                                                                     | Success.            |
-+-----------------------------------------------------------------------+---------------------+
-| `Core return code <../../ble_hs_return_codes/#return-codes-core>`__   | Unexpected error.   |
-+-----------------------------------------------------------------------+---------------------+
diff --git a/docs/network/ble/ble_hs/ble_gattc/functions/ble_gattc_disc_all_dscs.rst b/docs/network/ble/ble_hs/ble_gattc/functions/ble_gattc_disc_all_dscs.rst
deleted file mode 100644
index 9706437fc..000000000
--- a/docs/network/ble/ble_hs/ble_gattc/functions/ble_gattc_disc_all_dscs.rst
+++ /dev/null
@@ -1,62 +0,0 @@
-ble\_gattc\_disc\_all\_dscs
----------------------------
-
-.. code:: c
-
-    int
-    ble_gattc_disc_all_dscs(
-               uint16_t  conn_handle,
-               uint16_t  start_handle,
-               uint16_t  end_handle,
-        ble_gatt_dsc_fn *cb,
-                   void *cb_arg
-    )
-
-Description
-~~~~~~~~~~~
-
-Initiates GATT procedure: Discover All Characteristic Descriptors.
-
-Parameters
-~~~~~~~~~~
-
-+----------------+------------------+
-| *Parameter*    | *Description*    |
-+================+==================+
-| conn\_handle   | The connection   |
-|                | over which to    |
-|                | execute the      |
-|                | procedure.       |
-+----------------+------------------+
-| chr\_val\_hand | The handle of    |
-| le             | the              |
-|                | characteristic   |
-|                | value attribute. |
-+----------------+------------------+
-| chr\_end\_hand | The last handle  |
-| le             | in the           |
-|                | characteristic   |
-|                | definition.      |
-+----------------+------------------+
-| cb             | The function to  |
-|                | call to report   |
-|                | procedure status |
-|                | updates; null    |
-|                | for no callback. |
-+----------------+------------------+
-| cb\_arg        | The optional     |
-|                | argument to pass |
-|                | to the callback  |
-|                | function.        |
-+----------------+------------------+
-
-Returned values
-~~~~~~~~~~~~~~~
-
-+-----------------------------------------------------------------------+---------------------+
-| *Value*                                                               | *Condition*         |
-+=======================================================================+=====================+
-| 0                                                                     | Success.            |
-+-----------------------------------------------------------------------+---------------------+
-| `Core return code <../../ble_hs_return_codes/#return-codes-core>`__   | Unexpected error.   |
-+-----------------------------------------------------------------------+---------------------+
diff --git a/docs/network/ble/ble_hs/ble_gattc/functions/ble_gattc_disc_all_svcs.rst b/docs/network/ble/ble_hs/ble_gattc/functions/ble_gattc_disc_all_svcs.rst
deleted file mode 100644
index 0b9b22f62..000000000
--- a/docs/network/ble/ble_hs/ble_gattc/functions/ble_gattc_disc_all_svcs.rst
+++ /dev/null
@@ -1,44 +0,0 @@
-ble\_gattc\_disc\_all\_svcs
----------------------------
-
-.. code:: c
-
-    int
-    ble_gattc_disc_all_svcs(
-                    uint16_t  conn_handle,
-        ble_gatt_disc_svc_fn *cb,
-                        void *cb_arg
-    )
-
-Description
-~~~~~~~~~~~
-
-Initiates GATT procedure: Discover All Primary Services.
-
-Parameters
-~~~~~~~~~~
-
-+----------------+------------------+
-| *Parameter*    | *Description*    |
-+================+==================+
-| conn\_handle   | The connection   |
-|                | over which to    |
-|                | execute the      |
-|                | procedure.       |
-+----------------+------------------+
-| cb             | The function to  |
-|                | call to report   |
-|                | procedure status |
-|                | updates; null    |
-|                | for no callback. |
-+----------------+------------------+
-| cb\_arg        | The optional     |
-|                | argument to pass |
-|                | to the callback  |
-|                | function.        |
-+----------------+------------------+
-
-Returned values
-~~~~~~~~~~~~~~~
-
-None
diff --git a/docs/network/ble/ble_hs/ble_gattc/functions/ble_gattc_disc_chrs_by_uuid.rst b/docs/network/ble/ble_hs/ble_gattc/functions/ble_gattc_disc_chrs_by_uuid.rst
deleted file mode 100644
index 53707ba71..000000000
--- a/docs/network/ble/ble_hs/ble_gattc/functions/ble_gattc_disc_chrs_by_uuid.rst
+++ /dev/null
@@ -1,71 +0,0 @@
-ble\_gattc\_disc\_chrs\_by\_uuid
---------------------------------
-
-.. code:: c
-
-    int
-    ble_gattc_disc_chrs_by_uuid(
-                uint16_t  conn_handle,
-                uint16_t  start_handle,
-                uint16_t  end_handle,
-        const ble_uuid_t *uuid,
-         ble_gatt_chr_fn *cb,
-                    void *cb_arg
-    )
-
-Description
-~~~~~~~~~~~
-
-Initiates GATT procedure: Discover Characteristics by UUID.
-
-Parameters
-~~~~~~~~~~
-
-+----------------+------------------+
-| *Parameter*    | *Description*    |
-+================+==================+
-| conn\_handle   | The connection   |
-|                | over which to    |
-|                | execute the      |
-|                | procedure.       |
-+----------------+------------------+
-| start\_handle  | The handle to    |
-|                | begin the search |
-|                | at (generally    |
-|                | the service      |
-|                | definition       |
-|                | handle).         |
-+----------------+------------------+
-| end\_handle    | The handle to    |
-|                | end the search   |
-|                | at (generally    |
-|                | the last handle  |
-|                | in the service). |
-+----------------+------------------+
-| chr\_uuid128   | The 128-bit UUID |
-|                | of the           |
-|                | characteristic   |
-|                | to discover.     |
-+----------------+------------------+
-| cb             | The function to  |
-|                | call to report   |
-|                | procedure status |
-|                | updates; null    |
-|                | for no callback. |
-+----------------+------------------+
-| cb\_arg        | The optional     |
-|                | argument to pass |
-|                | to the callback  |
-|                | function.        |
-+----------------+------------------+
-
-Returned values
-~~~~~~~~~~~~~~~
-
-+-----------------------------------------------------------------------+---------------------+
-| *Value*                                                               | *Condition*         |
-+=======================================================================+=====================+
-| 0                                                                     | Success.            |
-+-----------------------------------------------------------------------+---------------------+
-| `Core return code <../../ble_hs_return_codes/#return-codes-core>`__   | Unexpected error.   |
-+-----------------------------------------------------------------------+---------------------+
diff --git a/docs/network/ble/ble_hs/ble_gattc/functions/ble_gattc_disc_svc_by_uuid.rst b/docs/network/ble/ble_hs/ble_gattc/functions/ble_gattc_disc_svc_by_uuid.rst
deleted file mode 100644
index 7e5561ad2..000000000
--- a/docs/network/ble/ble_hs/ble_gattc/functions/ble_gattc_disc_svc_by_uuid.rst
+++ /dev/null
@@ -1,55 +0,0 @@
-ble\_gattc\_disc\_svc\_by\_uuid
--------------------------------
-
-.. code:: c
-
-    int
-    ble_gattc_disc_svc_by_uuid(
-                    uint16_t  conn_handle,
-            const ble_uuid_t *uuid,
-        ble_gatt_disc_svc_fn *cb,
-                        void *cb_arg
-    )
-
-Description
-~~~~~~~~~~~
-
-Initiates GATT procedure: Discover Primary Service by Service UUID.
-
-Parameters
-~~~~~~~~~~
-
-+----------------+------------------+
-| *Parameter*    | *Description*    |
-+================+==================+
-| conn\_handle   | The connection   |
-|                | over which to    |
-|                | execute the      |
-|                | procedure.       |
-+----------------+------------------+
-| service\_uuid1 | The 128-bit UUID |
-| 28             | of the service   |
-|                | to discover.     |
-+----------------+------------------+
-| cb             | The function to  |
-|                | call to report   |
-|                | procedure status |
-|                | updates; null    |
-|                | for no callback. |
-+----------------+------------------+
-| cb\_arg        | The optional     |
-|                | argument to pass |
-|                | to the callback  |
-|                | function.        |
-+----------------+------------------+
-
-Returned values
-~~~~~~~~~~~~~~~
-
-+-----------------------------------------------------------------------+---------------------+
-| *Value*                                                               | *Condition*         |
-+=======================================================================+=====================+
-| 0                                                                     | Success.            |
-+-----------------------------------------------------------------------+---------------------+
-| `Core return code <../../ble_hs_return_codes/#return-codes-core>`__   | Unexpected error.   |
-+-----------------------------------------------------------------------+---------------------+
diff --git a/docs/network/ble/ble_hs/ble_gattc/functions/ble_gattc_exchange_mtu.rst b/docs/network/ble/ble_hs/ble_gattc/functions/ble_gattc_exchange_mtu.rst
deleted file mode 100644
index b16f02dc9..000000000
--- a/docs/network/ble/ble_hs/ble_gattc/functions/ble_gattc_exchange_mtu.rst
+++ /dev/null
@@ -1,50 +0,0 @@
-ble\_gattc\_exchange\_mtu
--------------------------
-
-.. code:: c
-
-    int
-    ble_gattc_exchange_mtu(
-               uint16_t  conn_handle,
-        ble_gatt_mtu_fn *cb,
-                   void *cb_arg
-    )
-
-Description
-~~~~~~~~~~~
-
-Initiates GATT procedure: Exchange MTU.
-
-Parameters
-~~~~~~~~~~
-
-+----------------+------------------+
-| *Parameter*    | *Description*    |
-+================+==================+
-| conn\_handle   | The connection   |
-|                | over which to    |
-|                | execute the      |
-|                | procedure.       |
-+----------------+------------------+
-| cb             | The function to  |
-|                | call to report   |
-|                | procedure status |
-|                | updates; null    |
-|                | for no callback. |
-+----------------+------------------+
-| cb\_arg        | The optional     |
-|                | argument to pass |
-|                | to the callback  |
-|                | function.        |
-+----------------+------------------+
-
-Returned values
-~~~~~~~~~~~~~~~
-
-+-----------------------------------------------------------------------+---------------------+
-| *Value*                                                               | *Condition*         |
-+=======================================================================+=====================+
-| 0                                                                     | Success.            |
-+-----------------------------------------------------------------------+---------------------+
-| `Core return code <../../ble_hs_return_codes/#return-codes-core>`__   | Unexpected error.   |
-+-----------------------------------------------------------------------+---------------------+
diff --git a/docs/network/ble/ble_hs/ble_gattc/functions/ble_gattc_find_inc_svcs.rst b/docs/network/ble/ble_hs/ble_gattc/functions/ble_gattc_find_inc_svcs.rst
deleted file mode 100644
index 03a651499..000000000
--- a/docs/network/ble/ble_hs/ble_gattc/functions/ble_gattc_find_inc_svcs.rst
+++ /dev/null
@@ -1,65 +0,0 @@
-ble\_gattc\_find\_inc\_svcs
----------------------------
-
-.. code:: c
-
-    int
-    ble_gattc_find_inc_svcs(
-                    uint16_t  conn_handle,
-                    uint16_t  start_handle,
-                    uint16_t  end_handle,
-        ble_gatt_disc_svc_fn *cb,
-                        void *cb_arg
-    )
-
-Description
-~~~~~~~~~~~
-
-Initiates GATT procedure: Find Included Services.
-
-Parameters
-~~~~~~~~~~
-
-+----------------+------------------+
-| *Parameter*    | *Description*    |
-+================+==================+
-| conn\_handle   | The connection   |
-|                | over which to    |
-|                | execute the      |
-|                | procedure.       |
-+----------------+------------------+
-| start\_handle  | The handle to    |
-|                | begin the search |
-|                | at (generally    |
-|                | the service      |
-|                | definition       |
-|                | handle).         |
-+----------------+------------------+
-| end\_handle    | The handle to    |
-|                | end the search   |
-|                | at (generally    |
-|                | the last handle  |
-|                | in the service). |
-+----------------+------------------+
-| cb             | The function to  |
-|                | call to report   |
-|                | procedure status |
-|                | updates; null    |
-|                | for no callback. |
-+----------------+------------------+
-| cb\_arg        | The optional     |
-|                | argument to pass |
-|                | to the callback  |
-|                | function.        |
-+----------------+------------------+
-
-Returned values
-~~~~~~~~~~~~~~~
-
-+-----------------------------------------------------------------------+---------------------+
-| *Value*                                                               | *Condition*         |
-+=======================================================================+=====================+
-| 0                                                                     | Success.            |
-+-----------------------------------------------------------------------+---------------------+
-| `Core return code <../../ble_hs_return_codes/#return-codes-core>`__   | Unexpected error.   |
-+-----------------------------------------------------------------------+---------------------+
diff --git a/docs/network/ble/ble_hs/ble_gattc/functions/ble_gattc_indicate.rst b/docs/network/ble/ble_hs/ble_gattc/functions/ble_gattc_indicate.rst
deleted file mode 100644
index 803445d1d..000000000
--- a/docs/network/ble/ble_hs/ble_gattc/functions/ble_gattc_indicate.rst
+++ /dev/null
@@ -1,47 +0,0 @@
-ble\_gattc\_indicate
---------------------
-
-.. code:: c
-
-    int
-    ble_gattc_indicate(
-        uint16_t conn_handle,
-        uint16_t chr_val_handle
-    )
-
-Description
-~~~~~~~~~~~
-
-Sends a characteristic indication. The content of the message is read
-from the specified characteristic.
-
-Parameters
-~~~~~~~~~~
-
-+----------------+------------------+
-| *Parameter*    | *Description*    |
-+================+==================+
-| conn\_handle   | The connection   |
-|                | over which to    |
-|                | execute the      |
-|                | procedure.       |
-+----------------+------------------+
-| chr\_val\_hand | The value        |
-| le             | attribute handle |
-|                | of the           |
-|                | characteristic   |
-|                | to include in    |
-|                | the outgoing     |
-|                | indication.      |
-+----------------+------------------+
-
-Returned values
-~~~~~~~~~~~~~~~
-
-+-----------------------------------------------------------------------+---------------------+
-| *Value*                                                               | *Condition*         |
-+=======================================================================+=====================+
-| 0                                                                     | Success.            |
-+-----------------------------------------------------------------------+---------------------+
-| `Core return code <../../ble_hs_return_codes/#return-codes-core>`__   | Unexpected error.   |
-+-----------------------------------------------------------------------+---------------------+
diff --git a/docs/network/ble/ble_hs/ble_gattc/functions/ble_gattc_indicate_custom.rst b/docs/network/ble/ble_hs/ble_gattc/functions/ble_gattc_indicate_custom.rst
deleted file mode 100644
index 14c0b0802..000000000
--- a/docs/network/ble/ble_hs/ble_gattc/functions/ble_gattc_indicate_custom.rst
+++ /dev/null
@@ -1,52 +0,0 @@
-ble\_gattc\_indicate\_custom
-----------------------------
-
-.. code:: c
-
-    int
-    ble_gattc_indicate_custom(
-              uint16_t  conn_handle,
-              uint16_t  chr_val_handle,
-        struct os_mbuf *txom
-    )
-
-Description
-~~~~~~~~~~~
-
-Sends a characteristic indication. The content of the message is read
-from the specified characteristic.
-
-Parameters
-~~~~~~~~~~
-
-+----------------+------------------+
-| *Parameter*    | *Description*    |
-+================+==================+
-| conn\_handle   | The connection   |
-|                | over which to    |
-|                | execute the      |
-|                | procedure.       |
-+----------------+------------------+
-| chr\_val\_hand | The value        |
-| le             | attribute handle |
-|                | of the           |
-|                | characteristic   |
-|                | to include in    |
-|                | the outgoing     |
-|                | indication.      |
-+----------------+------------------+
-| txom           | The data to      |
-|                | include in the   |
-|                | indication.      |
-+----------------+------------------+
-
-Returned values
-~~~~~~~~~~~~~~~
-
-+-----------------------------------------------------------------------+---------------------+
-| *Value*                                                               | *Condition*         |
-+=======================================================================+=====================+
-| 0                                                                     | Success.            |
-+-----------------------------------------------------------------------+---------------------+
-| `Core return code <../../ble_hs_return_codes/#return-codes-core>`__   | Unexpected error.   |
-+-----------------------------------------------------------------------+---------------------+
diff --git a/docs/network/ble/ble_hs/ble_gattc/functions/ble_gattc_notify.rst b/docs/network/ble/ble_hs/ble_gattc/functions/ble_gattc_notify.rst
deleted file mode 100644
index 6b5a09419..000000000
--- a/docs/network/ble/ble_hs/ble_gattc/functions/ble_gattc_notify.rst
+++ /dev/null
@@ -1,47 +0,0 @@
-ble\_gattc\_notify
-------------------
-
-.. code:: c
-
-    int
-    ble_gattc_notify(
-        uint16_t conn_handle,
-        uint16_t chr_val_handle
-    )
-
-Description
-~~~~~~~~~~~
-
-Sends a characteristic notification. The content of the message is read
-from the specified characteristic.
-
-Parameters
-~~~~~~~~~~
-
-+----------------+------------------+
-| *Parameter*    | *Description*    |
-+================+==================+
-| conn\_handle   | The connection   |
-|                | over which to    |
-|                | execute the      |
-|                | procedure.       |
-+----------------+------------------+
-| chr\_val\_hand | The value        |
-| le             | attribute handle |
-|                | of the           |
-|                | characteristic   |
-|                | to include in    |
-|                | the outgoing     |
-|                | notification.    |
-+----------------+------------------+
-
-Returned values
-~~~~~~~~~~~~~~~
-
-+-----------------------------------------------------------------------+---------------------+
-| *Value*                                                               | *Condition*         |
-+=======================================================================+=====================+
-| 0                                                                     | Success.            |
-+-----------------------------------------------------------------------+---------------------+
-| `Core return code <../../ble_hs_return_codes/#return-codes-core>`__   | Unexpected error.   |
-+-----------------------------------------------------------------------+---------------------+
diff --git a/docs/network/ble/ble_hs/ble_gattc/functions/ble_gattc_notify_custom.rst b/docs/network/ble/ble_hs/ble_gattc/functions/ble_gattc_notify_custom.rst
deleted file mode 100644
index f49bc25eb..000000000
--- a/docs/network/ble/ble_hs/ble_gattc/functions/ble_gattc_notify_custom.rst
+++ /dev/null
@@ -1,50 +0,0 @@
-ble\_gattc\_notify\_custom
---------------------------
-
-.. code:: c
-
-    int
-    ble_gattc_notify_custom(
-              uint16_t  conn_handle,
-              uint16_t  chr_val_handle,
-        struct os_mbuf *txom
-    )
-
-Description
-~~~~~~~~~~~
-
-Sends a "free-form" characteristic notification. This function consumes
-the supplied mbuf regardless of the outcome.
-
-Parameters
-~~~~~~~~~~
-
-+----------------+------------------+
-| *Parameter*    | *Description*    |
-+================+==================+
-| conn\_handle   | The connection   |
-|                | over which to    |
-|                | execute the      |
-|                | procedure.       |
-+----------------+------------------+
-| chr\_val\_hand | The attribute    |
-| le             | handle to        |
-|                | indicate in the  |
-|                | outgoing         |
-|                | notification.    |
-+----------------+------------------+
-| txom           | The value to     |
-|                | write to the     |
-|                | characteristic.  |
-+----------------+------------------+
-
-Returned values
-~~~~~~~~~~~~~~~
-
-+-----------------------------------------------------------------------+---------------------+
-| *Value*                                                               | *Condition*         |
-+=======================================================================+=====================+
-| 0                                                                     | Success.            |
-+-----------------------------------------------------------------------+---------------------+
-| `Core return code <../../ble_hs_return_codes/#return-codes-core>`__   | Unexpected error.   |
-+-----------------------------------------------------------------------+---------------------+
diff --git a/docs/network/ble/ble_hs/ble_gattc/functions/ble_gattc_read.rst b/docs/network/ble/ble_hs/ble_gattc/functions/ble_gattc_read.rst
deleted file mode 100644
index f92f7071a..000000000
--- a/docs/network/ble/ble_hs/ble_gattc/functions/ble_gattc_read.rst
+++ /dev/null
@@ -1,56 +0,0 @@
-ble\_gattc\_read
-----------------
-
-.. code:: c
-
-    int
-    ble_gattc_read(
-                uint16_t  conn_handle,
-                uint16_t  attr_handle,
-        ble_gatt_attr_fn *cb,
-                    void *cb_arg
-    )
-
-Description
-~~~~~~~~~~~
-
-Initiates GATT procedure: Read Characteristic Value.
-
-Parameters
-~~~~~~~~~~
-
-+----------------+------------------+
-| *Parameter*    | *Description*    |
-+================+==================+
-| conn\_handle   | The connection   |
-|                | over which to    |
-|                | execute the      |
-|                | procedure.       |
-+----------------+------------------+
-| attr\_handle   | The handle of    |
-|                | the              |
-|                | characteristic   |
-|                | value to read.   |
-+----------------+------------------+
-| cb             | The function to  |
-|                | call to report   |
-|                | procedure status |
-|                | updates; null    |
-|                | for no callback. |
-+----------------+------------------+
-| cb\_arg        | The optional     |
-|                | argument to pass |
-|                | to the callback  |
-|                | function.        |
-+----------------+------------------+
-
-Returned values
-~~~~~~~~~~~~~~~
-
-+-----------------------------------------------------------------------+---------------------+
-| *Value*                                                               | *Condition*         |
-+=======================================================================+=====================+
-| 0                                                                     | Success.            |
-+-----------------------------------------------------------------------+---------------------+
-| `Core return code <../../ble_hs_return_codes/#return-codes-core>`__   | Unexpected error.   |
-+-----------------------------------------------------------------------+---------------------+
diff --git a/docs/network/ble/ble_hs/ble_gattc/functions/ble_gattc_read_by_uuid.rst b/docs/network/ble/ble_hs/ble_gattc/functions/ble_gattc_read_by_uuid.rst
deleted file mode 100644
index 17d4e7435..000000000
--- a/docs/network/ble/ble_hs/ble_gattc/functions/ble_gattc_read_by_uuid.rst
+++ /dev/null
@@ -1,67 +0,0 @@
-ble\_gattc\_read\_by\_uuid
---------------------------
-
-.. code:: c
-
-    int
-    ble_gattc_read_by_uuid(
-                uint16_t  conn_handle,
-                uint16_t  start_handle,
-                uint16_t  end_handle,
-        const ble_uuid_t *uuid,
-        ble_gatt_attr_fn *cb,
-                    void *cb_arg
-    )
-
-Description
-~~~~~~~~~~~
-
-Initiates GATT procedure: Read Using Characteristic UUID.
-
-Parameters
-~~~~~~~~~~
-
-+----------------+------------------+
-| *Parameter*    | *Description*    |
-+================+==================+
-| conn\_handle   | The connection   |
-|                | over which to    |
-|                | execute the      |
-|                | procedure.       |
-+----------------+------------------+
-| start\_handle  | The first handle |
-|                | to search        |
-|                | (generally the   |
-|                | handle of the    |
-|                | service          |
-|                | definition).     |
-+----------------+------------------+
-| end\_handle    | The last handle  |
-|                | to search        |
-|                | (generally the   |
-|                | last handle in   |
-|                | the service      |
-|                | definition).     |
-+----------------+------------------+
-| cb             | The function to  |
-|                | call to report   |
-|                | procedure status |
-|                | updates; null    |
-|                | for no callback. |
-+----------------+------------------+
-| cb\_arg        | The optional     |
-|                | argument to pass |
-|                | to the callback  |
-|                | function.        |
-+----------------+------------------+
-
-Returned values
-~~~~~~~~~~~~~~~
-
-+-----------------------------------------------------------------------+---------------------+
-| *Value*                                                               | *Condition*         |
-+=======================================================================+=====================+
-| 0                                                                     | Success.            |
-+-----------------------------------------------------------------------+---------------------+
-| `Core return code <../../ble_hs_return_codes/#return-codes-core>`__   | Unexpected error.   |
-+-----------------------------------------------------------------------+---------------------+
diff --git a/docs/network/ble/ble_hs/ble_gattc/functions/ble_gattc_read_long.rst b/docs/network/ble/ble_hs/ble_gattc/functions/ble_gattc_read_long.rst
deleted file mode 100644
index b9404860e..000000000
--- a/docs/network/ble/ble_hs/ble_gattc/functions/ble_gattc_read_long.rst
+++ /dev/null
@@ -1,57 +0,0 @@
-ble\_gattc\_read\_long
-----------------------
-
-.. code:: c
-
-    int
-    ble_gattc_read_long(
-                uint16_t  conn_handle,
-                uint16_t  handle,
-                uint16_t  offset,
-        ble_gatt_attr_fn *cb,
-                    void *cb_arg
-    )
-
-Description
-~~~~~~~~~~~
-
-Initiates GATT procedure: Read Long Characteristic Values.
-
-Parameters
-~~~~~~~~~~
-
-+----------------+------------------+
-| *Parameter*    | *Description*    |
-+================+==================+
-| conn\_handle   | The connection   |
-|                | over which to    |
-|                | execute the      |
-|                | procedure.       |
-+----------------+------------------+
-| handle         | The handle of    |
-|                | the              |
-|                | characteristic   |
-|                | value to read.   |
-+----------------+------------------+
-| cb             | The function to  |
-|                | call to report   |
-|                | procedure status |
-|                | updates; null    |
-|                | for no callback. |
-+----------------+------------------+
-| cb\_arg        | The optional     |
-|                | argument to pass |
-|                | to the callback  |
-|                | function.        |
-+----------------+------------------+
-
-Returned values
-~~~~~~~~~~~~~~~
-
-+-----------------------------------------------------------------------+---------------------+
-| *Value*                                                               | *Condition*         |
-+=======================================================================+=====================+
-| 0                                                                     | Success.            |
-+-----------------------------------------------------------------------+---------------------+
-| `Core return code <../../ble_hs_return_codes/#return-codes-core>`__   | Unexpected error.   |
-+-----------------------------------------------------------------------+---------------------+
diff --git a/docs/network/ble/ble_hs/ble_gattc/functions/ble_gattc_read_mult.rst b/docs/network/ble/ble_hs/ble_gattc/functions/ble_gattc_read_mult.rst
deleted file mode 100644
index 962849cd1..000000000
--- a/docs/network/ble/ble_hs/ble_gattc/functions/ble_gattc_read_mult.rst
+++ /dev/null
@@ -1,60 +0,0 @@
-ble\_gattc\_read\_mult
-----------------------
-
-.. code:: c
-
-    int
-    ble_gattc_read_mult(
-                uint16_t  conn_handle,
-          const uint16_t *handles,
-                 uint8_t  num_handles,
-        ble_gatt_attr_fn *cb,
-                    void *cb_arg
-    )
-
-Description
-~~~~~~~~~~~
-
-Initiates GATT procedure: Read Multiple Characteristic Values.
-
-Parameters
-~~~~~~~~~~
-
-+----------------+------------------+
-| *Parameter*    | *Description*    |
-+================+==================+
-| conn\_handle   | The connection   |
-|                | over which to    |
-|                | execute the      |
-|                | procedure.       |
-+----------------+------------------+
-| handles        | An array of      |
-|                | 16-bit attribute |
-|                | handles to read. |
-+----------------+------------------+
-| num\_handles   | The number of    |
-|                | entries in the   |
-|                | "handles" array. |
-+----------------+------------------+
-| cb             | The function to  |
-|                | call to report   |
-|                | procedure status |
-|                | updates; null    |
-|                | for no callback. |
-+----------------+------------------+
-| cb\_arg        | The optional     |
-|                | argument to pass |
-|                | to the callback  |
-|                | function.        |
-+----------------+------------------+
-
-Returned values
-~~~~~~~~~~~~~~~
-
-+-----------------------------------------------------------------------+---------------------+
-| *Value*                                                               | *Condition*         |
-+=======================================================================+=====================+
-| 0                                                                     | Success.            |
-+-----------------------------------------------------------------------+---------------------+
-| `Core return code <../../ble_hs_return_codes/#return-codes-core>`__   | Unexpected error.   |
-+-----------------------------------------------------------------------+---------------------+
diff --git a/docs/network/ble/ble_hs/ble_gattc/functions/ble_gattc_write.rst b/docs/network/ble/ble_hs/ble_gattc/functions/ble_gattc_write.rst
deleted file mode 100644
index 816417ce6..000000000
--- a/docs/network/ble/ble_hs/ble_gattc/functions/ble_gattc_write.rst
+++ /dev/null
@@ -1,63 +0,0 @@
-ble\_gattc\_write
------------------
-
-.. code:: c
-
-    int
-    ble_gattc_write(
-                uint16_t  conn_handle,
-                uint16_t  attr_handle,
-          struct os_mbuf *txom,
-        ble_gatt_attr_fn *cb,
-                    void *cb_arg
-    )
-
-Description
-~~~~~~~~~~~
-
-Initiates GATT procedure: Write Characteristic Value. This function
-consumes the supplied mbuf regardless of the outcome.
-
-Parameters
-~~~~~~~~~~
-
-+----------------+------------------+
-| *Parameter*    | *Description*    |
-+================+==================+
-| conn\_handle   | The connection   |
-|                | over which to    |
-|                | execute the      |
-|                | procedure.       |
-+----------------+------------------+
-| attr\_handle   | The handle of    |
-|                | the              |
-|                | characteristic   |
-|                | value to write   |
-|                | to.              |
-+----------------+------------------+
-| txom           | The value to     |
-|                | write to the     |
-|                | characteristic.  |
-+----------------+------------------+
-| cb             | The function to  |
-|                | call to report   |
-|                | procedure status |
-|                | updates; null    |
-|                | for no callback. |
-+----------------+------------------+
-| cb\_arg        | The optional     |
-|                | argument to pass |
-|                | to the callback  |
-|                | function.        |
-+----------------+------------------+
-
-Returned values
-~~~~~~~~~~~~~~~
-
-+-----------------------------------------------------------------------+---------------------+
-| *Value*                                                               | *Condition*         |
-+=======================================================================+=====================+
-| 0                                                                     | Success.            |
-+-----------------------------------------------------------------------+---------------------+
-| `Core return code <../../ble_hs_return_codes/#return-codes-core>`__   | Unexpected error.   |
-+-----------------------------------------------------------------------+---------------------+
diff --git a/docs/network/ble/ble_hs/ble_gattc/functions/ble_gattc_write_flat.rst b/docs/network/ble/ble_hs/ble_gattc/functions/ble_gattc_write_flat.rst
deleted file mode 100644
index f710b65a4..000000000
--- a/docs/network/ble/ble_hs/ble_gattc/functions/ble_gattc_write_flat.rst
+++ /dev/null
@@ -1,67 +0,0 @@
-ble\_gattc\_write\_flat
------------------------
-
-.. code:: c
-
-    int
-    ble_gattc_write_flat(
-                uint16_t  conn_handle,
-                uint16_t  attr_handle,
-              const void *data,
-                uint16_t  data_len,
-        ble_gatt_attr_fn *cb,
-                    void *cb_arg
-    )
-
-Description
-~~~~~~~~~~~
-
-Initiates GATT procedure: Write Characteristic Value (flat buffer
-version).
-
-Parameters
-~~~~~~~~~~
-
-+----------------+------------------+
-| *Parameter*    | *Description*    |
-+================+==================+
-| conn\_handle   | The connection   |
-|                | over which to    |
-|                | execute the      |
-|                | procedure.       |
-+----------------+------------------+
-| attr\_handle   | The handle of    |
-|                | the              |
-|                | characteristic   |
-|                | value to write   |
-|                | to.              |
-+----------------+------------------+
-| value          | The value to     |
-|                | write to the     |
-|                | characteristic.  |
-+----------------+------------------+
-| value\_len     | The number of    |
-|                | bytes to write.  |
-+----------------+------------------+
-| cb             | The function to  |
-|                | call to report   |
-|                | procedure status |
-|                | updates; null    |
-|                | for no callback. |
-+----------------+------------------+
-| cb\_arg        | The optional     |
-|                | argument to pass |
-|                | to the callback  |
-|                | function.        |
-+----------------+------------------+
-
-Returned values
-~~~~~~~~~~~~~~~
-
-+-----------------------------------------------------------------------+---------------------+
-| *Value*                                                               | *Condition*         |
-+=======================================================================+=====================+
-| 0                                                                     | Success.            |
-+-----------------------------------------------------------------------+---------------------+
-| `Core return code <../../ble_hs_return_codes/#return-codes-core>`__   | Unexpected error.   |
-+-----------------------------------------------------------------------+---------------------+
diff --git a/docs/network/ble/ble_hs/ble_gattc/functions/ble_gattc_write_long.rst b/docs/network/ble/ble_hs/ble_gattc/functions/ble_gattc_write_long.rst
deleted file mode 100644
index 3786e7706..000000000
--- a/docs/network/ble/ble_hs/ble_gattc/functions/ble_gattc_write_long.rst
+++ /dev/null
@@ -1,64 +0,0 @@
-ble\_gattc\_write\_long
------------------------
-
-.. code:: c
-
-    int
-    ble_gattc_write_long(
-                uint16_t  conn_handle,
-                uint16_t  attr_handle,
-                uint16_t  offset,
-          struct os_mbuf *txom,
-        ble_gatt_attr_fn *cb,
-                    void *cb_arg
-    )
-
-Description
-~~~~~~~~~~~
-
-Initiates GATT procedure: Write Long Characteristic Values. This
-function consumes the supplied mbuf regardless of the outcome.
-
-Parameters
-~~~~~~~~~~
-
-+----------------+------------------+
-| *Parameter*    | *Description*    |
-+================+==================+
-| conn\_handle   | The connection   |
-|                | over which to    |
-|                | execute the      |
-|                | procedure.       |
-+----------------+------------------+
-| attr\_handle   | The handle of    |
-|                | the              |
-|                | characteristic   |
-|                | value to write   |
-|                | to.              |
-+----------------+------------------+
-| txom           | The value to     |
-|                | write to the     |
-|                | characteristic.  |
-+----------------+------------------+
-| cb             | The function to  |
-|                | call to report   |
-|                | procedure status |
-|                | updates; null    |
-|                | for no callback. |
-+----------------+------------------+
-| cb\_arg        | The optional     |
-|                | argument to pass |
-|                | to the callback  |
-|                | function.        |
-+----------------+------------------+
-
-Returned values
-~~~~~~~~~~~~~~~
-
-+-----------------------------------------------------------------------+---------------------+
-| *Value*                                                               | *Condition*         |
-+=======================================================================+=====================+
-| 0                                                                     | Success.            |
-+-----------------------------------------------------------------------+---------------------+
-| `Core return code <../../ble_hs_return_codes/#return-codes-core>`__   | Unexpected error.   |
-+-----------------------------------------------------------------------+---------------------+
diff --git a/docs/network/ble/ble_hs/ble_gattc/functions/ble_gattc_write_no_rsp.rst b/docs/network/ble/ble_hs/ble_gattc/functions/ble_gattc_write_no_rsp.rst
deleted file mode 100644
index 0c86c7be9..000000000
--- a/docs/network/ble/ble_hs/ble_gattc/functions/ble_gattc_write_no_rsp.rst
+++ /dev/null
@@ -1,41 +0,0 @@
-ble\_gattc\_write\_no\_rsp
---------------------------
-
-.. code:: c
-
-    int
-    ble_gattc_write_no_rsp(
-              uint16_t  conn_handle,
-              uint16_t  attr_handle,
-        struct os_mbuf *txom
-    )
-
-Description
-~~~~~~~~~~~
-
-Initiates GATT procedure: Write Without Response. This function consumes
-the supplied mbuf regardless of the outcome.
-
-Parameters
-~~~~~~~~~~
-
-+----------------+-------------------------------------------------------+
-| *Parameter*    | *Description*                                         |
-+================+=======================================================+
-| conn\_handle   | The connection over which to execute the procedure.   |
-+----------------+-------------------------------------------------------+
-| attr\_handle   | The handle of the characteristic value to write to.   |
-+----------------+-------------------------------------------------------+
-| txom           | The value to write to the characteristic.             |
-+----------------+-------------------------------------------------------+
-
-Returned values
-~~~~~~~~~~~~~~~
-
-+-----------------------------------------------------------------------+---------------------+
-| *Value*                                                               | *Condition*         |
-+=======================================================================+=====================+
-| 0                                                                     | Success.            |
-+-----------------------------------------------------------------------+---------------------+
-| `Core return code <../../ble_hs_return_codes/#return-codes-core>`__   | Unexpected error.   |
-+-----------------------------------------------------------------------+---------------------+
diff --git a/docs/network/ble/ble_hs/ble_gattc/functions/ble_gattc_write_no_rsp_flat.rst b/docs/network/ble/ble_hs/ble_gattc/functions/ble_gattc_write_no_rsp_flat.rst
deleted file mode 100644
index a4d7c86a4..000000000
--- a/docs/network/ble/ble_hs/ble_gattc/functions/ble_gattc_write_no_rsp_flat.rst
+++ /dev/null
@@ -1,44 +0,0 @@
-ble\_gattc\_write\_no\_rsp\_flat
---------------------------------
-
-.. code:: c
-
-    int
-    ble_gattc_write_no_rsp_flat(
-          uint16_t  conn_handle,
-          uint16_t  attr_handle,
-        const void *data,
-          uint16_t  data_len
-    )
-
-Description
-~~~~~~~~~~~
-
-Initiates GATT procedure: Write Without Response. This function consumes
-the supplied mbuf regardless of the outcome.
-
-Parameters
-~~~~~~~~~~
-
-+----------------+-------------------------------------------------------+
-| *Parameter*    | *Description*                                         |
-+================+=======================================================+
-| conn\_handle   | The connection over which to execute the procedure.   |
-+----------------+-------------------------------------------------------+
-| attr\_handle   | The handle of the characteristic value to write to.   |
-+----------------+-------------------------------------------------------+
-| value          | The value to write to the characteristic.             |
-+----------------+-------------------------------------------------------+
-| value\_len     | The number of bytes to write.                         |
-+----------------+-------------------------------------------------------+
-
-Returned values
-~~~~~~~~~~~~~~~
-
-+-----------------------------------------------------------------------+---------------------+
-| *Value*                                                               | *Condition*         |
-+=======================================================================+=====================+
-| 0                                                                     | Success.            |
-+-----------------------------------------------------------------------+---------------------+
-| `Core return code <../../ble_hs_return_codes/#return-codes-core>`__   | Unexpected error.   |
-+-----------------------------------------------------------------------+---------------------+
diff --git a/docs/network/ble/ble_hs/ble_gattc/functions/ble_gattc_write_reliable.rst b/docs/network/ble/ble_hs/ble_gattc/functions/ble_gattc_write_reliable.rst
deleted file mode 100644
index 867cb176d..000000000
--- a/docs/network/ble/ble_hs/ble_gattc/functions/ble_gattc_write_reliable.rst
+++ /dev/null
@@ -1,68 +0,0 @@
-ble\_gattc\_write\_reliable
----------------------------
-
-.. code:: c
-
-    int
-    ble_gattc_write_reliable(
-                         uint16_t  conn_handle,
-             struct ble_gatt_attr *attrs,
-                              int  num_attrs,
-        ble_gatt_reliable_attr_fn *cb,
-                             void *cb_arg
-    )
-
-Description
-~~~~~~~~~~~
-
-Initiates GATT procedure: Reliable Writes. This function consumes the
-supplied mbufs regardless of the outcome.
-
-Parameters
-~~~~~~~~~~
-
-+----------------+------------------+
-| *Parameter*    | *Description*    |
-+================+==================+
-| conn\_handle   | The connection   |
-|                | over which to    |
-|                | execute the      |
-|                | procedure.       |
-+----------------+------------------+
-| attrs          | An array of      |
-|                | attribute        |
-|                | descriptors;     |
-|                | specifies which  |
-|                | characteristics  |
-|                | to write to and  |
-|                | what data to     |
-|                | write to them.   |
-|                | The mbuf pointer |
-|                | in each          |
-|                | attribute is set |
-|                | to NULL by this  |
-|                | function.        |
-+----------------+------------------+
-| num\_attrs     | The number of    |
-|                | characteristics  |
-|                | to write; equal  |
-|                | to the number of |
-|                | elements in the  |
-|                | 'attrs' array.   |
-+----------------+------------------+
-| cb             | The function to  |
-|                | call to report   |
-|                | procedure status |
-|                | updates; null    |
-|                | for no callback. |
-+----------------+------------------+
-| cb\_arg        | The optional     |
-|                | argument to pass |
-|                | to the callback  |
-|                | function.        |
-+----------------+------------------+
-
-Returned values
-~~~~~~~~~~~~~~~
-
-None
diff --git a/docs/network/ble/ble_hs/ble_gattc/mdtoc.rst b/docs/network/ble/ble_hs/ble_gattc/mdtoc.rst
deleted file mode 100644
index d974749d4..000000000
--- a/docs/network/ble/ble_hs/ble_gattc/mdtoc.rst
+++ /dev/null
@@ -1,28 +0,0 @@
-::
-
-            - 'GATT client':
-                - toc: 'network/ble/ble_hs/ble_gattc/ble_gattc.md'
-                - 'Definitions':
-                    - 'GATT client definitions': 'network/ble/ble_hs/ble_gattc/definitions/ble_gattc_defs.md'
-                - 'Functions':
-                    - 'ble_gattc_disc_all_chrs': 'network/ble/ble_hs/ble_gattc/functions/ble_gattc_disc_all_chrs.md'
-                    - 'ble_gattc_disc_all_dscs': 'network/ble/ble_hs/ble_gattc/functions/ble_gattc_disc_all_dscs.md'
-                    - 'ble_gattc_disc_all_svcs': 'network/ble/ble_hs/ble_gattc/functions/ble_gattc_disc_all_svcs.md'
-                    - 'ble_gattc_disc_chrs_by_uuid': 'network/ble/ble_hs/ble_gattc/functions/ble_gattc_disc_chrs_by_uuid.md'
-                    - 'ble_gattc_disc_svc_by_uuid': 'network/ble/ble_hs/ble_gattc/functions/ble_gattc_disc_svc_by_uuid.md'
-                    - 'ble_gattc_exchange_mtu': 'network/ble/ble_hs/ble_gattc/functions/ble_gattc_exchange_mtu.md'
-                    - 'ble_gattc_find_inc_svcs': 'network/ble/ble_hs/ble_gattc/functions/ble_gattc_find_inc_svcs.md'
-                    - 'ble_gattc_indicate': 'network/ble/ble_hs/ble_gattc/functions/ble_gattc_indicate.md'
-                    - 'ble_gattc_indicate_custom': 'network/ble/ble_hs/ble_gattc/functions/ble_gattc_indicate_custom.md'
-                    - 'ble_gattc_notify': 'network/ble/ble_hs/ble_gattc/functions/ble_gattc_notify.md'
-                    - 'ble_gattc_notify_custom': 'network/ble/ble_hs/ble_gattc/functions/ble_gattc_notify_custom.md'
-                    - 'ble_gattc_read': 'network/ble/ble_hs/ble_gattc/functions/ble_gattc_read.md'
-                    - 'ble_gattc_read_by_uuid': 'network/ble/ble_hs/ble_gattc/functions/ble_gattc_read_by_uuid.md'
-                    - 'ble_gattc_read_long': 'network/ble/ble_hs/ble_gattc/functions/ble_gattc_read_long.md'
-                    - 'ble_gattc_read_mult': 'network/ble/ble_hs/ble_gattc/functions/ble_gattc_read_mult.md'
-                    - 'ble_gattc_write': 'network/ble/ble_hs/ble_gattc/functions/ble_gattc_write.md'
-                    - 'ble_gattc_write_flat': 'network/ble/ble_hs/ble_gattc/functions/ble_gattc_write_flat.md'
-                    - 'ble_gattc_write_long': 'network/ble/ble_hs/ble_gattc/functions/ble_gattc_write_long.md'
-                    - 'ble_gattc_write_no_rsp': 'network/ble/ble_hs/ble_gattc/functions/ble_gattc_write_no_rsp.md'
-                    - 'ble_gattc_write_no_rsp_flat': 'network/ble/ble_hs/ble_gattc/functions/ble_gattc_write_no_rsp_flat.md'
-                    - 'ble_gattc_write_reliable': 'network/ble/ble_hs/ble_gattc/functions/ble_gattc_write_reliable.md'
diff --git a/docs/network/ble/ble_hs/ble_gatts.rst b/docs/network/ble/ble_hs/ble_gatts.rst
new file mode 100644
index 000000000..871ea831a
--- /dev/null
+++ b/docs/network/ble/ble_hs/ble_gatts.rst
@@ -0,0 +1,15 @@
+NimBLE Host GATT Server Reference
+---------------------------------
+
+Introduction
+~~~~~~~~~~~~
+
+The Generic Attribute Profile (GATT) manages all activities involving services, characteristics, and descriptors. The
+server half of the GATT API handles registration and responding to GATT clients.
+
+Header
+~~~~~~
+
+.. code-block:: cpp
+
+    #include "host/ble_hs.h"
diff --git a/docs/network/ble/ble_hs/ble_gatts/ble_gatts.rst b/docs/network/ble/ble_hs/ble_gatts/ble_gatts.rst
deleted file mode 100644
index 2acc5ce5d..000000000
--- a/docs/network/ble/ble_hs/ble_gatts/ble_gatts.rst
+++ /dev/null
@@ -1,79 +0,0 @@
-NimBLE Host GATT Server Reference
----------------------------------
-
-Introduction
-~~~~~~~~~~~~
-
-The Generic Attribute Profile (GATT) manages all activities involving
-services, characteristics, and descriptors. The server half of the GATT
-API handles registration and responding to GATT clients.
-
-Header
-~~~~~~
-
-.. code:: c
-
-    #include "host/ble_hs.h"
-
-Definitions
-~~~~~~~~~~~
-
-`BLE host GATT server definitions <definitions/ble_gatts_defs.html>`__
-
-Functions
-~~~~~~~~~
-
-+-------------+----------------+
-| Function    | Description    |
-+=============+================+
-| `ble\_gatts | Queues a set   |
-| \_add\_svcs | of service     |
-|  <functions | definitions    |
-| /ble_gatts_ | for            |
-| add_svcs.md | registration.  |
-| >`__        |                |
-+-------------+----------------+
-| `ble\_gatts | Changes        |
-| \_svc\_set\ | visibility of  |
-| _visibility | a service with |
-|  <functions | specified      |
-| /ble_gatts_ | handle.        |
-| svc_set_vis |                |
-| ibility.html> |                |
-| `__         |                |
-+-------------+----------------+
-| `ble\_gatts | Adjusts a host |
-| \_count\_cf | configuration  |
-| g <function | object's       |
-| s/ble_gatts | settings to    |
-| _count_cfg. | accommodate    |
-| md>`__      | the specified  |
-|             | service        |
-|             | definition     |
-|             | array.         |
-+-------------+----------------+
-| `ble\_gatts | Retrieves the  |
-| \_find\_chr | pair of        |
-|  <functions | attribute      |
-| /ble_gatts_ | handles        |
-| find_chr.md | associated     |
-| >`__        | with a local   |
-|             | GATT           |
-|             | characteristic |
-|             | .              |
-+-------------+----------------+
-| `ble\_gatts | Retrieves the  |
-| \_find\_dsc | attribute      |
-|  <functions | handle         |
-| /ble_gatts_ | associated     |
-| find_dsc.md | with a local   |
-| >`__        | GATT           |
-|             | descriptor.    |
-+-------------+----------------+
-| `ble\_gatts | Retrieves the  |
-| \_find\_svc | attribute      |
-|  <functions | handle         |
-| /ble_gatts_ | associated     |
-| find_svc.md | with a local   |
-| >`__        | GATT service.  |
-+-------------+----------------+
diff --git a/docs/network/ble/ble_hs/ble_gatts/definitions/ble_gatts_defs.rst b/docs/network/ble/ble_hs/ble_gatts/definitions/ble_gatts_defs.rst
deleted file mode 100644
index a0aa9a004..000000000
--- a/docs/network/ble/ble_hs/ble_gatts/definitions/ble_gatts_defs.rst
+++ /dev/null
@@ -1,236 +0,0 @@
-GATT Server Definitions
------------------------
-
-.. code:: c
-
-    typedef int ble_gatt_access_fn(uint16_t conn_handle, uint16_t attr_handle,
-                                   struct ble_gatt_access_ctxt *ctxt, void *arg);
-
-.. code:: c
-
-    typedef uint16_t ble_gatt_chr_flags;
-
-.. code:: c
-
-    struct ble_gatt_chr_def {
-        /**
-         * Pointer to characteristic UUID; use BLE_UUIDxx_DECLARE macros to declare
-         * proper UUID; NULL if there are no more characteristics in the service.
-         */
-        const ble_uuid_t *uuid;
-
-        /**
-         * Callback that gets executed when this characteristic is read or
-         * written.
-         */
-        ble_gatt_access_fn *access_cb;
-
-        /** Optional argument for callback. */
-        void *arg;
-
-        /**
-         * Array of this characteristic's descriptors.  NULL if no descriptors.
-         * Do not include CCCD; it gets added automatically if this
-         * characteristic's notify or indicate flag is set.
-         */
-        struct ble_gatt_dsc_def *descriptors;
-
-        /** Specifies the set of permitted operations for this characteristic. */
-        ble_gatt_chr_flags flags;
-
-        /** Specifies minimum required key size to access this characteristic. */
-        uint8_t min_key_size;
-
-        /** 
-         * At registration time, this is filled in with the characteristic's value
-         * attribute handle.
-         */
-        uint16_t * const val_handle;
-    };
-
-.. code:: c
-
-    struct ble_gatt_svc_def {
-        /**
-         * One of the following:
-         *     o BLE_GATT_SVC_TYPE_PRIMARY - primary service
-         *     o BLE_GATT_SVC_TYPE_SECONDARY - secondary service
-         *     o 0 - No more services in this array.
-         */
-        uint8_t type;
-
-        /**
-         * Pointer to service UUID; use BLE_UUIDxx_DECLARE macros to declare
-         * proper UUID; NULL if there are no more characteristics in the service.
-         */
-        const ble_uuid_t *uuid;
-
-        /**
-         * Array of pointers to other service definitions.  These services are
-         * reported as "included services" during service discovery.  Terminate the
-         * array with NULL.
-         */
-        const struct ble_gatt_svc_def **includes;
-
-        /**
-         * Array of characteristic definitions corresponding to characteristics
-         * belonging to this service.
-         */
-        const struct ble_gatt_chr_def *characteristics;
-    };
-
-.. code:: c
-
-    struct ble_gatt_dsc_def {
-        /**
-         * Pointer to descriptor UUID; use BLE_UUIDxx_DECLARE macros to declare
-         * proper UUID; NULL if there are no more characteristics in the service.
-         */
-        const ble_uuid_t *uuid;
-
-        /** Specifies the set of permitted operations for this descriptor. */
-        uint8_t att_flags;
-
-        /** Specifies minimum required key size to access this descriptor. */
-        uint8_t min_key_size;
-
-        /** Callback that gets executed when the descriptor is read or written. */
-        ble_gatt_access_fn *access_cb;
-
-        /** Optional argument for callback. */
-        void *arg;
-    };
-
-.. code:: c
-
-    /**
-     * Context for an access to a GATT characteristic or descriptor.  When a client
-     * reads or writes a locally registered characteristic or descriptor, an
-     * instance of this struct gets passed to the application callback.
-     */
-    struct ble_gatt_access_ctxt {
-        /**
-         * Indicates the gatt operation being performed.  This is equal to one of
-         * the following values:
-         *     o  BLE_GATT_ACCESS_OP_READ_CHR
-         *     o  BLE_GATT_ACCESS_OP_WRITE_CHR
-         *     o  BLE_GATT_ACCESS_OP_READ_DSC
-         *     o  BLE_GATT_ACCESS_OP_WRITE_DSC
-         */
-        uint8_t op;
-
-        /**
-         * A container for the GATT access data.
-         *     o For reads: The application populates this with the value of the
-         *       characteristic or descriptor being read.
-         *     o For writes: This is already populated with the value being written
-         *       by the peer.  If the application wishes to retain this mbuf for
-         *       later use, the access callback must set this pointer to NULL to
-         *       prevent the stack from freeing it.
-         */
-        struct os_mbuf *om;
-
-        /**
-         * The GATT operation being performed dictates which field in this union is
-         * valid.  If a characteristic is being accessed, the chr field is valid.
-         * Otherwise a descriptor is being accessed, in which case the dsc field
-         * is valid.
-         */
-        union {
-            /**
-             * The characteristic definition corresponding to the characteristic
-             * being accessed.  This is what the app registered at startup.
-             */
-            const struct ble_gatt_chr_def *chr;
-
-            /**
-             * The descriptor definition corresponding to the descriptor being
-             * accessed.  This is what the app registered at startup.
-             */
-            const struct ble_gatt_dsc_def *dsc;
-        };
-    }
-
-.. code:: c
-
-    /**
-     * Context passed to the registration callback; represents the GATT service,
-     * characteristic, or descriptor being registered.
-     */
-    struct ble_gatt_register_ctxt {
-        /**
-         * Indicates the gatt registration operation just performed.  This is
-         * equal to one of the following values:
-         *     o BLE_GATT_REGISTER_OP_SVC
-         *     o BLE_GATT_REGISTER_OP_CHR
-         *     o BLE_GATT_REGISTER_OP_DSC
-         */
-        uint8_t op;
-
-        /**
-         * The value of the op field determines which field in this union is valid.
-         */
-        union {
-            /** Service; valid if op == BLE_GATT_REGISTER_OP_SVC. */
-            struct {
-                /** The ATT handle of the service definition attribute. */
-                uint16_t handle;
-
-                /**
-                 * The service definition representing the service being
-                 * registered.
-                 */
-                const struct ble_gatt_svc_def *svc_def;
-            } svc;
-
-            /** Characteristic; valid if op == BLE_GATT_REGISTER_OP_CHR. */
-            struct {
-                /** The ATT handle of the characteristic definition attribute. */
-                uint16_t def_handle;
-
-                /** The ATT handle of the characteristic value attribute. */
-                uint16_t val_handle;
-
-                /**
-                 * The characteristic definition representing the characteristic
-                 * being registered.
-                 */
-                const struct ble_gatt_chr_def *chr_def;
-
-                /**
-                 * The service definition corresponding to the characteristic's
-                 * parent service.
-                 */
-                const struct ble_gatt_svc_def *svc_def;
-            } chr;
-
-            /** Descriptor; valid if op == BLE_GATT_REGISTER_OP_DSC. */
-            struct {
-                /** The ATT handle of the descriptor definition attribute. */
-                uint16_t handle;
-
-                /**
-                 * The descriptor definition corresponding to the descriptor being
-                 * registered.
-                 */
-                const struct ble_gatt_dsc_def *dsc_def;
-
-                /**
-                 * The characteristic definition corresponding to the descriptor's
-                 * parent characteristic.
-                 */
-                const struct ble_gatt_chr_def *chr_def;
-
-                /**
-                 * The service definition corresponding to the descriptor's
-                 * grandparent service
-                 */
-                const struct ble_gatt_svc_def *svc_def;
-            } dsc;
-        };
-    };
-
-.. code:: c
-
-    typedef void ble_gatt_register_fn(struct ble_gatt_register_ctxt *ctxt,
-                                      void *arg);
diff --git a/docs/network/ble/ble_hs/ble_gatts/functions/ble_gatts_add_svcs.rst b/docs/network/ble/ble_hs/ble_gatts/functions/ble_gatts_add_svcs.rst
deleted file mode 100644
index f3004332f..000000000
--- a/docs/network/ble/ble_hs/ble_gatts/functions/ble_gatts_add_svcs.rst
+++ /dev/null
@@ -1,42 +0,0 @@
-ble\_gatts\_add\_svcs
----------------------
-
-.. code:: c
-
-    int
-    ble_gatts_add_svcs(const struct ble_gatt_svc_def *svcs)
-
-Description
-~~~~~~~~~~~
-
-Queues a set of service definitions for registration. All services
-queued in this manner get registered when ble\_hs\_init() is called.
-
-Parameters
-~~~~~~~~~~
-
-+----------------+------------------+
-| *Parameter*    | *Description*    |
-+================+==================+
-| svcs           | An array of      |
-|                | service          |
-|                | definitions to   |
-|                | queue for        |
-|                | registration.    |
-|                | This array must  |
-|                | be terminated    |
-|                | with an entry    |
-|                | whose 'type'     |
-|                | equals 0.        |
-+----------------+------------------+
-
-Returned values
-~~~~~~~~~~~~~~~
-
-+-------------------+--------------------+
-| *Value*           | *Condition*        |
-+===================+====================+
-| 0                 | Success.           |
-+-------------------+--------------------+
-| BLE\_HS\_ENOMEM   | Heap exhaustion.   |
-+-------------------+--------------------+
diff --git a/docs/network/ble/ble_hs/ble_gatts/functions/ble_gatts_count_cfg.rst b/docs/network/ble/ble_hs/ble_gatts/functions/ble_gatts_count_cfg.rst
deleted file mode 100644
index 3a8d8bd59..000000000
--- a/docs/network/ble/ble_hs/ble_gatts/functions/ble_gatts_count_cfg.rst
+++ /dev/null
@@ -1,39 +0,0 @@
-ble\_gatts\_count\_cfg
-----------------------
-
-.. code:: c
-
-    int
-    ble_gatts_count_cfg(const struct ble_gatt_svc_def *defs)
-
-Description
-~~~~~~~~~~~
-
-Adjusts a host configuration object's settings to accommodate the
-specified service definition array. This function adds the counts to the
-appropriate fields in the supplied configuration object without clearing
-them first, so it can be called repeatedly with different inputs to
-calculate totals. Be sure to zero the GATT server settings prior to the
-first call to this function.
-
-Parameters
-~~~~~~~~~~
-
-+---------------+------------------------------------------------------------------------+
-| *Parameter*   | *Description*                                                          |
-+===============+========================================================================+
-| defs          | The service array containing the resource definitions to be counted.   |
-+---------------+------------------------------------------------------------------------+
-| cfg           | The resource counts are accumulated in this configuration object.      |
-+---------------+------------------------------------------------------------------------+
-
-Returned values
-~~~~~~~~~~~~~~~
-
-+-------------------+-----------------------------------------------------------+
-| *Value*           | *Condition*                                               |
-+===================+===========================================================+
-| 0                 | Success.                                                  |
-+-------------------+-----------------------------------------------------------+
-| BLE\_HS\_EINVAL   | The svcs array contains an invalid resource definition.   |
-+-------------------+-----------------------------------------------------------+
diff --git a/docs/network/ble/ble_hs/ble_gatts/functions/ble_gatts_find_chr.rst b/docs/network/ble/ble_hs/ble_gatts/functions/ble_gatts_find_chr.rst
deleted file mode 100644
index 68de12659..000000000
--- a/docs/network/ble/ble_hs/ble_gatts/functions/ble_gatts_find_chr.rst
+++ /dev/null
@@ -1,64 +0,0 @@
-ble\_gatts\_find\_chr
----------------------
-
-.. code:: c
-
-    int
-    ble_gatts_find_chr(
-        const ble_uuid_t *svc_uuid,
-        const ble_uuid_t *chr_uuid,
-                uint16_t *out_def_handle,
-                uint16_t *out_val_handle
-    )
-
-Description
-~~~~~~~~~~~
-
-Retrieves the pair of attribute handles associated with a local GATT
-characteristic.
-
-Parameters
-~~~~~~~~~~
-
-+----------------+------------------+
-| *Parameter*    | *Description*    |
-+================+==================+
-| svc\_uuid128   | The UUID of the  |
-|                | parent service.  |
-+----------------+------------------+
-| chr\_uuid128   | The UUID of the  |
-|                | characteristic   |
-|                | to look up.      |
-+----------------+------------------+
-| out\_def\_hand | On success,      |
-| le             | populated with   |
-|                | the handle of    |
-|                | the              |
-|                | characteristic   |
-|                | definition       |
-|                | attribute. Pass  |
-|                | null if you      |
-|                | don't need this  |
-|                | value.           |
-+----------------+------------------+
-| out\_val\_hand | On success,      |
-| le             | populated with   |
-|                | the handle of    |
-|                | the              |
-|                | characteristic   |
-|                | value attribute. |
-|                | Pass null if you |
-|                | don't need this  |
-|                | value.           |
-+----------------+------------------+
-
-Returned values
-~~~~~~~~~~~~~~~
-
-+-------------------+---------------------------------------------------------------+
-| *Value*           | *Condition*                                                   |
-+===================+===============================================================+
-| 0                 | Success.                                                      |
-+-------------------+---------------------------------------------------------------+
-| BLE\_HS\_ENOENT   | The specified service or characteristic could not be found.   |
-+-------------------+---------------------------------------------------------------+
diff --git a/docs/network/ble/ble_hs/ble_gatts/functions/ble_gatts_find_dsc.rst b/docs/network/ble/ble_hs/ble_gatts/functions/ble_gatts_find_dsc.rst
deleted file mode 100644
index 50b32f0b2..000000000
--- a/docs/network/ble/ble_hs/ble_gatts/functions/ble_gatts_find_dsc.rst
+++ /dev/null
@@ -1,62 +0,0 @@
-ble\_gatts\_find\_dsc
----------------------
-
-.. code:: c
-
-    int
-    ble_gatts_find_dsc(
-        const ble_uuid_t *svc_uuid,
-        const ble_uuid_t *chr_uuid,
-        const ble_uuid_t *dsc_uuid,
-                uint16_t *out_handle
-    )
-
-Description
-~~~~~~~~~~~
-
-Retrieves the attribute handle associated with a local GATT descriptor.
-
-Parameters
-~~~~~~~~~~
-
-+----------------+------------------+
-| *Parameter*    | *Description*    |
-+================+==================+
-| svc\_uuid128   | The UUID of the  |
-|                | grandparent      |
-|                | service.         |
-+----------------+------------------+
-| chr\_uuid128   | The UUID of the  |
-|                | parent           |
-|                | characteristic.  |
-+----------------+------------------+
-| dsc\_uuid128   | The UUID of the  |
-|                | descriptor ro    |
-|                | look up.         |
-+----------------+------------------+
-| out\_handle    | On success,      |
-|                | populated with   |
-|                | the handle of    |
-|                | the descripytor  |
-|                | attribute. Pass  |
-|                | null if you      |
-|                | don't need this  |
-|                | value.           |
-+----------------+------------------+
-
-Returned values
-~~~~~~~~~~~~~~~
-
-+------------+----------------+
-| *Value*    | *Condition*    |
-+============+================+
-| 0          | Success.       |
-+------------+----------------+
-| BLE\_HS\_E | The specified  |
-| NOENT      | service,       |
-|            | characteristic |
-|            | ,              |
-|            | or descriptor  |
-|            | could not be   |
-|            | found.         |
-+------------+----------------+
diff --git a/docs/network/ble/ble_hs/ble_gatts/functions/ble_gatts_find_svc.rst b/docs/network/ble/ble_hs/ble_gatts/functions/ble_gatts_find_svc.rst
deleted file mode 100644
index 40a83da17..000000000
--- a/docs/network/ble/ble_hs/ble_gatts/functions/ble_gatts_find_svc.rst
+++ /dev/null
@@ -1,46 +0,0 @@
-ble\_gatts\_find\_svc
----------------------
-
-.. code:: c
-
-    int
-    ble_gatts_find_svc(
-        const ble_uuid_t *uuid,
-                uint16_t *out_handle
-    )
-
-Description
-~~~~~~~~~~~
-
-Retrieves the attribute handle associated with a local GATT service.
-
-Parameters
-~~~~~~~~~~
-
-+----------------+------------------+
-| *Parameter*    | *Description*    |
-+================+==================+
-| uuid128        | The UUID of the  |
-|                | service to look  |
-|                | up.              |
-+----------------+------------------+
-| out\_handle    | On success,      |
-|                | populated with   |
-|                | the handle of    |
-|                | the service      |
-|                | attribute. Pass  |
-|                | null if you      |
-|                | don't need this  |
-|                | value.           |
-+----------------+------------------+
-
-Returned values
-~~~~~~~~~~~~~~~
-
-+-------------------+---------------------------------------------+
-| *Value*           | *Condition*                                 |
-+===================+=============================================+
-| 0                 | Success.                                    |
-+-------------------+---------------------------------------------+
-| BLE\_HS\_ENOENT   | The specified service could not be found.   |
-+-------------------+---------------------------------------------+
diff --git a/docs/network/ble/ble_hs/ble_gatts/functions/ble_gatts_svc_set_visibility.rst b/docs/network/ble/ble_hs/ble_gatts/functions/ble_gatts_svc_set_visibility.rst
deleted file mode 100644
index ce0d470c4..000000000
--- a/docs/network/ble/ble_hs/ble_gatts/functions/ble_gatts_svc_set_visibility.rst
+++ /dev/null
@@ -1,45 +0,0 @@
-ble\_gatts\_svc\_set\_visibility
---------------------------------
-
-.. code:: c
-
-    int
-    ble_gatts_svc_set_visibility(uint16_t handle, int visible)
-
-Description
-~~~~~~~~~~~
-
-Changes visibility of a service with specified handle. This function
-allow any service to be hidden (and then restored) from clients. Note:
-From GATT point of view, the service is still registered and has the
-same handle range assigned and it is ATT server which hides the
-attributes from the client.
-
-Parameters
-~~~~~~~~~~
-
-+----------------+------------------+
-| *Parameter*    | *Description*    |
-+================+==================+
-| handle         | The handle of a  |
-|                | service for      |
-|                | which the        |
-|                | visibility       |
-|                | should be        |
-|                | changed.         |
-+----------------+------------------+
-| visible        | The value of     |
-|                | visibility to    |
-|                | set.             |
-+----------------+------------------+
-
-Returned values
-~~~~~~~~~~~~~~~
-
-+-------------------+--------------------------------------------------+
-| *Value*           | *Condition*                                      |
-+===================+==================================================+
-| 0                 | Success.                                         |
-+-------------------+--------------------------------------------------+
-| BLE\_HS\_ENOENT   | The svcs with specified handle does not exist.   |
-+-------------------+--------------------------------------------------+
diff --git a/docs/network/ble/ble_hs/ble_gatts/mdtoc.rst b/docs/network/ble/ble_hs/ble_gatts/mdtoc.rst
deleted file mode 100644
index 15f82b7ec..000000000
--- a/docs/network/ble/ble_hs/ble_gatts/mdtoc.rst
+++ /dev/null
@@ -1,13 +0,0 @@
-::
-
-            - 'GATT server':
-                - toc: 'network/ble/ble_hs/ble_gatts/ble_gatts.md'
-                - 'Definitions':
-                    - 'GATT server definitions': 'network/ble/ble_hs/ble_gatts/definitions/ble_gatts_defs.md'
-                - 'Functions':
-                    - 'ble_gatts_add_svcs': 'network/ble/ble_hs/ble_gatts/functions/ble_gatts_add_svcs.md'
-                    - 'ble_gatts_svc_set_visibility': 'network/ble/ble_hs/ble_gatts/functions/ble_gatts_svc_set_visibility.md'
-                    - 'ble_gatts_count_cfg': 'network/ble/ble_hs/ble_gatts/functions/ble_gatts_count_cfg.md'
-                    - 'ble_gatts_find_chr': 'network/ble/ble_hs/ble_gatts/functions/ble_gatts_find_chr.md'
-                    - 'ble_gatts_find_dsc': 'network/ble/ble_hs/ble_gatts/functions/ble_gatts_find_dsc.md'
-                    - 'ble_gatts_find_svc': 'network/ble/ble_hs/ble_gatts/functions/ble_gatts_find_svc.md'
diff --git a/docs/network/ble/ble_hs/ble_hs.rst b/docs/network/ble/ble_hs/ble_hs.rst
index b5c33c205..4de5a6495 100644
--- a/docs/network/ble/ble_hs/ble_hs.rst
+++ b/docs/network/ble/ble_hs/ble_hs.rst
@@ -1,5 +1,5 @@
 NimBLE Host
-===========
+-----------
 
 Introduction
 ~~~~~~~~~~~~
@@ -11,18 +11,17 @@ At a high level, the NimBLE stack is divided into two components:
 
 This document is an API reference for the host component. If you are
 interested in the general structure of the NimBLE stack and its non-host
-components, you might want to read the `BLE
-introduction <../ble_intro.html>`__.
+components, you might want to read the :doc:`../ble_intro`.
 
 The host sits directly below the application, and it serves as the
 interface to the application for all BLE operations.
 
-Reference
-~~~~~~~~~
+.. toctree::
+   :titlesonly:
 
--  `NimBLE Host Return Codes <ble_hs_return_codes.html>`__
--  `Generic Access Protocol (GAP) <ble_gap/ble_gap.html>`__
--  `Generic Attribute Profile (GATT) Client <ble_gattc/ble_gattc.html>`__
--  `Generic Attribute Profile (GATT) Server <ble_gatts/ble_gatts.html>`__
--  `Identity <ble_hs_id/ble_hs_id.html>`__
--  `Other <other/other.html>`__
+   Return Codes <ble_hs_return_codes>
+   GAP <ble_gap>
+   GATT Client <ble_gattc>
+   GATT Server <ble_gatts>
+   Identity <ble_hs_id>
+   ATT <ble_att>
diff --git a/docs/network/ble/ble_hs/ble_hs_id.rst b/docs/network/ble/ble_hs/ble_hs_id.rst
new file mode 100644
index 000000000..dbb47c941
--- /dev/null
+++ b/docs/network/ble/ble_hs/ble_hs_id.rst
@@ -0,0 +1,45 @@
+NimBLE Host Identity Reference
+------------------------------
+
+Introduction
+~~~~~~~~~~~~
+
+The identity API provides facilities for querying and configuring your device's addresses. BLE's addressing scheme is
+quite involved; the summary that follows is only a brief introduction.
+
+BLE defines four address types:
+
++---------------------------------+---------------------------------------------------------------------------------------------------+-------------+----------------------------------------------+
+| Type                            | Description                                                                                       | Identity?   | Configured with                              |
++=================================+===================================================================================================+=============+==============================================+
+| Public                          | Address assigned by manufacturer; the three most significant bytes form the manufacturer's OUI.   | Yes         | N/A; read from controller at startup.        |
++---------------------------------+---------------------------------------------------------------------------------------------------+-------------+----------------------------------------------+
+| Static random                   | Randomly generated address.                                                                       | Yes         | *ble_hs_id_set_rnd()*                        |
++---------------------------------+---------------------------------------------------------------------------------------------------+-------------+----------------------------------------------+
+| Resolvable private (RPA)        | Address randomly generated from an identity address and an identity resolving key (IRK).          | No          | N/A; generated by controller periodically.   |
++---------------------------------+---------------------------------------------------------------------------------------------------+-------------+----------------------------------------------+
+| Non-resolvable private (NRPA)   | Randomly generated address.                                                                       | No          | *ble_hs_id_set_rnd()*                        |
++---------------------------------+---------------------------------------------------------------------------------------------------+-------------+----------------------------------------------+
+
+Identity Addresses
+^^^^^^^^^^^^^^^^^^
+
+The third column in the above table indicates the *identity* property of each address type. An identity address never
+changes, and a device can be identified by one of its unique identity addresses.
+
+Non-identity addresses are used by devices supporting BLE privacy. A device using the privacy feature frequently changes
+its own address to a newly-generated non-identity address. By cycling its address, the device makes it impossible for
+eavesdroppers to track its location.
+
+A device can have up to two identity addresses at once: one public and one static random. As indicated in the above table,
+the public identity address cannot be configured; the static random identity address can be set by calling *ble_hs_id_set_rnd()*.
+
+The address type is selected on a per-GAP-procedure basis. Each time you initiate a GAP procedure, you indicate which
+address type the device should use for the duration of the procedure.
+
+Header
+~~~~~~
+
+.. code-block:: cpp
+
+    #include "host/ble_hs.h"
diff --git a/docs/network/ble/ble_hs/ble_hs_id/ble_hs_id.rst b/docs/network/ble/ble_hs/ble_hs_id/ble_hs_id.rst
deleted file mode 100644
index b825cafd1..000000000
--- a/docs/network/ble/ble_hs/ble_hs_id/ble_hs_id.rst
+++ /dev/null
@@ -1,79 +0,0 @@
-NimBLE Host Identity Reference
-------------------------------
-
-Introduction
-~~~~~~~~~~~~
-
-The identity API provides facilities for querying and configuring your
-device's addresses. BLE's addressing scheme is quite involved; the
-summary that follows is only a brief introduction.
-
-BLE defines four address types:
-
-+--------------+---------------------------------------+------+-------------------+
-| Type         | Description                           | Iden | Configured with   |
-|              |                                       | tity |                   |
-|              |                                       | ?    |                   |
-+==============+=======================================+======+===================+
-| Public       | Address assigned by manufacturer; the | Yes  | N/A; read from    |
-|              | three most significant bytes form the |      | controller at     |
-|              | manufacturer's OUI.                   |      | startup.          |
-+--------------+---------------------------------------+------+-------------------+
-| Static       | Randomly generated address.           | Yes  | *ble\_hs\_id\_set |
-| random       |                                       |      | \_rnd()*          |
-+--------------+---------------------------------------+------+-------------------+
-| Resolvable   | Address randomly generated from an    | No   | N/A; generated by |
-| private      | identity address and an identity      |      | controller        |
-| (RPA)        | resolving key (IRK).                  |      | periodically.     |
-+--------------+---------------------------------------+------+-------------------+
-| Non-resolvab | Randomly generated address.           | No   | *ble\_hs\_id\_set |
-| le           |                                       |      | \_rnd()*          |
-| private      |                                       |      |                   |
-| (NRPA)       |                                       |      |                   |
-+--------------+---------------------------------------+------+-------------------+
-
-Identity Addresses
-^^^^^^^^^^^^^^^^^^
-
-The third column in the above table indicates the *identity* property of
-each address type. An identity address never changes, and a device can
-be identified by one of its unique identity addresses.
-
-Non-identity addresses are used by devices supporting BLE privacy. A
-device using the privacy feature frequently changes its own address to a
-newly-generated non-identity address. By cycling its address, the device
-makes it impossible for eavesdroppers to track its location.
-
-A device can have up to two identity addresses at once: one public and
-one static random. As indicated in the above table, the public identity
-address cannot be configured; the static random identity address can be
-set by calling *ble\_hs\_id\_set\_rnd()*.
-
-The address type is selected on a per-GAP-procedure basis. Each time you
-initiate a GAP procedure, you indicate which address type the device
-should use for the duration of the procedure.
-
-Header
-~~~~~~
-
-.. code:: c
-
-    #include "host/ble_hs.h"
-
-Definitions
-~~~~~~~~~~~
-
-None.
-
-Functions
-~~~~~~~~~
-
-+------------------------------------------------------------------+-----------------------------------------------------+
-| Function                                                         | Description                                         |
-+==================================================================+=====================================================+
-| `ble\_hs\_id\_copy\_addr <functions/ble_hs_id_copy_addr.html>`__   | Retrieves one of the device's identity addresses.   |
-+------------------------------------------------------------------+-----------------------------------------------------+
-| `ble\_hs\_id\_gen\_rnd <functions/ble_hs_id_gen_rnd.html>`__       | Generates a new random address.                     |
-+------------------------------------------------------------------+-----------------------------------------------------+
-| `ble\_hs\_id\_set\_rnd <functions/ble_hs_id_set_rnd.html>`__       | Sets the device's random address.                   |
-+------------------------------------------------------------------+-----------------------------------------------------+
diff --git a/docs/network/ble/ble_hs/ble_hs_id/functions/ble_hs_id_copy_addr.rst b/docs/network/ble/ble_hs/ble_hs_id/functions/ble_hs_id_copy_addr.rst
deleted file mode 100644
index 5c1ad2f2d..000000000
--- a/docs/network/ble/ble_hs/ble_hs_id/functions/ble_hs_id_copy_addr.rst
+++ /dev/null
@@ -1,86 +0,0 @@
-ble\_hs\_id\_copy\_addr
------------------------
-
-.. code:: c
-
-    int
-    ble_hs_id_copy_addr(
-        uint8_t  id_addr_type,
-        uint8_t *out_id_addr,
-            int *out_is_nrpa
-    )
-
-Description
-~~~~~~~~~~~
-
-Retrieves one of the device's identity addresses. The device can have
-two identity addresses: one public and one random. The id\_addr\_type
-argument specifies which of these two addresses to retrieve.
-
-Parameters
-~~~~~~~~~~
-
-+---------------+-----------------+
-| *Parameter*   | *Description*   |
-+===============+=================+
-+---------------+-----------------+
-
-\| id\_addr\_type \| The type of identity address to retrieve. Valid
-values are:
-
-.. raw:: html
-
-   <ul>
-
-.. raw:: html
-
-   <li>
-
-BLE\_ADDR\_PUBLIC
-
-.. raw:: html
-
-   </li>
-
-.. raw:: html
-
-   <li>
-
-BLE\_ADDR\_RANDOM
-
-.. raw:: html
-
-   </li>
-
-.. raw:: html
-
-   </ul>
-
-\| \| out\_id\_addr \| On success, the requested identity address is
-copied into this buffer. The buffer must be at least six bytes in size.
-\| \| out\_is\_nrpa \| On success, the pointed-to value indicates
-whether the retrieved address is a non-resolvable private address. \|
-
-Returned values
-~~~~~~~~~~~~~~~
-
-+------------+----------------+
-| *Value*    | *Condition*    |
-+============+================+
-| 0          | Success.       |
-+------------+----------------+
-| BLE\_HS\_E | An invalid     |
-| INVAL      | address type   |
-|            | was specified. |
-+------------+----------------+
-| BLE\_HS\_E | The device     |
-| NOADDR     | does not have  |
-|            | an identity    |
-|            | address of the |
-|            | requested      |
-|            | type.          |
-+------------+----------------+
-| other      | Other ble host |
-|            | core code on   |
-|            | error.         |
-+------------+----------------+
diff --git a/docs/network/ble/ble_hs/ble_hs_id/functions/ble_hs_id_gen_rnd.rst b/docs/network/ble/ble_hs/ble_hs_id/functions/ble_hs_id_gen_rnd.rst
deleted file mode 100644
index 2172029d8..000000000
--- a/docs/network/ble/ble_hs/ble_hs_id/functions/ble_hs_id_gen_rnd.rst
+++ /dev/null
@@ -1,47 +0,0 @@
-ble\_hs\_id\_gen\_rnd
----------------------
-
-.. code:: c
-
-    int
-    ble_hs_id_gen_rnd(
-               int  nrpa,
-        ble_addr_t *out_addr
-    )
-
-Description
-~~~~~~~~~~~
-
-Generates a new random address. This function does not configure the
-device with the new address; the caller can use the address in
-subsequent operations.
-
-Parameters
-~~~~~~~~~~
-
-+----------------+------------------+
-| *Parameter*    | *Description*    |
-+================+==================+
-| nrpa           | The type of      |
-|                | random address   |
-|                | to generate: 0:  |
-|                | static 1:        |
-|                | non-resolvable   |
-|                | private          |
-+----------------+------------------+
-| out\_addr      | On success, the  |
-|                | generated        |
-|                | address gets     |
-|                | written here.    |
-+----------------+------------------+
-
-Returned values
-~~~~~~~~~~~~~~~
-
-+-----------------------------------------------------------------------+---------------------+
-| *Value*                                                               | *Condition*         |
-+=======================================================================+=====================+
-| 0                                                                     | Success.            |
-+-----------------------------------------------------------------------+---------------------+
-| `Core return code <../../ble_hs_return_codes/#return-codes-core>`__   | Unexpected error.   |
-+-----------------------------------------------------------------------+---------------------+
diff --git a/docs/network/ble/ble_hs/ble_hs_id/functions/ble_hs_id_set_rnd.rst b/docs/network/ble/ble_hs/ble_hs_id/functions/ble_hs_id_set_rnd.rst
deleted file mode 100644
index 3912e104d..000000000
--- a/docs/network/ble/ble_hs/ble_hs_id/functions/ble_hs_id_set_rnd.rst
+++ /dev/null
@@ -1,35 +0,0 @@
-ble\_hs\_id\_set\_rnd
----------------------
-
-.. code:: c
-
-    int
-    ble_hs_id_set_rnd(const uint8_t *rnd_addr)
-
-Description
-~~~~~~~~~~~
-
-Sets the device's random address. The address type (static vs.
-non-resolvable private) is inferred from the most-significant byte of
-the address. The address is specified in host byte order
-(little-endian!).
-
-Parameters
-~~~~~~~~~~
-
-+---------------+------------------------------+
-| *Parameter*   | *Description*                |
-+===============+==============================+
-| rnd\_addr     | The random address to set.   |
-+---------------+------------------------------+
-
-Returned values
-~~~~~~~~~~~~~~~
-
-+-----------------------------------------------------------------------+---------------------+
-| *Value*                                                               | *Condition*         |
-+=======================================================================+=====================+
-| 0                                                                     | Success.            |
-+-----------------------------------------------------------------------+---------------------+
-| `Core return code <../../ble_hs_return_codes/#return-codes-core>`__   | Unexpected error.   |
-+-----------------------------------------------------------------------+---------------------+
diff --git a/docs/network/ble/ble_hs/ble_hs_id/mdtoc.rst b/docs/network/ble/ble_hs/ble_hs_id/mdtoc.rst
deleted file mode 100644
index b13c65e8e..000000000
--- a/docs/network/ble/ble_hs/ble_hs_id/mdtoc.rst
+++ /dev/null
@@ -1,8 +0,0 @@
-::
-
-            - 'Identity':
-                - toc: 'network/ble/ble_hs/ble_hs_id/ble_hs_id.md'
-                - 'Functions':
-                    - 'ble_hs_id_copy_addr': 'network/ble/ble_hs/ble_hs_id/functions/ble_hs_id_copy_addr.md'
-                    - 'ble_hs_id_gen_rnd': 'network/ble/ble_hs/ble_hs_id/functions/ble_hs_id_gen_rnd.md'
-                    - 'ble_hs_id_set_rnd': 'network/ble/ble_hs/ble_hs_id/functions/ble_hs_id_set_rnd.md'
diff --git a/docs/network/ble/ble_hs/ble_hs_return_codes.rst b/docs/network/ble/ble_hs/ble_hs_return_codes.rst
index 2acf4a404..c69cc4f8d 100644
--- a/docs/network/ble/ble_hs/ble_hs_return_codes.rst
+++ b/docs/network/ble/ble_hs/ble_hs_return_codes.rst
@@ -1,21 +1,9 @@
 NimBLE Host Return Codes
 ------------------------
 
--  `Introduction <#introduction>`__
-
-   -  `Summary <#summary>`__
-   -  `Example <#example>`__
-
--  `Return Code Reference <#return-code-reference>`__
-
-   -  `Return codes - Core <#return-codes-core>`__
-   -  `Return codes - ATT <#return-codes-att>`__
-   -  `Return codes - HCI <#return-codes-hci>`__
-   -  `Return codes - L2CAP <#return-codes-l2cap>`__
-   -  `Return codes - Security manager
-      (us) <#return-codes-security-manager-(us)>`__
-   -  `Return codes - Security manager
-      (peer) <#return-codes-security-manager-(peer)>`__
+.. contents::
+    :local:
+    :depth: 2
 
 Introduction
 ~~~~~~~~~~~~
@@ -23,112 +11,27 @@ Introduction
 Summary
 ^^^^^^^
 
-The NimBLE host reports status to the application via a set of return
-codes. The host encompasses several layers of the Bluetooth
-specification that each defines its own set of status codes. Rather than
-"abstract away" information from lower layers that the application
-developer might find useful, the NimBLE host aims to indicate precisely
-what happened when something fails. Consequently, the host utilizes a
-rather large set of return codes.
-
-A return code of 0 indicates success. For failure conditions, the return
-codes are partitioned into five separate sets:
-
-+--------+----------------+
-| Set    | Condition      |
-+========+================+
-| Core   | Errors         |
-|        | detected       |
-|        | internally by  |
-|        | the NimBLE     |
-|        | host.          |
-+--------+----------------+
-| ATT    | The ATT server |
-|        | has reported a |
-|        | failure via    |
-|        | the            |
-|        | transmission   |
-|        | of an ATT      |
-|        | Error          |
-|        | Response. The  |
-|        | return code    |
-|        | corresponds to |
-|        | the value of   |
-|        | the Error Code |
-|        | field in the   |
-|        | response.      |
-+--------+----------------+
-| HCI    | The controller |
-|        | has reported   |
-|        | an error to    |
-|        | the host via a |
-|        | command        |
-|        | complete or    |
-|        | command status |
-|        | HCI event. The |
-|        | return code    |
-|        | corresponds to |
-|        | the value of   |
-|        | the Status     |
-|        | field in the   |
-|        | event.         |
-+--------+----------------+
-| L2CAP  | An L2CAP       |
-|        | signaling      |
-|        | procedure has  |
-|        | failed and an  |
-|        | L2CAP Command  |
-|        | Reject was     |
-|        | sent as a      |
-|        | result. The    |
-|        | return code    |
-|        | corresponds to |
-|        | the value of   |
-|        | the Reason     |
-|        | field in the   |
-|        | command.       |
-+--------+----------------+
-| Securi | The host       |
-| ty     | detected an    |
-| manage | error during a |
-| r      | security       |
-| (us)   | manager        |
-|        | procedure and  |
-|        | sent a Pairing |
-|        | Failed command |
-|        | to the peer.   |
-|        | The return     |
-|        | code           |
-|        | corresponds to |
-|        | the value of   |
-|        | the Reason     |
-|        | field in the   |
-|        | Pairing Failed |
-|        | command.       |
-+--------+----------------+
-| Securi | A security     |
-| ty     | manager        |
-| manage | procedure      |
-| r      | failed because |
-| (peer) | the peer sent  |
-|        | us a Pairing   |
-|        | Failed         |
-|        | command. The   |
-|        | return code    |
-|        | corresponds to |
-|        | the value of   |
-|        | the Reason     |
-|        | field in the   |
-|        | Pairing Failed |
-|        | command.       |
-+--------+----------------+
-
-The return codes in the core set are defined by the NimBLE Host. The
-other sets are defined in the Bluetooth specification; the codes in this
-latter group are referred to as *formal status codes*. As defined in the
-Bluetooth specification, the formal status code sets are not disjoint.
-That is, they overlap. For example, the spec defines a status code of 1
-to have all of the following meanings:
+The NimBLE host reports status to the application via a set of return codes. The host encompasses several layers of the Bluetooth specification that each defines its own set of status codes. Rather than "abstract away" information from lower layers that the application developer might find useful, the NimBLE host aims to indicate precisely what happened when something fails. Consequently, the host utilizes a rather large set of return codes.
+
+A return code of 0 indicates success. For failure conditions, the return codes are partitioned into five separate sets:
+
++---------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
+| Set                       | Condition                                                                                                                                                                                                   |
++===========================+=============================================================================================================================================================================================================+
+| Core                      | Errors detected internally by the NimBLE host.                                                                                                                                                              |
++---------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
+| ATT                       | The ATT server has reported a failure via the transmission of an ATT Error Response. The return code corresponds to the value of the Error Code field in the response.                                      |
++---------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
+| HCI                       | The controller has reported an error to the host via a command complete or command status HCI event. The return code corresponds to the value of the Status field in the event.                             |
++---------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
+| L2CAP                     | An L2CAP signaling procedure has failed and an L2CAP Command Reject was sent as a result. The return code corresponds to the value of the Reason field in the command.                                      |
++---------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
+| Security manager (us)     | The host detected an error during a security manager procedure and sent a Pairing Failed command to the peer. The return code corresponds to the value of the Reason field in the Pairing Failed command.   |
++---------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
+| Security manager (peer)   | A security manager procedure failed because the peer sent us a Pairing Failed command. The return code corresponds to the value of the Reason field in the Pairing Failed command.                          |
++---------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
+
+The return codes in the core set are defined by the NimBLE Host. The other sets are defined in the Bluetooth specification; the codes in this latter group are referred to as *formal status codes*. As defined in the Bluetooth specification, the formal status code sets are not disjoint. That is, they overlap. For example, the spec defines a status code of 1 to have all of the following meanings:
 
 +---------+----------------------------+
 | Layer   | Meaning                    |
@@ -142,17 +45,9 @@ to have all of the following meanings:
 | SM      | Passkey entry failed.      |
 +---------+----------------------------+
 
-Clearly, the host can't just return an unadorned formal status code and
-expect the application to make sense of it. To resolve this ambiguity,
-the NimBLE host divides the full range of an int into several subranges.
-Each subrange corresponds to one of the five return code sets. For
-example, the ATT set is mapped onto the subrange *[0x100, 0x200)*. To
-indicate an ATT error of 3 (write not permitted), the NimBLE host
-returns a value 0x103 to the application.
+Clearly, the host can't just return an unadorned formal status code and expect the application to make sense of it. To resolve this ambiguity, the NimBLE host divides the full range of an int into several subranges. Each subrange corresponds to one of the five return code sets. For example, the ATT set is mapped onto the subrange *[0x100, 0x200)*. To indicate an ATT error of 3 (write not permitted), the NimBLE host returns a value 0x103 to the application.
 
-The host defines a set of convenience macros for converting from a
-formal status code to NimBLE host status code. These macros are
-documented in the table below.
+The host defines a set of convenience macros for converting from a formal status code to NimBLE host status code. These macros are documented in the table below.
 
 +----------------------------+---------------------------+--------------+
 | Macro                      | Status code set           | Base value   |
@@ -171,12 +66,7 @@ documented in the table below.
 Example
 ^^^^^^^
 
-The following example demonstrates how an application might determine
-which error is being reported by the host. In this example, the
-application performs the GAP encryption procedure and checks the return
-code. To simplify the example, the application uses a hypothetical
-*my\_blocking\_enc\_proc()* function, which blocks until the pairing
-operation has completed.
+The following example demonstrates how an application might determine which error is being reported by the host. In this example, the application performs the GAP encryption procedure and checks the return code. To simplify the example, the application uses a hypothetical *my\_blocking\_enc\_proc()* function, which blocks until the pairing operation has completed.
 
 .. code:: c
 
@@ -219,8 +109,7 @@ Return Code Reference
 Header
 ^^^^^^
 
-All NimBLE host return codes are made accessible by including the
-following header:
+All NimBLE host return codes are made accessible by including the following header:
 
 .. code:: c
 
@@ -229,760 +118,320 @@ following header:
 Return codes - Core
 ^^^^^^^^^^^^^^^^^^^
 
-The precise meaning of each of these error codes depends on the function
-that returns it. The API reference for a particular function indicates
-the conditions under which each of these codes are returned.
-
-+----------+-------------------+-------------------------------------------------+
-| Value    | Name              | Condition                                       |
-+==========+===================+=================================================+
-| 0x00     | *N/A*             | Success                                         |
-+----------+-------------------+-------------------------------------------------+
-| 0x01     | BLE\_HS\_EAGAIN   | Temporary failure; try again.                   |
-+----------+-------------------+-------------------------------------------------+
-| 0x02     | BLE\_HS\_EALREADY | Operation already in progress or completed.     |
-+----------+-------------------+-------------------------------------------------+
-| 0x03     | BLE\_HS\_EINVAL   | One or more arguments are invalid.              |
-+----------+-------------------+-------------------------------------------------+
-| 0x04     | BLE\_HS\_EMSGSIZE | The provided buffer is too small.               |
-+----------+-------------------+-------------------------------------------------+
-| 0x05     | BLE\_HS\_ENOENT   | No entry matching the specified criteria.       |
-+----------+-------------------+-------------------------------------------------+
-| 0x06     | BLE\_HS\_ENOMEM   | Operation failed due to resource exhaustion.    |
-+----------+-------------------+-------------------------------------------------+
-| 0x07     | BLE\_HS\_ENOTCONN | No open connection with the specified handle.   |
-+----------+-------------------+-------------------------------------------------+
-| 0x08     | BLE\_HS\_ENOTSUP  | Operation disabled at compile time.             |
-+----------+-------------------+-------------------------------------------------+
-| 0x09     | BLE\_HS\_EAPP     | Application callback behaved unexpectedly.      |
-+----------+-------------------+-------------------------------------------------+
-| 0x0a     | BLE\_HS\_EBADDATA | Command from peer is invalid.                   |
-+----------+-------------------+-------------------------------------------------+
-| 0x0b     | BLE\_HS\_EOS      | Mynewt OS error.                                |
-+----------+-------------------+-------------------------------------------------+
-| 0x0c     | BLE\_HS\_ECONTROL | Event from controller is invalid.               |
-|          | LER               |                                                 |
-+----------+-------------------+-------------------------------------------------+
-| 0x0d     | BLE\_HS\_ETIMEOUT | Operation timed out.                            |
-+----------+-------------------+-------------------------------------------------+
-| 0x0e     | BLE\_HS\_EDONE    | Operation completed successfully.               |
-+----------+-------------------+-------------------------------------------------+
-| 0x0f     | BLE\_HS\_EBUSY    | Operation cannot be performed until procedure   |
-|          |                   | completes.                                      |
-+----------+-------------------+-------------------------------------------------+
-| 0x10     | BLE\_HS\_EREJECT  | Peer rejected a connection parameter update     |
-|          |                   | request.                                        |
-+----------+-------------------+-------------------------------------------------+
-| 0x11     | BLE\_HS\_EUNKNOWN | Unexpected failure; catch all.                  |
-+----------+-------------------+-------------------------------------------------+
-| 0x12     | BLE\_HS\_EROLE    | Operation requires different role (e.g.,        |
-|          |                   | central vs. peripheral).                        |
-+----------+-------------------+-------------------------------------------------+
-| 0x13     | BLE\_HS\_ETIMEOUT | HCI request timed out; controller unresponsive. |
-|          | \_HCI             |                                                 |
-+----------+-------------------+-------------------------------------------------+
-| 0x14     | BLE\_HS\_ENOMEM\_ | Controller failed to send event due to memory   |
-|          | EVT               | exhaustion (combined host-controller only).     |
-+----------+-------------------+-------------------------------------------------+
-| 0x15     | BLE\_HS\_ENOADDR  | Operation requires an identity address but none |
-|          |                   | configured.                                     |
-+----------+-------------------+-------------------------------------------------+
-| 0x16     | BLE\_HS\_ENOTSYNC | Attempt to use the host before it is synced     |
-|          | ED                | with controller.                                |
-+----------+-------------------+-------------------------------------------------+
-| 0x17     | BLE\_HS\_EAUTHEN  | Insufficient authentication.                    |
-+----------+-------------------+-------------------------------------------------+
-| 0x18     | BLE\_HS\_EAUTHOR  | Insufficient authorization.                     |
-+----------+-------------------+-------------------------------------------------+
-| 0x19     | BLE\_HS\_EENCRYPT | Insufficient encryption level.                  |
-+----------+-------------------+-------------------------------------------------+
-| 0x1a     | BLE\_HS\_EENCRYPT | Insufficient key size.                          |
-|          | \_KEY\_SZ         |                                                 |
-+----------+-------------------+-------------------------------------------------+
-| 0x1b     | BLE\_HS\_ESTORE\_ | Storage at capacity.                            |
-|          | CAP               |                                                 |
-+----------+-------------------+-------------------------------------------------+
-| 0x1c     | BLE\_HS\_ESTORE\_ | Storage IO error.                               |
-|          | FAIL              |                                                 |
-+----------+-------------------+-------------------------------------------------+
+The precise meaning of each of these error codes depends on the function that returns it.
+The API reference for a particular function indicates the conditions under which each of these codes are returned.
+
++---------+------------------------------+---------------------------------------------------------------------------------------------+
+| Value   | Name                         | Condition                                                                                   |
++=========+==============================+=============================================================================================+
+| 0x00    | *N/A*                        | Success                                                                                     |
++---------+------------------------------+---------------------------------------------------------------------------------------------+
+| 0x01    | BLE\_HS\_EAGAIN              | Temporary failure; try again.                                                               |
++---------+------------------------------+---------------------------------------------------------------------------------------------+
+| 0x02    | BLE\_HS\_EALREADY            | Operation already in progress or completed.                                                 |
++---------+------------------------------+---------------------------------------------------------------------------------------------+
+| 0x03    | BLE\_HS\_EINVAL              | One or more arguments are invalid.                                                          |
++---------+------------------------------+---------------------------------------------------------------------------------------------+
+| 0x04    | BLE\_HS\_EMSGSIZE            | The provided buffer is too small.                                                           |
++---------+------------------------------+---------------------------------------------------------------------------------------------+
+| 0x05    | BLE\_HS\_ENOENT              | No entry matching the specified criteria.                                                   |
++---------+------------------------------+---------------------------------------------------------------------------------------------+
+| 0x06    | BLE\_HS\_ENOMEM              | Operation failed due to resource exhaustion.                                                |
++---------+------------------------------+---------------------------------------------------------------------------------------------+
+| 0x07    | BLE\_HS\_ENOTCONN            | No open connection with the specified handle.                                               |
++---------+------------------------------+---------------------------------------------------------------------------------------------+
+| 0x08    | BLE\_HS\_ENOTSUP             | Operation disabled at compile time.                                                         |
++---------+------------------------------+---------------------------------------------------------------------------------------------+
+| 0x09    | BLE\_HS\_EAPP                | Application callback behaved unexpectedly.                                                  |
++---------+------------------------------+---------------------------------------------------------------------------------------------+
+| 0x0a    | BLE\_HS\_EBADDATA            | Command from peer is invalid.                                                               |
++---------+------------------------------+---------------------------------------------------------------------------------------------+
+| 0x0b    | BLE\_HS\_EOS                 | Mynewt OS error.                                                                            |
++---------+------------------------------+---------------------------------------------------------------------------------------------+
+| 0x0c    | BLE\_HS\_ECONTROLLER         | Event from controller is invalid.                                                           |
++---------+------------------------------+---------------------------------------------------------------------------------------------+
+| 0x0d    | BLE\_HS\_ETIMEOUT            | Operation timed out.                                                                        |
++---------+------------------------------+---------------------------------------------------------------------------------------------+
+| 0x0e    | BLE\_HS\_EDONE               | Operation completed successfully.                                                           |
++---------+------------------------------+---------------------------------------------------------------------------------------------+
+| 0x0f    | BLE\_HS\_EBUSY               | Operation cannot be performed until procedure completes.                                    |
++---------+------------------------------+---------------------------------------------------------------------------------------------+
+| 0x10    | BLE\_HS\_EREJECT             | Peer rejected a connection parameter update request.                                        |
++---------+------------------------------+---------------------------------------------------------------------------------------------+
+| 0x11    | BLE\_HS\_EUNKNOWN            | Unexpected failure; catch all.                                                              |
++---------+------------------------------+---------------------------------------------------------------------------------------------+
+| 0x12    | BLE\_HS\_EROLE               | Operation requires different role (e.g., central vs. peripheral).                           |
++---------+------------------------------+---------------------------------------------------------------------------------------------+
+| 0x13    | BLE\_HS\_ETIMEOUT\_HCI       | HCI request timed out; controller unresponsive.                                             |
++---------+------------------------------+---------------------------------------------------------------------------------------------+
+| 0x14    | BLE\_HS\_ENOMEM\_EVT         | Controller failed to send event due to memory exhaustion (combined host-controller only).   |
++---------+------------------------------+---------------------------------------------------------------------------------------------+
+| 0x15    | BLE\_HS\_ENOADDR             | Operation requires an identity address but none configured.                                 |
++---------+------------------------------+---------------------------------------------------------------------------------------------+
+| 0x16    | BLE\_HS\_ENOTSYNCED          | Attempt to use the host before it is synced with controller.                                |
++---------+------------------------------+---------------------------------------------------------------------------------------------+
+| 0x17    | BLE\_HS\_EAUTHEN             | Insufficient authentication.                                                                |
++---------+------------------------------+---------------------------------------------------------------------------------------------+
+| 0x18    | BLE\_HS\_EAUTHOR             | Insufficient authorization.                                                                 |
++---------+------------------------------+---------------------------------------------------------------------------------------------+
+| 0x19    | BLE\_HS\_EENCRYPT            | Insufficient encryption level.                                                              |
++---------+------------------------------+---------------------------------------------------------------------------------------------+
+| 0x1a    | BLE\_HS\_EENCRYPT\_KEY\_SZ   | Insufficient key size.                                                                      |
++---------+------------------------------+---------------------------------------------------------------------------------------------+
+| 0x1b    | BLE\_HS\_ESTORE\_CAP         | Storage at capacity.                                                                        |
++---------+------------------------------+---------------------------------------------------------------------------------------------+
+| 0x1c    | BLE\_HS\_ESTORE\_FAIL        | Storage IO error.                                                                           |
++---------+------------------------------+---------------------------------------------------------------------------------------------+
 
 Return codes - ATT
 ^^^^^^^^^^^^^^^^^^
 
-+-----------------+-----------------+-----------+----------------+
-| NimBLE Value    | Formal Value    | Name      | Condition      |
-+=================+=================+===========+================+
-| 0x0101          | 0x01            | BLE\_ATT\ | The attribute  |
-|                 |                 | _ERR\_INV | handle given   |
-|                 |                 | ALID\_HAN | was not valid  |
-|                 |                 | DLE       | on this        |
-|                 |                 |           | server.        |
-+-----------------+-----------------+-----------+----------------+
-| 0x0102          | 0x02            | BLE\_ATT\ | The attribute  |
-|                 |                 | _ERR\_REA | cannot be      |
-|                 |                 | D\_NOT\_P | read.          |
-|                 |                 | ERMITTED  |                |
-+-----------------+-----------------+-----------+----------------+
-| 0x0103          | 0x03            | BLE\_ATT\ | The attribute  |
-|                 |                 | _ERR\_WRI | cannot be      |
-|                 |                 | TE\_NOT\_ | written.       |
-|                 |                 | PERMITTED |                |
-+-----------------+-----------------+-----------+----------------+
-| 0x0104          | 0x04            | BLE\_ATT\ | The attribute  |
-|                 |                 | _ERR\_INV | PDU was        |
-|                 |                 | ALID\_PDU | invalid.       |
-+-----------------+-----------------+-----------+----------------+
-| 0x0105          | 0x05            | BLE\_ATT\ | The attribute  |
-|                 |                 | _ERR\_INS | requires       |
-|                 |                 | UFFICIENT | authentication |
-|                 |                 | \_AUTHEN  | before it can  |
-|                 |                 |           | be read or     |
-|                 |                 |           | written.       |
-+-----------------+-----------------+-----------+----------------+
-| 0x0106          | 0x06            | BLE\_ATT\ | Attribute      |
-|                 |                 | _ERR\_REQ | server does    |
-|                 |                 | \_NOT\_SU | not support    |
-|                 |                 | PPORTED   | the request    |
-|                 |                 |           | received from  |
-|                 |                 |           | the client.    |
-+-----------------+-----------------+-----------+----------------+
-| 0x0107          | 0x07            | BLE\_ATT\ | Offset         |
-|                 |                 | _ERR\_INV | specified was  |
-|                 |                 | ALID\_OFF | past the end   |
-|                 |                 | SET       | of the         |
-|                 |                 |           | attribute.     |
-+-----------------+-----------------+-----------+----------------+
-| 0x0108          | 0x08            | BLE\_ATT\ | The attribute  |
-|                 |                 | _ERR\_INS | requires       |
-|                 |                 | UFFICIENT | authorization  |
-|                 |                 | \_AUTHOR  | before it can  |
-|                 |                 |           | be read or     |
-|                 |                 |           | written.       |
-+-----------------+-----------------+-----------+----------------+
-| 0x0109          | 0x09            | BLE\_ATT\ | Too many       |
-|                 |                 | _ERR\_PRE | prepare writes |
-|                 |                 | PARE\_QUE | have been      |
-|                 |                 | UE\_FULL  | queued.        |
-+-----------------+-----------------+-----------+----------------+
-| 0x010a          | 0x0a            | BLE\_ATT\ | No attribute   |
-|                 |                 | _ERR\_ATT | found within   |
-|                 |                 | R\_NOT\_F | the given      |
-|                 |                 | OUND      | attribute      |
-|                 |                 |           | handle range.  |
-+-----------------+-----------------+-----------+----------------+
-| 0x010b          | 0x0b            | BLE\_ATT\ | The attribute  |
-|                 |                 | _ERR\_ATT | cannot be read |
-|                 |                 | R\_NOT\_L | or written     |
-|                 |                 | ONG       | using the Read |
-|                 |                 |           | Blob Request.  |
-+-----------------+-----------------+-----------+----------------+
-| 0x010c          | 0x0c            | BLE\_ATT\ | The Encryption |
-|                 |                 | _ERR\_INS | Key Size used  |
-|                 |                 | UFFICIENT | for encrypting |
-|                 |                 | \_KEY\_SZ | this link is   |
-|                 |                 |           | insufficient.  |
-+-----------------+-----------------+-----------+----------------+
-| 0x010d          | 0x0d            | BLE\_ATT\ | The attribute  |
-|                 |                 | _ERR\_INV | value length   |
-|                 |                 | ALID\_ATT | is invalid for |
-|                 |                 | R\_VALUE\ | the operation. |
-|                 |                 | _LEN      |                |
-+-----------------+-----------------+-----------+----------------+
-| 0x010e          | 0x0e            | BLE\_ATT\ | The attribute  |
-|                 |                 | _ERR\_UNL | request that   |
-|                 |                 | IKELY     | was requested  |
-|                 |                 |           | has            |
-|                 |                 |           | encountered an |
-|                 |                 |           | error that was |
-|                 |                 |           | unlikely, and  |
-|                 |                 |           | therefore      |
-|                 |                 |           | could not be   |
-|                 |                 |           | completed as   |
-|                 |                 |           | requested.     |
-+-----------------+-----------------+-----------+----------------+
-| 0x010f          | 0x0f            | BLE\_ATT\ | The attribute  |
-|                 |                 | _ERR\_INS | requires       |
-|                 |                 | UFFICIENT | encryption     |
-|                 |                 | \_ENC     | before it can  |
-|                 |                 |           | be read or     |
-|                 |                 |           | written.       |
-+-----------------+-----------------+-----------+----------------+
-| 0x0110          | 0x10            | BLE\_ATT\ | The attribute  |
-|                 |                 | _ERR\_UNS | type is not a  |
-|                 |                 | UPPORTED\ | supported      |
-|                 |                 | _GROUP    | grouping       |
-|                 |                 |           | attribute as   |
-|                 |                 |           | defined by a   |
-|                 |                 |           | higher layer   |
-|                 |                 |           | specification. |
-+-----------------+-----------------+-----------+----------------+
-| 0x0111          | 0x11            | BLE\_ATT\ | Insufficient   |
-|                 |                 | _ERR\_INS | Resources to   |
-|                 |                 | UFFICIENT | complete the   |
-|                 |                 | \_RES     | request.       |
-+-----------------+-----------------+-----------+----------------+
++----------------+----------------+--------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+
+| NimBLE Value   | Formal Value   | Name                                       | Condition                                                                                                                                 |
++================+================+============================================+===========================================================================================================================================+
+| 0x0101         | 0x01           | BLE\_ATT\_ERR\_INVALID\_HANDLE             | The attribute handle given was not valid on this server.                                                                                  |
++----------------+----------------+--------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+
+| 0x0102         | 0x02           | BLE\_ATT\_ERR\_READ\_NOT\_PERMITTED        | The attribute cannot be read.                                                                                                             |
++----------------+----------------+--------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+
+| 0x0103         | 0x03           | BLE\_ATT\_ERR\_WRITE\_NOT\_PERMITTED       | The attribute cannot be written.                                                                                                          |
++----------------+----------------+--------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+
+| 0x0104         | 0x04           | BLE\_ATT\_ERR\_INVALID\_PDU                | The attribute PDU was invalid.                                                                                                            |
++----------------+----------------+--------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+
+| 0x0105         | 0x05           | BLE\_ATT\_ERR\_INSUFFICIENT\_AUTHEN        | The attribute requires authentication before it can be read or written.                                                                   |
++----------------+----------------+--------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+
+| 0x0106         | 0x06           | BLE\_ATT\_ERR\_REQ\_NOT\_SUPPORTED         | Attribute server does not support the request received from the client.                                                                   |
++----------------+----------------+--------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+
+| 0x0107         | 0x07           | BLE\_ATT\_ERR\_INVALID\_OFFSET             | Offset specified was past the end of the attribute.                                                                                       |
++----------------+----------------+--------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+
+| 0x0108         | 0x08           | BLE\_ATT\_ERR\_INSUFFICIENT\_AUTHOR        | The attribute requires authorization before it can be read or written.                                                                    |
++----------------+----------------+--------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+
+| 0x0109         | 0x09           | BLE\_ATT\_ERR\_PREPARE\_QUEUE\_FULL        | Too many prepare writes have been queued.                                                                                                 |
++----------------+----------------+--------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+
+| 0x010a         | 0x0a           | BLE\_ATT\_ERR\_ATTR\_NOT\_FOUND            | No attribute found within the given attribute handle range.                                                                               |
++----------------+----------------+--------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+
+| 0x010b         | 0x0b           | BLE\_ATT\_ERR\_ATTR\_NOT\_LONG             | The attribute cannot be read or written using the Read Blob Request.                                                                      |
++----------------+----------------+--------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+
+| 0x010c         | 0x0c           | BLE\_ATT\_ERR\_INSUFFICIENT\_KEY\_SZ       | The Encryption Key Size used for encrypting this link is insufficient.                                                                    |
++----------------+----------------+--------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+
+| 0x010d         | 0x0d           | BLE\_ATT\_ERR\_INVALID\_ATTR\_VALUE\_LEN   | The attribute value length is invalid for the operation.                                                                                  |
++----------------+----------------+--------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+
+| 0x010e         | 0x0e           | BLE\_ATT\_ERR\_UNLIKELY                    | The attribute request that was requested has encountered an error that was unlikely, and therefore could not be completed as requested.   |
++----------------+----------------+--------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+
+| 0x010f         | 0x0f           | BLE\_ATT\_ERR\_INSUFFICIENT\_ENC           | The attribute requires encryption before it can be read or written.                                                                       |
++----------------+----------------+--------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+
+| 0x0110         | 0x10           | BLE\_ATT\_ERR\_UNSUPPORTED\_GROUP          | The attribute type is not a supported grouping attribute as defined by a higher layer specification.                                      |
++----------------+----------------+--------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+
+| 0x0111         | 0x11           | BLE\_ATT\_ERR\_INSUFFICIENT\_RES           | Insufficient Resources to complete the request.                                                                                           |
++----------------+----------------+--------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+
 
 Return codes - HCI
 ^^^^^^^^^^^^^^^^^^
 
-+-----------------+-----------------+-----------+----------------+
-| NimBLE Value    | Formal Value    | Name      | Condition      |
-+=================+=================+===========+================+
-| 0x0201          | 0x01            | BLE\_ERR\ | Unknown HCI    |
-|                 |                 | _UNKNOWN\ | Command        |
-|                 |                 | _HCI\_CMD |                |
-+-----------------+-----------------+-----------+----------------+
-| 0x0202          | 0x02            | BLE\_ERR\ | Unknown        |
-|                 |                 | _UNK\_CON | Connection     |
-|                 |                 | N\_ID     | Identifier     |
-+-----------------+-----------------+-----------+----------------+
-| 0x0203          | 0x03            | BLE\_ERR\ | Hardware       |
-|                 |                 | _HW\_FAIL | Failure        |
-+-----------------+-----------------+-----------+----------------+
-| 0x0204          | 0x04            | BLE\_ERR\ | Page Timeout   |
-|                 |                 | _PAGE\_TM |                |
-|                 |                 | O         |                |
-+-----------------+-----------------+-----------+----------------+
-| 0x0205          | 0x05            | BLE\_ERR\ | Authentication |
-|                 |                 | _AUTH\_FA | Failure        |
-|                 |                 | IL        |                |
-+-----------------+-----------------+-----------+----------------+
-| 0x0206          | 0x06            | BLE\_ERR\ | PIN or Key     |
-|                 |                 | _PINKEY\_ | Missing        |
-|                 |                 | MISSING   |                |
-+-----------------+-----------------+-----------+----------------+
-| 0x0207          | 0x07            | BLE\_ERR\ | Memory         |
-|                 |                 | _MEM\_CAP | Capacity       |
-|                 |                 | ACITY     | Exceeded       |
-+-----------------+-----------------+-----------+----------------+
-| 0x0208          | 0x08            | BLE\_ERR\ | Connection     |
-|                 |                 | _CONN\_SP | Timeout        |
-|                 |                 | VN\_TMO   |                |
-+-----------------+-----------------+-----------+----------------+
-| 0x0209          | 0x09            | BLE\_ERR\ | Connection     |
-|                 |                 | _CONN\_LI | Limit Exceeded |
-|                 |                 | MIT       |                |
-+-----------------+-----------------+-----------+----------------+
-| 0x020a          | 0x0a            | BLE\_ERR\ | Synchronous    |
-|                 |                 | _SYNCH\_C | Connection     |
-|                 |                 | ONN\_LIMI | Limit To A     |
-|                 |                 | T         | Device         |
-|                 |                 |           | Exceeded       |
-+-----------------+-----------------+-----------+----------------+
-| 0x020b          | 0x0b            | BLE\_ERR\ | ACL Connection |
-|                 |                 | _ACL\_CON | Already Exists |
-|                 |                 | N\_EXISTS |                |
-+-----------------+-----------------+-----------+----------------+
-| 0x020c          | 0x0c            | BLE\_ERR\ | Command        |
-|                 |                 | _CMD\_DIS | Disallowed     |
-|                 |                 | ALLOWED   |                |
-+-----------------+-----------------+-----------+----------------+
-| 0x020d          | 0x0d            | BLE\_ERR\ | Connection     |
-|                 |                 | _CONN\_RE | Rejected due   |
-|                 |                 | J\_RESOUR | to Limited     |
-|                 |                 | CES       | Resources      |
-+-----------------+-----------------+-----------+----------------+
-| 0x020e          | 0x0e            | BLE\_ERR\ | Connection     |
-|                 |                 | _CONN\_RE | Rejected Due   |
-|                 |                 | J\_SECURI | To Security    |
-|                 |                 | TY        | Reasons        |
-+-----------------+-----------------+-----------+----------------+
-| 0x020f          | 0x0f            | BLE\_ERR\ | Connection     |
-|                 |                 | _CONN\_RE | Rejected due   |
-|                 |                 | J\_BD\_AD | to             |
-|                 |                 | DR        | Unacceptable   |
-|                 |                 |           | BD\_ADDR       |
-+-----------------+-----------------+-----------+----------------+
-| 0x0210          | 0x10            | BLE\_ERR\ | Connection     |
-|                 |                 | _CONN\_AC | Accept Timeout |
-|                 |                 | CEPT\_TMO | Exceeded       |
-+-----------------+-----------------+-----------+----------------+
-| 0x0211          | 0x11            | BLE\_ERR\ | Unsupported    |
-|                 |                 | _UNSUPPOR | Feature or     |
-|                 |                 | TED       | Parameter      |
-|                 |                 |           | Value          |
-+-----------------+-----------------+-----------+----------------+
-| 0x0212          | 0x12            | BLE\_ERR\ | Invalid HCI    |
-|                 |                 | _INV\_HCI | Command        |
-|                 |                 | \_CMD\_PA | Parameters     |
-|                 |                 | RMS       |                |
-+-----------------+-----------------+-----------+----------------+
-| 0x0213          | 0x13            | BLE\_ERR\ | Remote User    |
-|                 |                 | _REM\_USE | Terminated     |
-|                 |                 | R\_CONN\_ | Connection     |
-|                 |                 | TERM      |                |
-+-----------------+-----------------+-----------+----------------+
-| 0x0214          | 0x14            | BLE\_ERR\ | Remote Device  |
-|                 |                 | _RD\_CONN | Terminated     |
-|                 |                 | \_TERM\_R | Connection due |
-|                 |                 | ESRCS     | to Low         |
-|                 |                 |           | Resources      |
-+-----------------+-----------------+-----------+----------------+
-| 0x0215          | 0x15            | BLE\_ERR\ | Remote Device  |
-|                 |                 | _RD\_CONN | Terminated     |
-|                 |                 | \_TERM\_P | Connection due |
-|                 |                 | WROFF     | to Power Off   |
-+-----------------+-----------------+-----------+----------------+
-| 0x0216          | 0x16            | BLE\_ERR\ | Connection     |
-|                 |                 | _CONN\_TE | Terminated By  |
-|                 |                 | RM\_LOCAL | Local Host     |
-+-----------------+-----------------+-----------+----------------+
-| 0x0217          | 0x17            | BLE\_ERR\ | Repeated       |
-|                 |                 | _REPEATED | Attempts       |
-|                 |                 | \_ATTEMPT |                |
-|                 |                 | S         |                |
-+-----------------+-----------------+-----------+----------------+
-| 0x0218          | 0x18            | BLE\_ERR\ | Pairing Not    |
-|                 |                 | _NO\_PAIR | Allowed        |
-|                 |                 | ING       |                |
-+-----------------+-----------------+-----------+----------------+
-| 0x0219          | 0x19            | BLE\_ERR\ | Unknown LMP    |
-|                 |                 | _UNK\_LMP | PDU            |
-+-----------------+-----------------+-----------+----------------+
-| 0x021a          | 0x1a            | BLE\_ERR\ | Unsupported    |
-|                 |                 | _UNSUPP\_ | Remote Feature |
-|                 |                 | REM\_FEAT | / Unsupported  |
-|                 |                 | URE       | LMP Feature    |
-+-----------------+-----------------+-----------+----------------+
-| 0x021b          | 0x1b            | BLE\_ERR\ | SCO Offset     |
-|                 |                 | _SCO\_OFF | Rejected       |
-|                 |                 | SET       |                |
-+-----------------+-----------------+-----------+----------------+
-| 0x021c          | 0x1c            | BLE\_ERR\ | SCO Interval   |
-|                 |                 | _SCO\_ITV | Rejected       |
-|                 |                 | L         |                |
-+-----------------+-----------------+-----------+----------------+
-| 0x021d          | 0x1d            | BLE\_ERR\ | SCO Air Mode   |
-|                 |                 | _SCO\_AIR | Rejected       |
-|                 |                 | \_MODE    |                |
-+-----------------+-----------------+-----------+----------------+
-| 0x021e          | 0x1e            | BLE\_ERR\ | Invalid LMP    |
-|                 |                 | _INV\_LMP | Parameters /   |
-|                 |                 | \_LL\_PAR | Invalid LL     |
-|                 |                 | M         | Parameters     |
-+-----------------+-----------------+-----------+----------------+
-| 0x021f          | 0x1f            | BLE\_ERR\ | Unspecified    |
-|                 |                 | _UNSPECIF | Error          |
-|                 |                 | IED       |                |
-+-----------------+-----------------+-----------+----------------+
-| 0x0220          | 0x20            | BLE\_ERR\ | Unsupported    |
-|                 |                 | _UNSUPP\_ | LMP Parameter  |
-|                 |                 | LMP\_LL\_ | Value /        |
-|                 |                 | PARM      | Unsupported LL |
-|                 |                 |           | Parameter      |
-|                 |                 |           | Value          |
-+-----------------+-----------------+-----------+----------------+
-| 0x0221          | 0x21            | BLE\_ERR\ | Role Change    |
-|                 |                 | _NO\_ROLE | Not Allowed    |
-|                 |                 | \_CHANGE  |                |
-+-----------------+-----------------+-----------+----------------+
-| 0x0222          | 0x22            | BLE\_ERR\ | LMP Response   |
-|                 |                 | _LMP\_LL\ | Timeout / LL   |
-|                 |                 | _RSP\_TMO | Response       |
-|                 |                 |           | Timeout        |
-+-----------------+-----------------+-----------+----------------+
-| 0x0223          | 0x23            | BLE\_ERR\ | LMP Error      |
-|                 |                 | _LMP\_COL | Transaction    |
-|                 |                 | LISION    | Collision      |
-+-----------------+-----------------+-----------+----------------+
-| 0x0224          | 0x24            | BLE\_ERR\ | LMP PDU Not    |
-|                 |                 | _LMP\_PDU | Allowed        |
-+-----------------+-----------------+-----------+----------------+
-| 0x0225          | 0x25            | BLE\_ERR\ | Encryption     |
-|                 |                 | _ENCRYPTI | Mode Not       |
-|                 |                 | ON\_MODE  | Acceptable     |
-+-----------------+-----------------+-----------+----------------+
-| 0x0226          | 0x26            | BLE\_ERR\ | Link Key       |
-|                 |                 | _LINK\_KE | cannot be      |
-|                 |                 | Y\_CHANGE | Changed        |
-+-----------------+-----------------+-----------+----------------+
-| 0x0227          | 0x27            | BLE\_ERR\ | Requested QoS  |
-|                 |                 | _UNSUPP\_ | Not Supported  |
-|                 |                 | QOS       |                |
-+-----------------+-----------------+-----------+----------------+
-| 0x0228          | 0x28            | BLE\_ERR\ | Instant Passed |
-|                 |                 | _INSTANT\ |                |
-|                 |                 | _PASSED   |                |
-+-----------------+-----------------+-----------+----------------+
-| 0x0229          | 0x29            | BLE\_ERR\ | Pairing With   |
-|                 |                 | _UNIT\_KE | Unit Key Not   |
-|                 |                 | Y\_PAIRIN | Supported      |
-|                 |                 | G         |                |
-+-----------------+-----------------+-----------+----------------+
-| 0x022a          | 0x2a            | BLE\_ERR\ | Different      |
-|                 |                 | _DIFF\_TR | Transaction    |
-|                 |                 | ANS\_COLL | Collision      |
-+-----------------+-----------------+-----------+----------------+
-| 0x022c          | 0x2c            | BLE\_ERR\ | QoS            |
-|                 |                 | _QOS\_PAR | Unacceptable   |
-|                 |                 | M         | Parameter      |
-+-----------------+-----------------+-----------+----------------+
-| 0x022d          | 0x2d            | BLE\_ERR\ | QoS Rejected   |
-|                 |                 | _QOS\_REJ |                |
-|                 |                 | ECTED     |                |
-+-----------------+-----------------+-----------+----------------+
-| 0x022e          | 0x2e            | BLE\_ERR\ | Channel        |
-|                 |                 | _CHAN\_CL | Classification |
-|                 |                 | ASS       | Not Supported  |
-+-----------------+-----------------+-----------+----------------+
-| 0x022f          | 0x2f            | BLE\_ERR\ | Insufficient   |
-|                 |                 | _INSUFFIC | Security       |
-|                 |                 | IENT\_SEC |                |
-+-----------------+-----------------+-----------+----------------+
-| 0x0230          | 0x30            | BLE\_ERR\ | Parameter Out  |
-|                 |                 | _PARM\_OU | Of Mandatory   |
-|                 |                 | T\_OF\_RA | Range          |
-|                 |                 | NGE       |                |
-+-----------------+-----------------+-----------+----------------+
-| 0x0232          | 0x32            | BLE\_ERR\ | Role Switch    |
-|                 |                 | _PENDING\ | Pending        |
-|                 |                 | _ROLE\_SW |                |
-+-----------------+-----------------+-----------+----------------+
-| 0x0234          | 0x34            | BLE\_ERR\ | Reserved Slot  |
-|                 |                 | _RESERVED | Violation      |
-|                 |                 | \_SLOT    |                |
-+-----------------+-----------------+-----------+----------------+
-| 0x0235          | 0x35            | BLE\_ERR\ | Role Switch    |
-|                 |                 | _ROLE\_SW | Failed         |
-|                 |                 | \_FAIL    |                |
-+-----------------+-----------------+-----------+----------------+
-| 0x0236          | 0x36            | BLE\_ERR\ | Extended       |
-|                 |                 | _INQ\_RSP | Inquiry        |
-|                 |                 | \_TOO\_BI | Response Too   |
-|                 |                 | G         | Large          |
-+-----------------+-----------------+-----------+----------------+
-| 0x0237          | 0x37            | BLE\_ERR\ | Secure Simple  |
-|                 |                 | _SEC\_SIM | Pairing Not    |
-|                 |                 | PLE\_PAIR | Supported By   |
-|                 |                 |           | Host           |
-+-----------------+-----------------+-----------+----------------+
-| 0x0238          | 0x38            | BLE\_ERR\ | Host Busy -    |
-|                 |                 | _HOST\_BU | Pairing        |
-|                 |                 | SY\_PAIR  |                |
-+-----------------+-----------------+-----------+----------------+
-| 0x0239          | 0x39            | BLE\_ERR\ | Connection     |
-|                 |                 | _CONN\_RE | Rejected due   |
-|                 |                 | J\_CHANNE | to No Suitable |
-|                 |                 | L         | Channel Found  |
-+-----------------+-----------------+-----------+----------------+
-| 0x023a          | 0x3a            | BLE\_ERR\ | Controller     |
-|                 |                 | _CTLR\_BU | Busy           |
-|                 |                 | SY        |                |
-+-----------------+-----------------+-----------+----------------+
-| 0x023b          | 0x3b            | BLE\_ERR\ | Unacceptable   |
-|                 |                 | _CONN\_PA | Connection     |
-|                 |                 | RMS       | Parameters     |
-+-----------------+-----------------+-----------+----------------+
-| 0x023c          | 0x3c            | BLE\_ERR\ | Directed       |
-|                 |                 | _DIR\_ADV | Advertising    |
-|                 |                 | \_TMO     | Timeout        |
-+-----------------+-----------------+-----------+----------------+
-| 0x023d          | 0x3d            | BLE\_ERR\ | Connection     |
-|                 |                 | _CONN\_TE | Terminated due |
-|                 |                 | RM\_MIC   | to MIC Failure |
-+-----------------+-----------------+-----------+----------------+
-| 0x023e          | 0x3e            | BLE\_ERR\ | Connection     |
-|                 |                 | _CONN\_ES | Failed to be   |
-|                 |                 | TABLISHME | Established    |
-|                 |                 | NT        |                |
-+-----------------+-----------------+-----------+----------------+
-| 0x023f          | 0x3f            | BLE\_ERR\ | MAC Connection |
-|                 |                 | _MAC\_CON | Failed         |
-|                 |                 | N\_FAIL   |                |
-+-----------------+-----------------+-----------+----------------+
-| 0x0240          | 0x40            | BLE\_ERR\ | Coarse Clock   |
-|                 |                 | _COARSE\_ | Adjustment     |
-|                 |                 | CLK\_ADJ  | Rejected but   |
-|                 |                 |           | Will Try to    |
-|                 |                 |           | Adjust Using   |
-|                 |                 |           | Clock Dragging |
-+-----------------+-----------------+-----------+----------------+
++----------------+----------------+------------------------------------+--------------------------------------------------------------------------------+
+| NimBLE Value   | Formal Value   | Name                               | Condition                                                                      |
++================+================+====================================+================================================================================+
+| 0x0201         | 0x01           | BLE\_ERR\_UNKNOWN\_HCI\_CMD        | Unknown HCI Command                                                            |
++----------------+----------------+------------------------------------+--------------------------------------------------------------------------------+
+| 0x0202         | 0x02           | BLE\_ERR\_UNK\_CONN\_ID            | Unknown Connection Identifier                                                  |
++----------------+----------------+------------------------------------+--------------------------------------------------------------------------------+
+| 0x0203         | 0x03           | BLE\_ERR\_HW\_FAIL                 | Hardware Failure                                                               |
++----------------+----------------+------------------------------------+--------------------------------------------------------------------------------+
+| 0x0204         | 0x04           | BLE\_ERR\_PAGE\_TMO                | Page Timeout                                                                   |
++----------------+----------------+------------------------------------+--------------------------------------------------------------------------------+
+| 0x0205         | 0x05           | BLE\_ERR\_AUTH\_FAIL               | Authentication Failure                                                         |
++----------------+----------------+------------------------------------+--------------------------------------------------------------------------------+
+| 0x0206         | 0x06           | BLE\_ERR\_PINKEY\_MISSING          | PIN or Key Missing                                                             |
++----------------+----------------+------------------------------------+--------------------------------------------------------------------------------+
+| 0x0207         | 0x07           | BLE\_ERR\_MEM\_CAPACITY            | Memory Capacity Exceeded                                                       |
++----------------+----------------+------------------------------------+--------------------------------------------------------------------------------+
+| 0x0208         | 0x08           | BLE\_ERR\_CONN\_SPVN\_TMO          | Connection Timeout                                                             |
++----------------+----------------+------------------------------------+--------------------------------------------------------------------------------+
+| 0x0209         | 0x09           | BLE\_ERR\_CONN\_LIMIT              | Connection Limit Exceeded                                                      |
++----------------+----------------+------------------------------------+--------------------------------------------------------------------------------+
+| 0x020a         | 0x0a           | BLE\_ERR\_SYNCH\_CONN\_LIMIT       | Synchronous Connection Limit To A Device Exceeded                              |
++----------------+----------------+------------------------------------+--------------------------------------------------------------------------------+
+| 0x020b         | 0x0b           | BLE\_ERR\_ACL\_CONN\_EXISTS        | ACL Connection Already Exists                                                  |
++----------------+----------------+------------------------------------+--------------------------------------------------------------------------------+
+| 0x020c         | 0x0c           | BLE\_ERR\_CMD\_DISALLOWED          | Command Disallowed                                                             |
++----------------+----------------+------------------------------------+--------------------------------------------------------------------------------+
+| 0x020d         | 0x0d           | BLE\_ERR\_CONN\_REJ\_RESOURCES     | Connection Rejected due to Limited Resources                                   |
++----------------+----------------+------------------------------------+--------------------------------------------------------------------------------+
+| 0x020e         | 0x0e           | BLE\_ERR\_CONN\_REJ\_SECURITY      | Connection Rejected Due To Security Reasons                                    |
++----------------+----------------+------------------------------------+--------------------------------------------------------------------------------+
+| 0x020f         | 0x0f           | BLE\_ERR\_CONN\_REJ\_BD\_ADDR      | Connection Rejected due to Unacceptable BD\_ADDR                               |
++----------------+----------------+------------------------------------+--------------------------------------------------------------------------------+
+| 0x0210         | 0x10           | BLE\_ERR\_CONN\_ACCEPT\_TMO        | Connection Accept Timeout Exceeded                                             |
++----------------+----------------+------------------------------------+--------------------------------------------------------------------------------+
+| 0x0211         | 0x11           | BLE\_ERR\_UNSUPPORTED              | Unsupported Feature or Parameter Value                                         |
++----------------+----------------+------------------------------------+--------------------------------------------------------------------------------+
+| 0x0212         | 0x12           | BLE\_ERR\_INV\_HCI\_CMD\_PARMS     | Invalid HCI Command Parameters                                                 |
++----------------+----------------+------------------------------------+--------------------------------------------------------------------------------+
+| 0x0213         | 0x13           | BLE\_ERR\_REM\_USER\_CONN\_TERM    | Remote User Terminated Connection                                              |
++----------------+----------------+------------------------------------+--------------------------------------------------------------------------------+
+| 0x0214         | 0x14           | BLE\_ERR\_RD\_CONN\_TERM\_RESRCS   | Remote Device Terminated Connection due to Low Resources                       |
++----------------+----------------+------------------------------------+--------------------------------------------------------------------------------+
+| 0x0215         | 0x15           | BLE\_ERR\_RD\_CONN\_TERM\_PWROFF   | Remote Device Terminated Connection due to Power Off                           |
++----------------+----------------+------------------------------------+--------------------------------------------------------------------------------+
+| 0x0216         | 0x16           | BLE\_ERR\_CONN\_TERM\_LOCAL        | Connection Terminated By Local Host                                            |
++----------------+----------------+------------------------------------+--------------------------------------------------------------------------------+
+| 0x0217         | 0x17           | BLE\_ERR\_REPEATED\_ATTEMPTS       | Repeated Attempts                                                              |
++----------------+----------------+------------------------------------+--------------------------------------------------------------------------------+
+| 0x0218         | 0x18           | BLE\_ERR\_NO\_PAIRING              | Pairing Not Allowed                                                            |
++----------------+----------------+------------------------------------+--------------------------------------------------------------------------------+
+| 0x0219         | 0x19           | BLE\_ERR\_UNK\_LMP                 | Unknown LMP PDU                                                                |
++----------------+----------------+------------------------------------+--------------------------------------------------------------------------------+
+| 0x021a         | 0x1a           | BLE\_ERR\_UNSUPP\_REM\_FEATURE     | Unsupported Remote Feature / Unsupported LMP Feature                           |
++----------------+----------------+------------------------------------+--------------------------------------------------------------------------------+
+| 0x021b         | 0x1b           | BLE\_ERR\_SCO\_OFFSET              | SCO Offset Rejected                                                            |
++----------------+----------------+------------------------------------+--------------------------------------------------------------------------------+
+| 0x021c         | 0x1c           | BLE\_ERR\_SCO\_ITVL                | SCO Interval Rejected                                                          |
++----------------+----------------+------------------------------------+--------------------------------------------------------------------------------+
+| 0x021d         | 0x1d           | BLE\_ERR\_SCO\_AIR\_MODE           | SCO Air Mode Rejected                                                          |
++----------------+----------------+------------------------------------+--------------------------------------------------------------------------------+
+| 0x021e         | 0x1e           | BLE\_ERR\_INV\_LMP\_LL\_PARM       | Invalid LMP Parameters / Invalid LL Parameters                                 |
++----------------+----------------+------------------------------------+--------------------------------------------------------------------------------+
+| 0x021f         | 0x1f           | BLE\_ERR\_UNSPECIFIED              | Unspecified Error                                                              |
++----------------+----------------+------------------------------------+--------------------------------------------------------------------------------+
+| 0x0220         | 0x20           | BLE\_ERR\_UNSUPP\_LMP\_LL\_PARM    | Unsupported LMP Parameter Value / Unsupported LL Parameter Value               |
++----------------+----------------+------------------------------------+--------------------------------------------------------------------------------+
+| 0x0221         | 0x21           | BLE\_ERR\_NO\_ROLE\_CHANGE         | Role Change Not Allowed                                                        |
++----------------+----------------+------------------------------------+--------------------------------------------------------------------------------+
+| 0x0222         | 0x22           | BLE\_ERR\_LMP\_LL\_RSP\_TMO        | LMP Response Timeout / LL Response Timeout                                     |
++----------------+----------------+------------------------------------+--------------------------------------------------------------------------------+
+| 0x0223         | 0x23           | BLE\_ERR\_LMP\_COLLISION           | LMP Error Transaction Collision                                                |
++----------------+----------------+------------------------------------+--------------------------------------------------------------------------------+
+| 0x0224         | 0x24           | BLE\_ERR\_LMP\_PDU                 | LMP PDU Not Allowed                                                            |
++----------------+----------------+------------------------------------+--------------------------------------------------------------------------------+
+| 0x0225         | 0x25           | BLE\_ERR\_ENCRYPTION\_MODE         | Encryption Mode Not Acceptable                                                 |
++----------------+----------------+------------------------------------+--------------------------------------------------------------------------------+
+| 0x0226         | 0x26           | BLE\_ERR\_LINK\_KEY\_CHANGE        | Link Key cannot be Changed                                                     |
++----------------+----------------+------------------------------------+--------------------------------------------------------------------------------+
+| 0x0227         | 0x27           | BLE\_ERR\_UNSUPP\_QOS              | Requested QoS Not Supported                                                    |
++----------------+----------------+------------------------------------+--------------------------------------------------------------------------------+
+| 0x0228         | 0x28           | BLE\_ERR\_INSTANT\_PASSED          | Instant Passed                                                                 |
++----------------+----------------+------------------------------------+--------------------------------------------------------------------------------+
+| 0x0229         | 0x29           | BLE\_ERR\_UNIT\_KEY\_PAIRING       | Pairing With Unit Key Not Supported                                            |
++----------------+----------------+------------------------------------+--------------------------------------------------------------------------------+
+| 0x022a         | 0x2a           | BLE\_ERR\_DIFF\_TRANS\_COLL        | Different Transaction Collision                                                |
++----------------+----------------+------------------------------------+--------------------------------------------------------------------------------+
+| 0x022c         | 0x2c           | BLE\_ERR\_QOS\_PARM                | QoS Unacceptable Parameter                                                     |
++----------------+----------------+------------------------------------+--------------------------------------------------------------------------------+
+| 0x022d         | 0x2d           | BLE\_ERR\_QOS\_REJECTED            | QoS Rejected                                                                   |
++----------------+----------------+------------------------------------+--------------------------------------------------------------------------------+
+| 0x022e         | 0x2e           | BLE\_ERR\_CHAN\_CLASS              | Channel Classification Not Supported                                           |
++----------------+----------------+------------------------------------+--------------------------------------------------------------------------------+
+| 0x022f         | 0x2f           | BLE\_ERR\_INSUFFICIENT\_SEC        | Insufficient Security                                                          |
++----------------+----------------+------------------------------------+--------------------------------------------------------------------------------+
+| 0x0230         | 0x30           | BLE\_ERR\_PARM\_OUT\_OF\_RANGE     | Parameter Out Of Mandatory Range                                               |
++----------------+----------------+------------------------------------+--------------------------------------------------------------------------------+
+| 0x0232         | 0x32           | BLE\_ERR\_PENDING\_ROLE\_SW        | Role Switch Pending                                                            |
++----------------+----------------+------------------------------------+--------------------------------------------------------------------------------+
+| 0x0234         | 0x34           | BLE\_ERR\_RESERVED\_SLOT           | Reserved Slot Violation                                                        |
++----------------+----------------+------------------------------------+--------------------------------------------------------------------------------+
+| 0x0235         | 0x35           | BLE\_ERR\_ROLE\_SW\_FAIL           | Role Switch Failed                                                             |
++----------------+----------------+------------------------------------+--------------------------------------------------------------------------------+
+| 0x0236         | 0x36           | BLE\_ERR\_INQ\_RSP\_TOO\_BIG       | Extended Inquiry Response Too Large                                            |
++----------------+----------------+------------------------------------+--------------------------------------------------------------------------------+
+| 0x0237         | 0x37           | BLE\_ERR\_SEC\_SIMPLE\_PAIR        | Secure Simple Pairing Not Supported By Host                                    |
++----------------+----------------+------------------------------------+--------------------------------------------------------------------------------+
+| 0x0238         | 0x38           | BLE\_ERR\_HOST\_BUSY\_PAIR         | Host Busy - Pairing                                                            |
++----------------+----------------+------------------------------------+--------------------------------------------------------------------------------+
+| 0x0239         | 0x39           | BLE\_ERR\_CONN\_REJ\_CHANNEL       | Connection Rejected due to No Suitable Channel Found                           |
++----------------+----------------+------------------------------------+--------------------------------------------------------------------------------+
+| 0x023a         | 0x3a           | BLE\_ERR\_CTLR\_BUSY               | Controller Busy                                                                |
++----------------+----------------+------------------------------------+--------------------------------------------------------------------------------+
+| 0x023b         | 0x3b           | BLE\_ERR\_CONN\_PARMS              | Unacceptable Connection Parameters                                             |
++----------------+----------------+------------------------------------+--------------------------------------------------------------------------------+
+| 0x023c         | 0x3c           | BLE\_ERR\_DIR\_ADV\_TMO            | Directed Advertising Timeout                                                   |
++----------------+----------------+------------------------------------+--------------------------------------------------------------------------------+
+| 0x023d         | 0x3d           | BLE\_ERR\_CONN\_TERM\_MIC          | Connection Terminated due to MIC Failure                                       |
++----------------+----------------+------------------------------------+--------------------------------------------------------------------------------+
+| 0x023e         | 0x3e           | BLE\_ERR\_CONN\_ESTABLISHMENT      | Connection Failed to be Established                                            |
++----------------+----------------+------------------------------------+--------------------------------------------------------------------------------+
+| 0x023f         | 0x3f           | BLE\_ERR\_MAC\_CONN\_FAIL          | MAC Connection Failed                                                          |
++----------------+----------------+------------------------------------+--------------------------------------------------------------------------------+
+| 0x0240         | 0x40           | BLE\_ERR\_COARSE\_CLK\_ADJ         | Coarse Clock Adjustment Rejected but Will Try to Adjust Using Clock Dragging   |
++----------------+----------------+------------------------------------+--------------------------------------------------------------------------------+
 
 Return codes - L2CAP
 ^^^^^^^^^^^^^^^^^^^^
 
-+-----------------+-----------------+-----------+----------------+
-| NimBLE Value    | Formal Value    | Name      | Condition      |
-+=================+=================+===========+================+
-| 0x0300          | 0x00            | BLE\_L2CA | Invalid or     |
-|                 |                 | P\_SIG\_E | unsupported    |
-|                 |                 | RR\_CMD\_ | incoming L2CAP |
-|                 |                 | NOT\_UNDE | sig command.   |
-|                 |                 | RSTOOD    |                |
-+-----------------+-----------------+-----------+----------------+
-| 0x0301          | 0x01            | BLE\_L2CA | Incoming       |
-|                 |                 | P\_SIG\_E | packet too     |
-|                 |                 | RR\_MTU\_ | large.         |
-|                 |                 | EXCEEDED  |                |
-+-----------------+-----------------+-----------+----------------+
-| 0x0302          | 0x02            | BLE\_L2CA | No channel     |
-|                 |                 | P\_SIG\_E | with specified |
-|                 |                 | RR\_INVAL | ID.            |
-|                 |                 | ID\_CID   |                |
-+-----------------+-----------------+-----------+----------------+
++----------------+----------------+----------------------------------------------+------------------------------------------------------+
+| NimBLE Value   | Formal Value   | Name                                         | Condition                                            |
++================+================+==============================================+======================================================+
+| 0x0300         | 0x00           | BLE\_L2CAP\_SIG\_ERR\_CMD\_NOT\_UNDERSTOOD   | Invalid or unsupported incoming L2CAP sig command.   |
++----------------+----------------+----------------------------------------------+------------------------------------------------------+
+| 0x0301         | 0x01           | BLE\_L2CAP\_SIG\_ERR\_MTU\_EXCEEDED          | Incoming packet too large.                           |
++----------------+----------------+----------------------------------------------+------------------------------------------------------+
+| 0x0302         | 0x02           | BLE\_L2CAP\_SIG\_ERR\_INVALID\_CID           | No channel with specified ID.                        |
++----------------+----------------+----------------------------------------------+------------------------------------------------------+
 
 Return codes - Security manager (us)
 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
-+-----------------+-----------------+-----------+----------------+
-| NimBLE Value    | Formal Value    | Name      | Condition      |
-+=================+=================+===========+================+
-| 0x0401          | 0x01            | BLE\_SM\_ | The user input |
-|                 |                 | ERR\_PASS | of passkey     |
-|                 |                 | KEY       | failed, for    |
-|                 |                 |           | example, the   |
-|                 |                 |           | user cancelled |
-|                 |                 |           | the operation. |
-+-----------------+-----------------+-----------+----------------+
-| 0x0402          | 0x02            | BLE\_SM\_ | The OOB data   |
-|                 |                 | ERR\_OOB  | is not         |
-|                 |                 |           | available.     |
-+-----------------+-----------------+-----------+----------------+
-| 0x0403          | 0x03            | BLE\_SM\_ | The pairing    |
-|                 |                 | ERR\_AUTH | procedure      |
-|                 |                 | REQ       | cannot be      |
-|                 |                 |           | performed as   |
-|                 |                 |           | authentication |
-|                 |                 |           | requirements   |
-|                 |                 |           | cannot be met  |
-|                 |                 |           | due to IO      |
-|                 |                 |           | capabilities   |
-|                 |                 |           | of one or both |
-|                 |                 |           | devices.       |
-+-----------------+-----------------+-----------+----------------+
-| 0x0404          | 0x04            | BLE\_SM\_ | The confirm    |
-|                 |                 | ERR\_CONF | value does not |
-|                 |                 | IRM\_MISM | match the      |
-|                 |                 | ATCH      | calculated     |
-|                 |                 |           | compare value. |
-+-----------------+-----------------+-----------+----------------+
-| 0x0405          | 0x05            | BLE\_SM\_ | Pairing is not |
-|                 |                 | ERR\_PAIR | supported by   |
-|                 |                 | \_NOT\_SU | the device.    |
-|                 |                 | PP        |                |
-+-----------------+-----------------+-----------+----------------+
-| 0x0406          | 0x06            | BLE\_SM\_ | The resultant  |
-|                 |                 | ERR\_ENC\ | encryption key |
-|                 |                 | _KEY\_SZ  | size is        |
-|                 |                 |           | insufficient   |
-|                 |                 |           | for the        |
-|                 |                 |           | security       |
-|                 |                 |           | requirements   |
-|                 |                 |           | of this        |
-|                 |                 |           | device.        |
-+-----------------+-----------------+-----------+----------------+
-| 0x0407          | 0x07            | BLE\_SM\_ | The SMP        |
-|                 |                 | ERR\_CMD\ | command        |
-|                 |                 | _NOT\_SUP | received is    |
-|                 |                 | P         | not supported  |
-|                 |                 |           | on this        |
-|                 |                 |           | device.        |
-+-----------------+-----------------+-----------+----------------+
-| 0x0408          | 0x08            | BLE\_SM\_ | Pairing failed |
-|                 |                 | ERR\_UNSP | due to an      |
-|                 |                 | ECIFIED   | unspecified    |
-|                 |                 |           | reason.        |
-+-----------------+-----------------+-----------+----------------+
-| 0x0409          | 0x09            | BLE\_SM\_ | Pairing or     |
-|                 |                 | ERR\_REPE | authentication |
-|                 |                 | ATED      | procedure is   |
-|                 |                 |           | disallowed     |
-|                 |                 |           | because too    |
-|                 |                 |           | little time    |
-|                 |                 |           | has elapsed    |
-|                 |                 |           | since last     |
-|                 |                 |           | pairing        |
-|                 |                 |           | request or     |
-|                 |                 |           | security       |
-|                 |                 |           | request.       |
-+-----------------+-----------------+-----------+----------------+
-| 0x040a          | 0x0a            | BLE\_SM\_ | The Invalid    |
-|                 |                 | ERR\_INVA | Parameters     |
-|                 |                 | L         | error code     |
-|                 |                 |           | indicates that |
-|                 |                 |           | the command    |
-|                 |                 |           | length is      |
-|                 |                 |           | invalid or     |
-|                 |                 |           | that a         |
-|                 |                 |           | parameter is   |
-|                 |                 |           | outside of the |
-|                 |                 |           | specified      |
-|                 |                 |           | range.         |
-+-----------------+-----------------+-----------+----------------+
-| 0x040b          | 0x0b            | BLE\_SM\_ | Indicates to   |
-|                 |                 | ERR\_DHKE | the remote     |
-|                 |                 | Y         | device that    |
-|                 |                 |           | the DHKey      |
-|                 |                 |           | Check value    |
-|                 |                 |           | received       |
-|                 |                 |           | doesn?t match  |
-|                 |                 |           | the one        |
-|                 |                 |           | calculated by  |
-|                 |                 |           | the local      |
-|                 |                 |           | device.        |
-+-----------------+-----------------+-----------+----------------+
-| 0x040c          | 0x0c            | BLE\_SM\_ | Indicates that |
-|                 |                 | ERR\_NUMC | the confirm    |
-|                 |                 | MP        | values in the  |
-|                 |                 |           | numeric        |
-|                 |                 |           | comparison     |
-|                 |                 |           | protocol do    |
-|                 |                 |           | not match.     |
-+-----------------+-----------------+-----------+----------------+
-| 0x040d          | 0x0d            | BLE\_SM\_ | Indicates that |
-|                 |                 | ERR\_ALRE | the pairing    |
-|                 |                 | ADY       | over the LE    |
-|                 |                 |           | transport      |
-|                 |                 |           | failed due to  |
-|                 |                 |           | a Pairing      |
-|                 |                 |           | Request sent   |
-|                 |                 |           | over the       |
-|                 |                 |           | BR/EDR         |
-|                 |                 |           | transport in   |
-|                 |                 |           | process.       |
-+-----------------+-----------------+-----------+----------------+
-| 0x040e          | 0x0e            | BLE\_SM\_ | Indicates that |
-|                 |                 | ERR\_CROS | the BR/EDR     |
-|                 |                 | S\_TRANS  | Link Key       |
-|                 |                 |           | generated on   |
-|                 |                 |           | the BR/EDR     |
-|                 |                 |           | transport      |
-|                 |                 |           | cannot be used |
-|                 |                 |           | to derive and  |
-|                 |                 |           | distribute     |
-|                 |                 |           | keys for the   |
-|                 |                 |           | LE transport.  |
-+-----------------+-----------------+-----------+----------------+
++----------------+----------------+-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+
+| NimBLE Value   | Formal Value   | Name                              | Condition                                                                                                                                 |
++================+================+===================================+===========================================================================================================================================+
+| 0x0401         | 0x01           | BLE\_SM\_ERR\_PASSKEY             | The user input of passkey failed, for example, the user cancelled the operation.                                                          |
++----------------+----------------+-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+
+| 0x0402         | 0x02           | BLE\_SM\_ERR\_OOB                 | The OOB data is not available.                                                                                                            |
++----------------+----------------+-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+
+| 0x0403         | 0x03           | BLE\_SM\_ERR\_AUTHREQ             | The pairing procedure cannot be performed as authentication requirements cannot be met due to IO capabilities of one or both devices.     |
++----------------+----------------+-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+
+| 0x0404         | 0x04           | BLE\_SM\_ERR\_CONFIRM\_MISMATCH   | The confirm value does not match the calculated compare value.                                                                            |
++----------------+----------------+-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+
+| 0x0405         | 0x05           | BLE\_SM\_ERR\_PAIR\_NOT\_SUPP     | Pairing is not supported by the device.                                                                                                   |
++----------------+----------------+-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+
+| 0x0406         | 0x06           | BLE\_SM\_ERR\_ENC\_KEY\_SZ        | The resultant encryption key size is insufficient for the security requirements of this device.                                           |
++----------------+----------------+-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+
+| 0x0407         | 0x07           | BLE\_SM\_ERR\_CMD\_NOT\_SUPP      | The SMP command received is not supported on this device.                                                                                 |
++----------------+----------------+-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+
+| 0x0408         | 0x08           | BLE\_SM\_ERR\_UNSPECIFIED         | Pairing failed due to an unspecified reason.                                                                                              |
++----------------+----------------+-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+
+| 0x0409         | 0x09           | BLE\_SM\_ERR\_REPEATED            | Pairing or authentication procedure is disallowed because too little time has elapsed since last pairing request or security request.     |
++----------------+----------------+-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+
+| 0x040a         | 0x0a           | BLE\_SM\_ERR\_INVAL               | The Invalid Parameters error code indicates that the command length is invalid or that a parameter is outside of the specified range.     |
++----------------+----------------+-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+
+| 0x040b         | 0x0b           | BLE\_SM\_ERR\_DHKEY               | Indicates to the remote device that the DHKey Check value received doesn?t match the one calculated by the local device.                  |
++----------------+----------------+-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+
+| 0x040c         | 0x0c           | BLE\_SM\_ERR\_NUMCMP              | Indicates that the confirm values in the numeric comparison protocol do not match.                                                        |
++----------------+----------------+-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+
+| 0x040d         | 0x0d           | BLE\_SM\_ERR\_ALREADY             | Indicates that the pairing over the LE transport failed due to a Pairing Request sent over the BR/EDR transport in process.               |
++----------------+----------------+-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+
+| 0x040e         | 0x0e           | BLE\_SM\_ERR\_CROSS\_TRANS        | Indicates that the BR/EDR Link Key generated on the BR/EDR transport cannot be used to derive and distribute keys for the LE transport.   |
++----------------+----------------+-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+
 
 Return codes - Security manager (peer)
 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
-+-----------------+-----------------+-----------+----------------+
-| NimBLE Value    | Formal Value    | Name      | Condition      |
-+=================+=================+===========+================+
-| 0x0501          | 0x01            | BLE\_SM\_ | The user input |
-|                 |                 | ERR\_PASS | of passkey     |
-|                 |                 | KEY       | failed, for    |
-|                 |                 |           | example, the   |
-|                 |                 |           | user cancelled |
-|                 |                 |           | the operation. |
-+-----------------+-----------------+-----------+----------------+
-| 0x0502          | 0x02            | BLE\_SM\_ | The OOB data   |
-|                 |                 | ERR\_OOB  | is not         |
-|                 |                 |           | available.     |
-+-----------------+-----------------+-----------+----------------+
-| 0x0503          | 0x03            | BLE\_SM\_ | The pairing    |
-|                 |                 | ERR\_AUTH | procedure      |
-|                 |                 | REQ       | cannot be      |
-|                 |                 |           | performed as   |
-|                 |                 |           | authentication |
-|                 |                 |           | requirements   |
-|                 |                 |           | cannot be met  |
-|                 |                 |           | due to IO      |
-|                 |                 |           | capabilities   |
-|                 |                 |           | of one or both |
-|                 |                 |           | devices.       |
-+-----------------+-----------------+-----------+----------------+
-| 0x0504          | 0x04            | BLE\_SM\_ | The confirm    |
-|                 |                 | ERR\_CONF | value does not |
-|                 |                 | IRM\_MISM | match the      |
-|                 |                 | ATCH      | calculated     |
-|                 |                 |           | compare value. |
-+-----------------+-----------------+-----------+----------------+
-| 0x0505          | 0x05            | BLE\_SM\_ | Pairing is not |
-|                 |                 | ERR\_PAIR | supported by   |
-|                 |                 | \_NOT\_SU | the device.    |
-|                 |                 | PP        |                |
-+-----------------+-----------------+-----------+----------------+
-| 0x0506          | 0x06            | BLE\_SM\_ | The resultant  |
-|                 |                 | ERR\_ENC\ | encryption key |
-|                 |                 | _KEY\_SZ  | size is        |
-|                 |                 |           | insufficient   |
-|                 |                 |           | for the        |
-|                 |                 |           | security       |
-|                 |                 |           | requirements   |
-|                 |                 |           | of this        |
-|                 |                 |           | device.        |
-+-----------------+-----------------+-----------+----------------+
-| 0x0507          | 0x07            | BLE\_SM\_ | The SMP        |
-|                 |                 | ERR\_CMD\ | command        |
-|                 |                 | _NOT\_SUP | received is    |
-|                 |                 | P         | not supported  |
-|                 |                 |           | on this        |
-|                 |                 |           | device.        |
-+-----------------+-----------------+-----------+----------------+
-| 0x0508          | 0x08            | BLE\_SM\_ | Pairing failed |
-|                 |                 | ERR\_UNSP | due to an      |
-|                 |                 | ECIFIED   | unspecified    |
-|                 |                 |           | reason.        |
-+-----------------+-----------------+-----------+----------------+
-| 0x0509          | 0x09            | BLE\_SM\_ | Pairing or     |
-|                 |                 | ERR\_REPE | authentication |
-|                 |                 | ATED      | procedure is   |
-|                 |                 |           | disallowed     |
-|                 |                 |           | because too    |
-|                 |                 |           | little time    |
-|                 |                 |           | has elapsed    |
-|                 |                 |           | since last     |
-|                 |                 |           | pairing        |
-|                 |                 |           | request or     |
-|                 |                 |           | security       |
-|                 |                 |           | request.       |
-+-----------------+-----------------+-----------+----------------+
-| 0x050a          | 0x0a            | BLE\_SM\_ | The Invalid    |
-|                 |                 | ERR\_INVA | Parameters     |
-|                 |                 | L         | error code     |
-|                 |                 |           | indicates that |
-|                 |                 |           | the command    |
-|                 |                 |           | length is      |
-|                 |                 |           | invalid or     |
-|                 |                 |           | that a         |
-|                 |                 |           | parameter is   |
-|                 |                 |           | outside of the |
-|                 |                 |           | specified      |
-|                 |                 |           | range.         |
-+-----------------+-----------------+-----------+----------------+
-| 0x050b          | 0x0b            | BLE\_SM\_ | Indicates to   |
-|                 |                 | ERR\_DHKE | the remote     |
-|                 |                 | Y         | device that    |
-|                 |                 |           | the DHKey      |
-|                 |                 |           | Check value    |
-|                 |                 |           | received       |
-|                 |                 |           | doesn?t match  |
-|                 |                 |           | the one        |
-|                 |                 |           | calculated by  |
-|                 |                 |           | the local      |
-|                 |                 |           | device.        |
-+-----------------+-----------------+-----------+----------------+
-| 0x050c          | 0x0c            | BLE\_SM\_ | Indicates that |
-|                 |                 | ERR\_NUMC | the confirm    |
-|                 |                 | MP        | values in the  |
-|                 |                 |           | numeric        |
-|                 |                 |           | comparison     |
-|                 |                 |           | protocol do    |
-|                 |                 |           | not match.     |
-+-----------------+-----------------+-----------+----------------+
-| 0x050d          | 0x0d            | BLE\_SM\_ | Indicates that |
-|                 |                 | ERR\_ALRE | the pairing    |
-|                 |                 | ADY       | over the LE    |
-|                 |                 |           | transport      |
-|                 |                 |           | failed due to  |
-|                 |                 |           | a Pairing      |
-|                 |                 |           | Request sent   |
-|                 |                 |           | over the       |
-|                 |                 |           | BR/EDR         |
-|                 |                 |           | transport in   |
-|                 |                 |           | process.       |
-+-----------------+-----------------+-----------+----------------+
-| 0x050e          | 0x0e            | BLE\_SM\_ | Indicates that |
-|                 |                 | ERR\_CROS | the BR/EDR     |
-|                 |                 | S\_TRANS  | Link Key       |
-|                 |                 |           | generated on   |
-|                 |                 |           | the BR/EDR     |
-|                 |                 |           | transport      |
-|                 |                 |           | cannot be used |
-|                 |                 |           | to derive and  |
-|                 |                 |           | distribute     |
-|                 |                 |           | keys for the   |
-|                 |                 |           | LE transport.  |
-+-----------------+-----------------+-----------+----------------+
++----------------+----------------+-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+
+| NimBLE Value   | Formal Value   | Name                              | Condition                                                                                                                                 |
++================+================+===================================+===========================================================================================================================================+
+| 0x0501         | 0x01           | BLE\_SM\_ERR\_PASSKEY             | The user input of passkey failed, for example, the user cancelled the operation.                                                          |
++----------------+----------------+-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+
+| 0x0502         | 0x02           | BLE\_SM\_ERR\_OOB                 | The OOB data is not available.                                                                                                            |
++----------------+----------------+-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+
+| 0x0503         | 0x03           | BLE\_SM\_ERR\_AUTHREQ             | The pairing procedure cannot be performed as authentication requirements cannot be met due to IO capabilities of one or both devices.     |
++----------------+----------------+-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+
+| 0x0504         | 0x04           | BLE\_SM\_ERR\_CONFIRM\_MISMATCH   | The confirm value does not match the calculated compare value.                                                                            |
++----------------+----------------+-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+
+| 0x0505         | 0x05           | BLE\_SM\_ERR\_PAIR\_NOT\_SUPP     | Pairing is not supported by the device.                                                                                                   |
++----------------+----------------+-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+
+| 0x0506         | 0x06           | BLE\_SM\_ERR\_ENC\_KEY\_SZ        | The resultant encryption key size is insufficient for the security requirements of this device.                                           |
++----------------+----------------+-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+
+| 0x0507         | 0x07           | BLE\_SM\_ERR\_CMD\_NOT\_SUPP      | The SMP command received is not supported on this device.                                                                                 |
++----------------+----------------+-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+
+| 0x0508         | 0x08           | BLE\_SM\_ERR\_UNSPECIFIED         | Pairing failed due to an unspecified reason.                                                                                              |
++----------------+----------------+-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+
+| 0x0509         | 0x09           | BLE\_SM\_ERR\_REPEATED            | Pairing or authentication procedure is disallowed because too little time has elapsed since last pairing request or security request.     |
++----------------+----------------+-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+
+| 0x050a         | 0x0a           | BLE\_SM\_ERR\_INVAL               | The Invalid Parameters error code indicates that the command length is invalid or that a parameter is outside of the specified range.     |
++----------------+----------------+-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+
+| 0x050b         | 0x0b           | BLE\_SM\_ERR\_DHKEY               | Indicates to the remote device that the DHKey Check value received doesn?t match the one calculated by the local device.                  |
++----------------+----------------+-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+
+| 0x050c         | 0x0c           | BLE\_SM\_ERR\_NUMCMP              | Indicates that the confirm values in the numeric comparison protocol do not match.                                                        |
++----------------+----------------+-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+
+| 0x050d         | 0x0d           | BLE\_SM\_ERR\_ALREADY             | Indicates that the pairing over the LE transport failed due to a Pairing Request sent over the BR/EDR transport in process.               |
++----------------+----------------+-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+
+| 0x050e         | 0x0e           | BLE\_SM\_ERR\_CROSS\_TRANS        | Indicates that the BR/EDR Link Key generated on the BR/EDR transport cannot be used to derive and distribute keys for the LE transport.   |
++----------------+----------------+-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+
diff --git a/docs/network/ble/ble_hs/other/functions/ble_eddystone_set_adv_data_uid.rst b/docs/network/ble/ble_hs/other/functions/ble_eddystone_set_adv_data_uid.rst
deleted file mode 100644
index d25f0ae20..000000000
--- a/docs/network/ble/ble_hs/other/functions/ble_eddystone_set_adv_data_uid.rst
+++ /dev/null
@@ -1,67 +0,0 @@
-ble\_eddystone\_set\_adv\_data\_uid
------------------------------------
-
-.. code:: c
-
-    int
-    ble_eddystone_set_adv_data_uid(
-        struct ble_hs_adv_fields *adv_fields,
-                            void *uid
-    )
-
-Description
-~~~~~~~~~~~
-
-Configures the device to advertise eddystone UID beacons.
-
-Parameters
-~~~~~~~~~~
-
-+----------------+------------------+
-| *Parameter*    | *Description*    |
-+================+==================+
-| adv\_fields    | The base         |
-|                | advertisement    |
-|                | fields to        |
-|                | transform into   |
-|                | an eddystone     |
-|                | beacon. All      |
-|                | configured       |
-|                | fields are       |
-|                | preserved; you   |
-|                | probably want to |
-|                | clear this       |
-|                | struct before    |
-|                | calling this     |
-|                | function.        |
-+----------------+------------------+
-| uid            | The 16-byte UID  |
-|                | to advertise.    |
-+----------------+------------------+
-
-Returned values
-~~~~~~~~~~~~~~~
-
-+------------+----------------+
-| *Value*    | *Condition*    |
-+============+================+
-| 0          | Success.       |
-+------------+----------------+
-| BLE\_HS\_E | Advertising is |
-| BUSY       | in progress.   |
-+------------+----------------+
-| BLE\_HS\_E | The specified  |
-| MSGSIZE    | data is too    |
-|            | large to fit   |
-|            | in an          |
-|            | advertisement. |
-+------------+----------------+
-| `Core      | Unexpected     |
-| return     | error.         |
-| code <../. |                |
-| ./ble_hs_r |                |
-| eturn_code |                |
-| s/#return- |                |
-| codes-core |                |
-| >`__       |                |
-+------------+----------------+
diff --git a/docs/network/ble/ble_hs/other/functions/ble_eddystone_set_adv_data_url.rst b/docs/network/ble/ble_hs/other/functions/ble_eddystone_set_adv_data_url.rst
deleted file mode 100644
index ff902a316..000000000
--- a/docs/network/ble/ble_hs/other/functions/ble_eddystone_set_adv_data_url.rst
+++ /dev/null
@@ -1,99 +0,0 @@
-ble\_eddystone\_set\_adv\_data\_url
------------------------------------
-
-.. code:: c
-
-    int
-    ble_eddystone_set_adv_data_url(
-        struct ble_hs_adv_fields *adv_fields,
-                         uint8_t  url_scheme,
-                            char *url_body,
-                         uint8_t  url_body_len,
-                         uint8_t  url_suffix
-    )
-
-Description
-~~~~~~~~~~~
-
-Configures the device to advertise eddystone URL beacons.
-
-Parameters
-~~~~~~~~~~
-
-+----------------+------------------+
-| *Parameter*    | *Description*    |
-+================+==================+
-| adv\_fields    | The base         |
-|                | advertisement    |
-|                | fields to        |
-|                | transform into   |
-|                | an eddystone     |
-|                | beacon. All      |
-|                | configured       |
-|                | fields are       |
-|                | preserved; you   |
-|                | probably want to |
-|                | clear this       |
-|                | struct before    |
-|                | calling this     |
-|                | function.        |
-+----------------+------------------+
-| url\_scheme    | The prefix of    |
-|                | the URL; one of  |
-|                | the              |
-|                | BLE\_EDDYSTONE\_ |
-|                | URL\_SCHEME      |
-|                | values.          |
-+----------------+------------------+
-| url\_body      | The middle of    |
-|                | the URL. Don't   |
-|                | include the      |
-|                | suffix if there  |
-|                | is a suitable    |
-|                | suffix code.     |
-+----------------+------------------+
-| url\_body\_len | The string       |
-|                | length of the    |
-|                | url\_body        |
-|                | argument.        |
-+----------------+------------------+
-| url\_suffix    | The suffix of    |
-|                | the URL; one of  |
-|                | the              |
-|                | BLE\_EDDYSTONE\_ |
-|                | URL\_SUFFIX      |
-|                | values; use      |
-|                | BLE\_EDDYSTONE\_ |
-|                | URL\_SUFFIX\_NON |
-|                | E                |
-|                | if the suffix is |
-|                | embedded in the  |
-|                | body argument.   |
-+----------------+------------------+
-
-Returned values
-~~~~~~~~~~~~~~~
-
-+------------+----------------+
-| *Value*    | *Condition*    |
-+============+================+
-| 0          | Success.       |
-+------------+----------------+
-| BLE\_HS\_E | Advertising is |
-| BUSY       | in progress.   |
-+------------+----------------+
-| BLE\_HS\_E | The specified  |
-| MSGSIZE    | data is too    |
-|            | large to fit   |
-|            | in an          |
-|            | advertisement. |
-+------------+----------------+
-| `Core      | Unexpected     |
-| return     | error.         |
-| code <../. |                |
-| ./ble_hs_r |                |
-| eturn_code |                |
-| s/#return- |                |
-| codes-core |                |
-| >`__       |                |
-+------------+----------------+
diff --git a/docs/network/ble/ble_hs/other/functions/ble_hs_evq_set.rst b/docs/network/ble/ble_hs/other/functions/ble_hs_evq_set.rst
deleted file mode 100644
index 0f9256a1a..000000000
--- a/docs/network/ble/ble_hs/other/functions/ble_hs_evq_set.rst
+++ /dev/null
@@ -1,28 +0,0 @@
-ble\_hs\_evq\_set
------------------
-
-.. code:: c
-
-    void
-    ble_hs_evq_set(struct os_eventq *evq)
-
-Description
-~~~~~~~~~~~
-
-Designates the specified event queue for NimBLE host work. By default,
-the host uses the default event queue and runs in the main task. This
-function is useful if you want the host to run in a different task.
-
-Parameters
-~~~~~~~~~~
-
-+---------------+-----------------------------------------+
-| *Parameter*   | *Description*                           |
-+===============+=========================================+
-| evq           | The event queue to use for host work.   |
-+---------------+-----------------------------------------+
-
-Returned values
-~~~~~~~~~~~~~~~
-
-None
diff --git a/docs/network/ble/ble_hs/other/functions/ble_hs_mbuf_att_pkt.rst b/docs/network/ble/ble_hs/other/functions/ble_hs_mbuf_att_pkt.rst
deleted file mode 100644
index 29662db87..000000000
--- a/docs/network/ble/ble_hs/other/functions/ble_hs_mbuf_att_pkt.rst
+++ /dev/null
@@ -1,67 +0,0 @@
-ble\_hs\_mbuf\_att\_pkt
------------------------
-
-.. code:: c
-
-    struct os_mbuf *
-    ble_hs_mbuf_att_pkt(void)
-
-Description
-~~~~~~~~~~~
-
-Allocates an mbuf suitable for an ATT command packet. The resulting
-packet has sufficient leading space for:
-
-.. raw:: html
-
-   <ul>
-
-.. raw:: html
-
-   <li>
-
-ACL data header
-
-.. raw:: html
-
-   </li>
-
-.. raw:: html
-
-   <li>
-
-L2CAP B-frame header
-
-.. raw:: html
-
-   </li>
-
-.. raw:: html
-
-   <li>
-
-Largest ATT command base (prepare write request / response).
-
-.. raw:: html
-
-   </li>
-
-.. raw:: html
-
-   </ul>
-
-Parameters
-~~~~~~~~~~
-
-None
-
-Returned values
-~~~~~~~~~~~~~~~
-
-+-----------------+----------------------+
-| *Value*         | *Condition*          |
-+=================+======================+
-| An empty mbuf   | Success.             |
-+-----------------+----------------------+
-| null            | Memory exhaustion.   |
-+-----------------+----------------------+
diff --git a/docs/network/ble/ble_hs/other/functions/ble_hs_mbuf_from_flat.rst b/docs/network/ble/ble_hs/other/functions/ble_hs_mbuf_from_flat.rst
deleted file mode 100644
index 8b9839fa5..000000000
--- a/docs/network/ble/ble_hs/other/functions/ble_hs_mbuf_from_flat.rst
+++ /dev/null
@@ -1,38 +0,0 @@
-ble\_hs\_mbuf\_from\_flat
--------------------------
-
-.. code:: c
-
-    struct os_mbuf *
-    ble_hs_mbuf_from_flat(
-        const void *buf,
-          uint16_t  len
-    )
-
-Description
-~~~~~~~~~~~
-
-Allocates a an mbuf and fills it with the contents of the specified flat
-buffer.
-
-Parameters
-~~~~~~~~~~
-
-+---------------+----------------------------------+
-| *Parameter*   | *Description*                    |
-+===============+==================================+
-| buf           | The flat buffer to copy from.    |
-+---------------+----------------------------------+
-| len           | The length of the flat buffer.   |
-+---------------+----------------------------------+
-
-Returned values
-~~~~~~~~~~~~~~~
-
-+--------------------------+----------------------+
-| *Value*                  | *Condition*          |
-+==========================+======================+
-| A newly-allocated mbuf   | Success.             |
-+--------------------------+----------------------+
-| NULL                     | Memory exhaustion.   |
-+--------------------------+----------------------+
diff --git a/docs/network/ble/ble_hs/other/functions/ble_hs_mbuf_to_flat.rst b/docs/network/ble/ble_hs/other/functions/ble_hs_mbuf_to_flat.rst
deleted file mode 100644
index 449c2a5b0..000000000
--- a/docs/network/ble/ble_hs/other/functions/ble_hs_mbuf_to_flat.rst
+++ /dev/null
@@ -1,59 +0,0 @@
-ble\_hs\_mbuf\_to\_flat
------------------------
-
-.. code:: c
-
-    int
-    ble_hs_mbuf_to_flat(
-        const struct os_mbuf *om,
-                        void *flat,
-                    uint16_t  max_len,
-                    uint16_t *out_copy_len
-    )
-
-Description
-~~~~~~~~~~~
-
-Copies the contents of an mbuf into the specified flat buffer. If the
-flat buffer is too small to contain the mbuf's contents, it is filled to
-capacity and BLE\_HS\_EMSGSIZE is returned.
-
-Parameters
-~~~~~~~~~~
-
-+------------------+----------------------------------------------------------+
-| *Parameter*      | *Description*                                            |
-+==================+==========================================================+
-| om               | The mbuf to copy from.                                   |
-+------------------+----------------------------------------------------------+
-| flat             | The destination flat buffer.                             |
-+------------------+----------------------------------------------------------+
-| max\_len         | The size of the flat buffer.                             |
-+------------------+----------------------------------------------------------+
-| out\_copy\_len   | The number of bytes actually copied gets written here.   |
-+------------------+----------------------------------------------------------+
-
-Returned values
-~~~~~~~~~~~~~~~
-
-+------------+----------------+
-| *Value*    | *Condition*    |
-+============+================+
-| 0          | Success.       |
-+------------+----------------+
-| BLE\_HS\_E | The flat       |
-| MSGSIZE    | buffer is too  |
-|            | small to       |
-|            | contain the    |
-|            | mbuf's         |
-|            | contents.      |
-+------------+----------------+
-| `Core      | Unexpected     |
-| return     | error.         |
-| code <../. |                |
-| ./ble_hs_r |                |
-| eturn_code |                |
-| s/#return- |                |
-| codes-core |                |
-| >`__       |                |
-+------------+----------------+
diff --git a/docs/network/ble/ble_hs/other/functions/ble_hs_sched_reset.rst b/docs/network/ble/ble_hs/other/functions/ble_hs_sched_reset.rst
deleted file mode 100644
index 9ff3298b7..000000000
--- a/docs/network/ble/ble_hs/other/functions/ble_hs_sched_reset.rst
+++ /dev/null
@@ -1,28 +0,0 @@
-ble\_hs\_sched\_reset
----------------------
-
-.. code:: c
-
-    void
-    ble_hs_sched_reset(int reason)
-
-Description
-~~~~~~~~~~~
-
-Causes the host to reset the NimBLE stack as soon as possible. The
-application is notified when the reset occurs via the host reset
-callback.
-
-Parameters
-~~~~~~~~~~
-
-+---------------+---------------------------------------------------------------+
-| *Parameter*   | *Description*                                                 |
-+===============+===============================================================+
-| reason        | The host error code that gets passed to the reset callback.   |
-+---------------+---------------------------------------------------------------+
-
-Returned values
-~~~~~~~~~~~~~~~
-
-None
diff --git a/docs/network/ble/ble_hs/other/functions/ble_hs_synced.rst b/docs/network/ble/ble_hs/other/functions/ble_hs_synced.rst
deleted file mode 100644
index 0beb08d50..000000000
--- a/docs/network/ble/ble_hs/other/functions/ble_hs_synced.rst
+++ /dev/null
@@ -1,29 +0,0 @@
-ble\_hs\_synced
----------------
-
-.. code:: c
-
-    int
-    ble_hs_synced(void)
-
-Description
-~~~~~~~~~~~
-
-Indicates whether the host has synchronized with the controller.
-Synchronization must occur before any host procedures can be performed.
-
-Parameters
-~~~~~~~~~~
-
-None
-
-Returned values
-~~~~~~~~~~~~~~~
-
-+-----------+--------------------------------------------+
-| *Value*   | *Condition*                                |
-+===========+============================================+
-| 1         | The host and controller are in sync.       |
-+-----------+--------------------------------------------+
-| 0         | The host and controller our out of sync.   |
-+-----------+--------------------------------------------+
diff --git a/docs/network/ble/ble_hs/other/functions/ble_ibeacon_set_adv_data.rst b/docs/network/ble/ble_hs/other/functions/ble_ibeacon_set_adv_data.rst
deleted file mode 100644
index ba2b3b7b0..000000000
--- a/docs/network/ble/ble_hs/other/functions/ble_ibeacon_set_adv_data.rst
+++ /dev/null
@@ -1,42 +0,0 @@
-ble\_ibeacon\_set\_adv\_data
-----------------------------
-
-.. code:: c
-
-    int
-    ble_ibeacon_set_adv_data(
-            void *uuid128,
-        uint16_t  major,
-        uint16_t  minor
-    )
-
-Description
-~~~~~~~~~~~
-
-Configures the device to advertise iBeacons.
-
-Parameters
-~~~~~~~~~~
-
-+---------------+----------------------------------------------------+
-| *Parameter*   | *Description*                                      |
-+===============+====================================================+
-| uuid          | The 128-bit UUID to advertise.                     |
-+---------------+----------------------------------------------------+
-| major         | The major version number to include in iBeacons.   |
-+---------------+----------------------------------------------------+
-| minor         | The minor version number to include in iBeacons.   |
-+---------------+----------------------------------------------------+
-
-Returned values
-~~~~~~~~~~~~~~~
-
-+-----------------------------------------------------------------------+-------------------------------+
-| *Value*                                                               | *Condition*                   |
-+=======================================================================+===============================+
-| 0                                                                     | Success.                      |
-+-----------------------------------------------------------------------+-------------------------------+
-| BLE\_HS\_EBUSY                                                        | Advertising is in progress.   |
-+-----------------------------------------------------------------------+-------------------------------+
-| `Core return code <../../ble_hs_return_codes/#return-codes-core>`__   | Unexpected error.             |
-+-----------------------------------------------------------------------+-------------------------------+
diff --git a/docs/network/ble/ble_hs/other/functions/ble_uuid_cmp.rst b/docs/network/ble/ble_hs/other/functions/ble_uuid_cmp.rst
deleted file mode 100644
index fa2e94f8f..000000000
--- a/docs/network/ble/ble_hs/other/functions/ble_uuid_cmp.rst
+++ /dev/null
@@ -1,37 +0,0 @@
-ble\_uuid\_cmp
---------------
-
-.. code:: c
-
-    int
-    ble_uuid_cmp(
-        const ble_uuid_t *uuid1,
-        const ble_uuid_t *uuid2
-    )
-
-Description
-~~~~~~~~~~~
-
-Compares two Bluetooth UUIDs.
-
-Parameters
-~~~~~~~~~~
-
-+---------------+-------------------------------+
-| *Parameter*   | *Description*                 |
-+===============+===============================+
-| uuid1         | The first UUID to compare.    |
-+---------------+-------------------------------+
-| uuid2         | The second UUID to compare.   |
-+---------------+-------------------------------+
-
-Returned values
-~~~~~~~~~~~~~~~
-
-+-----------+----------------------------+
-| *Value*   | *Condition*                |
-+===========+============================+
-| 0         | The two uuids are equal.   |
-+-----------+----------------------------+
-| nonzero   | The uuids differ.          |
-+-----------+----------------------------+
diff --git a/docs/network/ble/ble_hs/other/functions/ble_uuid_init_from_buf.rst b/docs/network/ble/ble_hs/other/functions/ble_uuid_init_from_buf.rst
deleted file mode 100644
index ed5e4c5f6..000000000
--- a/docs/network/ble/ble_hs/other/functions/ble_uuid_init_from_buf.rst
+++ /dev/null
@@ -1,40 +0,0 @@
-ble\_uuid\_init\_from\_buf
---------------------------
-
-.. code:: c
-
-    int
-    ble_uuid_init_from_buf(
-        ble_uuid_any_t *uuid,
-            const void *buf,
-                size_t  len
-    )
-
-Description
-~~~~~~~~~~~
-
-Constructs a UUID object from a byte array.
-
-Parameters
-~~~~~~~~~~
-
-+---------------+--------------------------------------------------------------+
-| *Parameter*   | *Description*                                                |
-+===============+==============================================================+
-| uuid          | On success, this gets populated with the constructed UUID.   |
-+---------------+--------------------------------------------------------------+
-| buf           | The source buffer to parse.                                  |
-+---------------+--------------------------------------------------------------+
-| len           | The size of the buffer, in bytes.                            |
-+---------------+--------------------------------------------------------------+
-
-Returned values
-~~~~~~~~~~~~~~~
-
-+-------------------+----------------------------------------------------+
-| *Value*           | *Condition*                                        |
-+===================+====================================================+
-| 0                 | Success.                                           |
-+-------------------+----------------------------------------------------+
-| BLE\_HS\_EINVAL   | The source buffer does not contain a valid uuid.   |
-+-------------------+----------------------------------------------------+
diff --git a/docs/network/ble/ble_hs/other/functions/ble_uuid_to_str.rst b/docs/network/ble/ble_hs/other/functions/ble_uuid_to_str.rst
deleted file mode 100644
index b720346b3..000000000
--- a/docs/network/ble/ble_hs/other/functions/ble_uuid_to_str.rst
+++ /dev/null
@@ -1,70 +0,0 @@
-ble\_uuid\_to\_str
-------------------
-
-.. code:: c
-
-    char *
-    ble_uuid_to_str(
-        const ble_uuid_t *uuid,
-                    char *dst
-    )
-
-Description
-~~~~~~~~~~~
-
-Converts the specified UUID to its string representation. Example string
-representations:
-
-.. raw:: html
-
-   <ul>
-
-.. raw:: html
-
-   <li>
-
-16-bit: 0x1234
-
-.. raw:: html
-
-   </li>
-
-.. raw:: html
-
-   <li>
-
-32-bit: 0x12345678
-
-.. raw:: html
-
-   </li>
-
-.. raw:: html
-
-   <li>
-
-128-bit: 12345678-1234-1234-1234-123456789abc
-
-.. raw:: html
-
-   </li>
-
-.. raw:: html
-
-   </ul>
-
-Parameters
-~~~~~~~~~~
-
-+---------------+-------------------------------+
-| *Parameter*   | *Description*                 |
-+===============+===============================+
-| uuid          | The source UUID to convert.   |
-+---------------+-------------------------------+
-| dst           | The destination buffer.       |
-+---------------+-------------------------------+
-
-Returned values
-~~~~~~~~~~~~~~~
-
-A pointer to the supplied destination buffer.
diff --git a/docs/network/ble/ble_hs/other/functions/ble_uuid_u16.rst b/docs/network/ble/ble_hs/other/functions/ble_uuid_u16.rst
deleted file mode 100644
index 1e8e979c6..000000000
--- a/docs/network/ble/ble_hs/other/functions/ble_uuid_u16.rst
+++ /dev/null
@@ -1,32 +0,0 @@
-ble\_uuid\_u16
---------------
-
-.. code:: c
-
-    uint16_t
-    ble_uuid_u16(const ble_uuid_t *uuid)
-
-Description
-~~~~~~~~~~~
-
-Converts the specified 16-bit UUID to a uint16\_t.
-
-Parameters
-~~~~~~~~~~
-
-+---------------+-------------------------------+
-| *Parameter*   | *Description*                 |
-+===============+===============================+
-| uuid          | The source UUID to convert.   |
-+---------------+-------------------------------+
-
-Returned values
-~~~~~~~~~~~~~~~
-
-+-------------------------+--------------------------------------+
-| *Value*                 | *Condition*                          |
-+=========================+======================================+
-| The converted integer   | Success.                             |
-+-------------------------+--------------------------------------+
-| 0                       | The specified uuid is not 16 bits.   |
-+-------------------------+--------------------------------------+
diff --git a/docs/network/ble/ble_hs/other/mdtoc.rst b/docs/network/ble/ble_hs/other/mdtoc.rst
deleted file mode 100644
index 901f2025b..000000000
--- a/docs/network/ble/ble_hs/other/mdtoc.rst
+++ /dev/null
@@ -1,18 +0,0 @@
-::
-
-            - 'Other':
-                - toc: 'network/ble/ble_hs/other/other.md'
-                - 'Functions':
-                    - 'ble_eddystone_set_adv_data_uid': 'network/ble/ble_hs/other/functions/ble_eddystone_set_adv_data_uid.md'
-                    - 'ble_eddystone_set_adv_data_url': 'network/ble/ble_hs/other/functions/ble_eddystone_set_adv_data_url.md'
-                    - 'ble_hs_evq_set': 'network/ble/ble_hs/other/functions/ble_hs_evq_set.md'
-                    - 'ble_hs_mbuf_att_pkt': 'network/ble/ble_hs/other/functions/ble_hs_mbuf_att_pkt.md'
-                    - 'ble_hs_mbuf_from_flat': 'network/ble/ble_hs/other/functions/ble_hs_mbuf_from_flat.md'
-                    - 'ble_hs_mbuf_to_flat': 'network/ble/ble_hs/other/functions/ble_hs_mbuf_to_flat.md'
-                    - 'ble_hs_sched_reset': 'network/ble/ble_hs/other/functions/ble_hs_sched_reset.md'
-                    - 'ble_hs_synced': 'network/ble/ble_hs/other/functions/ble_hs_synced.md'
-                    - 'ble_ibeacon_set_adv_data': 'network/ble/ble_hs/other/functions/ble_ibeacon_set_adv_data.md'
-                    - 'ble_uuid_cmp': 'network/ble/ble_hs/other/functions/ble_uuid_cmp.md'
-                    - 'ble_uuid_init_from_buf': 'network/ble/ble_hs/other/functions/ble_uuid_init_from_buf.md'
-                    - 'ble_uuid_to_str': 'network/ble/ble_hs/other/functions/ble_uuid_to_str.md'
-                    - 'ble_uuid_u16': 'network/ble/ble_hs/other/functions/ble_uuid_u16.md'
diff --git a/docs/network/ble/ble_hs/other/other.rst b/docs/network/ble/ble_hs/other/other.rst
deleted file mode 100644
index 0b76a47e8..000000000
--- a/docs/network/ble/ble_hs/other/other.rst
+++ /dev/null
@@ -1,120 +0,0 @@
-NimBLE Host Other Reference
----------------------------
-
-Introduction
-~~~~~~~~~~~~
-
-This section is a reference on miscellaneous parts of the NimBLE host
-which don't fit anywhere else!
-
-Header
-~~~~~~
-
-.. code:: c
-
-    #include "host/ble_hs.h"
-
-Definitions
-~~~~~~~~~~~
-
-None.
-
-Functions
-~~~~~~~~~
-
-+-------------+----------------+
-| Function    | Description    |
-+=============+================+
-| `ble\_eddys | Configures the |
-| tone\_set\_ | device to      |
-| adv\_data\_ | advertise      |
-| uid <functi | eddystone UID  |
-| ons/ble_edd | beacons.       |
-| ystone_set_ |                |
-| adv_data_ui |                |
-| d.html>`__    |                |
-+-------------+----------------+
-| `ble\_eddys | Configures the |
-| tone\_set\_ | device to      |
-| adv\_data\_ | advertise      |
-| url <functi | eddystone URL  |
-| ons/ble_edd | beacons.       |
-| ystone_set_ |                |
-| adv_data_ur |                |
-| l.html>`__    |                |
-+-------------+----------------+
-| `ble\_hs\_e | Designates the |
-| vq\_set <fu | specified      |
-| nctions/ble | event queue    |
-| _hs_evq_set | for NimBLE     |
-| .html>`__     | host work.     |
-+-------------+----------------+
-| `ble\_hs\_m | Allocates an   |
-| buf\_att\_p | mbuf suitable  |
-| kt <functio | for an ATT     |
-| ns/ble_hs_m | command        |
-| buf_att_pkt | packet.        |
-| .html>`__     |                |
-+-------------+----------------+
-| `ble\_hs\_m | Allocates a an |
-| buf\_from\_ | mbuf and fills |
-| flat <funct | it with the    |
-| ions/ble_hs | contents of    |
-| _mbuf_from_ | the specified  |
-| flat.html>`__ | flat buffer.   |
-+-------------+----------------+
-| `ble\_hs\_m | Copies the     |
-| buf\_to\_fl | contents of an |
-| at <functio | mbuf into the  |
-| ns/ble_hs_m | specified flat |
-| buf_to_flat | buffer.        |
-| .html>`__     |                |
-+-------------+----------------+
-| `ble\_hs\_s | Causes the     |
-| ched\_reset | host to reset  |
-|  <functions | the NimBLE     |
-| /ble_hs_sch | stack as soon  |
-| ed_reset.md | as possible.   |
-| >`__        |                |
-+-------------+----------------+
-| `ble\_hs\_s | Indicates      |
-| ynced <func | whether the    |
-| tions/ble_h | host has       |
-| s_synced.md | synchronized   |
-| >`__        | with the       |
-|             | controller.    |
-+-------------+----------------+
-| `ble\_ibeac | Configures the |
-| on\_set\_ad | device to      |
-| v\_data <fu | advertise      |
-| nctions/ble | iBeacons.      |
-| _ibeacon_se |                |
-| t_adv_data. |                |
-| md>`__      |                |
-+-------------+----------------+
-| `ble\_uuid\ | Compares two   |
-| _cmp <funct | Bluetooth      |
-| ions/ble_uu | UUIDs.         |
-| id_cmp.html>` |                |
-| __          |                |
-+-------------+----------------+
-| `ble\_uuid\ | Constructs a   |
-| _init\_from | UUID object    |
-| \_buf <func | from a byte    |
-| tions/ble_u | array.         |
-| uid_init_fr |                |
-| om_buf.html>` |                |
-| __          |                |
-+-------------+----------------+
-| `ble\_uuid\ | Converts the   |
-| _to\_str <f | specified UUID |
-| unctions/bl | to its string  |
-| e_uuid_to_s | representation |
-| tr.html>`__   | .              |
-+-------------+----------------+
-| `ble\_uuid\ | Converts the   |
-| _u16 <funct | specified      |
-| ions/ble_uu | 16-bit UUID to |
-| id_u16.html>` | a uint16\_t.   |
-| __          |                |
-+-------------+----------------+
diff --git a/docs/network/ble/ble_intro.rst b/docs/network/ble/ble_intro.rst
index fa5b9853e..f47a78b76 100644
--- a/docs/network/ble/ble_intro.rst
+++ b/docs/network/ble/ble_intro.rst
@@ -1,4 +1,4 @@
-BLE Introduction
+BLE User Guide
 ----------------
 
 Apache Mynewt offers the world's first fully open-source Bluetooth Low
@@ -13,6 +13,20 @@ 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
@@ -106,5 +120,3 @@ services.
    a connection is terminated. It supports a maximum of one connection.
 3. **blemesh**: A sample application for Bluetooth Mesh Node using
    on/off model.
-
-
diff --git a/docs/network/ble/ble_sec.rst b/docs/network/ble/ble_sec.rst
index 65b985773..0cc15e634 100644
--- a/docs/network/ble/ble_sec.rst
+++ b/docs/network/ble/ble_sec.rst
@@ -1,5 +1,5 @@
-BLE Security
-------------
+NimBLE Security
+---------------
 
 The Bluetooth Low Energy security model includes five distinct security
 concepts as listed below. For detailed specifications, see BLUETOOTH
diff --git a/docs/network/ble/ble_setup/ble_addr.rst b/docs/network/ble/ble_setup/ble_addr.rst
index 85e35f2f4..a8531b377 100644
--- a/docs/network/ble/ble_setup/ble_addr.rst
+++ b/docs/network/ble/ble_setup/ble_addr.rst
@@ -1,10 +1,9 @@
-Configure an Address
---------------------
+Configure device ddress
+------------------------
 
 A BLE device needs an address to do just about anything. For information
 on the various types of Bluetooth addresses, see the `NimBLE Host
-Identity
-Reference <../../../network/ble/ble_hs/ble_hs_id/ble_hs_id.html>`__.
+Identity Reference :doc:`<../../../network/ble/ble_hs/ble_hs_id/ble_hs_id>`.
 
 There are several methods for assigning an address to a NimBLE device.
 The available options are documented below:
@@ -28,7 +27,7 @@ Method 2: Hardcode a public address in the Mynewt target
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
 The NimBLE controller package exports a
-`syscfg <../../../os/modules/sysinitconfig/sysinitconfig.html>`__ setting
+:doc:`syscfg <../../../os/modules/sysinitconfig/sysinitconfig>` setting
 called ``BLE_PUBLIC_DEV_ADDR``. This setting can be overridden at the
 application or target level to configure a public Bluetooth address. For
 example, a target can assign the public address *11:22:33:44:55:66* as
@@ -53,13 +52,12 @@ Method 3: Configure a random address at runtime
 Random addresses get configured through the NimBLE host. The following
 two functions are used in random address configuration:
 
--  `ble\_hs\_id\_gen\_rnd <../../../network/ble/ble_hs/ble_hs_id/functions/ble_hs_id_gen_rnd/>`__:
+-  :doc:`ble_hs_id_gen_rnd <../../../network/ble/ble_hs/ble_hs_id/functions/ble_hs_id_gen_rnd>`:
    Generates a new random address.
--  `ble\_hs\_id\_set\_rnd <../../../network/ble/ble_hs/ble_hs_id/functions/ble_hs_id_set_rnd/>`__:
+-  :doc:`ble_hs_id_set_rnd <../../../network/ble/ble_hs/ble_hs_id/functions/ble_hs_id_set_rnd>`:
    Sets the device's random address.
 
-For an example of how this is done, see the `BLE iBeacon
-tutorial <../../../os/tutorials/ibeacon/>`__.
+For an example of how this is done, see the :doc:`<../../../os/tutorials/ibeacon>`.
 
 *Note:* A NimBLE device can be configured with multiple addresses; at
 most one of each address type.
diff --git a/docs/network/ble/ble_setup/ble_lp_clock.rst b/docs/network/ble/ble_setup/ble_lp_clock.rst
index 7b5975dc5..34a967fec 100644
--- a/docs/network/ble/ble_setup/ble_lp_clock.rst
+++ b/docs/network/ble/ble_setup/ble_lp_clock.rst
@@ -24,8 +24,7 @@ properly:
 -  OS cputime timer source shall be set to 32768 Hz clock source
 -  Default 1 MHz clock source can be disabled if not used by application
 -  32768 Hz clock source shall be enabled
--  Crystal settling time shall be set to non-zero value (see
-   `below <#crystal-settle-time-configuration>`__)
+-  Crystal settling time shall be set to non-zero value (see below)
 
 For example, on nRF52 platform timer 5 can be used as source for 32768
 Hz clock. Also, timer 0 can be disabled since this is the default source
diff --git a/docs/network/ble/ble_setup/ble_setup_intro.rst b/docs/network/ble/ble_setup/ble_setup_intro.rst
index 3edda15a5..806817c62 100644
--- a/docs/network/ble/ble_setup/ble_setup_intro.rst
+++ b/docs/network/ble/ble_setup/ble_setup_intro.rst
@@ -1,7 +1,13 @@
-NimBLE setup
+NimBLE Setup
 ------------
 
 Most NimBLE initialization is done automatically by
-`sysinit <../../../os/modules/sysinitconfig/sysinitconfig.html>`__. This
+:doc:`sysinit <../../../os/modules/sysinitconfig/sysinitconfig>`. This
 section documents the few bits of initialization that an application
 must perform manually.
+
+.. toctree::
+
+    ble_lp_clock
+    ble_addr
+    ble_sync_cb
diff --git a/docs/network/ble/ble_setup/ble_sync_cb.rst b/docs/network/ble/ble_setup/ble_sync_cb.rst
index 0cce83fc7..facf37a5c 100644
--- a/docs/network/ble/ble_setup/ble_sync_cb.rst
+++ b/docs/network/ble/ble_setup/ble_sync_cb.rst
@@ -12,7 +12,7 @@ learns when sync is achieved by configuring the host's *sync callback*:
 ``ble_hs_cfg.sync_cb``. The host calls the sync callback whenever sync
 is acquired. The sync callback has the following form:
 
-::
+.. code-block:: cpp
 
     typedef void ble_hs_sync_fn(void);
 
@@ -23,22 +23,22 @@ reset
 ~~~~~
 
 Another event indicated by the host is a *controller reset*. The NimBLE
-stack resets itself when a catstrophic error occurs, such as loss of
+stack resets itself when a catastrophic error occurs, such as loss of
 communication between the host and controller. Upon resetting, the host
 drops all BLE connections and loses sync with the controller. After a
 reset, the application should refrain from using the host until sync is
-again signalled via the sync callback.
+again signaled via the sync callback.
 
 An application learns of a host reset by configuring the host's *reset
 callback*: ``ble_hs_cfg.reset_cb``. This callback has the following
 form:
 
-::
+.. code-block:: cpp
 
     typedef void ble_hs_reset_fn(int reason);
 
-The ``reason`` parameter is a `NimBLE host return
-code <../../../network/ble/ble_hs/ble_hs_return_codes/>`__.
+The ``reason`` parameter is a :doc:`NimBLE host return
+code <../../../network/ble/ble_hs/ble_hs_return_codes>`.
 
 Example
 ~~~~~~~
@@ -46,7 +46,7 @@ Example
 The following example demonstrates the configuration of the sync and
 reset callbacks.
 
-.. code:: c
+.. code-block:: cpp
 
     #include "sysinit/sysinit.h"
     #include "console/console.h"
diff --git a/docs/network/ble/bletiny/bletiny_GAP.rst b/docs/network/ble/bletiny/bletiny_GAP.rst
deleted file mode 100644
index 4ccad871b..000000000
--- a/docs/network/ble/bletiny/bletiny_GAP.rst
+++ /dev/null
@@ -1,487 +0,0 @@
-GAP API for bletiny
--------------------
-
-Generic Access Profile (GAP) defines the generic procedures related to
-discovery of Bluetooth devices (idle mode procedures) and link
-management aspects of connecting to Bluetooth devices (connecting mode
-procedures). It also defines procedures related to use of different
-security levels.
-
-Several different modes and procedures may be performed simultaneously
-over an LE physical transport. The following modes and procedures are
-defined for use over an LE physical transport:
-
-1. **Broadcast mode and observation procedure**
-
-   -  These allow two devices to communicate in a unidirectional
-      connectionless manner using the advertising events.
-
-2. **Discovery modes and procedures**
-
-   -  All devices shall be in either non-discoverable mode or one of the
-      discoverable modes.
-   -  A device in the discoverable mode shall be in either the general
-      discoverable mode or the limited discoverable mode.
-   -  A device in non-discoverable mode will not be discovered by any
-      device that is performing either the general discovery procedure
-      or the limited discovery procedure.
-
-3. **Connection modes and procedures**
-
-   -  allow a device to establish a connection to another device.
-   -  allow updating of parameters of the connection
-   -  allow termination of the connection
-
-4. **Bonding modes and procedures**
-
-   -  Bonding allows two connected devices to exchange and store
-      security and identity information to create a trusted
-      relationship.
-   -  Bonding can occur only between two devices in bondable mode.
-
-Usage API
-~~~~~~~~~
-
-+-------+------------+------------------+
-| **Ite | **Modes    | **nimBLE         |
-| m     | and        | command**        |
-| No.** | Procedures |                  |
-|       | **         |                  |
-+=======+============+==================+
-| 1     | Broadcast  | ``b adv conn=non |
-|       | Mode       |  disc=x``        |
-+-------+------------+------------------+
-|       | Observatio | ``b scan dur=x d |
-|       | n          | isc=x type=x fil |
-|       | Procedure  | t=x``            |
-+-------+------------+------------------+
-| 2     | Non-Discov | ``b adv conn=x d |
-|       | erable     | isc=non``        |
-|       | mode       |                  |
-+-------+------------+------------------+
-|       | Limited    | ``b adv conn=x d |
-|       | Discoverab | isc=ltd``        |
-|       | le         |                  |
-|       | mode       |                  |
-+-------+------------+------------------+
-|       | General    | ``b adv conn=x d |
-|       | Discoverab | isc=gen``        |
-|       | le         |                  |
-|       | mode       |                  |
-+-------+------------+------------------+
-|       | Limited    | ``b scan dur=x d |
-|       | Discovery  | isc=ltd type=act |
-|       | procedure  | ive filt=no_wl`` |
-+-------+------------+------------------+
-|       | General    | ``b scan dur=x d |
-|       | Discovery  | isc=gen type=act |
-|       | procedure  | ive filt=no_wl`` |
-+-------+------------+------------------+
-|       | Name       | ``b scan dur=x`` |
-|       | Discovery  | ``b scan cancel` |
-|       | procedure  | `                |
-|       |            | ``b conn peer_ad |
-|       |            | dr_type=x peer_a |
-|       |            | ddr=x``          |
-|       |            | ``b read conn=x  |
-|       |            | uuid=0x2a00``    |
-+-------+------------+------------------+
-| 3     | Non-connec | ``b adv conn=non |
-|       | table      |  disc=x``        |
-|       | mode       |                  |
-+-------+------------+------------------+
-|       | Directed   | ``b adv conn=dir |
-|       | connectabl |  [own_addr_type= |
-|       | e          | x] [disc=x] [dur |
-|       | mode       | =x]``            |
-+-------+------------+------------------+
-|       | Undirected | ``b adv conn=und |
-|       | connectabl |  [own_addr_type= |
-|       | e          | x] [disc=x] [dur |
-|       | mode       | =x]``            |
-+-------+------------+------------------+
-|       | Auto       | ``b wl addr_type |
-|       | connection | =x addr=x [addr_ |
-|       | establishm | type=y addr=y] [ |
-|       | ent        | ...]``           |
-|       | procedure  | ``b conn addr_ty |
-|       |            | pe=wl``          |
-+-------+------------+------------------+
-|       | General    | ``b scan dur=x`` |
-|       | connection | ``b scan cancel` |
-|       | establishm | `                |
-|       | ent        | ``b conn peer_ad |
-|       | procedure  | dr_type=x peer_a |
-|       |            | ddr=x``          |
-+-------+------------+------------------+
-|       | Selective  | ``b wl addr_type |
-|       | connection | =x addr=x [addr_ |
-|       | establishm | type=y addr=y] [ |
-|       | ent        | ...]``           |
-|       | procedure  | ``b scan filt=us |
-|       |            | e_wl dur=x``     |
-|       |            | ``b scan cancel` |
-|       |            | `                |
-|       |            | ``b conn peer_ad |
-|       |            | dr_type=x peer_a |
-|       |            | ddr=x [own_addr_ |
-|       |            | type=x]``        |
-+-------+------------+------------------+
-|       | Direct     | ``b conn addr_ty |
-|       | connection | pe=x addr=x [par |
-|       | establishm | ams]``           |
-|       | ent        |                  |
-|       | procedure  |                  |
-+-------+------------+------------------+
-|       | Connection | ``b update conn= |
-|       | parameter  | x <params>``     |
-|       | update     |                  |
-|       | procedure  |                  |
-+-------+------------+------------------+
-|       | Terminate  | ``b term conn=x` |
-|       | connection | `                |
-|       | procedure  |                  |
-+-------+------------+------------------+
-| 4     | Non-Bondab | ``b set sm_data  |
-|       | le         | bonding=0``      |
-|       | mode       | [\*]             |
-+-------+------------+------------------+
-|       | Bondable   | ``b set sm_data  |
-|       | mode       | bonding=1``      |
-|       |            | [\*]             |
-+-------+------------+------------------+
-|       | Bonding    | ``b sec start co |
-|       | procedure  | nn=x``           |
-|       |            | [\*]             |
-+-------+------------+------------------+
-
-**[\*]** Security is disabled by default in bletiny. To use the bonding
-modes and procedures, add ``BLE_SM_LEGACY: 1`` or ``BLE_SM_SC: 1`` to
-your syscfg.yml file depending on your needs.
-
-Address Types
-~~~~~~~~~~~~~
-
-+--------------------+-------------------------------------------------------+
-| *bletiny string*   | *Description*                                         |
-+====================+=======================================================+
-| public             | Public address.                                       |
-+--------------------+-------------------------------------------------------+
-| random             | Random static address.                                |
-+--------------------+-------------------------------------------------------+
-| rpa\_pub           | Resolvable private address, public identity.          |
-+--------------------+-------------------------------------------------------+
-| rpa\_rnd           | Resolvable private address, random static identity.   |
-+--------------------+-------------------------------------------------------+
-| wl                 | Use white list; ignore peer\_addr parameter.          |
-+--------------------+-------------------------------------------------------+
-
-Connection Types
-~~~~~~~~~~~~~~~~
-
-Bluetooth Specification Version 5.0 allows for different types of
-connections:
-
-+--------------------------------------------------+---------------------------------+
-| *Description*                                    | *bletiny ext parameter value*   |
-+==================================================+=================================+
-| Legacy connection                                | none                            |
-+--------------------------------------------------+---------------------------------+
-| Extended connection with 1M PHY                  | 1M                              |
-+--------------------------------------------------+---------------------------------+
-| Extended connection with coded PHY               | coded                           |
-+--------------------------------------------------+---------------------------------+
-| Extended connection with both 1M and coded PHY   | both                            |
-+--------------------------------------------------+---------------------------------+
-| Extended connection with 1M, 2M and coded PHYs   | all                             |
-+--------------------------------------------------+---------------------------------+
-
-Connection Parameters
-~~~~~~~~~~~~~~~~~~~~~
-
-Connection parameter definitions can be found in Section 7.8.12 of the
-BLUETOOTH SPECIFICATION Version 5.0 [Vol 2, Part E].
-
-Connection parameters for all types of connections:
-
-+-------------+---------------------------------------------------+------------+
-| *Name*      | *Description*                                     | *bletiny   |
-|             |                                                   | string*    |
-+=============+===================================================+============+
-| Connection  | Parameter indicating the type of connection       | ext        |
-| Type        |                                                   |            |
-+-------------+---------------------------------------------------+------------+
-| Peer\_Addre | Whether the peer is using a public or random      | peer\_addr |
-| ss\_Type    | address (see Address types table).                | \_type     |
-+-------------+---------------------------------------------------+------------+
-| Peer\_Addre | The 6-byte device address of the peer; ignored if | peer\_addr |
-| ss          | white list is used                                |            |
-+-------------+---------------------------------------------------+------------+
-| Own\_Addres | The type of address to use when initiating the    | own\_addr\ |
-| s\_Type     | connection (see Address types table)              | _type      |
-+-------------+---------------------------------------------------+------------+
-| Duration    | Number of milliseconds before aborting the        | dur        |
-|             | connect attempt                                   |            |
-+-------------+---------------------------------------------------+------------+
-
-Connection parameters for legacy and 1M PHY extended connection:
-
-+------------+-----------------------------------------------------+-----------+
-| *Name*     | *Description*                                       | *bletiny  |
-|            |                                                     | string*   |
-+============+=====================================================+===========+
-| LE\_Scan\_ | Recommendation from the Host on how long the        | scan\_itv |
-| Interval   | Controller should scan                              | l         |
-+------------+-----------------------------------------------------+-----------+
-| LE\_Scan\_ | Recommendation from the Host on how frequently the  | scan\_win |
-| Window     | Controller should scan                              | dow       |
-+------------+-----------------------------------------------------+-----------+
-| Conn\_Inte | Defines minimum allowed connection interval         | itvl\_min |
-| rval\_Min  |                                                     |           |
-+------------+-----------------------------------------------------+-----------+
-| Conn\_Inte | Defines maximum allowed connection interval         | itvl\_max |
-| rval\_Max  |                                                     |           |
-+------------+-----------------------------------------------------+-----------+
-| Conn\_Late | Defines the maximum allowed connection latency      | latency   |
-| ncy        |                                                     |           |
-+------------+-----------------------------------------------------+-----------+
-| Supervisio | Link supervision timeout for the connection.        | timeout   |
-| n\_Timeout |                                                     |           |
-+------------+-----------------------------------------------------+-----------+
-| Minimum\_C | Informative parameter providing the Controller with | min\_ce\_ |
-| E\_Length  | the expected minimum length of the connection event | len       |
-+------------+-----------------------------------------------------+-----------+
-| Maximum\_C | Informative parameter providing the Controller with | max\_ce\_ |
-| E\_Length  | the expected maximum length of the connection event | len       |
-+------------+-----------------------------------------------------+-----------+
-
-Extended Connection parameters for coded PHY connection:
-
-+------------+-----------------------------------------------------+-----------+
-| *Name*     | *Description*                                       | *bletiny  |
-|            |                                                     | string*   |
-+============+=====================================================+===========+
-| LE\_Scan\_ | Recommendation from the Host on how long the        | coded\_sc |
-| Interval   | Controller should scan                              | an\_itvl  |
-+------------+-----------------------------------------------------+-----------+
-| LE\_Scan\_ | Recommendation from the Host on how frequently the  | coded\_sc |
-| Window     | Controller should scan                              | an\_windo |
-|            |                                                     | w         |
-+------------+-----------------------------------------------------+-----------+
-| Conn\_Inte | Defines minimum allowed connection interval         | coded\_it |
-| rval\_Min  |                                                     | vl\_min   |
-+------------+-----------------------------------------------------+-----------+
-| Conn\_Inte | Defines maximum allowed connection interval         | coded\_it |
-| rval\_Max  |                                                     | vl\_max   |
-+------------+-----------------------------------------------------+-----------+
-| Conn\_Late | Defines the maximum allowed connection latency      | coded\_la |
-| ncy        |                                                     | tency     |
-+------------+-----------------------------------------------------+-----------+
-| Supervisio | Link supervision timeout for the connection.        | coded\_ti |
-| n\_Timeout |                                                     | meout     |
-+------------+-----------------------------------------------------+-----------+
-| Minimum\_C | Informative parameter providing the Controller with | coded\_mi |
-| E\_Length  | the expected minimum length of the connection event | n\_ce\_le |
-|            |                                                     | n         |
-+------------+-----------------------------------------------------+-----------+
-| Maximum\_C | Informative parameter providing the Controller with | coded\_ma |
-| E\_Length  | the expected maximum length of the connection event | x\_ce\_le |
-|            |                                                     | n         |
-+------------+-----------------------------------------------------+-----------+
-
-Extended Connection parameters for 2M PHY connection:
-
-+------------+-----------------------------------------------------+-----------+
-| *Name*     | *Description*                                       | *bletiny  |
-|            |                                                     | string*   |
-+============+=====================================================+===========+
-| Conn\_Inte | Defines minimum allowed connection interval         | 2M\_itvl\ |
-| rval\_Min  |                                                     | _min      |
-+------------+-----------------------------------------------------+-----------+
-| Conn\_Inte | Defines maximum allowed connection interval         | 2M\_itvl\ |
-| rval\_Max  |                                                     | _max      |
-+------------+-----------------------------------------------------+-----------+
-| Conn\_Late | Defines the maximum allowed connection latency      | 2M\_laten |
-| ncy        |                                                     | cy        |
-+------------+-----------------------------------------------------+-----------+
-| Supervisio | Link supervision timeout for the connection.        | 2M\_timeo |
-| n\_Timeout |                                                     | ut        |
-+------------+-----------------------------------------------------+-----------+
-| Minimum\_C | Informative parameter providing the Controller with | 2M\_min\_ |
-| E\_Length  | the expected minimum length of the connection event | ce\_len   |
-+------------+-----------------------------------------------------+-----------+
-| Maximum\_C | Informative parameter providing the Controller with | 2M\_max\_ |
-| E\_Length  | the expected maximum length of the connection event | ce\_len   |
-+------------+-----------------------------------------------------+-----------+
-
-Scan Types
-~~~~~~~~~~
-
-Bluetooth Specification Version 5.0 allows for different types of scan:
-
-+--------------------------------------------+---------------------------------+
-| *Description*                              | *bletiny ext parameter value*   |
-+============================================+=================================+
-| Legacy scan                                | 0                               |
-+--------------------------------------------+---------------------------------+
-| Extended scan with 1M PHY                  | 1M                              |
-+--------------------------------------------+---------------------------------+
-| Extended scan with coded PHY               | coded                           |
-+--------------------------------------------+---------------------------------+
-| Extended scan with both 1M and coded PHY   | both                            |
-+--------------------------------------------+---------------------------------+
-
-Scan Parameters
-~~~~~~~~~~~~~~~
-
-Scan parameter definitions can be found in Section 7.8.10 of the
-BLUETOOTH SPECIFICATION Version 5.0 [Vol 2, Part E].
-
-+-----------------+-----------------------------------------------+-------------+
-| *Name*          | *Description*                                 | *bletiny    |
-|                 |                                               | string*     |
-+=================+===============================================+=============+
-| Scan Type       | Parameter indicating the type of scan         | ext         |
-+-----------------+-----------------------------------------------+-------------+
-| LE\_Scan\_Type  | Controls the type of scan to perform (passive | passive     |
-|                 | or active)                                    |             |
-+-----------------+-----------------------------------------------+-------------+
-| LE\_Scan\_Inter | Recommendation from the Host on how long the  | itvl        |
-| val             | Controller should scan                        |             |
-+-----------------+-----------------------------------------------+-------------+
-| LE\_Scan\_Windo | Recommendation from the Host on how           | window      |
-| w               | frequently the Controller should scan         |             |
-+-----------------+-----------------------------------------------+-------------+
-| Scanning\_Filte | Policy about which advertising packets to     | filter      |
-| r\_Policy       | accept                                        |             |
-+-----------------+-----------------------------------------------+-------------+
-| Duration        | Number of milliseconds before canceling scan  | dur         |
-|                 | procedure                                     |             |
-+-----------------+-----------------------------------------------+-------------+
-| Limited         | Limited scan procedure                        | ltd         |
-+-----------------+-----------------------------------------------+-------------+
-| No duplicates   | Filter out duplicates in shell output         | nodups      |
-+-----------------+-----------------------------------------------+-------------+
-| Own\_Address\_T | The type of address to use when scanning (see | own\_addr\_ |
-| ype             | Address types table)                          | type        |
-+-----------------+-----------------------------------------------+-------------+
-
-Extended Scan parameters:
-
-+--------------+--------------------------------------------------+--------------+
-| *Name*       | *Description*                                    | *bletiny     |
-|              |                                                  | string*      |
-+==============+==================================================+==============+
-| Duration     | Number of milliseconds before canceling scan     | duration     |
-|              | procedure                                        |              |
-+--------------+--------------------------------------------------+--------------+
-| Period       | Period in which scan should be enabled for       | period       |
-|              | specified duration                               |              |
-+--------------+--------------------------------------------------+--------------+
-| LE\_Scan\_Ty | Controls the type of scan to perform (passive or | lr\_passive  |
-| pe           | active)                                          |              |
-+--------------+--------------------------------------------------+--------------+
-| LE\_Scan\_In | Recommendation from the Host on how long the     | lr\_itvl     |
-| terval       | Controller should scan                           |              |
-+--------------+--------------------------------------------------+--------------+
-| LE\_Scan\_Wi | Recommendation from the Host on how frequently   | lr\_window   |
-| ndow         | the Controller should scan                       |              |
-+--------------+--------------------------------------------------+--------------+
-
-Advertisment Parameters
-~~~~~~~~~~~~~~~~~~~~~~~
-
-+-----------+---------------------+--------------------------------+---------------+
-| *bletiny  | *Description*       | *Notes*                        | *Default*     |
-| string*   |                     |                                |               |
-+===========+=====================+================================+===============+
-| conn      | Connectable mode    | See Connectable Modes table.   | und           |
-+-----------+---------------------+--------------------------------+---------------+
-| disc      | Discoverable mode   | See Discoverable Modes table.  | gen           |
-+-----------+---------------------+--------------------------------+---------------+
-| own\_addr | The type of address | See Address Types table.       | public        |
-| \_type    | to advertise with   |                                |               |
-+-----------+---------------------+--------------------------------+---------------+
-| peer\_add | The peer's address  | Only used for directed         | public        |
-| r\_type   | type                | advertising; see Address Types |               |
-|           |                     | table.                         |               |
-+-----------+---------------------+--------------------------------+---------------+
-| peer\_add | The peer's address  | Only used for directed         | N/A           |
-| r         |                     | advertising                    |               |
-+-----------+---------------------+--------------------------------+---------------+
-| chan\_map |                     |                                | 0             |
-+-----------+---------------------+--------------------------------+---------------+
-| filt      | The filter policy   | See Advertisement Filter       | none          |
-|           |                     | Policies table.                |               |
-+-----------+---------------------+--------------------------------+---------------+
-| itvl\_min |                     | units=0.625ms                  | non: 100ms;   |
-|           |                     |                                | und/dir: 30ms |
-+-----------+---------------------+--------------------------------+---------------+
-| itvl\_max |                     | units=0.625ms                  | non: 150ms;   |
-|           |                     |                                | und/dir: 60ms |
-+-----------+---------------------+--------------------------------+---------------+
-| hd        | Whether to use      | 0/1                            | 0             |
-|           | high-duty-cycle     |                                |               |
-+-----------+---------------------+--------------------------------+---------------+
-| dur       |                     | Milliseconds                   | Forever       |
-+-----------+---------------------+--------------------------------+---------------+
-
-Extended Advertising parameters:
-
-+----------+-------------------------------------------+---------+----------------+
-| *bletiny | *Description*                             | *Notes* | *Default*      |
-| string*  |                                           |         |                |
-+==========+===========================================+=========+================+
-| tx\_powe | Maximum power level at which the          | -127 -  | 127 (Host has  |
-| r        | advertising packets are to be transmitted | 127 dBm | no preference) |
-+----------+-------------------------------------------+---------+----------------+
-| primary\ | PHY on which the advertising packets are  |         | none           |
-| _phy     | transmitted on the primary advertising    |         |                |
-|          | channel                                   |         |                |
-+----------+-------------------------------------------+---------+----------------+
-| secondar | PHY on which the advertising packets are  |         | primary\_phy   |
-| y\_phy   | transmitted on the secondary advertising  |         |                |
-|          | channel                                   |         |                |
-+----------+-------------------------------------------+---------+----------------+
-
-Advertising PHY Types
-~~~~~~~~~~~~~~~~~~~~~
-
-+---------------------------------------+-----------------------------+
-| *Description*                         | *bletiny parameter value*   |
-+=======================================+=============================+
-| Legacy advertising                    | none                        |
-+---------------------------------------+-----------------------------+
-| Extended advertising with 1M PHY      | 1M                          |
-+---------------------------------------+-----------------------------+
-| Extended advertising with 2M PHY      | 2M                          |
-+---------------------------------------+-----------------------------+
-| Extended advertising with coded PHY   | coded                       |
-+---------------------------------------+-----------------------------+
-
-Advertisement Filter Policies
-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-
-+--------------------+------------------+------------+
-| *btshell string*   | *Description*    | *Notes*    |
-+====================+==================+============+
-| none               | No filtering. No | Default    |
-|                    | whitelist used.  |            |
-+--------------------+------------------+------------+
-| scan               | Process all      |            |
-|                    | connection       |            |
-|                    | requests but     |            |
-|                    | only scans from  |            |
-|                    | white list.      |            |
-+--------------------+------------------+------------+
-| conn               | Process all scan |            |
-|                    | request but only |            |
-|                    | connection       |            |
-|                    | requests from    |            |
-|                    | white list.      |            |
-+--------------------+------------------+------------+
-| both               | Ignore all scan  |            |
-|                    | and connection   |            |
-|                    | requests unless  |            |
-|                    | in white list.   |            |
-+--------------------+------------------+------------+
diff --git a/docs/network/ble/bletiny/bletiny_GATT.rst b/docs/network/ble/bletiny/bletiny_GATT.rst
deleted file mode 100644
index c2d31ddcb..000000000
--- a/docs/network/ble/bletiny/bletiny_GATT.rst
+++ /dev/null
@@ -1,185 +0,0 @@
-GATT feature API for bletiny
-----------------------------
-
-GATT(GENERIC ATTRIBUTE PROFILE) describes a service framework using the
-Attribute Protocol for discovering services, and for reading and writing
-characteristic values on a peer device. There are 11 features defined in
-the GATT Profile, and each of the features is mapped to procedures and
-sub-procedures:
-
-+-------+------------+------------------+---------+
-| **Ite | **Feature* | **Sub-Procedure* | **nimBL |
-| m     | *          | *                | E       |
-| No.** |            |                  | command |
-|       |            |                  | **      |
-+=======+============+==================+=========+
-| 1     | Server     | Exchange MTU     | ``b mtu |
-|       | Configurat |                  | ``      |
-|       | ion        |                  |         |
-+-------+------------+------------------+---------+
-| 2     | Primary    | Discover All     | ``b dis |
-|       | Service    | Primary Services | c svc c |
-|       | Discovery  |                  | onn=x`` |
-+-------+------------+------------------+---------+
-|       |            | Discover Primary | ``b dis |
-|       |            | Services By      | c svc c |
-|       |            | Service UUID     | onn=x u |
-|       |            |                  | uid=x`` |
-+-------+------------+------------------+---------+
-| 3     | Relationsh | Find Included    | ``b fin |
-|       | ip         | Services         | d inc_s |
-|       | Discovery  |                  | vcs con |
-|       |            |                  | n=x sta |
-|       |            |                  | rt=x en |
-|       |            |                  | d=x``   |
-+-------+------------+------------------+---------+
-| 4     | Characteri | Discover All     | ``b dis |
-|       | stic       | Characteristic   | c chr c |
-|       | Discovery  | of a Service     | onn=x s |
-|       |            |                  | tart=x  |
-|       |            |                  | end=x`` |
-+-------+------------+------------------+---------+
-|       |            | Discover         | ``b dis |
-|       |            | Characteristic   | c chr c |
-|       |            | by UUID          | onn=x s |
-|       |            |                  | tart=x  |
-|       |            |                  | end=x u |
-|       |            |                  | uid=x`` |
-+-------+------------+------------------+---------+
-| 5     | Characteri | Discover All     | ``b dis |
-|       | stic       | Characteristic   | c dsc c |
-|       | Descriptor | Descriptors      | onn=x s |
-|       | Discovery  |                  | tart=x  |
-|       |            |                  | end=x`` |
-+-------+------------+------------------+---------+
-| 6     | Reading a  | Read             | ``b rea |
-|       | Characteri | Characteristic   | d conn= |
-|       | stic       | Value            | x attr= |
-|       | Value      |                  | x``     |
-+-------+------------+------------------+---------+
-|       |            | Read Using       | ``b rea |
-|       |            | Characteristic   | d conn= |
-|       |            | UUID             | x start |
-|       |            |                  | =x end= |
-|       |            |                  | x uuid= |
-|       |            |                  | x``     |
-+-------+------------+------------------+---------+
-|       |            | Read Long        | ``b rea |
-|       |            | Characteristic   | d conn= |
-|       |            | Values           | x attr= |
-|       |            |                  | x long= |
-|       |            |                  | 1``     |
-+-------+------------+------------------+---------+
-|       |            | Read Multiple    | ``b rea |
-|       |            | Characteristic   | d conn= |
-|       |            | Values           | x attr= |
-|       |            |                  | x attr= |
-|       |            |                  | y attr= |
-|       |            |                  | z``     |
-+-------+------------+------------------+---------+
-| 7     | Writing a  | Write Without    | ``b wri |
-|       | Characteri | Response         | te conn |
-|       | stic       |                  | =x valu |
-|       | Value      |                  | e=0xXX: |
-|       |            |                  | 0xXX no |
-|       |            |                  | _rsp=1` |
-|       |            |                  | `       |
-+-------+------------+------------------+---------+
-|       |            | Signed Write     | NOT     |
-|       |            | Without Response | SUPPORT |
-|       |            |                  | ED      |
-+-------+------------+------------------+---------+
-|       |            | Write            | ``b wri |
-|       |            | Characteristic   | te conn |
-|       |            | Value            | =x attr |
-|       |            |                  | =x valu |
-|       |            |                  | e=0xXX: |
-|       |            |                  | 0xXX``  |
-+-------+------------+------------------+---------+
-|       |            | Write Long       | ``b wri |
-|       |            | Characteristic   | te conn |
-|       |            | Values           | =x attr |
-|       |            |                  | =x valu |
-|       |            |                  | e=0xXX: |
-|       |            |                  | 0xXX lo |
-|       |            |                  | ng=1``  |
-+-------+------------+------------------+---------+
-|       |            | Characteristic   | ``b wri |
-|       |            | Value Reliable   | te conn |
-|       |            | Writes           | =x attr |
-|       |            |                  | =x valu |
-|       |            |                  | e=0xXX: |
-|       |            |                  | 0xXX at |
-|       |            |                  | tr=y va |
-|       |            |                  | lue=0xY |
-|       |            |                  | Y:0xYY` |
-|       |            |                  | `       |
-+-------+------------+------------------+---------+
-| 8     | Notificati | Notifications    | Write   |
-|       | on         |                  | CLIENT  |
-|       | of a       |                  | CONFIGU |
-|       | Characteri |                  | RATION  |
-|       | stic       |                  | charact |
-|       | Value      |                  | eristic |
-+-------+------------+------------------+---------+
-| 9     | Indication | Indications      | Write   |
-|       | of a       |                  | CLIENT  |
-|       | Characteri |                  | CONFIGU |
-|       | stic       |                  | RATION  |
-|       | Value      |                  | charact |
-|       |            |                  | eristic |
-+-------+------------+------------------+---------+
-| 10    | Reading a  | Read             | ``b rea |
-|       | Characteri | Characteristic   | d conn= |
-|       | stic       | Descriptors      | x attr= |
-|       | Descriptor |                  | x``     |
-+-------+------------+------------------+---------+
-|       |            | Read Long        | ``b rea |
-|       |            | Characteristic   | d conn= |
-|       |            | Descriptors      | x attr= |
-|       |            |                  | x long= |
-|       |            |                  | 1``     |
-+-------+------------+------------------+---------+
-| 11    | Writing a  | Write            | ``b wri |
-|       | Characteri | Characteristic   | te conn |
-|       | stic       | Descriptors      | =x valu |
-|       | Descriptor |                  | e=0xXX: |
-|       |            |                  | 0xXX``  |
-+-------+------------+------------------+---------+
-|       |            | Write Long       | ``b wri |
-|       |            | Characteristic   | te conn |
-|       |            | Descriptors      | =x valu |
-|       |            |                  | e=0xXX: |
-|       |            |                  | 0xXX lo |
-|       |            |                  | ng=1``  |
-+-------+------------+------------------+---------+
-
-Using nimBLE commands Assuming you have discovered and established
-~~~~~~~~~~~~~~~
-
-a BLE connection with at least one peer device (as explained earlier in
-`API for bletiny app <bletiny_api.html>`__, you can find out what
-characteristics and services are available over these connections. Here
-is a recap.
-
-::
-
-    b show conn
-
-To show discovered services
-
-::
-
-    b show svc
-
-To show discovered characteristics
-
-::
-
-    b show chr
-
-To show connection RSSI
-
-::
-
-    b show rssi conn=x
diff --git a/docs/network/ble/bletiny/bletiny_advdata.rst b/docs/network/ble/bletiny/bletiny_advdata.rst
deleted file mode 100644
index ab58c7342..000000000
--- a/docs/network/ble/bletiny/bletiny_advdata.rst
+++ /dev/null
@@ -1,276 +0,0 @@
-Advertisement Data Fields
--------------------------
-
-This part defines the advertisement data fields used in the ``bletiny``
-app. For a complete list of all data types and formats used for Extended
-Inquiry Response (EIR), Advertising Data (AD), and OOB data blocks,
-refer to the Supplement to the Bluetooth Core Specification, CSSv6,
-available for download
-`here <https://www.bluetooth.org/DocMan/handlers/DownloadDoc.ashx?doc_id=302735&_ga=1.133090766.1368218946.1444779486>`__.
-
-+-------+------------+------------------+
-| **Nam | **Definiti | **Details**      |
-| e**   | on**       |                  |
-+=======+============+==================+
-| uuids | 16-bit     | Indicates the    |
-| 16    | Bluetooth  | Service UUID     |
-|       | Service    | list is          |
-|       | UUIDs      | incomplete i.e.  |
-|       |            | more 16-bit      |
-|       |            | Service UUIDs    |
-|       |            | available. 16    |
-|       |            | bit UUIDs shall  |
-|       |            | only be used if  |
-|       |            | they are         |
-|       |            | assigned by the  |
-|       |            | Bluetooth SIG.   |
-+-------+------------+------------------+
-| uuids | 16-bit     | Indicates the    |
-| 16\_i | Bluetooth  | Service UUID     |
-| s\_co | Service    | list is          |
-| mplet | UUIDs      | complete. 16 bit |
-| e     |            | UUIDs shall only |
-|       |            | be used if they  |
-|       |            | are assigned by  |
-|       |            | the Bluetooth    |
-|       |            | SIG.             |
-+-------+------------+------------------+
-| uuids | 32-bit     | Indicates the    |
-| 32    | Bluetooth  | Service UUID     |
-|       | Service    | list is          |
-|       | UUIDs      | incomplete i.e.  |
-|       |            | more 32-bit      |
-|       |            | Service UUIDs    |
-|       |            | available. 32    |
-|       |            | bit UUIDs shall  |
-|       |            | only be used if  |
-|       |            | they are         |
-|       |            | assigned by the  |
-|       |            | Bluetooth SIG.   |
-+-------+------------+------------------+
-| uuids | 32-bit     | Indicates the    |
-| 32\_i | Bluetooth  | Service UUID     |
-| s\_co | Service    | list is          |
-| mplet | UUIDs      | complete. 32 bit |
-| e     |            | UUIDs shall only |
-|       |            | be used if they  |
-|       |            | are assigned by  |
-|       |            | the Bluetooth    |
-|       |            | SIG.             |
-+-------+------------+------------------+
-| uuids | Global     | More 128-bit     |
-| 128   | 128-bit    | Service UUIDs    |
-|       | Service    | available.       |
-|       | UUIDs      |                  |
-+-------+------------+------------------+
-| uuids | Global     | Complete list of |
-| 128\_ | 128-bit    | 128-bit Service  |
-| is\_c | Service    | UUIDs            |
-| omple | UUIDs      |                  |
-| te    |            |                  |
-+-------+------------+------------------+
-| tx\_p | TX Power   | Indicates the    |
-| wr\_l | Level      | transmitted      |
-| vl    |            | power level of   |
-|       |            | the packet       |
-|       |            | containing the   |
-|       |            | data type. The   |
-|       |            | TX Power Level   |
-|       |            | data type may be |
-|       |            | used to          |
-|       |            | calculate path   |
-|       |            | loss on a        |
-|       |            | received packet  |
-|       |            | using the        |
-|       |            | following        |
-|       |            | equation:        |
-|       |            | pathloss = Tx    |
-|       |            | Power Level ?    |
-|       |            | RSSI where       |
-|       |            | ?RSSI? is the    |
-|       |            | received signal  |
-|       |            | strength, in     |
-|       |            | dBm, of the      |
-|       |            | packet received. |
-+-------+------------+------------------+
-| devic | Class of   | Size: 3 octets   |
-| e\_cl | device     |                  |
-| ass   |            |                  |
-+-------+------------+------------------+
-| slave | Slave      | Contains the     |
-| \_itv | Connection | Peripheral?s     |
-| l\_ra | Interval   | preferred        |
-| nge   | Range      | connection       |
-|       |            | interval range,  |
-|       |            | for all logical  |
-|       |            | connections.     |
-|       |            | Size: 4 Octets . |
-|       |            | The first 2      |
-|       |            | octets defines   |
-|       |            | the minimum      |
-|       |            | value for the    |
-|       |            | connection       |
-|       |            | interval in the  |
-|       |            | following        |
-|       |            | manner:          |
-|       |            | connIntervalmin  |
-|       |            | =                |
-|       |            | Conn\_Interval\_ |
-|       |            | Min              |
-|       |            | \* 1.25 ms       |
-|       |            | Conn\_Interval\_ |
-|       |            | Min              |
-|       |            | range: 0x0006 to |
-|       |            | 0x0C80 Value of  |
-|       |            | 0xFFFF indicates |
-|       |            | no specific      |
-|       |            | minimum. The     |
-|       |            | other 2 octets   |
-|       |            | defines the      |
-|       |            | maximum value    |
-|       |            | for the          |
-|       |            | connection       |
-|       |            | interval in the  |
-|       |            | following        |
-|       |            | manner:          |
-|       |            | connIntervalmax  |
-|       |            | =                |
-|       |            | Conn\_Interval\_ |
-|       |            | Max              |
-|       |            | \* 1.25 ms       |
-|       |            | Conn\_Interval\_ |
-|       |            | Max              |
-|       |            | range: 0x0006 to |
-|       |            | 0x0C80           |
-|       |            | Conn\_Interval\_ |
-|       |            | Max              |
-|       |            | shall be equal   |
-|       |            | to or greater    |
-|       |            | than the         |
-|       |            | Conn\_Interval\_ |
-|       |            | Min.             |
-|       |            | Value of 0xFFFF  |
-|       |            | indicates no     |
-|       |            | specific         |
-|       |            | maximum.         |
-+-------+------------+------------------+
-| svc\_ | Service    | Size: 2 or more  |
-| data\ | Data - 16  | octets The first |
-| _uuid | bit UUID   | 2 octets contain |
-| 16    |            | the 16 bit       |
-|       |            | Service UUID     |
-|       |            | followed by      |
-|       |            | additional       |
-|       |            | service data     |
-+-------+------------+------------------+
-| publi | Public     | Defines the      |
-| c\_tg | Target     | address of one   |
-| t\_ad | Address    | or more intended |
-| dr    |            | recipients of an |
-|       |            | advertisement    |
-|       |            | when one or more |
-|       |            | devices were     |
-|       |            | bonded using a   |
-|       |            | public address.  |
-|       |            | This data type   |
-|       |            | shall exist only |
-|       |            | once. It may be  |
-|       |            | sent in either   |
-|       |            | the Advertising  |
-|       |            | or Scan Response |
-|       |            | data, but not    |
-|       |            | both.            |
-+-------+------------+------------------+
-| appea | Appearance | Defines the      |
-| rance |            | external         |
-|       |            | appearance of    |
-|       |            | the device. The  |
-|       |            | Appearance data  |
-|       |            | type shall exist |
-|       |            | only once. It    |
-|       |            | may be sent in   |
-|       |            | either the       |
-|       |            | Advertising or   |
-|       |            | Scan Response    |
-|       |            | data, but not    |
-|       |            | both.            |
-+-------+------------+------------------+
-| adv\_ | Advertisin | Contains the     |
-| itvl  | g          | advInterval      |
-|       | Interval   | value as defined |
-|       |            | in the Core      |
-|       |            | specification,   |
-|       |            | Volume 6, Part   |
-|       |            | B, Section       |
-|       |            | 4.4.2.2.         |
-+-------+------------+------------------+
-| le\_a | LE         | Defines the      |
-| ddr   | Bluetooth  | device address   |
-|       | Device     | of the local     |
-|       | Address    | device and the   |
-|       |            | address type on  |
-|       |            | the LE           |
-|       |            | transport.       |
-+-------+------------+------------------+
-| le\_r | LE Role    | Defines the LE   |
-| ole   |            | role             |
-|       |            | capabilities of  |
-|       |            | the device. 0x00 |
-|       |            | Only Peripheral  |
-|       |            | Role supported   |
-|       |            | 0x01 Only        |
-|       |            | Central Role     |
-|       |            | supported 0x02   |
-|       |            | Peripheral and   |
-|       |            | Central Role     |
-|       |            | supported,       |
-|       |            | Peripheral Role  |
-|       |            | preferred for    |
-|       |            | connection       |
-|       |            | establishment    |
-|       |            | 0x03 Peripheral  |
-|       |            | and Central Role |
-|       |            | supported,       |
-|       |            | Central Role     |
-|       |            | preferred for    |
-|       |            | connection       |
-|       |            | establishment    |
-|       |            | 0x04 ? 0xFF      |
-|       |            | Reserved for     |
-|       |            | future use       |
-+-------+------------+------------------+
-| svc\_ | Service    | Size: 4 or more  |
-| data\ | Data - 32  | octets The first |
-| _uuid | bit UUID   | 4 octets contain |
-| 32    |            | the 32 bit       |
-|       |            | Service UUID     |
-|       |            | followed by      |
-|       |            | additional       |
-|       |            | service data     |
-+-------+------------+------------------+
-| svc\_ | Service    | Size: 16 or more |
-| data\ | Data - 128 | octets The first |
-| _uuid | bit UUID   | 16 octets        |
-| 128   |            | contain the 128  |
-|       |            | bit Service UUID |
-|       |            | followed by      |
-|       |            | additional       |
-|       |            | service data     |
-+-------+------------+------------------+
-| uri   | Uniform    | Scheme name      |
-|       | Resource   | string and URI   |
-|       | Identifier | as a UTF-8       |
-|       | (URI)      | string           |
-+-------+------------+------------------+
-| mfg\_ | Manufactur | Size: 2 or more  |
-| data  | er         | octets The first |
-|       | Specific   | 2 octets contain |
-|       | data       | the Company      |
-|       |            | Identifier Code  |
-|       |            | followed by      |
-|       |            | additional       |
-|       |            | manufacturer     |
-|       |            | specific data    |
-+-------+------------+------------------+
-
-
diff --git a/docs/network/ble/bletiny/bletiny_api.rst b/docs/network/ble/bletiny/bletiny_api.rst
deleted file mode 100644
index 34c2f5474..000000000
--- a/docs/network/ble/bletiny/bletiny_api.rst
+++ /dev/null
@@ -1,125 +0,0 @@
-API for bletiny app
--------------------
-
-"bletiny" is one of the sample applications that come with Mynewt. It is
-a shell application which provides a basic interface to the host-side of
-the BLE stack. "bletiny" includes all the possible roles
-(Central/Peripheral) and they may be run simultaneously. You can run
-bletiny on a board and issue commands that make it behave as a central
-or a peripheral with different peers.
-
-"bletiny" is a BLE application which uses the 1.0 shell. If you want to
-use the 1.1 shell in BLE application please go to `btshell
-app <../btshell/btshell_api.html>`__.
-
-Highlighted below are some of the ways you can use the API to establish
-connections and discover services and characteristics from peer devices.
-For descriptions of the full API, go to the next sections on `GAP in
-bletiny <bletiny_GAP.html>`__ and `GATT in bletiny <bletiny_GATT.html>`__.
-
-All bletiny commands are prefixed with ``b``. This prefix distinguished
-bletiny commands from other shell commands that are implemented by other
-Mynewt packages.
-
-Set device address.
-~~~~~~~~~~~~~~~~~~~
-
-On startup, bletiny has the following identity address configuration:
-
--  Public address: None
--  Random address: None
-
-The below ``set`` commands can be used to change the address
-configuration:
-
-::
-
-    b set addr_type=public addr=<device-address>
-    b set addr_type=random addr=<device-address>
-
-For example:
-
-::
-
-    b set addr_type=public addr=01:02:03:04:05:06
-    b set addr_type=random addr=c1:aa:bb:cc:dd:ee
-
-The address configuration can be viewed with the ``b show addr``
-command, as follows:
-
-::
-
-    b show addr
-    public_id_addr=01:02:03:04:05:06 random_id_addr=c1:aa:bb:cc:dd:ee
-
-Initiate a direct connection to a device
-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-
-In this case, your board is acting as a central and initiating a
-connection with another BLE device. The example assumes you know the
-address of the peer, either by scanning for available peers or because
-you have set up the peer yourself.
-
-.. code:: hl_lines="1"
-
-    b conn own_addr_type=public peer_addr_type=public peer_addr=d4:f5:13:53:d2:43
-    connection established; handle=1 our_ota_addr_type=0 our_ota_addr=0a:0b:0c:0d:0e:0f out_id_addr_type=0 our_id_addr=0a:0b:0c:0d:0e:0f peer_addr_type=0 peer_addr=43:d2:53:13:f5:d4 conn_itvl=40 conn_latency=0 supervision_timeout=256 encrypted=0 authenticated=0 bonded=0
-
-The ``handle=1`` in the output indicates that it is connection-1.
-
-Configure advertisements to include device name
-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-
-In this case, your board is acting as a peripheral.
-
-::
-
-    b set adv_data name=<your-device-name>
-
-Begin sending undirected general advertisements
-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-
-In this case, your board is acting as a peripheral.
-
-::
-
-    b adv conn=und disc=gen
-
-Show established connections.
-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-
-::
-
-    b show conn
-
-Discover and display peer's services, characteristics, and descriptors.
-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-
-This is how you discover and then display the services of the peer you
-established earlier across connection-1.
-
-``hl_lines="1 2" b disc full conn=1 b show chr [ts=132425ssb, mod=64 level=2] CONNECTION: handle=1 addr=d4:f5:13:53:d2:43 [ts=132428ssb, mod=64 level=2]     start=1 end=5 uuid=0x1800 [ts=132433ssb, mod=64 level=2]     start=6 end=16 uuid=0x1808 [ts=132437ssb, mod=64 level=2]     start=17 end=31 uuid=0x180a [ts=132441ssb, mod=64 level=2]     start=32 end=65535 uuid=00000000-0000-1000-1000000000000000``
-
-Read an attribute belonging to the peer
-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-
-::
-
-    b read conn=1 attr=21
-
-Write to an attribute belonging to the peer
-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-
-::
-
-    b write conn=1 attr=3 value=0x01:0x02:0x03
-
-Perform a passive scan
-~~~~~~~~~~~~~~~~~~~~~~
-
-This is how you tell your board to listen to all advertisements around
-it. The duration is specified in ms.
-
-::
-
-    b scan dur=1000 type=passive filt=no_wl
diff --git a/docs/network/ble/bletiny_api.rst b/docs/network/ble/bletiny_api.rst
deleted file mode 100644
index 9a1de2a9f..000000000
--- a/docs/network/ble/bletiny_api.rst
+++ /dev/null
@@ -1,127 +0,0 @@
-API for bletiny app
--------------------
-
-"bletiny" is one of the sample applications that come with Mynewt. It is
-a simple shell application which provides a basic interface to the
-host-side of the BLE stack. "bletiny" includes all the possible roles
-(Central/Peripheral) and they may be run simultaneously. You can run
-bletiny on a board and issue commands that make it behave as a central
-or a peripheral with different peers.
-
-Highlighted below are some of the ways you can use the API to establish
-connections and discover services and characteristics from peer devices.
-For descriptions of the full API, go to the next sections on `GAP in
-bletiny <bletiny/bletiny_GAP.html>`__ and `GATT in
-bletiny <bletiny/bletiny_GATT.html>`__.
-
-Set device public address.
-~~~~~~~~~~~~~~~~~~~~~~~~~~
-
-Currently the device public address is hardcoded to
-``0a:0b:0c:0d:0e:0f`` in ``bletiny`` app but you can change it by going
-into its source code and initializing it to the desired value as
-described in the section on how to `initialize device
-addr <ini_stack/ble_devadd.html>`__.
-
-Initiate a direct connection to a device
-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-
-In this case, your board is acting as a central and initiating a
-connection with another BLE device. The example assumes you know the
-address of the peer, either by scanning for available peers or because
-you have set up the peer yourself.
-
-.. code:: hl_lines="1"
-
-    b conn addr_type=public addr=d4:f5:13:53:d2:43
-    [ts=118609ssb, mod=64 level=2] connection complete; status=0 handle=1 peer_addr_type=0 peer_addr=0x43:0xd2:0x53:0x13:0xf5:0xd4 conn_itvl=40 conn_latency=0 supervision_timeout=256
-
-The ``handle=1`` in the output indicates that it is connection-1.
-
-Configure advertisements to include device name
-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-
-In this case, your board is acting as a peripheral.
-
-::
-
-    b set adv_data name=<your-device-name>
-
-Begin sending undirected general advertisements
-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-
-In this case, your board is acting as a peripheral.
-
-::
-
-    b adv conn=und disc=gen
-
-Show established connections.
-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-
-::
-
-    b show conn
-
-Discover and display peer's services.
-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-
-This is how you discover and then display the services of the peer you
-established earlier across connection-1.
-
-``hl_lines="1 2" b disc svc conn=1 b show chr [ts=132425ssb, mod=64 level=2] CONNECTION: handle=1 addr=d4:f5:13:53:d2:43 [ts=132428ssb, mod=64 level=2]     start=1 end=5 uuid=0x1800 [ts=132433ssb, mod=64 level=2]     start=6 end=16 uuid=0x1808 [ts=132437ssb, mod=64 level=2]     start=17 end=31 uuid=0x180a [ts=132441ssb, mod=64 level=2]     start=32 end=65535 uuid=00000000-0000-1000-1000000000000000``
-
-Discover characteristics for each service on peer
-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-
-The following examples show how to find the characteristics for each
-service available on the peer device across connection-1. The start and
-end values depend on the specific services discovered using the previous
-command ``b show chr``. Continuing with the example above, you can
-discover the characteristics of the first service and display it using
-the following commands.
-
-``hl_lines="1 2" b disc chr conn=1 start=1 end=5 b show chr [ts=163063ssb, mod=64 level=2] CONNECTION: handle=1 addr=d4:f5:13:53:d2:43 [ts=163067ssb, mod=64 level=2]     start=1 end=5 uuid=0x1800 [ts=163071ssb, mod=64 level=2]         def_handle=2 val_handle=3 properties=0x02 uuid=0x2a00 [ts=163078ssb, mod=64 level=2]         def_handle=4 val_handle=5 properties=0x02 uuid=0x2a01 [ts=163085ssb, mod=64 level=2]     start=6 end=16 uuid=0x1808 [ts=163089ssb, mod=64 level=2]     start=17 end=31 uuid=0x180a [ts=163094ssb, mod=64 level=2]     start=32 end=65535 uuid=00000000-0000-1000-1000000000000000``
-
-You can next discover characteristics for the second service and
-display.
-
-``hl_lines="1 2" b disc chr conn=1 start=6 end=16 b show chr [ts=180631ssb, mod=64 level=2] CONNECTION: handle=1 addr=d4:f5:13:53:d2:43 [ts=180634ssb, mod=64 level=2]     start=1 end=5 uuid=0x1800 [ts=180639ssb, mod=64 level=2]         def_handle=2 val_handle=3 properties=0x02 uuid=0x2a00 [ts=180646ssb, mod=64 level=2]         def_handle=4 val_handle=5 properties=0x02 uuid=0x2a01 [ts=180653ssb, mod=64 level=2]     start=6 end=16 uuid=0x1808 [ts=180657ssb, mod=64 level=2]         def_handle=7 val_handle=8 properties=0x10 uuid=0x2a18 [ts=180664ssb, mod=64 level=2]         def_handle=10 val_handle=11 properties=0x02 uuid=0x2a51 [ts=180672ssb, mod=64 level=2]         def_handle=12 val_handle=13 properties=0x28 uuid=0x2a52 [ts=180679ssb, mod=64 level=2]         def_handle=15 val_handle=16 properties=0x02 uuid=0x2a08 [ts=180686ssb, mod=64 level=2]     start=17 end=31 uuid=0x180a [ts=180691ssb, mod=64 level=2]     start=32 end=65535 uuid=00000000-0000-1000-1000000000000000``
-
-Discover descriptors for each characteristic on peer
-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-
-Just as before, the start and end values depend on the specific
-characteristics discovered.
-
-::
-
-    b disc dsc conn=1 start=1 end=5
-    b disc dsc conn=1 start=6 end=16
-    b disc dsc conn=1 start=17 end=31
-
-Read an attribute belonging to the peer
-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-
-::
-
-    b read conn=1 attr=18 attr=21
-
-Write to an attribute belonging to the peer
-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-
-::
-
-    b write conn=1 attr=3 value=0x01:0x02:0x03
-
-Perform a passive scan
-~~~~~~~~~~~~~~~~~~~~~~
-
-This is how you tell your board to listen to all advertisements around
-it. The duration is specified in ms.
-
-::
-
-    b scan dur=1000 disc=gen type=passive filt=no_wl
-
-
diff --git a/docs/network/ble/btshell/btshell_GAP.rst b/docs/network/ble/btshell/btshell_GAP.rst
index 886d76c67..774ea60c6 100644
--- a/docs/network/ble/btshell/btshell_GAP.rst
+++ b/docs/network/ble/btshell/btshell_GAP.rst
@@ -1,30 +1,23 @@
 GAP API for btshell
--------------------
+===================
 
-Generic Access Profile (GAP) defines the generic procedures related to
-discovery of Bluetooth devices (idle mode procedures) and link
-management aspects of connecting to Bluetooth devices (connecting mode
-procedures). It also defines procedures related to use of different
-security levels.
+Generic Access Profile (GAP) defines the generic procedures related to discovery of Bluetooth devices (idle mode
+procedures) and link management aspects of connecting to Bluetooth devices (connecting mode procedures). It also defines
+procedures related to use of different security levels.
 
-Several different modes and procedures may be performed simultaneously
-over an LE physical transport. The following modes and procedures are
-defined for use over an LE physical transport:
+Several different modes and procedures may be performed simultaneously over an LE physical transport. The following
+modes and procedures are defined for use over an LE physical transport:
 
 1. **Broadcast mode and observation procedure**
 
-   -  These allow two devices to communicate in a unidirectional
-      connectionless manner using the advertising events.
+   -  These allow two devices to communicate in a unidirectional connectionless manner using the advertising events.
 
 2. **Discovery modes and procedures**
 
-   -  All devices shall be in either non-discoverable mode or one of the
-      discoverable modes.
-   -  A device in the discoverable mode shall be in either the general
-      discoverable mode or the limited discoverable mode.
-   -  A device in non-discoverable mode will not be discovered by any
-      device that is performing either the general discovery procedure
-      or the limited discovery procedure.
+   -  All devices shall be in either non-discoverable mode or one of the discoverable modes.
+   -  A device in the discoverable mode shall be in either the general discoverable mode or the limited discoverable mode.
+   -  A device in non-discoverable mode will not be discovered by any device that is performing either the general
+      discovery procedure or the limited discovery procedure.
 
 3. **Connection modes and procedures**
 
@@ -34,464 +27,634 @@ defined for use over an LE physical transport:
 
 4. **Bonding modes and procedures**
 
-   -  Bonding allows two connected devices to exchange and store
-      security and identity information to create a trusted
+   -  Bonding allows two connected devices to exchange and store security and identity information to create a trusted
       relationship.
    -  Bonding can occur only between two devices in bondable mode.
 
-Usage API
-~~~~~~~~~
-
-+-------+------------+------------------+
-| **Ite | **Modes    | **nimBLE         |
-| m     | and        | command**        |
-| No.** | Procedures |                  |
-|       | **         |                  |
-+=======+============+==================+
-| 1     | Broadcast  | ``advertise conn |
-|       | Mode       | =non discov=x``  |
-+-------+------------+------------------+
-|       | Observatio | ``scan duration= |
-|       | n          | x passive=x filt |
-|       | Procedure  | er=x``           |
-+-------+------------+------------------+
-| 2     | Non-Discov | ``advertise conn |
-|       | erable     | =x discov=non``  |
-|       | mode       |                  |
-+-------+------------+------------------+
-|       | Limited    | ``advertise conn |
-|       | Discoverab | =x discov=ltd``  |
-|       | le         |                  |
-|       | mode       |                  |
-+-------+------------+------------------+
-|       | General    | ``advertise conn |
-|       | Discoverab | =x discov=gen``  |
-|       | le         |                  |
-|       | mode       |                  |
-+-------+------------+------------------+
-|       | Limited    | ``scan duration= |
-|       | Discovery  | x discov=ltd pas |
-|       | procedure  | sive=0 filter=no |
-|       |            | _wl``            |
-+-------+------------+------------------+
-|       | General    | ``scan duration= |
-|       | Discovery  | x discov=gen pas |
-|       | procedure  | sive=0 filter=no |
-|       |            | _wl``            |
-+-------+------------+------------------+
-|       | Name       | ``scan duration= |
-|       | Discovery  | x``              |
-|       | procedure  | ``scan cancel``  |
-|       |            | ``connect peer_a |
-|       |            | ddr_type=x peer_ |
-|       |            | addr=x``         |
-|       |            | ``gatt-read conn |
-|       |            | =x uuid=0x2a00`` |
-+-------+------------+------------------+
-| 3     | Non-connec | ``advertise conn |
-|       | table      | =non discov=x``  |
-|       | mode       |                  |
-+-------+------------+------------------+
-|       | Directed   | ``advertise conn |
-|       | connectabl | =dir [own_addr_t |
-|       | e          | ype=x] [discov=x |
-|       | mode       | ] [duration=x]`` |
-+-------+------------+------------------+
-|       | Undirected | ``advertise conn |
-|       | connectabl | =und [own_addr_t |
-|       | e          | ype=x] [discov=x |
-|       | mode       | ] [duration=x]`` |
-+-------+------------+------------------+
-|       | Auto       | ``white-list add |
-|       | connection | r_type=x addr=x  |
-|       | establishm | [addr_type=y add |
-|       | ent        | r=y] [...]``     |
-|       | procedure  | ``connect addr_t |
-|       |            | ype=wl``         |
-+-------+------------+------------------+
-|       | General    | ``scan duration= |
-|       | connection | x``              |
-|       | establishm | ``scan cancel``  |
-|       | ent        | ``connect peer_a |
-|       | procedure  | ddr_type=x peer_ |
-|       |            | addr=x``         |
-+-------+------------+------------------+
-|       | Selective  | ``white-list add |
-|       | connection | r_type=x addr=x  |
-|       | establishm | [addr_type=y add |
-|       | ent        | r=y] [...]``     |
-|       | procedure  | ``scan filter=us |
-|       |            | e_wl duration=x` |
-|       |            | `                |
-|       |            | ``scan cancel``  |
-|       |            | ``connect peer_a |
-|       |            | ddr_type=x peer_ |
-|       |            | addr=x [own_addr |
-|       |            | _type=x]``       |
-+-------+------------+------------------+
-|       | Direct     | ``connect addr_t |
-|       | connection | ype=x addr=x [pa |
-|       | establishm | rams]``          |
-|       | ent        |                  |
-|       | procedure  |                  |
-+-------+------------+------------------+
-|       | Connection | ``conn-update-pa |
-|       | parameter  | rams conn=x <par |
-|       | update     | ams>``           |
-|       | procedure  |                  |
-+-------+------------+------------------+
-|       | Terminate  | ``disconnect con |
-|       | connection | n=x``            |
-|       | procedure  |                  |
-+-------+------------+------------------+
-| 4     | Non-Bondab | ``security-set-d |
-|       | le         | ata bonding=0``  |
-|       | mode       | [\*]             |
-+-------+------------+------------------+
-|       | Bondable   | ``security-set-d |
-|       | mode       | ata bonding=1``  |
-|       |            | [\*]             |
-+-------+------------+------------------+
-|       | Bonding    | ``security-start |
-|       | procedure  |  conn=x``        |
-|       |            | [\*]             |
-+-------+------------+------------------+
-
-**[\*]** Security is disabled by default in btshell. To use the bonding
-modes and procedures, add ``BLE_SM_LEGACY: 1`` or ``BLE_SM_SC: 1`` to
-your syscfg.yml file depending on your needs.
-
-Address Types
-~~~~~~~~~~~~~
-
-+--------------+------------------------------------+---------------------------+
-| *btshell     | *Description*                      | *Notes*                   |
-| string*      |                                    |                           |
-+==============+====================================+===========================+
-| public       | Public address.                    |                           |
-+--------------+------------------------------------+---------------------------+
-| random       | Random static address.             |                           |
-+--------------+------------------------------------+---------------------------+
-| rpa\_pub     | Resolvable private address, public | Not available for all     |
-|              | identity.                          | commands.                 |
-+--------------+------------------------------------+---------------------------+
-| rpa\_rnd     | Resolvable private address, random | Not available for all     |
-|              | static identity.                   | commands.                 |
-+--------------+------------------------------------+---------------------------+
-| wl           | Use white list; ignore peer\_addr  | Only availble for         |
-|              | parameter.                         | "connect" command.        |
-+--------------+------------------------------------+---------------------------+
-
-Connection Types
-~~~~~~~~~~~~~~~~
-
-Bluetooth Specification Version 5.0 allows for different types of
-connections:
-
-+--------------------------------------------------+---------------------------------+
-| *Description*                                    | *btshell ext parameter value*   |
-+==================================================+=================================+
-| Legacy connection                                | none                            |
-+--------------------------------------------------+---------------------------------+
-| Extended connection with 1M PHY                  | 1M                              |
-+--------------------------------------------------+---------------------------------+
-| Extended connection with coded PHY               | coded                           |
-+--------------------------------------------------+---------------------------------+
-| Extended connection with both 1M and coded PHY   | both                            |
-+--------------------------------------------------+---------------------------------+
-| Extended connection with 1M, 2M and coded PHYs   | all                             |
-+--------------------------------------------------+---------------------------------+
-
-Connection Parameters
-~~~~~~~~~~~~~~~~~~~~~
-
-Connection parameter definitions can be found in Section 7.8.12 of the
-BLUETOOTH SPECIFICATION Version 5.0 [Vol 2, Part E].
-
-Connection parameters for all types of connections:
-
-+-------------+---------------------------------------------------+------------+
-| *Name*      | *Description*                                     | *btshell   |
-|             |                                                   | string*    |
-+=============+===================================================+============+
-| Connection  | Parameter indicating the type of connection       | extended   |
-| Type        |                                                   |            |
-+-------------+---------------------------------------------------+------------+
-| Peer\_Addre | Whether the peer is using a public or random      | peer\_addr |
-| ss\_Type    | address (see Address types table).                | \_type     |
-+-------------+---------------------------------------------------+------------+
-| Peer\_Addre | The 6-byte device address of the peer; ignored if | peer\_addr |
-| ss          | white list is used                                |            |
-+-------------+---------------------------------------------------+------------+
-| Own\_Addres | The type of address to use when initiating the    | own\_addr\ |
-| s\_Type     | connection (see Address types table)              | _type      |
-+-------------+---------------------------------------------------+------------+
-| Duration    | Number of milliseconds before aborting the        | duration   |
-|             | connect attempt                                   |            |
-+-------------+---------------------------------------------------+------------+
-
-Connection parameters for legacy and 1M PHY extended connection:
-
-+------------+-----------------------------------------------------+------------+
-| *Name*     | *Description*                                       | *btshell   |
-|            |                                                     | string*    |
-+============+=====================================================+============+
-| LE\_Scan\_ | Recommendation from the Host on how long the        | scan\_inte |
-| Interval   | Controller should scan                              | rval       |
-+------------+-----------------------------------------------------+------------+
-| LE\_Scan\_ | Recommendation from the Host on how frequently the  | scan\_wind |
-| Window     | Controller should scan                              | ow         |
-+------------+-----------------------------------------------------+------------+
-| Conn\_Inte | Defines minimum allowed connection interval         | interval\_ |
-| rval\_Min  |                                                     | min        |
-+------------+-----------------------------------------------------+------------+
-| Conn\_Inte | Defines maximum allowed connection interval         | interval\_ |
-| rval\_Max  |                                                     | max        |
-+------------+-----------------------------------------------------+------------+
-| Conn\_Late | Defines the maximum allowed connection latency      | latency    |
-| ncy        |                                                     |            |
-+------------+-----------------------------------------------------+------------+
-| Supervisio | Link supervision timeout for the connection.        | timeout    |
-| n\_Timeout |                                                     |            |
-+------------+-----------------------------------------------------+------------+
-| Minimum\_C | Informative parameter providing the Controller with | min\_conn\ |
-| E\_Length  | the expected minimum length of the connection event | _event\_le |
-|            |                                                     | n          |
-+------------+-----------------------------------------------------+------------+
-| Maximum\_C | Informative parameter providing the Controller with | max\_conn\ |
-| E\_Length  | the expected maximum length of the connection event | _event\_le |
-|            |                                                     | n          |
-+------------+-----------------------------------------------------+------------+
-
-Extended Connection parameters for coded PHY connection:
-
-+------------+---------------------------------------------------+--------------+
-| *Name*     | *Description*                                     | *btshell     |
-|            |                                                   | string*      |
-+============+===================================================+==============+
-| LE\_Scan\_ | Recommendation from the Host on how long the      | coded\_scan\ |
-| Interval   | Controller should scan                            | _interval    |
-+------------+---------------------------------------------------+--------------+
-| LE\_Scan\_ | Recommendation from the Host on how frequently    | coded\_scan\ |
-| Window     | the Controller should scan                        | _window      |
-+------------+---------------------------------------------------+--------------+
-| Conn\_Inte | Defines minimum allowed connection interval       | coded\_inter |
-| rval\_Min  |                                                   | val\_min     |
-+------------+---------------------------------------------------+--------------+
-| Conn\_Inte | Defines maximum allowed connection interval       | coded\_inter |
-| rval\_Max  |                                                   | val\_max     |
-+------------+---------------------------------------------------+--------------+
-| Conn\_Late | Defines the maximum allowed connection latency    | coded\_laten |
-| ncy        |                                                   | cy           |
-+------------+---------------------------------------------------+--------------+
-| Supervisio | Link supervision timeout for the connection.      | coded\_timeo |
-| n\_Timeout |                                                   | ut           |
-+------------+---------------------------------------------------+--------------+
-| Minimum\_C | Informative parameter providing the Controller    | coded\_min\_ |
-| E\_Length  | with the expected minimum length of the           | conn\_event\ |
-|            | connection event                                  | _len         |
-+------------+---------------------------------------------------+--------------+
-| Maximum\_C | Informative parameter providing the Controller    | coded\_max\_ |
-| E\_Length  | with the expected maximum length of the           | conn\_event\ |
-|            | connection event                                  | _len         |
-+------------+---------------------------------------------------+--------------+
-
-Extended Connection parameters for 2M PHY connection:
-
-+------------+----------------------------------------------------+-------------+
-| *Name*     | *Description*                                      | *btshell    |
-|            |                                                    | string*     |
-+============+====================================================+=============+
-| Conn\_Inte | Defines minimum allowed connection interval        | 2M\_interva |
-| rval\_Min  |                                                    | l\_min      |
-+------------+----------------------------------------------------+-------------+
-| Conn\_Inte | Defines maximum allowed connection interval        | 2M\_interva |
-| rval\_Max  |                                                    | l\_max      |
-+------------+----------------------------------------------------+-------------+
-| Conn\_Late | Defines the maximum allowed connection latency     | 2M\_latency |
-| ncy        |                                                    |             |
-+------------+----------------------------------------------------+-------------+
-| Supervisio | Link supervision timeout for the connection.       | 2M\_timeout |
-| n\_Timeout |                                                    |             |
-+------------+----------------------------------------------------+-------------+
-| Minimum\_C | Informative parameter providing the Controller     | 2M\_min\_co |
-| E\_Length  | with the expected minimum length of the connection | nn\_event\_ |
-|            | event                                              | len         |
-+------------+----------------------------------------------------+-------------+
-| Maximum\_C | Informative parameter providing the Controller     | 2M\_max\_co |
-| E\_Length  | with the expected maximum length of the connection | nn\_event\_ |
-|            | event                                              | len         |
-+------------+----------------------------------------------------+-------------+
-
-Scan Types
-~~~~~~~~~~
-
-Bluetooth Specification Version 5.0 allows for different types of scan:
-
-+--------------------------------------------+---------------------------------+
-| *Description*                              | *btshell ext parameter value*   |
-+============================================+=================================+
-| Legacy scan                                | none                            |
-+--------------------------------------------+---------------------------------+
-| Extended scan with 1M PHY                  | 1M                              |
-+--------------------------------------------+---------------------------------+
-| Extended scan with coded PHY               | coded                           |
-+--------------------------------------------+---------------------------------+
-| Extended scan with both 1M and coded PHY   | both                            |
-+--------------------------------------------+---------------------------------+
-
-Scan Parameters
-~~~~~~~~~~~~~~~
-
-Scan parameter definitions can be found in Section 7.8.10 of the
-BLUETOOTH SPECIFICATION Version 5.0 [Vol 2, Part E].
-
-+-----------------+-----------------------------------------------+-------------+
-| *Name*          | *Description*                                 | *btshell    |
-|                 |                                               | string*     |
-+=================+===============================================+=============+
-| Scan Type       | Parameter indicating the type of scan         | extended    |
-+-----------------+-----------------------------------------------+-------------+
-| LE\_Scan\_Type  | Controls the type of scan to perform (passive | passive     |
-|                 | or active)                                    |             |
-+-----------------+-----------------------------------------------+-------------+
-| LE\_Scan\_Inter | Recommendation from the Host on how long the  | interval    |
-| val             | Controller should scan                        |             |
-+-----------------+-----------------------------------------------+-------------+
-| LE\_Scan\_Windo | Recommendation from the Host on how           | window      |
-| w               | frequently the Controller should scan         |             |
-+-----------------+-----------------------------------------------+-------------+
-| Scanning\_Filte | Policy about which advertising packets to     | filter      |
-| r\_Policy       | accept                                        |             |
-+-----------------+-----------------------------------------------+-------------+
-| Duration        | Number of milliseconds before canceling scan  | duration    |
-|                 | procedure                                     |             |
-+-----------------+-----------------------------------------------+-------------+
-| Limited         | Limited scan procedure                        | limited     |
-+-----------------+-----------------------------------------------+-------------+
-| No duplicates   | Filter out duplicates in shell output         | nodups      |
-+-----------------+-----------------------------------------------+-------------+
-| Own\_Address\_T | The type of address to use when scanning (see | own\_addr\_ |
-| ype             | Address types table)                          | type        |
-+-----------------+-----------------------------------------------+-------------+
-
-Extended Scan parameters:
-
-+-------------+-------------------------------------------------+---------------+
-| *Name*      | *Description*                                   | *btshell      |
-|             |                                                 | string*       |
-+=============+=================================================+===============+
-| Duration    | Number of milliseconds before canceling scan    | extended\_dur |
-|             | procedure                                       | ation         |
-+-------------+-------------------------------------------------+---------------+
-| Period      | Period in which scan should be enabled for      | extended\_per |
-|             | specified duration                              | iod           |
-+-------------+-------------------------------------------------+---------------+
-| LE\_Scan\_T | Controls the type of scan to perform (passive   | longrange\_pa |
-| ype         | or active)                                      | ssive         |
-+-------------+-------------------------------------------------+---------------+
-| LE\_Scan\_I | Recommendation from the Host on how long the    | longrange\_in |
-| nterval     | Controller should scan                          | terval        |
-+-------------+-------------------------------------------------+---------------+
-| LE\_Scan\_W | Recommendation from the Host on how frequently  | longrange\_wi |
-| indow       | the Controller should scan                      | ndow          |
-+-------------+-------------------------------------------------+---------------+
-
-Advertisment Parameters
-~~~~~~~~~~~~~~~~~~~~~~~
-
-+-----------+---------------------+--------------------------------+---------------+
-| *btshell  | *Description*       | *Notes*                        | *Default*     |
-| string*   |                     |                                |               |
-+===========+=====================+================================+===============+
-| conn      | Connectable mode    | See Connectable Modes table.   | und           |
-+-----------+---------------------+--------------------------------+---------------+
-| discov    | Discoverable mode   | See Discoverable Modes table.  | gen           |
-+-----------+---------------------+--------------------------------+---------------+
-| own\_addr | The type of address | See Address Types table.       | public        |
-| \_type    | to advertise with   |                                |               |
-+-----------+---------------------+--------------------------------+---------------+
-| peer\_add | The peer's address  | Only used for directed         | public        |
-| r\_type   | type                | advertising; see Address Types |               |
-|           |                     | table.                         |               |
-+-----------+---------------------+--------------------------------+---------------+
-| peer\_add | The peer's address  | Only used for directed         | N/A           |
-| r         |                     | advertising                    |               |
-+-----------+---------------------+--------------------------------+---------------+
-| channel\_ |                     |                                | 0             |
-| map       |                     |                                |               |
-+-----------+---------------------+--------------------------------+---------------+
-| filter    | The filter policy   | See Advertisement Filter       | none          |
-|           |                     | Policies table.                |               |
-+-----------+---------------------+--------------------------------+---------------+
-| interval\ |                     | units=0.625ms                  | non: 100ms;   |
-| _min      |                     |                                | und/dir: 30ms |
-+-----------+---------------------+--------------------------------+---------------+
-| interval\ |                     | units=0.625ms                  | non: 150ms;   |
-| _max      |                     |                                | und/dir: 60ms |
-+-----------+---------------------+--------------------------------+---------------+
-| high\_dut | Whether to use      | 0/1                            | 0             |
-| y         | high-duty-cycle     |                                |               |
-+-----------+---------------------+--------------------------------+---------------+
-| duration  |                     | Milliseconds                   | Forever       |
-+-----------+---------------------+--------------------------------+---------------+
-
-Extended Advertising parameters:
-
-+----------+-------------------------------------------+---------+----------------+
-| *btshell | *Description*                             | *Notes* | *Default*      |
-| string*  |                                           |         |                |
-+==========+===========================================+=========+================+
-| tx\_powe | Maximum power level at which the          | -127 -  | 127 (Host has  |
-| r        | advertising packets are to be transmitted | 127 dBm | no preference) |
-+----------+-------------------------------------------+---------+----------------+
-| primary\ | PHY on which the advertising packets are  |         | none           |
-| _phy     | transmitted on the primary advertising    |         |                |
-|          | channel                                   |         |                |
-+----------+-------------------------------------------+---------+----------------+
-| secondar | PHY on which the advertising packets are  |         | primary\_phy   |
-| y\_phy   | transmitted on the secondary advertising  |         |                |
-|          | channel                                   |         |                |
-+----------+-------------------------------------------+---------+----------------+
-
-Advertising PHY Types
-~~~~~~~~~~~~~~~~~~~~~
-
-+---------------------------------------+-----------------------------+
-| *Description*                         | *btshell parameter value*   |
-+=======================================+=============================+
-| Legacy advertising                    | none                        |
-+---------------------------------------+-----------------------------+
-| Extended advertising with 1M PHY      | 1M                          |
-+---------------------------------------+-----------------------------+
-| Extended advertising with 2M PHY      | 2M                          |
-+---------------------------------------+-----------------------------+
-| Extended advertising with coded PHY   | coded                       |
-+---------------------------------------+-----------------------------+
-
-Advertisement Filter Policies
-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-
-+--------------------+------------------+------------+
-| *btshell string*   | *Description*    | *Notes*    |
-+====================+==================+============+
-| none               | No filtering. No | Default    |
-|                    | whitelist used.  |            |
-+--------------------+------------------+------------+
-| scan               | Process all      |            |
-|                    | connection       |            |
-|                    | requests but     |            |
-|                    | only scans from  |            |
-|                    | white list.      |            |
-+--------------------+------------------+------------+
-| conn               | Process all scan |            |
-|                    | request but only |            |
-|                    | connection       |            |
-|                    | requests from    |            |
-|                    | white list.      |            |
-+--------------------+------------------+------------+
-| both               | Ignore all scan  |            |
-|                    | and connection   |            |
-|                    | requests unless  |            |
-|                    | in white list.   |            |
-+--------------------+------------------+------------+
+Available commands
+~~~~~~~~~~~~~~~~~~
+
+Parameters default values are marked red.
+
+Configuration
+-------------
+
++---------------------+-----------------+----------------------------+---------------------------------------------------------------------------------------------------------+
+| **Command**         | **Parmeters**   | \*\* Possible values\*\*   | **Description**                                                                                         |
++=====================+=================+============================+=========================================================================================================+
+| **set**             |                 |                            | Set configuration options                                                                               |
++---------------------+-----------------+----------------------------+---------------------------------------------------------------------------------------------------------+
+|                     | addr            | XX:XX:XX:XX:XX:XX          | Local device address                                                                                    |
++---------------------+-----------------+----------------------------+---------------------------------------------------------------------------------------------------------+
+|                     | addr\_type      | ``public``                 | Local device address type                                                                               |
++---------------------+-----------------+----------------------------+---------------------------------------------------------------------------------------------------------+
+|                     |                 | random                     | Use random address for scan requests                                                                    |
++---------------------+-----------------+----------------------------+---------------------------------------------------------------------------------------------------------+
+|                     | mtu             | [23-UINT16\_MAX]           | GATT Maximum Transmission Unit (MTU)                                                                    |
++---------------------+-----------------+----------------------------+---------------------------------------------------------------------------------------------------------+
+|                     | irk             | XX:XX:XX...                | Local Identity Resolving Key (16 byte                                                                   |
++---------------------+-----------------+----------------------------+---------------------------------------------------------------------------------------------------------+
+| **set-priv-mode**   |                 |                            | Set privacy mode for device                                                                             |
++---------------------+-----------------+----------------------------+---------------------------------------------------------------------------------------------------------+
+|                     | addr            | XX:XX:XX:XX:XX:XX          | Remove device address                                                                                   |
++---------------------+-----------------+----------------------------+---------------------------------------------------------------------------------------------------------+
+|                     | addr\_type      | ``public``                 | Remote device public address type                                                                       |
++---------------------+-----------------+----------------------------+---------------------------------------------------------------------------------------------------------+
+|                     |                 | random                     | Remote device random address type                                                                       |
++---------------------+-----------------+----------------------------+---------------------------------------------------------------------------------------------------------+
+|                     | mode            | [``0``-1]                  | 0 - use network privacy, 1 - use device privacy                                                         |
++---------------------+-----------------+----------------------------+---------------------------------------------------------------------------------------------------------+
+| **white-list**      |                 |                            | Add devices to white list (this command accepts multiple instances of addr and addr\_type parameters)   |
++---------------------+-----------------+----------------------------+---------------------------------------------------------------------------------------------------------+
+|                     | addr            | XX:XX:XX:XX:XX:XX          | Remove device address                                                                                   |
++---------------------+-----------------+----------------------------+---------------------------------------------------------------------------------------------------------+
+|                     | addr\_type      | ``public``                 | Remote device public address type                                                                       |
++---------------------+-----------------+----------------------------+---------------------------------------------------------------------------------------------------------+
+|                     |                 | random                     | Remote device random address type                                                                       |
++---------------------+-----------------+----------------------------+---------------------------------------------------------------------------------------------------------+
+
+Device discovery and connection
+-------------------------------
+
++--------------------------+--------------------------------+----------------------------+------------------------------------------------------------------------------------------------------------+
+| **Command**              | **Parmeters**                  | \*\* Possible values\*\*   | **Description**                                                                                            |
++==========================+================================+============================+============================================================================================================+
+| **scan**                 |                                |                            | Discover remote devices                                                                                    |
++--------------------------+--------------------------------+----------------------------+------------------------------------------------------------------------------------------------------------+
+|                          | cancel                         |                            | cancel ongoing scan procedure                                                                              |
++--------------------------+--------------------------------+----------------------------+------------------------------------------------------------------------------------------------------------+
+|                          | extended                       | ``none``                   | Start legacy scan                                                                                          |
++--------------------------+--------------------------------+----------------------------+------------------------------------------------------------------------------------------------------------+
+|                          |                                | 1M                         | Start extended scan on 1M PHY                                                                              |
++--------------------------+--------------------------------+----------------------------+------------------------------------------------------------------------------------------------------------+
+|                          |                                | coded                      | Start extended scan on Coded PHY                                                                           |
++--------------------------+--------------------------------+----------------------------+------------------------------------------------------------------------------------------------------------+
+|                          |                                | both                       | Start extended scan on both PHYs                                                                           |
++--------------------------+--------------------------------+----------------------------+------------------------------------------------------------------------------------------------------------+
+|                          | duration                       | [1-``INT32_MAX``],         | Duration of scan in milliseconds                                                                           |
++--------------------------+--------------------------------+----------------------------+------------------------------------------------------------------------------------------------------------+
+|                          | limited                        | [``0``-1]                  | Use limited discovery procedure                                                                            |
++--------------------------+--------------------------------+----------------------------+------------------------------------------------------------------------------------------------------------+
+|                          | passive                        | [``0``-1]                  | Use passive scan                                                                                           |
++--------------------------+--------------------------------+----------------------------+------------------------------------------------------------------------------------------------------------+
+|                          | interval                       | [``0``-UINT16\_MAX]        | Scan interval, if 0 use stack's default                                                                    |
++--------------------------+--------------------------------+----------------------------+------------------------------------------------------------------------------------------------------------+
+|                          | window                         | [``0``-UINT16\_MAX]        | Scan window, if 0 use stack's default                                                                      |
++--------------------------+--------------------------------+----------------------------+------------------------------------------------------------------------------------------------------------+
+|                          | filter                         | ``no_wl``                  | Scan filter policy - Accept all advertising packets                                                        |
++--------------------------+--------------------------------+----------------------------+------------------------------------------------------------------------------------------------------------+
+|                          |                                | use\_wl                    | Accept only advertising packets from devices on White List                                                 |
++--------------------------+--------------------------------+----------------------------+------------------------------------------------------------------------------------------------------------+
+|                          |                                | no\_wl\_inita              | Accept all advertising packets (including directed RPA)                                                    |
++--------------------------+--------------------------------+----------------------------+------------------------------------------------------------------------------------------------------------+
+|                          |                                | use\_wl\_inita             | Accept only advertising packets from devices on White List (including directed RPA)                        |
++--------------------------+--------------------------------+----------------------------+------------------------------------------------------------------------------------------------------------+
+|                          | nodups                         | [``0``-1]                  | Disable duplicates filtering                                                                               |
++--------------------------+--------------------------------+----------------------------+------------------------------------------------------------------------------------------------------------+
+|                          | own\_addr\_type                | ``public``                 | Use public address for scan requests                                                                       |
++--------------------------+--------------------------------+----------------------------+------------------------------------------------------------------------------------------------------------+
+|                          |                                | random                     | Use random address for scan requests                                                                       |
++--------------------------+--------------------------------+----------------------------+------------------------------------------------------------------------------------------------------------+
+|                          |                                | rpa\_pub                   | Use RPA address for scan requests (fallback to public if no IRK)                                           |
++--------------------------+--------------------------------+----------------------------+------------------------------------------------------------------------------------------------------------+
+|                          |                                | rpa\_rnd                   | Use RPA address for scan requests (fallback to random if no IRK)                                           |
++--------------------------+--------------------------------+----------------------------+------------------------------------------------------------------------------------------------------------+
+|                          | extended\_duration             | [``0``-UINT16\_MAX]        | Duration of extended scan in 10 milliseconds                                                               |
++--------------------------+--------------------------------+----------------------------+------------------------------------------------------------------------------------------------------------+
+|                          | extended\_period               | [``0``-UINT16\_MAX]        | Periodic scan interval in 1.28 seconds (0 disabled)                                                        |
++--------------------------+--------------------------------+----------------------------+------------------------------------------------------------------------------------------------------------+
+|                          | longrange\_interval            | [``0``-UINT16\_MAX]        | Scan interval for Coded Scan , if 0 use stack's default                                                    |
++--------------------------+--------------------------------+----------------------------+------------------------------------------------------------------------------------------------------------+
+|                          | longrange\_window              | [``0``-UINT16\_MAX]        | Scan window for Coded Scan , if 0 use stack's default                                                      |
++--------------------------+--------------------------------+----------------------------+------------------------------------------------------------------------------------------------------------+
+|                          | longrange\_passive             | [``0``-1]                  | Use passive scan for Coded Scan                                                                            |
++--------------------------+--------------------------------+----------------------------+------------------------------------------------------------------------------------------------------------+
+| **connect**              |                                |                            | Initiate connection to remote device                                                                       |
++--------------------------+--------------------------------+----------------------------+------------------------------------------------------------------------------------------------------------+
+|                          | cancel                         |                            | Cancel ongoing connection procedure                                                                        |
++--------------------------+--------------------------------+----------------------------+------------------------------------------------------------------------------------------------------------+
+|                          | extended                       | ``none``                   | Use legacy connection procedure                                                                            |
++--------------------------+--------------------------------+----------------------------+------------------------------------------------------------------------------------------------------------+
+|                          |                                | 1M                         | Extended connect using 1M PHY scan parameters                                                              |
++--------------------------+--------------------------------+----------------------------+------------------------------------------------------------------------------------------------------------+
+|                          |                                | coded                      | Extended connect using Coded PHY scan parameters                                                           |
++--------------------------+--------------------------------+----------------------------+------------------------------------------------------------------------------------------------------------+
+|                          |                                | both                       | Extended connect using 1M and Coded PHYs scan parameters                                                   |
++--------------------------+--------------------------------+----------------------------+------------------------------------------------------------------------------------------------------------+
+|                          |                                | all                        | Extended connect using 1M and Coded PHYs scan parameters (Provide also connection parameters for 2M PHY)   |
++--------------------------+--------------------------------+----------------------------+------------------------------------------------------------------------------------------------------------+
+|                          | peer\_addr\_type               | ``public``                 | Remote device public address type                                                                          |
++--------------------------+--------------------------------+----------------------------+------------------------------------------------------------------------------------------------------------+
+|                          |                                | random                     | Remote device random address type                                                                          |
++--------------------------+--------------------------------+----------------------------+------------------------------------------------------------------------------------------------------------+
+|                          |                                | public\_id                 | Remote device public address type (Identity)                                                               |
++--------------------------+--------------------------------+----------------------------+------------------------------------------------------------------------------------------------------------+
+|                          |                                | random\_id                 | Remote device random address type (Identity)                                                               |
++--------------------------+--------------------------------+----------------------------+------------------------------------------------------------------------------------------------------------+
+|                          | peer\_addr                     | XX:XX:XX:XX:XX:XX          | Remove device address                                                                                      |
++--------------------------+--------------------------------+----------------------------+------------------------------------------------------------------------------------------------------------+
+|                          | own\_addr\_type                | ``public``                 | Use public address for scan requests                                                                       |
++--------------------------+--------------------------------+----------------------------+------------------------------------------------------------------------------------------------------------+
+|                          |                                | random                     | Use random address for scan requests                                                                       |
++--------------------------+--------------------------------+----------------------------+------------------------------------------------------------------------------------------------------------+
+|                          |                                | rpa\_pub                   | Use RPA address for scan requests (fallback to public if no IRK)                                           |
++--------------------------+--------------------------------+----------------------------+------------------------------------------------------------------------------------------------------------+
+|                          |                                | rpa\_rnd                   | Use RPA address for scan requests (fallback to random if no IRK)                                           |
++--------------------------+--------------------------------+----------------------------+------------------------------------------------------------------------------------------------------------+
+|                          | duration                       | [``0``-INT32\_MAX]         | Connection attempt duration, if 0 use stack's default                                                      |
++--------------------------+--------------------------------+----------------------------+------------------------------------------------------------------------------------------------------------+
+|                          | scan\_interval                 | [0-UINT16\_MAX]            | Scan interval, default: 0x0010                                                                             |
++--------------------------+--------------------------------+----------------------------+------------------------------------------------------------------------------------------------------------+
+|                          | scan\_window                   | [0-UINT16\_MAX]            | Scan window, default: 0x0010                                                                               |
++--------------------------+--------------------------------+----------------------------+------------------------------------------------------------------------------------------------------------+
+|                          | interval\_min                  | [0-UINT16\_MAX]            | Minimum connection interval, default: 30                                                                   |
++--------------------------+--------------------------------+----------------------------+------------------------------------------------------------------------------------------------------------+
+|                          | interval\_max                  | [0-UINT16\_MAX]            | Maximum connection interval, default: 50                                                                   |
++--------------------------+--------------------------------+----------------------------+------------------------------------------------------------------------------------------------------------+
+|                          | latency                        | [UINT16]                   | Connection latency, default: 0                                                                             |
++--------------------------+--------------------------------+----------------------------+------------------------------------------------------------------------------------------------------------+
+|                          | timeout                        | [UINT16]                   | Connection timeout, default: 0x0100                                                                        |
++--------------------------+--------------------------------+----------------------------+------------------------------------------------------------------------------------------------------------+
+|                          | min\_conn\_event\_len          | [UINT16]                   | Minimum length of connection event, default: 0x0010                                                        |
++--------------------------+--------------------------------+----------------------------+------------------------------------------------------------------------------------------------------------+
+|                          | max\_conn\_event\_len          | [UINT16]                   | Maximum length of connection event, default: 0x0300                                                        |
++--------------------------+--------------------------------+----------------------------+------------------------------------------------------------------------------------------------------------+
+|                          | coded\_scan\_interval          | [0-UINT16\_MAX]            | Coded PHY Scan interval, default: 0x0010                                                                   |
++--------------------------+--------------------------------+----------------------------+------------------------------------------------------------------------------------------------------------+
+|                          | coded\_scan\_window            | [0-UINT16\_MAX]            | Coded PHY Scan window, default: 0x0010                                                                     |
++--------------------------+--------------------------------+----------------------------+------------------------------------------------------------------------------------------------------------+
+|                          | coded\_interval\_min           | [0-UINT16\_MAX]            | Coded PHY Minimum connection interval, default: 30                                                         |
++--------------------------+--------------------------------+----------------------------+------------------------------------------------------------------------------------------------------------+
+|                          | coded\_interval\_max           | [0-UINT16\_MAX]            | Coded PHY Maximum connection interval, default: 50                                                         |
++--------------------------+--------------------------------+----------------------------+------------------------------------------------------------------------------------------------------------+
+|                          | coded\_latency                 | [UINT16]                   | Coded PHY Connection latency, default: 0                                                                   |
++--------------------------+--------------------------------+----------------------------+------------------------------------------------------------------------------------------------------------+
+|                          | coded\_timeout                 | [UINT16]                   | Coded PHY Connection timeout, default: 0x0100                                                              |
++--------------------------+--------------------------------+----------------------------+------------------------------------------------------------------------------------------------------------+
+|                          | coded\_min\_conn\_event\_len   | [UINT16]                   | Coded PHY Minimum length of connection event, default: 0x0010                                              |
++--------------------------+--------------------------------+----------------------------+------------------------------------------------------------------------------------------------------------+
+|                          | coded\_max\_conn\_event\_len   | [UINT16]                   | Coded PHY Maximum length of connection event, default: 0x0300                                              |
++--------------------------+--------------------------------+----------------------------+------------------------------------------------------------------------------------------------------------+
+|                          | 2M\_scan\_interval             | [0-UINT16\_MAX]            | 2M PHY Scan interval, default: 0x0010                                                                      |
++--------------------------+--------------------------------+----------------------------+------------------------------------------------------------------------------------------------------------+
+|                          | 2M\_scan\_window               | [0-UINT16\_MAX]            | 2M PHY Scan window, default: 0x0010                                                                        |
++--------------------------+--------------------------------+----------------------------+------------------------------------------------------------------------------------------------------------+
+|                          | 2M\_interval\_min              | [0-UINT16\_MAX]            | 2M PHY Minimum connection interval, default: 30                                                            |
++--------------------------+--------------------------------+----------------------------+------------------------------------------------------------------------------------------------------------+
+|                          | 2M\_interval\_max              | [0-UINT16\_MAX]            | 2M PHY Maximum connection interval, default: 50                                                            |
++--------------------------+--------------------------------+----------------------------+------------------------------------------------------------------------------------------------------------+
+|                          | 2M\_latency                    | [UINT16]                   | 2M PHY Connection latency, default: 0                                                                      |
++--------------------------+--------------------------------+----------------------------+------------------------------------------------------------------------------------------------------------+
+|                          | 2M\_timeout                    | [UINT16]                   | 2M PHY Connection timeout, default: 0x0100                                                                 |
++--------------------------+--------------------------------+----------------------------+------------------------------------------------------------------------------------------------------------+
+|                          | 2M\_min\_conn\_event\_len      | [UINT16]                   | 2M PHY Minimum length of connection event, default: 0x0010                                                 |
++--------------------------+--------------------------------+----------------------------+------------------------------------------------------------------------------------------------------------+
+|                          | 2M\_max\_conn\_event\_len      | [UINT16]                   | 2M PHY Maximum length of connection event, default: 0x0300                                                 |
++--------------------------+--------------------------------+----------------------------+------------------------------------------------------------------------------------------------------------+
+| **disconnect**           |                                |                            | Disconnect exisiting connection                                                                            |
++--------------------------+--------------------------------+----------------------------+------------------------------------------------------------------------------------------------------------+
+|                          | conn                           | [UINT16]                   | Connection handle                                                                                          |
++--------------------------+--------------------------------+----------------------------+------------------------------------------------------------------------------------------------------------+
+|                          | reason                         | [UINT8]                    | Disconnect reason                                                                                          |
++--------------------------+--------------------------------+----------------------------+------------------------------------------------------------------------------------------------------------+
+| **show-addr**            |                                |                            | Show local public and random identity addresses                                                            |
++--------------------------+--------------------------------+----------------------------+------------------------------------------------------------------------------------------------------------+
+| **show-conn**            |                                |                            | Show current connections                                                                                   |
++--------------------------+--------------------------------+----------------------------+------------------------------------------------------------------------------------------------------------+
+| **conn-rssi**            |                                |                            | Obtain RSSI of specified connection                                                                        |
++--------------------------+--------------------------------+----------------------------+------------------------------------------------------------------------------------------------------------+
+|                          | conn                           | [UINT16]                   | Connection handle                                                                                          |
++--------------------------+--------------------------------+----------------------------+------------------------------------------------------------------------------------------------------------+
+| **conn-update-params**   |                                |                            | Update parameters of specified connection                                                                  |
++--------------------------+--------------------------------+----------------------------+------------------------------------------------------------------------------------------------------------+
+|                          | conn                           | [UINT16]                   | Connection handle                                                                                          |
++--------------------------+--------------------------------+----------------------------+------------------------------------------------------------------------------------------------------------+
+|                          | interval\_min                  | [0-UINT16\_MAX]            | Minimum connection interval, default: 30                                                                   |
++--------------------------+--------------------------------+----------------------------+------------------------------------------------------------------------------------------------------------+
+|                          | interval\_max                  | [0-UINT16\_MAX]            | Maximum connection interval, default: 50                                                                   |
++--------------------------+--------------------------------+----------------------------+------------------------------------------------------------------------------------------------------------+
+|                          | latency                        | [UINT16]                   | Connection latency, default: 0                                                                             |
++--------------------------+--------------------------------+----------------------------+------------------------------------------------------------------------------------------------------------+
+|                          | timeout                        | [UINT16]                   | Connection timeout, default: 0x0100                                                                        |
++--------------------------+--------------------------------+----------------------------+------------------------------------------------------------------------------------------------------------+
+|                          | min\_conn\_event\_len          | [UINT16]                   | Minimum length of connection event, default: 0x0010                                                        |
++--------------------------+--------------------------------+----------------------------+------------------------------------------------------------------------------------------------------------+
+|                          | max\_conn\_event\_len          | [UINT16]                   | Maximum length of connection event, default: 0x0300                                                        |
++--------------------------+--------------------------------+----------------------------+------------------------------------------------------------------------------------------------------------+
+| **conn-datalen**         |                                |                            | Set DLE parmaeters for connection                                                                          |
++--------------------------+--------------------------------+----------------------------+------------------------------------------------------------------------------------------------------------+
+|                          | conn                           | [UINT16]                   | Connection handle                                                                                          |
++--------------------------+--------------------------------+----------------------------+------------------------------------------------------------------------------------------------------------+
+|                          | octets                         | [UINT16]                   | Maximum transmission packet size                                                                           |
++--------------------------+--------------------------------+----------------------------+------------------------------------------------------------------------------------------------------------+
+|                          | time                           | [UINT16]                   | Maximum transmission packet time                                                                           |
++--------------------------+--------------------------------+----------------------------+------------------------------------------------------------------------------------------------------------+
+| **phy-set**              |                                |                            | Set prefered PHYs used for connection                                                                      |
++--------------------------+--------------------------------+----------------------------+------------------------------------------------------------------------------------------------------------+
+|                          | conn                           | [UINT16]                   | Connection handle                                                                                          |
++--------------------------+--------------------------------+----------------------------+------------------------------------------------------------------------------------------------------------+
+|                          | tx\_phys\_mask                 | [UINT8]                    | Prefered PHYs on TX is mask of following bits0x00 - no preference0x01 - 1M, 0x02 - 2M, 0x04 - Coded        |
++--------------------------+--------------------------------+----------------------------+------------------------------------------------------------------------------------------------------------+
+|                          | rx\_phys\_mask                 | [UINT8]                    | Prefered PHYs on RX is mask of following bits0x00 - no preference0x01 - 1M, 0x02 - 2M, 0x04 - Coded        |
++--------------------------+--------------------------------+----------------------------+------------------------------------------------------------------------------------------------------------+
+|                          | phy\_opts                      | [UINT16]                   | Options for Coded PHY 0 - any coding, 1 - prefer S2, 2 - prefer S8                                         |
++--------------------------+--------------------------------+----------------------------+------------------------------------------------------------------------------------------------------------+
+| **phy-set-default**      |                                |                            | Set default prefered PHYs used for new connection                                                          |
++--------------------------+--------------------------------+----------------------------+------------------------------------------------------------------------------------------------------------+
+|                          | tx\_phys\_mask                 | [UINT8]                    | Prefered PHYs on TX is mask of following bits0x00 - no preference0x01 - 1M, 0x02 - 2M, 0x04 - Coded        |
++--------------------------+--------------------------------+----------------------------+------------------------------------------------------------------------------------------------------------+
+|                          | rx\_phys\_mask                 | [UINT8]                    | Prefered PHYs on RX is mask of following bits0x00 - no preference0x01 - 1M, 0x02 - 2M, 0x04 - Coded        |
++--------------------------+--------------------------------+----------------------------+------------------------------------------------------------------------------------------------------------+
+| **phy-read**             |                                |                            | Read connection current PHY                                                                                |
++--------------------------+--------------------------------+----------------------------+------------------------------------------------------------------------------------------------------------+
+|                          | conn                           | [UINT16]                   | Connection handle                                                                                          |
++--------------------------+--------------------------------+----------------------------+------------------------------------------------------------------------------------------------------------+
+| **l2cap-update**         |                                |                            | Update connection parameters                                                                               |
++--------------------------+--------------------------------+----------------------------+------------------------------------------------------------------------------------------------------------+
+|                          | interval\_min                  | [0-UINT16\_MAX]            | Minimum connection interval, default: 30                                                                   |
++--------------------------+--------------------------------+----------------------------+------------------------------------------------------------------------------------------------------------+
+|                          | interval\_max                  | [0-UINT16\_MAX]            | Maximum connection interval, default: 50                                                                   |
++--------------------------+--------------------------------+----------------------------+------------------------------------------------------------------------------------------------------------+
+|                          | latency                        | [UINT16]                   | Connection latency, default: 0                                                                             |
++--------------------------+--------------------------------+----------------------------+------------------------------------------------------------------------------------------------------------+
+|                          | timeout                        | [UINT16]                   | Connection timeout, default: 0x0100                                                                        |
++--------------------------+--------------------------------+----------------------------+------------------------------------------------------------------------------------------------------------+
+
+Security
+--------
+
++---------------------------+--------------------+----------------------------+----------------------------------------------------------------------------------------------------------------------------+
+| **Command**               | **Parmeters**      | \*\* Possible values\*\*   | **Description**                                                                                                            |
++===========================+====================+============================+============================================================================================================================+
+| **security-set-data**     |                    |                            | Set security configuration                                                                                                 |
++---------------------------+--------------------+----------------------------+----------------------------------------------------------------------------------------------------------------------------+
+|                           | oob-flag           | [``0``-1]                  | Set Out-Of-Band (OOB) flag in Security Manager                                                                             |
++---------------------------+--------------------+----------------------------+----------------------------------------------------------------------------------------------------------------------------+
+|                           | mitm-flag          | [``0``-1]                  | Set Man-In-The-Middle (MITM) flag in Security Manager                                                                      |
++---------------------------+--------------------+----------------------------+----------------------------------------------------------------------------------------------------------------------------+
+|                           | io\_capabilities   | 0                          | Set Input-Output Capabilities to "DisplayOnly"                                                                             |
++---------------------------+--------------------+----------------------------+----------------------------------------------------------------------------------------------------------------------------+
+|                           |                    | 1                          | Set Input-Output Capabilities to "DisplayYesNo"                                                                            |
++---------------------------+--------------------+----------------------------+----------------------------------------------------------------------------------------------------------------------------+
+|                           |                    | 2                          | Set Input-Output Capabilities to "KeyboardOnly"                                                                            |
++---------------------------+--------------------+----------------------------+----------------------------------------------------------------------------------------------------------------------------+
+|                           |                    | 3                          | Set Input-Output Capabilities to "NoInputNoOutput"                                                                         |
++---------------------------+--------------------+----------------------------+----------------------------------------------------------------------------------------------------------------------------+
+|                           |                    | 4                          | Set Input-Output Capabilities to "KeyboardDisplay"                                                                         |
++---------------------------+--------------------+----------------------------+----------------------------------------------------------------------------------------------------------------------------+
+|                           | our\_key\_dist     | [UINT8]                    | Set Local Keys Distribution, this is a bit field of possible values: LTK (0x01), IRK (0x02), CSRK (0x04), LTK\_SC(0x08)    |
++---------------------------+--------------------+----------------------------+----------------------------------------------------------------------------------------------------------------------------+
+|                           | their\_key\_dist   | [UINT8]                    | Set Remote Keys Distribution, this is a bit field of possible values: LTK (0x01), IRK (0x02), CSRK (0x04), LTK\_SC(0x08)   |
++---------------------------+--------------------+----------------------------+----------------------------------------------------------------------------------------------------------------------------+
+|                           | bonding-flag       | [``0``-1]                  | Set Bonding flag in Security Manager                                                                                       |
++---------------------------+--------------------+----------------------------+----------------------------------------------------------------------------------------------------------------------------+
+|                           | sc-flag            | [``0``-1]                  | Set Secure Connections flag in Security Manager                                                                            |
++---------------------------+--------------------+----------------------------+----------------------------------------------------------------------------------------------------------------------------+
+| **security-pair**         |                    |                            | Start pairing procedure                                                                                                    |
++---------------------------+--------------------+----------------------------+----------------------------------------------------------------------------------------------------------------------------+
+|                           | conn               | [UINT16]                   | Connection handle                                                                                                          |
++---------------------------+--------------------+----------------------------+----------------------------------------------------------------------------------------------------------------------------+
+| **security-encryption**   |                    |                            | Start encryption procedure                                                                                                 |
++---------------------------+--------------------+----------------------------+----------------------------------------------------------------------------------------------------------------------------+
+|                           | conn               | [UINT16]                   | Connection handle                                                                                                          |
++---------------------------+--------------------+----------------------------+----------------------------------------------------------------------------------------------------------------------------+
+|                           | ediv               | [UINT16]                   | EDIV for LTK to use (use storage if not provided)                                                                          |
++---------------------------+--------------------+----------------------------+----------------------------------------------------------------------------------------------------------------------------+
+|                           | rand               | [UINT64]                   | Rand for LTK                                                                                                               |
++---------------------------+--------------------+----------------------------+----------------------------------------------------------------------------------------------------------------------------+
+|                           | ltk                | XX:XX:XX...                | LTK (16 bytes)                                                                                                             |
++---------------------------+--------------------+----------------------------+----------------------------------------------------------------------------------------------------------------------------+
+| **security-start**        |                    |                            | Start security procedure (This starts either pairing or encryption depending if keys are stored)                           |
++---------------------------+--------------------+----------------------------+----------------------------------------------------------------------------------------------------------------------------+
+|                           | conn               | [UINT16]                   | Connection handle                                                                                                          |
++---------------------------+--------------------+----------------------------+----------------------------------------------------------------------------------------------------------------------------+
+| **auth-passkey**          |                    |                            | Reply to Passkey request                                                                                                   |
++---------------------------+--------------------+----------------------------+----------------------------------------------------------------------------------------------------------------------------+
+|                           | conn               | [UINT16]                   | Connection handle                                                                                                          |
++---------------------------+--------------------+----------------------------+----------------------------------------------------------------------------------------------------------------------------+
+|                           | action             | [UINT16]                   | Action to reply (as received in event)                                                                                     |
++---------------------------+--------------------+----------------------------+----------------------------------------------------------------------------------------------------------------------------+
+|                           | key                | [0-999999]                 | Passkey to reply (Input or Display action)                                                                                 |
++---------------------------+--------------------+----------------------------+----------------------------------------------------------------------------------------------------------------------------+
+|                           | oob                | XX:XX:XX:...               | Out-Of-Band secret (16 bytes) (OOB action)                                                                                 |
++---------------------------+--------------------+----------------------------+----------------------------------------------------------------------------------------------------------------------------+
+|                           | yesno              | Yy-Ny                      | Confirm passkey (for Passkey Confirm action)                                                                               |
++---------------------------+--------------------+----------------------------+----------------------------------------------------------------------------------------------------------------------------+
+
+Advertising with Extended Advertising enabled
+---------------------------------------------
+
++------------------------------+--------------------------+----------------------------+-------------------------------------------------------------------------------------+
+| **Command**                  | **Parmeters**            | \*\* Possible values\*\*   | **Description**                                                                     |
++==============================+==========================+============================+=====================================================================================+
+| **advertise-configure**      |                          |                            | Configure new advertising instance                                                  |
++------------------------------+--------------------------+----------------------------+-------------------------------------------------------------------------------------+
+|                              | instance                 | [``0``-UINT8\_MAX]         | Advertising instance                                                                |
++------------------------------+--------------------------+----------------------------+-------------------------------------------------------------------------------------+
+|                              | connectable              | [``0``-1]                  | Use connectable advertising                                                         |
++------------------------------+--------------------------+----------------------------+-------------------------------------------------------------------------------------+
+|                              | scannable                | [``0``-1]                  | Use scannable advertising                                                           |
++------------------------------+--------------------------+----------------------------+-------------------------------------------------------------------------------------+
+|                              | peer\_addr\_type         | ``public``                 | Remote device public address type                                                   |
++------------------------------+--------------------------+----------------------------+-------------------------------------------------------------------------------------+
+|                              |                          | random                     | Remote device random address type                                                   |
++------------------------------+--------------------------+----------------------------+-------------------------------------------------------------------------------------+
+|                              |                          | public\_id                 | Remote device public address type (Identity)                                        |
++------------------------------+--------------------------+----------------------------+-------------------------------------------------------------------------------------+
+|                              |                          | random\_id                 | Remote device random address type (Identity)                                        |
++------------------------------+--------------------------+----------------------------+-------------------------------------------------------------------------------------+
+|                              | peer\_addr               | XX:XX:XX:XX:XX:XX          | Remove device address - if provided perform directed advertising                    |
++------------------------------+--------------------------+----------------------------+-------------------------------------------------------------------------------------+
+|                              | own\_addr\_type          | ``public``                 | Use public address for scan requests                                                |
++------------------------------+--------------------------+----------------------------+-------------------------------------------------------------------------------------+
+|                              |                          | random                     | Use random address for scan requests                                                |
++------------------------------+--------------------------+----------------------------+-------------------------------------------------------------------------------------+
+|                              |                          | rpa\_pub                   | Use RPA address for scan requests (fallback to public if no IRK)                    |
++------------------------------+--------------------------+----------------------------+-------------------------------------------------------------------------------------+
+|                              |                          | rpa\_rnd                   | Use RPA address for scan requests (fallback to random if no IRK)                    |
++------------------------------+--------------------------+----------------------------+-------------------------------------------------------------------------------------+
+|                              | channel\_map             | [``0``-UINT8\_MAX}         | Primary advertising channels map. If 0 use all channels.                            |
++------------------------------+--------------------------+----------------------------+-------------------------------------------------------------------------------------+
+|                              | filter                   | ``none``                   | Advertising filter policy - no filtering, no whitelist used                         |
++------------------------------+--------------------------+----------------------------+-------------------------------------------------------------------------------------+
+|                              |                          | scan                       | process all connection requests but only scans from white list                      |
++------------------------------+--------------------------+----------------------------+-------------------------------------------------------------------------------------+
+|                              |                          | conn                       | process all scan request but only connection requests from white list               |
++------------------------------+--------------------------+----------------------------+-------------------------------------------------------------------------------------+
+|                              |                          | both                       | ignore all scan and connection requests unless in white list                        |
++------------------------------+--------------------------+----------------------------+-------------------------------------------------------------------------------------+
+|                              | interval\_min            | [``0``-UINT32\_MAX]        | Minimum advertising interval in 0.625 miliseconds If 0 use stack default.           |
++------------------------------+--------------------------+----------------------------+-------------------------------------------------------------------------------------+
+|                              | interval\_max            | [``0``-UINT32\_MAX]        | Maximum advertising interval in 0.625 miliseconds If 0 use stack default.           |
++------------------------------+--------------------------+----------------------------+-------------------------------------------------------------------------------------+
+|                              | rx\_power                | [-127 - ``127``]           | Advertising TX power in dBm                                                         |
++------------------------------+--------------------------+----------------------------+-------------------------------------------------------------------------------------+
+|                              | primary\_phy             | ``1M``                     | Use 1M PHY on primary advertising channels                                          |
++------------------------------+--------------------------+----------------------------+-------------------------------------------------------------------------------------+
+|                              |                          | ``coded``                  | Use Coded PHY on primary advertising channels                                       |
++------------------------------+--------------------------+----------------------------+-------------------------------------------------------------------------------------+
+|                              | secondary\_phy           | ``1M``                     | Use 1M PHY on secondary advertising channels                                        |
++------------------------------+--------------------------+----------------------------+-------------------------------------------------------------------------------------+
+|                              |                          | ``coded``                  | Use coded PHY on primary advertising channels                                       |
++------------------------------+--------------------------+----------------------------+-------------------------------------------------------------------------------------+
+|                              |                          | ``2M``                     | Use 2M PHY on primary advertising channels                                          |
++------------------------------+--------------------------+----------------------------+-------------------------------------------------------------------------------------+
+|                              | sid                      | [``0``-16]                 | Adsertising instance SID                                                            |
++------------------------------+--------------------------+----------------------------+-------------------------------------------------------------------------------------+
+|                              | high\_duty               | [``0``-1]                  | Use high\_duty advertising                                                          |
++------------------------------+--------------------------+----------------------------+-------------------------------------------------------------------------------------+
+|                              | anonymous                | [``0``-1]                  | Use anonymous advertising                                                           |
++------------------------------+--------------------------+----------------------------+-------------------------------------------------------------------------------------+
+|                              | legacy                   | [``0``-1]                  | Use legacy PDUs for advertising                                                     |
++------------------------------+--------------------------+----------------------------+-------------------------------------------------------------------------------------+
+|                              | include\_tx\_power       | [``0``-1]                  | Include TX power information in advertising PDUs                                    |
++------------------------------+--------------------------+----------------------------+-------------------------------------------------------------------------------------+
+|                              | scan\_req\_notif         | [``0``-1]                  | Enable SCAN\_REQ notifications                                                      |
++------------------------------+--------------------------+----------------------------+-------------------------------------------------------------------------------------+
+| **advertise-set-addr**       |                          |                            | Configure *random* adress for instance                                              |
++------------------------------+--------------------------+----------------------------+-------------------------------------------------------------------------------------+
+|                              | instance                 | [``0``-UINT8\_MAX]         | Advertising instance                                                                |
++------------------------------+--------------------------+----------------------------+-------------------------------------------------------------------------------------+
+|                              | addr                     | XX:XX:XX:XX:XX:XX          | Random address                                                                      |
++------------------------------+--------------------------+----------------------------+-------------------------------------------------------------------------------------+
+| **advertise-set-adv-data**   |                          |                            | Configure advertising instance ADV\_DATA. This allow to configure following TLVs:   |
++------------------------------+--------------------------+----------------------------+-------------------------------------------------------------------------------------+
+| **advertise-set-scan-rsp**   |                          |                            | Configure advertising instance SCAN\_RSP. This allow to configure following TLVs:   |
++------------------------------+--------------------------+----------------------------+-------------------------------------------------------------------------------------+
+|                              | instance                 | [``0``-UINT8\_MAX]         | Advertising instance                                                                |
++------------------------------+--------------------------+----------------------------+-------------------------------------------------------------------------------------+
+|                              | flags                    | [``0``-UINT8\_MAX]         | Flags value                                                                         |
++------------------------------+--------------------------+----------------------------+-------------------------------------------------------------------------------------+
+|                              | uuid16                   | [UINT16]                   | 16-bit UUID value (can be passed multiple times)                                    |
++------------------------------+--------------------------+----------------------------+-------------------------------------------------------------------------------------+
+|                              | uuid16\_is\_complete     | [``0``-1]                  | I 16-bit UUID list is complete                                                      |
++------------------------------+--------------------------+----------------------------+-------------------------------------------------------------------------------------+
+|                              | uuid32                   | [UINT32]                   | 32-bit UUID value (can be passed multiple times)                                    |
++------------------------------+--------------------------+----------------------------+-------------------------------------------------------------------------------------+
+|                              | uuid32\_is\_complete     | [``0``-1]                  | I 32-bit UUID list is complete                                                      |
++------------------------------+--------------------------+----------------------------+-------------------------------------------------------------------------------------+
+|                              | uuid128                  | XX:XX:XX:...               | 128-bit UUID value (16 bytes) (can be passed multiple times)                        |
++------------------------------+--------------------------+----------------------------+-------------------------------------------------------------------------------------+
+|                              | uuid128\_is\_complete    | [``0``-1]                  | I 128-bit UUID list is complete                                                     |
++------------------------------+--------------------------+----------------------------+-------------------------------------------------------------------------------------+
+|                              | tx\_power\_level         | [-127 - 127]               | TX Power level to include                                                           |
++------------------------------+--------------------------+----------------------------+-------------------------------------------------------------------------------------+
+|                              | appearance               | [UINT16]                   | Appearance                                                                          |
++------------------------------+--------------------------+----------------------------+-------------------------------------------------------------------------------------+
+|                              | name                     | string                     | Name                                                                                |
++------------------------------+--------------------------+----------------------------+-------------------------------------------------------------------------------------+
+|                              | advertising\_interval    | [UINT16]                   | Advertising interval                                                                |
++------------------------------+--------------------------+----------------------------+-------------------------------------------------------------------------------------+
+|                              | service\_data\_uuid32    | XX:XX:XX:...               | 32-bit UUID service data                                                            |
++------------------------------+--------------------------+----------------------------+-------------------------------------------------------------------------------------+
+|                              | service\_data\_uuid128   | XX:XX:XX:...               | 128-bit UUID service data                                                           |
++------------------------------+--------------------------+----------------------------+-------------------------------------------------------------------------------------+
+|                              | uri                      | XX:XX:XX:...               | URI                                                                                 |
++------------------------------+--------------------------+----------------------------+-------------------------------------------------------------------------------------+
+|                              | msg\_data                | XX:XX:XX:...               | Manufacturer data                                                                   |
++------------------------------+--------------------------+----------------------------+-------------------------------------------------------------------------------------+
+|                              | eddystone\_url           | string                     | Eddystone with specified URL                                                        |
++------------------------------+--------------------------+----------------------------+-------------------------------------------------------------------------------------+
+| **advertise-start**          |                          |                            | Start advertising with configured instance                                          |
++------------------------------+--------------------------+----------------------------+-------------------------------------------------------------------------------------+
+|                              | instance                 | [``0``-UINT8\_MAX]         | Advertising instance                                                                |
++------------------------------+--------------------------+----------------------------+-------------------------------------------------------------------------------------+
+|                              | duration                 | [``0``-UINT16\_MAX]        | Advertising duration in 10ms units. 0 - forver                                      |
++------------------------------+--------------------------+----------------------------+-------------------------------------------------------------------------------------+
+|                              | max\_events              | [``0``-UINT8\_MAX]         | Maximum number of advertising events. 0 - no limit                                  |
++------------------------------+--------------------------+----------------------------+-------------------------------------------------------------------------------------+
+| **advertise-stop**           |                          |                            | Stop advertising                                                                    |
++------------------------------+--------------------------+----------------------------+-------------------------------------------------------------------------------------+
+|                              | instance                 | [``0``-UINT8\_MAX]         | Advertising instance                                                                |
++------------------------------+--------------------------+----------------------------+-------------------------------------------------------------------------------------+
+| **advertise-remove**         |                          |                            | Remove configured advertising instance                                              |
++------------------------------+--------------------------+----------------------------+-------------------------------------------------------------------------------------+
+|                              | instance                 | [``0``-UINT8\_MAX]         | Advertising instance                                                                |
++------------------------------+--------------------------+----------------------------+-------------------------------------------------------------------------------------+
+
+Legacy Advertising with Extended Advertising disabled
+-----------------------------------------------------
+
++--------------------+--------------------------+----------------------------+-------------------------------------------------------------------------------------+
+| **Command**        | **Parmeters**            | \*\* Possible values\*\*   | **Description**                                                                     |
++====================+==========================+============================+=====================================================================================+
+| **advertise**      |                          |                            | Enable advertising                                                                  |
++--------------------+--------------------------+----------------------------+-------------------------------------------------------------------------------------+
+|                    | stop                     |                            | Stop enabled advertising                                                            |
++--------------------+--------------------------+----------------------------+-------------------------------------------------------------------------------------+
+|                    | conn                     | ``und``                    | Connectable mode: undirected                                                        |
++--------------------+--------------------------+----------------------------+-------------------------------------------------------------------------------------+
+|                    |                          | non                        | non-connectable                                                                     |
++--------------------+--------------------------+----------------------------+-------------------------------------------------------------------------------------+
+|                    |                          | dir                        | directed                                                                            |
++--------------------+--------------------------+----------------------------+-------------------------------------------------------------------------------------+
+|                    | discov                   | ``gen``                    | Discoverable mode: general discoverable                                             |
++--------------------+--------------------------+----------------------------+-------------------------------------------------------------------------------------+
+|                    |                          | ltd                        | limited discoverable                                                                |
++--------------------+--------------------------+----------------------------+-------------------------------------------------------------------------------------+
+|                    |                          | non                        | non-discoverable                                                                    |
++--------------------+--------------------------+----------------------------+-------------------------------------------------------------------------------------+
+|                    | scannable                | [``0``-1]                  | Use scannable advertising                                                           |
++--------------------+--------------------------+----------------------------+-------------------------------------------------------------------------------------+
+|                    | peer\_addr\_type         | ``public``                 | Remote device public address type                                                   |
++--------------------+--------------------------+----------------------------+-------------------------------------------------------------------------------------+
+|                    |                          | random                     | Remote device random address type                                                   |
++--------------------+--------------------------+----------------------------+-------------------------------------------------------------------------------------+
+|                    |                          | public\_id                 | Remote device public address type (Identity)                                        |
++--------------------+--------------------------+----------------------------+-------------------------------------------------------------------------------------+
+|                    |                          | random\_id                 | Remote device random address type (Identity)                                        |
++--------------------+--------------------------+----------------------------+-------------------------------------------------------------------------------------+
+|                    | peer\_addr               | XX:XX:XX:XX:XX:XX          | Remove device address - if provided perform directed advertising                    |
++--------------------+--------------------------+----------------------------+-------------------------------------------------------------------------------------+
+|                    | own\_addr\_type          | ``public``                 | Use public address for scan requests                                                |
++--------------------+--------------------------+----------------------------+-------------------------------------------------------------------------------------+
+|                    |                          | random                     | Use random address for scan requests                                                |
++--------------------+--------------------------+----------------------------+-------------------------------------------------------------------------------------+
+|                    |                          | rpa\_pub                   | Use RPA address for scan requests (fallback to public if no IRK)                    |
++--------------------+--------------------------+----------------------------+-------------------------------------------------------------------------------------+
+|                    |                          | rpa\_rnd                   | Use RPA address for scan requests (fallback to random if no IRK)                    |
++--------------------+--------------------------+----------------------------+-------------------------------------------------------------------------------------+
+|                    | channel\_map             | [``0``-UINT8\_MAX}         | Primary advertising channels map. If 0 use all channels.                            |
++--------------------+--------------------------+----------------------------+-------------------------------------------------------------------------------------+
+|                    | filter                   | ``none``                   | Advertising filter policy - no filtering, no whitelist used                         |
++--------------------+--------------------------+----------------------------+-------------------------------------------------------------------------------------+
+|                    |                          | scan                       | process all connection requests but only scans from white list                      |
++--------------------+--------------------------+----------------------------+-------------------------------------------------------------------------------------+
+|                    |                          | conn                       | process all scan request but only connection requests from white list               |
++--------------------+--------------------------+----------------------------+-------------------------------------------------------------------------------------+
+|                    |                          | both                       | ignore all scan and connection requests unless in white list                        |
++--------------------+--------------------------+----------------------------+-------------------------------------------------------------------------------------+
+|                    | interval\_min            | [``0``-UINT32\_MAX]        | Minimum advertising interval in 0.625 miliseconds If 0 use stack default.           |
++--------------------+--------------------------+----------------------------+-------------------------------------------------------------------------------------+
+|                    | interval\_max            | [``0``-UINT32\_MAX]        | Maximum advertising interval in 0.625 miliseconds If 0 use stack default.           |
++--------------------+--------------------------+----------------------------+-------------------------------------------------------------------------------------+
+|                    | high\_duty               | [``0``-1]                  | Use high\_duty advertising                                                          |
++--------------------+--------------------------+----------------------------+-------------------------------------------------------------------------------------+
+|                    | duration                 | [``1``-INT32\_MAX]         | Advertising duration in ms                                                          |
++--------------------+--------------------------+----------------------------+-------------------------------------------------------------------------------------+
+| **set-adv-data**   |                          |                            | Configure advertising instance ADV\_DATA. This allow to configure following TLVs:   |
++--------------------+--------------------------+----------------------------+-------------------------------------------------------------------------------------+
+| **set-scan-rsp**   |                          |                            | Configure advertising instance SCAN\_RSP. This allow to configure following TLVs:   |
++--------------------+--------------------------+----------------------------+-------------------------------------------------------------------------------------+
+|                    | flags                    | [``0``-UINT8\_MAX]         | Flags value                                                                         |
++--------------------+--------------------------+----------------------------+-------------------------------------------------------------------------------------+
+|                    | uuid16                   | [UINT16]                   | 16-bit UUID value (can be passed multiple times)                                    |
++--------------------+--------------------------+----------------------------+-------------------------------------------------------------------------------------+
+|                    | uuid16\_is\_complete     | [``0``-1]                  | I 16-bit UUID list is complete                                                      |
++--------------------+--------------------------+----------------------------+-------------------------------------------------------------------------------------+
+|                    | uuid32                   | [UINT32]                   | 32-bit UUID value (can be passed multiple times)                                    |
++--------------------+--------------------------+----------------------------+-------------------------------------------------------------------------------------+
+|                    | uuid32\_is\_complete     | [``0``-1]                  | I 32-bit UUID list is complete                                                      |
++--------------------+--------------------------+----------------------------+-------------------------------------------------------------------------------------+
+|                    | uuid128                  | XX:XX:XX:...               | 128-bit UUID value (16 bytes) (can be passed multiple times)                        |
++--------------------+--------------------------+----------------------------+-------------------------------------------------------------------------------------+
+|                    | uuid128\_is\_complete    | [``0``-1]                  | I 128-bit UUID list is complete                                                     |
++--------------------+--------------------------+----------------------------+-------------------------------------------------------------------------------------+
+|                    | tx\_power\_level         | [-127 - 127]               | TX Power level to include                                                           |
++--------------------+--------------------------+----------------------------+-------------------------------------------------------------------------------------+
+|                    | appearance               | [UINT16]                   | Appearance                                                                          |
++--------------------+--------------------------+----------------------------+-------------------------------------------------------------------------------------+
+|                    | name                     | string                     | Name                                                                                |
++--------------------+--------------------------+----------------------------+-------------------------------------------------------------------------------------+
+|                    | advertising\_interval    | [UINT16]                   | Advertising interval                                                                |
++--------------------+--------------------------+----------------------------+-------------------------------------------------------------------------------------+
+|                    | service\_data\_uuid32    | XX:XX:XX:...               | 32-bit UUID service data                                                            |
++--------------------+--------------------------+----------------------------+-------------------------------------------------------------------------------------+
+|                    | service\_data\_uuid128   | XX:XX:XX:...               | 128-bit UUID service data                                                           |
++--------------------+--------------------------+----------------------------+-------------------------------------------------------------------------------------+
+|                    | uri                      | XX:XX:XX:...               | URI                                                                                 |
++--------------------+--------------------------+----------------------------+-------------------------------------------------------------------------------------+
+|                    | msg\_data                | XX:XX:XX:...               | Manufacturer data                                                                   |
++--------------------+--------------------------+----------------------------+-------------------------------------------------------------------------------------+
+|                    | eddystone\_url           | string                     | Eddystone with specified URL                                                        |
++--------------------+--------------------------+----------------------------+-------------------------------------------------------------------------------------+
+
+L2CAP Connection Oriented Channels
+----------------------------------
+
++---------------------------+-----------------+----------------------------+----------------------------------------------------+
+| **Command**               | **Parmeters**   | \*\* Possible values\*\*   | **Description**                                    |
++===========================+=================+============================+====================================================+
+| **l2cap-create-server**   |                 |                            | Create L2CAP server                                |
++---------------------------+-----------------+----------------------------+----------------------------------------------------+
+|                           | psm             | [UINT16]                   | PSM                                                |
++---------------------------+-----------------+----------------------------+----------------------------------------------------+
+| **l2cap-connect**         |                 |                            | Connect to remote L2CAP server                     |
++---------------------------+-----------------+----------------------------+----------------------------------------------------+
+|                           | conn            | [UINT16]                   | Connection handle                                  |
++---------------------------+-----------------+----------------------------+----------------------------------------------------+
+|                           | psm             | [UINT16]                   | PSM                                                |
++---------------------------+-----------------+----------------------------+----------------------------------------------------+
+| **l2cap-disconnect**      |                 |                            | Disconnec from L2CAP server                        |
++---------------------------+-----------------+----------------------------+----------------------------------------------------+
+|                           | conn            | [UINT16]                   | Connection handle                                  |
++---------------------------+-----------------+----------------------------+----------------------------------------------------+
+|                           | idx             | [UINT16]                   | L2CAP connection oriented channel identifier       |
++---------------------------+-----------------+----------------------------+----------------------------------------------------+
+| **l2cap-send**            |                 |                            | Send data over connected L2CAP channel             |
++---------------------------+-----------------+----------------------------+----------------------------------------------------+
+|                           | conn            | [UINT16]                   | Connection handle                                  |
++---------------------------+-----------------+----------------------------+----------------------------------------------------+
+|                           | idx             | [UINT16]                   | L2CAP connection oriented channel identifier       |
++---------------------------+-----------------+----------------------------+----------------------------------------------------+
+|                           | bytes           | [UINT16]                   | Number of bytes to send (hardcoded data pattern)   |
++---------------------------+-----------------+----------------------------+----------------------------------------------------+
+| **l2cap-show-coc**        |                 |                            | Show connected L2CAP channels                      |
++---------------------------+-----------------+----------------------------+----------------------------------------------------+
+
+Keys storage
+------------
+
++---------------------+-----------------+----------------------------+----------------------------------------------------+
+| **Command**         | **Parmeters**   | \*\* Possible values\*\*   | **Description**                                    |
++=====================+=================+============================+====================================================+
+| **keystore-add**    |                 |                            | Add keys to storage                                |
++---------------------+-----------------+----------------------------+----------------------------------------------------+
+|                     | type            | msec                       | Master Key                                         |
++---------------------+-----------------+----------------------------+----------------------------------------------------+
+|                     |                 | ssec                       | Slave Key                                          |
++---------------------+-----------------+----------------------------+----------------------------------------------------+
+|                     |                 | cccd                       | Client Characteristic Configuration Descriptor     |
++---------------------+-----------------+----------------------------+----------------------------------------------------+
+|                     | addr            | XX:XX:XX:XX:XX:XX          | Device address                                     |
++---------------------+-----------------+----------------------------+----------------------------------------------------+
+|                     | addr\_type      | ``public``                 | Device address type                                |
++---------------------+-----------------+----------------------------+----------------------------------------------------+
+|                     |                 | random                     | Use random address for scan requests               |
++---------------------+-----------------+----------------------------+----------------------------------------------------+
+|                     | ediv            | [UINT16]                   | EDIV for LTK to add                                |
++---------------------+-----------------+----------------------------+----------------------------------------------------+
+|                     | rand            | [UINT64]                   | Rand for LTK                                       |
++---------------------+-----------------+----------------------------+----------------------------------------------------+
+|                     | ltk             | XX:XX:XX...                | LTK (16 bytes)                                     |
++---------------------+-----------------+----------------------------+----------------------------------------------------+
+|                     | irk             | XX:XX:XX...                | Identity Resolving Key (16 bytes)                  |
++---------------------+-----------------+----------------------------+----------------------------------------------------+
+|                     | csrk            | XX:XX:XX...                | Connection Signature Resolving Key (16 bytes)      |
++---------------------+-----------------+----------------------------+----------------------------------------------------+
+| **keystore-del**    |                 |                            | Delete keys from storage                           |
++---------------------+-----------------+----------------------------+----------------------------------------------------+
+|                     | type            | msec                       | Master Key                                         |
++---------------------+-----------------+----------------------------+----------------------------------------------------+
+|                     |                 | ssec                       | Slave Key                                          |
++---------------------+-----------------+----------------------------+----------------------------------------------------+
+|                     |                 | cccd                       | Client Characteristic Configuration Descriptor     |
++---------------------+-----------------+----------------------------+----------------------------------------------------+
+|                     | addr            | XX:XX:XX:XX:XX:XX          | Device address                                     |
++---------------------+-----------------+----------------------------+----------------------------------------------------+
+|                     | addr\_type      | ``public``                 | Device address type                                |
++---------------------+-----------------+----------------------------+----------------------------------------------------+
+|                     |                 | random                     | Use random address for scan requests               |
++---------------------+-----------------+----------------------------+----------------------------------------------------+
+|                     | ediv            | [UINT16]                   | EDIV for LTK to remove                             |
++---------------------+-----------------+----------------------------+----------------------------------------------------+
+|                     | rand            | [UINT64]                   | Rand for LTK                                       |
++---------------------+-----------------+----------------------------+----------------------------------------------------+
+| **keystore-show**   |                 |                            | Show stored keys                                   |
++---------------------+-----------------+----------------------------+----------------------------------------------------+
+|                     | type            | msec                       | Master Keys                                        |
++---------------------+-----------------+----------------------------+----------------------------------------------------+
+|                     |                 | ssec                       | Slave Keys                                         |
++---------------------+-----------------+----------------------------+----------------------------------------------------+
+|                     |                 | cccd                       | Client Characteristic Configuration Descriptor s   |
++---------------------+-----------------+----------------------------+----------------------------------------------------+
diff --git a/docs/network/ble/btshell/btshell_GATT.rst b/docs/network/ble/btshell/btshell_GATT.rst
index e80c58f65..0fe465fe5 100644
--- a/docs/network/ble/btshell/btshell_GATT.rst
+++ b/docs/network/ble/btshell/btshell_GATT.rst
@@ -1,129 +1,108 @@
 GATT feature API for btshell
-----------------------------
-
-GATT(GENERIC ATTRIBUTE PROFILE) describes a service framework using the
-Attribute Protocol for discovering services, and for reading and writing
-characteristic values on a peer device. There are 11 features defined in
-the GATT Profile, and each of the features is mapped to procedures and
-sub-procedures:
-
-+--------+-------------------+--------------------+-------------------------------+
-| **Item | **Feature**       | **Sub-Procedure**  | **nimBLE command**            |
-| No.**  |                   |                    |                               |
-+========+===================+====================+===============================+
-| 1      | Server            | Exchange MTU       | ``gatt-exchange-mtu conn=x``  |
-|        | Configuration     |                    |                               |
-+--------+-------------------+--------------------+-------------------------------+
-| 2      | Primary Service   | Discover All       | ``gatt-discover-service conn= |
-|        | Discovery         | Primary Services   | x``                           |
-+--------+-------------------+--------------------+-------------------------------+
-|        |                   | Discover Primary   | ``gatt-discover-service conn= |
-|        |                   | Services By        | x uuid=x``                    |
-|        |                   | Service UUID       |                               |
-+--------+-------------------+--------------------+-------------------------------+
-| 3      | Relationship      | Find Included      | ``gatt-find-included-services |
-|        | Discovery         | Services           |  conn=x start=x end=x``       |
-+--------+-------------------+--------------------+-------------------------------+
-| 4      | Characteristic    | Discover All       | ``gatt-discover-characteristi |
-|        | Discovery         | Characteristic of  | c conn=x start=x end=x``      |
-|        |                   | a Service          |                               |
-+--------+-------------------+--------------------+-------------------------------+
-|        |                   | Discover           | ``gatt-discover-characteristi |
-|        |                   | Characteristic by  | c conn=x start=x end=x uuid=x |
-|        |                   | UUID               | ``                            |
-+--------+-------------------+--------------------+-------------------------------+
-| 5      | Characteristic    | Discover All       | ``gatt-discover-descriptor co |
-|        | Descriptor        | Characteristic     | nn=x start=x end=x``          |
-|        | Discovery         | Descriptors        |                               |
-+--------+-------------------+--------------------+-------------------------------+
-| 6      | Reading a         | Read               | ``gatt-read conn=x attr=x``   |
-|        | Characteristic    | Characteristic     |                               |
-|        | Value             | Value              |                               |
-+--------+-------------------+--------------------+-------------------------------+
-|        |                   | Read Using         | ``gatt-read conn=x start=x en |
-|        |                   | Characteristic     | d=x uuid=x``                  |
-|        |                   | UUID               |                               |
-+--------+-------------------+--------------------+-------------------------------+
-|        |                   | Read Long          | ``gatt-read conn=x attr=x lon |
-|        |                   | Characteristic     | g=1``                         |
-|        |                   | Values             |                               |
-+--------+-------------------+--------------------+-------------------------------+
-|        |                   | Read Multiple      | ``gatt-read conn=x attr=x att |
-|        |                   | Characteristic     | r=y attr=z``                  |
-|        |                   | Values             |                               |
-+--------+-------------------+--------------------+-------------------------------+
-| 7      | Writing a         | Write Without      | ``gatt-write conn=x value=0xX |
-|        | Characteristic    | Response           | X:0xXX no_rsp=1``             |
-|        | Value             |                    |                               |
-+--------+-------------------+--------------------+-------------------------------+
-|        |                   | Signed Write       | NOT SUPPORTED                 |
-|        |                   | Without Response   |                               |
-+--------+-------------------+--------------------+-------------------------------+
-|        |                   | Write              | ``gatt-write conn=x attr=x va |
-|        |                   | Characteristic     | lue=0xXX:0xXX``               |
-|        |                   | Value              |                               |
-+--------+-------------------+--------------------+-------------------------------+
-|        |                   | Write Long         | ``gatt-write conn=x attr=x va |
-|        |                   | Characteristic     | lue=0xXX:0xXX long=1``        |
-|        |                   | Values             |                               |
-+--------+-------------------+--------------------+-------------------------------+
-|        |                   | Characteristic     | ``gatt-write conn=x attr=x va |
-|        |                   | Value Reliable     | lue=0xXX:0xXX attr=y value=0x |
-|        |                   | Writes             | YY:0xYY``                     |
-+--------+-------------------+--------------------+-------------------------------+
-| 8      | Notification of a | Notifications      | Write *0x01:0x00* to CLIENT   |
-|        | Characteristic    |                    | CONFIGURATION characteristic  |
-|        | Value             |                    |                               |
-+--------+-------------------+--------------------+-------------------------------+
-| 9      | Indication of a   | Indications        | Write *0x02:0x00* to CLIENT   |
-|        | Characteristic    |                    | CONFIGURATION characteristic  |
-|        | Value             |                    |                               |
-+--------+-------------------+--------------------+-------------------------------+
-| 10     | Reading a         | Read               | ``gatt-read conn=x attr=x``   |
-|        | Characteristic    | Characteristic     |                               |
-|        | Descriptor        | Descriptors        |                               |
-+--------+-------------------+--------------------+-------------------------------+
-|        |                   | Read Long          | ``gatt-read conn=x attr=x lon |
-|        |                   | Characteristic     | g=1``                         |
-|        |                   | Descriptors        |                               |
-+--------+-------------------+--------------------+-------------------------------+
-| 11     | Writing a         | Write              | ``gatt-write conn=x value=0xX |
-|        | Characteristic    | Characteristic     | X:0xXX``                      |
-|        | Descriptor        | Descriptors        |                               |
-+--------+-------------------+--------------------+-------------------------------+
-|        |                   | Write Long         | ``gatt-write conn=x value=0xX |
-|        |                   | Characteristic     | X:0xXX long=1``               |
-|        |                   | Descriptors        |                               |
-+--------+-------------------+--------------------+-------------------------------+
-
-Using NimBLE commands
-~~~~~~~~~~~~~~~~~~~~~
-
-Assuming you have discovered and established a BLE connection with at
-least one peer device (as explained earlier in `API for btshell
-app <btshell_api.html>`__, you can find out what characteristics and
-services are available over these connections. Here is a recap.
-
-To show established connections:
-
-::
-
-    gatt-show-conn
-
-To show discovered services, characteristics, and descriptors:
-
-::
-
-    gatt-show
-
-To show local database of services, characteristics, and descriptors:
-
-::
-
-    gatt-show-local
-
-To show connection RSSI:
-
-::
-
-    conn-rssi conn=x
+============================
+
+GATT(GENERIC ATTRIBUTE PROFILE) describes a service framework using the Attribute Protocol for discovering services,
+and for reading and writing characteristic values on a peer device. There are 11 features defined in the GATT Profile,
+and each of the features is mapped to procedures and sub-procedures:
+
+Available commands
+~~~~~~~~~~~~~~~~~~
+
+Parameters default values (if applicable) are marked red.
+
+Configuration
+-------------
+
++------------------------------------+-----------------+----------------------------+-----------------------------------------------------------+
+| **Command**                        | **Parmeters**   | \*\* Possible values\*\*   | **Description**                                           |
++====================================+=================+============================+===========================================================+
+| **gatt-discover-characteristic**   |                 |                            | Discover GATT characteristics                             |
++------------------------------------+-----------------+----------------------------+-----------------------------------------------------------+
+|                                    | conn            | [UINT16]                   | Connection handle                                         |
++------------------------------------+-----------------+----------------------------+-----------------------------------------------------------+
+|                                    | uuid            | [UINT16]                   | Characteristic UUID                                       |
++------------------------------------+-----------------+----------------------------+-----------------------------------------------------------+
+|                                    | start           | [UINT16]                   | Discovery start handle                                    |
++------------------------------------+-----------------+----------------------------+-----------------------------------------------------------+
+|                                    | end             | [UINT16]                   | Discovery end handle                                      |
++------------------------------------+-----------------+----------------------------+-----------------------------------------------------------+
+| **gatt-discover-descriptor**       |                 |                            | Discover GATT descriptors                                 |
++------------------------------------+-----------------+----------------------------+-----------------------------------------------------------+
+|                                    | conn            | [UINT16]                   | Connection handle                                         |
++------------------------------------+-----------------+----------------------------+-----------------------------------------------------------+
+|                                    | start           | [UINT16]                   | Discovery start handle                                    |
++------------------------------------+-----------------+----------------------------+-----------------------------------------------------------+
+|                                    | end             | [UINT16]                   | Discovery end handle                                      |
++------------------------------------+-----------------+----------------------------+-----------------------------------------------------------+
+| **gatt-discover-service**          |                 |                            | Discover services                                         |
++------------------------------------+-----------------+----------------------------+-----------------------------------------------------------+
+|                                    | conn            | [UINT16]                   | Connection handle                                         |
++------------------------------------+-----------------+----------------------------+-----------------------------------------------------------+
+|                                    | uuid16          | [UINT16]                   | Service UUID                                              |
++------------------------------------+-----------------+----------------------------+-----------------------------------------------------------+
+| **gatt-discover-full**             |                 |                            | Discover services, characteristic and descriptors         |
++------------------------------------+-----------------+----------------------------+-----------------------------------------------------------+
+|                                    | conn            | [UINT16]                   | Connection handle                                         |
++------------------------------------+-----------------+----------------------------+-----------------------------------------------------------+
+| **gatt-find-included-services**    |                 |                            | Find included services                                    |
++------------------------------------+-----------------+----------------------------+-----------------------------------------------------------+
+|                                    | conn            | [UINT16]                   | Connection handle                                         |
++------------------------------------+-----------------+----------------------------+-----------------------------------------------------------+
+|                                    | start           | [UINT16]                   | Discovery start handle                                    |
++------------------------------------+-----------------+----------------------------+-----------------------------------------------------------+
+|                                    | end             | [UINT16]                   | Discovery end handle                                      |
++------------------------------------+-----------------+----------------------------+-----------------------------------------------------------+
+| **gatt-exchange-mtu**              |                 |                            | Initiate ATT MTU exchange procedure                       |
++------------------------------------+-----------------+----------------------------+-----------------------------------------------------------+
+|                                    | conn            | [UINT16]                   | Connection handle                                         |
++------------------------------------+-----------------+----------------------------+-----------------------------------------------------------+
+| **gatt-read**                      |                 |                            | Read attribute                                            |
++------------------------------------+-----------------+----------------------------+-----------------------------------------------------------+
+|                                    | conn            | [UINT16]                   | Connection handle                                         |
++------------------------------------+-----------------+----------------------------+-----------------------------------------------------------+
+|                                    | long            | [``0``-1]                  | Long read                                                 |
++------------------------------------+-----------------+----------------------------+-----------------------------------------------------------+
+|                                    | attr            | [UINT16]                   | Attribute handle                                          |
++------------------------------------+-----------------+----------------------------+-----------------------------------------------------------+
+|                                    | offset          | [UINT16]                   | Long read offset value                                    |
++------------------------------------+-----------------+----------------------------+-----------------------------------------------------------+
+|                                    | uuid            | [UINT16]                   | Characteristic UUID                                       |
++------------------------------------+-----------------+----------------------------+-----------------------------------------------------------+
+|                                    | start           | [UINT16]                   | Discovery start handle                                    |
++------------------------------------+-----------------+----------------------------+-----------------------------------------------------------+
+|                                    | end             | [UINT16]                   | Discovery end handle                                      |
++------------------------------------+-----------------+----------------------------+-----------------------------------------------------------+
+| **gatt-notify**                    |                 |                            | Send notification or indication to all subscribed peers   |
++------------------------------------+-----------------+----------------------------+-----------------------------------------------------------+
+|                                    | attr            | [UINT16]                   | Attribute handle                                          |
++------------------------------------+-----------------+----------------------------+-----------------------------------------------------------+
+| **gatt-service-changed**           |                 |                            | Send Services Changed notification                        |
++------------------------------------+-----------------+----------------------------+-----------------------------------------------------------+
+|                                    | start           | [UINT16]                   | Start handle                                              |
++------------------------------------+-----------------+----------------------------+-----------------------------------------------------------+
+|                                    | end             | [UINT16]                   | End handle                                                |
++------------------------------------+-----------------+----------------------------+-----------------------------------------------------------+
+| **gatt-service-visibility**        |                 |                            | Set service visibility                                    |
++------------------------------------+-----------------+----------------------------+-----------------------------------------------------------+
+|                                    | handle          | [UINT16]                   | Service handle                                            |
++------------------------------------+-----------------+----------------------------+-----------------------------------------------------------+
+|                                    | visibility      | [``0``-1]                  | Service visibility                                        |
++------------------------------------+-----------------+----------------------------+-----------------------------------------------------------+
+| **gatt-show**                      |                 |                            | Show remote devices discovered databases structure        |
++------------------------------------+-----------------+----------------------------+-----------------------------------------------------------+
+| **gatt-show-local**                |                 |                            | Show local database structure                             |
++------------------------------------+-----------------+----------------------------+-----------------------------------------------------------+
+| **gatt-write**                     |                 |                            | Write attribute                                           |
++------------------------------------+-----------------+----------------------------+-----------------------------------------------------------+
+|                                    | conn            | [UINT16]                   | Connection handle                                         |
++------------------------------------+-----------------+----------------------------+-----------------------------------------------------------+
+|                                    | no\_rsp         | [``0``-1]                  | Use Write Without Response                                |
++------------------------------------+-----------------+----------------------------+-----------------------------------------------------------+
+|                                    | long            | [``0``-1]                  | Use Long Write procedure                                  |
++------------------------------------+-----------------+----------------------------+-----------------------------------------------------------+
+|                                    | attr            | [UINT16]                   | Attribute handle                                          |
++------------------------------------+-----------------+----------------------------+-----------------------------------------------------------+
+|                                    | offset          | [UINT16]                   | Long write offset value                                   |
++------------------------------------+-----------------+----------------------------+-----------------------------------------------------------+
+|                                    | value           | XX:XX:XX...                | Data to write                                             |
++------------------------------------+-----------------+----------------------------+-----------------------------------------------------------+
diff --git a/docs/network/ble/btshell/btshell_advdata.rst b/docs/network/ble/btshell/btshell_advdata.rst
index 2cac811ba..eabfcb3b8 100644
--- a/docs/network/ble/btshell/btshell_advdata.rst
+++ b/docs/network/ble/btshell/btshell_advdata.rst
@@ -1,278 +1,47 @@
 Advertisement Data Fields
 -------------------------
 
-This part defines the advertisement data fields used in the ``btshell``
-app. For a complete list of all data types and formats used for Extended
-Inquiry Response (EIR), Advertising Data (AD), and OOB data blocks,
-refer to the Supplement to the Bluetooth Core Specification, CSSv6,
-available for download
+This part defines the advertisement data fields used in the ``btshell`` app. For a complete list of all data types and
+formats used for Extended Inquiry Response (EIR), Advertising Data (AD), and OOB data blocks, refer to the Supplement
+to the Bluetooth Core Specification, CSSv6, available for download
 `here <https://www.bluetooth.org/DocMan/handlers/DownloadDoc.ashx?doc_id=302735&_ga=1.133090766.1368218946.1444779486>`__.
 
-+-------+------------+------------------+-----+
-| **Nam | **Definiti | **Details**      | **b |
-| e**   | on**       |                  | tsh |
-|       |            |                  | ell |
-|       |            |                  | Not |
-|       |            |                  | es* |
-|       |            |                  | *   |
-+=======+============+==================+=====+
-| flags | Indicates  | Flags used over  | Nim |
-|       | basic      | the LE physical  | BLE |
-|       | informatio | channel are: \*  | wil |
-|       | n          | Limited          | l   |
-|       | about the  | Discoverable     | aut |
-|       | advertiser | Mode \* General  | o-c |
-|       | .          | Discoverable     | alc |
-|       |            | Mode \* BR/EDR   | ula |
-|       |            | Not Supported \* | te  |
-|       |            | Simultaneous LE  | if  |
-|       |            | and BR/EDR to    | set |
-|       |            | Same Device      | to  |
-|       |            | Capable          | 0.  |
-|       |            | (Controller) \*  |     |
-|       |            | Simultaneous LE  |     |
-|       |            | and BR/EDR to    |     |
-|       |            | Same Device      |     |
-|       |            | Capable (Host)   |     |
-+-------+------------+------------------+-----+
-| uuid1 | 16-bit     | Indicates the    | Set |
-| 6     | Bluetooth  | Service UUID     | rep |
-|       | Service    | list is          | eat |
-|       | UUIDs      | incomplete i.e.  | edl |
-|       |            | more 16-bit      | y   |
-|       |            | Service UUIDs    | for |
-|       |            | available. 16    | mul |
-|       |            | bit UUIDs shall  | tip |
-|       |            | only be used if  | le  |
-|       |            | they are         | ser |
-|       |            | assigned by the  | vic |
-|       |            | Bluetooth SIG.   | e   |
-|       |            |                  | UUI |
-|       |            |                  | Ds. |
-+-------+------------+------------------+-----+
-| uuid1 | 16-bit     | Indicates the    |     |
-| 6\_is | Bluetooth  | Service UUID     |     |
-| \_com | Service    | list is          |     |
-| plete | UUIDs      | complete. 16 bit |     |
-|       |            | UUIDs shall only |     |
-|       |            | be used if they  |     |
-|       |            | are assigned by  |     |
-|       |            | the Bluetooth    |     |
-|       |            | SIG.             |     |
-+-------+------------+------------------+-----+
-| uuid3 | 32-bit     | Indicates the    | Set |
-| 2     | Bluetooth  | Service UUID     | rep |
-|       | Service    | list is          | eat |
-|       | UUIDs      | incomplete i.e.  | edl |
-|       |            | more 32-bit      | y   |
-|       |            | Service UUIDs    | for |
-|       |            | available. 32    | mul |
-|       |            | bit UUIDs shall  | tip |
-|       |            | only be used if  | le  |
-|       |            | they are         | ser |
-|       |            | assigned by the  | vic |
-|       |            | Bluetooth SIG.   | e   |
-|       |            |                  | UUI |
-|       |            |                  | Ds. |
-+-------+------------+------------------+-----+
-| uuid3 | 32-bit     | Indicates the    |     |
-| 2\_is | Bluetooth  | Service UUID     |     |
-| \_com | Service    | list is          |     |
-| plete | UUIDs      | complete. 32 bit |     |
-|       |            | UUIDs shall only |     |
-|       |            | be used if they  |     |
-|       |            | are assigned by  |     |
-|       |            | the Bluetooth    |     |
-|       |            | SIG.             |     |
-+-------+------------+------------------+-----+
-| uuid1 | Global     | More 128-bit     | Set |
-| 28    | 128-bit    | Service UUIDs    | rep |
-|       | Service    | available.       | eat |
-|       | UUIDs      |                  | edl |
-|       |            |                  | y   |
-|       |            |                  | for |
-|       |            |                  | mul |
-|       |            |                  | tip |
-|       |            |                  | le  |
-|       |            |                  | ser |
-|       |            |                  | vic |
-|       |            |                  | e   |
-|       |            |                  | UUI |
-|       |            |                  | Ds. |
-+-------+------------+------------------+-----+
-| uuid1 | Global     | Complete list of |     |
-| 28\_i | 128-bit    | 128-bit Service  |     |
-| s\_co | Service    | UUIDs            |     |
-| mplet | UUIDs      |                  |     |
-| e     |            |                  |     |
-+-------+------------+------------------+-----+
-| tx\_p | TX Power   | Indicates the    | Nim |
-| ower\ | Level      | transmitted      | BLE |
-| _leve |            | power level of   | wil |
-| l     |            | the packet       | l   |
-|       |            | containing the   | aut |
-|       |            | data type. The   | o-c |
-|       |            | TX Power Level   | alc |
-|       |            | data type may be | ula |
-|       |            | used to          | te  |
-|       |            | calculate path   | if  |
-|       |            | loss on a        | set |
-|       |            | received packet  | to  |
-|       |            | using the        | -12 |
-|       |            | following        | 8.  |
-|       |            | equation:        |     |
-|       |            | pathloss = Tx    |     |
-|       |            | Power Level ?    |     |
-|       |            | RSSI where       |     |
-|       |            | ?RSSI? is the    |     |
-|       |            | received signal  |     |
-|       |            | strength, in     |     |
-|       |            | dBm, of the      |     |
-|       |            | packet received. |     |
-+-------+------------+------------------+-----+
-| slave | Slave      | Contains the     |     |
-| \_int | Connection | Peripheral?s     |     |
-| erval | Interval   | preferred        |     |
-| \_ran | Range      | connection       |     |
-| ge    |            | interval range,  |     |
-|       |            | for all logical  |     |
-|       |            | connections.     |     |
-|       |            | Size: 4 Octets . |     |
-|       |            | The first 2      |     |
-|       |            | octets defines   |     |
-|       |            | the minimum      |     |
-|       |            | value for the    |     |
-|       |            | connection       |     |
-|       |            | interval in the  |     |
-|       |            | following        |     |
-|       |            | manner:          |     |
-|       |            | connIntervalmin  |     |
-|       |            | =                |     |
-|       |            | Conn\_Interval\_ |     |
-|       |            | Min              |     |
-|       |            | \* 1.25 ms       |     |
-|       |            | Conn\_Interval\_ |     |
-|       |            | Min              |     |
-|       |            | range: 0x0006 to |     |
-|       |            | 0x0C80 Value of  |     |
-|       |            | 0xFFFF indicates |     |
-|       |            | no specific      |     |
-|       |            | minimum. The     |     |
-|       |            | other 2 octets   |     |
-|       |            | defines the      |     |
-|       |            | maximum value    |     |
-|       |            | for the          |     |
-|       |            | connection       |     |
-|       |            | interval in the  |     |
-|       |            | following        |     |
-|       |            | manner:          |     |
-|       |            | connIntervalmax  |     |
-|       |            | =                |     |
-|       |            | Conn\_Interval\_ |     |
-|       |            | Max              |     |
-|       |            | \* 1.25 ms       |     |
-|       |            | Conn\_Interval\_ |     |
-|       |            | Max              |     |
-|       |            | range: 0x0006 to |     |
-|       |            | 0x0C80           |     |
-|       |            | Conn\_Interval\_ |     |
-|       |            | Max              |     |
-|       |            | shall be equal   |     |
-|       |            | to or greater    |     |
-|       |            | than the         |     |
-|       |            | Conn\_Interval\_ |     |
-|       |            | Min.             |     |
-|       |            | Value of 0xFFFF  |     |
-|       |            | indicates no     |     |
-|       |            | specific         |     |
-|       |            | maximum.         |     |
-+-------+------------+------------------+-----+
-| servi | Service    | Size: 2 or more  |     |
-| ce\_d | Data - 16  | octets The first |     |
-| ata\_ | bit UUID   | 2 octets contain |     |
-| uuid1 |            | the 16 bit       |     |
-| 6     |            | Service UUID     |     |
-|       |            | followed by      |     |
-|       |            | additional       |     |
-|       |            | service data     |     |
-+-------+------------+------------------+-----+
-| publi | Public     | Defines the      |     |
-| c\_ta | Target     | address of one   |     |
-| rget\ | Address    | or more intended |     |
-| _addr |            | recipients of an |     |
-| ess   |            | advertisement    |     |
-|       |            | when one or more |     |
-|       |            | devices were     |     |
-|       |            | bonded using a   |     |
-|       |            | public address.  |     |
-|       |            | This data type   |     |
-|       |            | shall exist only |     |
-|       |            | once. It may be  |     |
-|       |            | sent in either   |     |
-|       |            | the Advertising  |     |
-|       |            | or Scan Response |     |
-|       |            | data, but not    |     |
-|       |            | both.            |     |
-+-------+------------+------------------+-----+
-| appea | Appearance | Defines the      |     |
-| rance |            | external         |     |
-|       |            | appearance of    |     |
-|       |            | the device. The  |     |
-|       |            | Appearance data  |     |
-|       |            | type shall exist |     |
-|       |            | only once. It    |     |
-|       |            | may be sent in   |     |
-|       |            | either the       |     |
-|       |            | Advertising or   |     |
-|       |            | Scan Response    |     |
-|       |            | data, but not    |     |
-|       |            | both.            |     |
-+-------+------------+------------------+-----+
-| adver | Advertisin | Contains the     |     |
-| tisin | g          | advInterval      |     |
-| g\_in | Interval   | value as defined |     |
-| terva |            | in the Core      |     |
-| l     |            | specification,   |     |
-|       |            | Volume 6, Part   |     |
-|       |            | B, Section       |     |
-|       |            | 4.4.2.2.         |     |
-+-------+------------+------------------+-----+
-| servi | Service    | Size: 4 or more  |     |
-| ce\_d | Data - 32  | octets The first |     |
-| ata\_ | bit UUID   | 4 octets contain |     |
-| uuid3 |            | the 32 bit       |     |
-| 2     |            | Service UUID     |     |
-|       |            | followed by      |     |
-|       |            | additional       |     |
-|       |            | service data     |     |
-+-------+------------+------------------+-----+
-| servi | Service    | Size: 16 or more |     |
-| ce\_d | Data - 128 | octets The first |     |
-| ata\_ | bit UUID   | 16 octets        |     |
-| uuid1 |            | contain the 128  |     |
-| 28    |            | bit Service UUID |     |
-|       |            | followed by      |     |
-|       |            | additional       |     |
-|       |            | service data     |     |
-+-------+------------+------------------+-----+
-| uri   | Uniform    | Scheme name      |     |
-|       | Resource   | string and URI   |     |
-|       | Identifier | as a UTF-8       |     |
-|       | (URI)      | string           |     |
-+-------+------------+------------------+-----+
-| mfg\_ | Manufactur | Size: 2 or more  |     |
-| data  | er         | octets The first |     |
-|       | Specific   | 2 octets contain |     |
-|       | data       | the Company      |     |
-|       |            | Identifier Code  |     |
-|       |            | followed by      |     |
-|       |            | additional       |     |
-|       |            | manufacturer     |     |
-|       |            | specific data    |     |
-+-------+------------+------------------+-----+
-| eddys |            |                  |     |
-| tone\ |            |                  |     |
-| _url  |            |                  |     |
-+-------+------------+------------------+-----+
-
-
++---------------------------+-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+----------------------------------------------+
+| **Name**                  | **Definition**                                      | **Details**                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               | **btshell Notes**                            |
++===========================+=====================================================+===========================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================+==============================================+
+| flags                     | Indicates basic information about the advertiser.   | Flags used over the LE physical channel are: \* Limited Discoverable Mode \* General Discoverable Mode \* BR/EDR Not Supported \* Simultaneous LE and BR/EDR to Same Device Capable (Controller) \* Simultaneous LE and BR/EDR to Same Device Capable (Host)                                                                                                                                                                                                                                                                                                                                                                                                                              | NimBLE will auto-calculate if set to 0.      |
++---------------------------+-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+----------------------------------------------+
+| uuid16                    | 16-bit Bluetooth Service UUIDs                      | Indicates the Service UUID list is incomplete i.e. more 16-bit Service UUIDs available. 16 bit UUIDs shall only be used if they are assigned by the Bluetooth SIG.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        | Set repeatedly for multiple service UUIDs.   |
++---------------------------+-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+----------------------------------------------+
+| uuid16\_is\_complete      | 16-bit Bluetooth Service UUIDs                      | Indicates the Service UUID list is complete. 16 bit UUIDs shall only be used if they are assigned by the Bluetooth SIG.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   |                                              |
++---------------------------+-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+----------------------------------------------+
+| uuid32                    | 32-bit Bluetooth Service UUIDs                      | Indicates the Service UUID list is incomplete i.e. more 32-bit Service UUIDs available. 32 bit UUIDs shall only be used if they are assigned by the Bluetooth SIG.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        | Set repeatedly for multiple service UUIDs.   |
++---------------------------+-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+----------------------------------------------+
+| uuid32\_is\_complete      | 32-bit Bluetooth Service UUIDs                      | Indicates the Service UUID list is complete. 32 bit UUIDs shall only be used if they are assigned by the Bluetooth SIG.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   |                                              |
++---------------------------+-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+----------------------------------------------+
+| uuid128                   | Global 128-bit Service UUIDs                        | More 128-bit Service UUIDs available.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     | Set repeatedly for multiple service UUIDs.   |
++---------------------------+-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+----------------------------------------------+
+| uuid128\_is\_complete     | Global 128-bit Service UUIDs                        | Complete list of 128-bit Service UUIDs                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    |                                              |
++---------------------------+-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+----------------------------------------------+
+| tx\_power\_level          | TX Power Level                                      | Indicates the transmitted power level of the packet containing the data type. The TX Power Level data type may be used to calculate path loss on a received packet using the following equation: pathloss = Tx Power Level ? RSSI where ?RSSI? is the received signal strength, in dBm, of the packet received.                                                                                                                                                                                                                                                                                                                                                                           | NimBLE will auto-calculate if set to -128.   |
++---------------------------+-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+----------------------------------------------+
+| slave\_interval\_range    | Slave Connection Interval Range                     | Contains the Peripheral?s preferred connection interval range, for all logical connections. Size: 4 Octets . The first 2 octets defines the minimum value for the connection interval in the following manner: connIntervalmin = Conn\_Interval\_Min \* 1.25 ms Conn\_Interval\_Min range: 0x0006 to 0x0C80 Value of 0xFFFF indicates no specific minimum. The other 2 octets defines the maximum value for the connection interval in the following manner: connIntervalmax = Conn\_Interval\_Max \* 1.25 ms Conn\_Interval\_Max range: 0x0006 to 0x0C80 Conn\_Interval\_Max shall be equal to or greater than the Conn\_Interval\_Min. Value of 0xFFFF indicates no specific maximum.   |                                              |
++---------------------------+-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+----------------------------------------------+
+| service\_data\_uuid16     | Service Data - 16 bit UUID                          | Size: 2 or more octets The first 2 octets contain the 16 bit Service UUID followed by additional service data                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             |                                              |
++---------------------------+-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+----------------------------------------------+
+| public\_target\_address   | Public Target Address                               | Defines the address of one or more intended recipients of an advertisement when one or more devices were bonded using a public address. This data type shall exist only once. It may be sent in either the Advertising or Scan Response data, but not both.                                                                                                                                                                                                                                                                                                                                                                                                                               |                                              |
++---------------------------+-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+----------------------------------------------+
+| appearance                | Appearance                                          | Defines the external appearance of the device. The Appearance data type shall exist only once. It may be sent in either the Advertising or Scan Response data, but not both.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              |                                              |
++---------------------------+-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+----------------------------------------------+
+| advertising\_interval     | Advertising Interval                                | Contains the advInterval value as defined in the Core specification, Volume 6, Part B, Section 4.4.2.2.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   |                                              |
++---------------------------+-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+----------------------------------------------+
+| service\_data\_uuid32     | Service Data - 32 bit UUID                          | Size: 4 or more octets The first 4 octets contain the 32 bit Service UUID followed by additional service data                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             |                                              |
++---------------------------+-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+----------------------------------------------+
+| service\_data\_uuid128    | Service Data - 128 bit UUID                         | Size: 16 or more octets The first 16 octets contain the 128 bit Service UUID followed by additional service data                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          |                                              |
++---------------------------+-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+----------------------------------------------+
+| uri                       | Uniform Resource Identifier (URI)                   | Scheme name string and URI as a UTF-8 string                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              |                                              |
++---------------------------+-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+----------------------------------------------+
+| mfg\_data                 | Manufacturer Specific data                          | Size: 2 or more octets The first 2 octets contain the Company Identifier Code followed by additional manufacturer specific data                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           |                                              |
++---------------------------+-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+----------------------------------------------+
+| eddystone\_url            |                                                     |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           |                                              |
++---------------------------+-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+----------------------------------------------+
diff --git a/docs/network/ble/btshell/btshell_api.rst b/docs/network/ble/btshell/btshell_api.rst
index a4c6ae229..49605bf41 100644
--- a/docs/network/ble/btshell/btshell_api.rst
+++ b/docs/network/ble/btshell/btshell_api.rst
@@ -1,20 +1,30 @@
 API for btshell app
 -------------------
 
-"btshell" is one of the sample applications that come with Mynewt. It is
-a shell application which provides a basic interface to the host-side of
-the BLE stack. "btshell" includes all the possible roles
-(Central/Peripheral) and they may be run simultaneously. You can run
-btshell on a board and issue commands that make it behave as a central
-or a peripheral with different peers.
+"btshell" is one of the sample applications that come with Mynewt. It is a shell application which provides a basic
+interface to the host-side of the BLE stack. "btshell" includes all the possible roles (Central/Peripheral) and they may
+be run simultaneously. You can run btshell on a board and issue commands that make it behave as a central or a peripheral
+with different peers.
 
-"btshell" is a new application that uses Mynewt 1.1 shell features and
-has updated command and parameter names.
+**btshell** is a new application that uses shell subsystem introduced in Mynewt 1.1 and has updated commands and
+parameters names. Thanks to support for tab completion commands names are more descriptive and self-explanatory
+without requiring extensive typing.
 
-Highlighted below are some of the ways you can use the API to establish
-connections and discover services and characteristics from peer devices.
-For descriptions of the full API, go to the next sections on `GAP in
-btshell <btshell_GAP.html>`__ and `GATT in btshell <btshell_GATT.html>`__.
+Highlighted below are some of the ways you can use the API to establish connections and discover services and
+characteristics from peer devices. For descriptions of the full API, go to the next sections on
+:doc:`btshell_GAP` and :doc:`btshell_GATT`.
+
+.. contents::
+   :local:
+   :depth: 2
+
+.. toctree::
+   :hidden:
+   :titlesonly:
+
+   GAP <btshell_GAP>
+   GATT <btshell_GATT>
+   btshell_advdata
 
 Set device address.
 ~~~~~~~~~~~~~~~~~~~
@@ -24,8 +34,7 @@ On startup, btshell has the following identity address configuration:
 -  Public address: None
 -  Random address: None
 
-The below ``set`` commands can be used to change the address
-configuration:
+The below ``set`` commands can be used to change the address configuration:
 
 ::
 
@@ -39,8 +48,7 @@ For example:
     set addr_type=public addr=01:02:03:04:05:06
     set addr_type=random addr=c1:aa:bb:cc:dd:ee
 
-The address configuration can be viewed with the ``gatt-show-addr``
-command, as follows:
+The address configuration can be viewed with the ``gatt-show-addr`` command, as follows:
 
 ::
 
@@ -50,12 +58,12 @@ command, as follows:
 Initiate a direct connection to a device
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
-In this case, your board is acting as a central and initiating a
-connection with another BLE device. The example assumes you know the
-address of the peer, either by scanning for available peers or because
-you have set up the peer yourself.
+In this case, your board is acting as a central and initiating a connection with another BLE device. The example
+assumes you know the address of the peer, either by scanning for available peers or because you have set up the peer
+yourself.
 
-.. code:: hl_lines="1"
+.. code-block:: none
+    :emphasize-lines: 1
 
     connect peer_addr=d4:f5:13:53:d2:43
     connection established; handle=1 our_ota_addr_type=0 our_ota_addr=0a:0b:0c:0d:0e:0f out_id_addr_type=0 our_id_addr=0a:0b:0c:0d:0e:0f peer_addr_type=0 peer_addr=43:d2:53:13:f5:d4 conn_itvl=40 conn_latency=0 supervision_timeout=256 encrypted=0 authenticated=0 bonded=0
@@ -67,6 +75,14 @@ Configure advertisements to include device name
 
 In this case, your board is acting as a peripheral.
 
+With Extended Advertising enabled (should be executed after advertise-configure):
+
+::
+
+    advertise-set-adv-data name=<your-device-name>
+
+With Extended Advertising disabled:
+
 ::
 
     set-adv-data name=<your-device-name>
@@ -76,6 +92,15 @@ Begin sending undirected general advertisements
 
 In this case, your board is acting as a peripheral.
 
+With Extended Advertising enabled:
+
+::
+
+    advertise-configure connectable=1 legacy=1 scannable=1
+    advertise-start
+
+With Extended Advertising disabled:
+
 ::
 
     advertise conn=und discov=gen
@@ -90,10 +115,19 @@ Show established connections.
 Discover and display peer's services, characteristics, and descriptors.
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
-This is how you discover and then display the services of the peer you
-established earlier across connection-1.
+This is how you discover and then display the services of the peer you established earlier across connection-1.
+
+.. code-block:: none
+    :emphasize-lines: 1,2
+
+    gatt-discover-full conn=1
+    gatt-show
+    [ts=132425ssb, mod=64 level=2] CONNECTION: handle=1 addr=d4:f5:13:53:d2:43
+    [ts=132428ssb, mod=64 level=2]     start=1 end=5 uuid=0x1800
+    [ts=132433ssb, mod=64 level=2]     start=6 end=16 uuid=0x1808
+    [ts=132437ssb, mod=64 level=2]     start=17 end=31 uuid=0x180a
+    [ts=132441ssb, mod=64 level=2]     start=32 end=65535 uuid=00000000-0000-1000-1000000000000000
 
-``hl_lines="1 2" gatt-discover-full conn=1 gatt-show [ts=132425ssb, mod=64 level=2] CONNECTION: handle=1 addr=d4:f5:13:53:d2:43 [ts=132428ssb, mod=64 level=2]     start=1 end=5 uuid=0x1800 [ts=132433ssb, mod=64 level=2]     start=6 end=16 uuid=0x1808 [ts=132437ssb, mod=64 level=2]     start=17 end=31 uuid=0x180a [ts=132441ssb, mod=64 level=2]     start=32 end=65535 uuid=00000000-0000-1000-1000000000000000``
 
 Read an attribute belonging to the peer
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -112,8 +146,7 @@ Write to an attribute belonging to the peer
 Perform a passive scan
 ~~~~~~~~~~~~~~~~~~~~~~
 
-This is how you tell your board to listen to all advertisements around
-it. The duration is specified in ms.
+This is how you tell your board to listen to all advertisements around it. The duration is specified in ms.
 
 ::
 
diff --git a/docs/network/ble/mesh/index.rst b/docs/network/ble/mesh/index.rst
new file mode 100644
index 000000000..6ad75363f
--- /dev/null
+++ b/docs/network/ble/mesh/index.rst
@@ -0,0 +1,95 @@
+Bluetooth Mesh
+--------------
+
+.. toctree::
+   :hidden:
+   :titlesonly:
+
+   sample
+
+.. contents::
+   :local:
+   :depth: 2
+
+Introduction to Mesh
+~~~~~~~~~~~~~~~~~~~~
+
+Bluetooth Mesh is a new standard from Bluetooth SIG that was released in 2017. It enables many-to-many device
+communication (as opposed to point-to-point approach in BLE) and is optimised for large-scale networks like building
+automation or sensors network. It utilizes managed flood based approach where only mains-powered nodes relay messages
+making it very power efficient (battery powered low-power nodes that don't relay messages can operate in mesh network for years).
+
+Bluetooth Mesh is complementary to Bluetooth specification and requires features from 4.0 release only. This allows
+deployment of networks using hardware already available on the market.
+
+Topology
+~~~~~~~~
+
+.. figure:: mesh_topology.jpg
+   :alt: Bluetooth Mesh Topology (source: Mesh Profile Specification 1.0)
+
+Bluetooth Mesh defines few features (roles) for devices in network. Those are:
+
+-  Relay - receive and retransmit mesh messages over the advertising bearer to enable larger networks
+-  Proxy - receive and retransmit mesh messages between GATT and advertising bearers.
+-  Low Power - operate within a mesh network at significantly reduced receiver duty cycles only in conjunction with a
+   node supporting the Friend feature
+-  Friend - the ability to help a node supporting the Low Power feature to operate by storing messages destined for those nodes
+
+Bearers
+~~~~~~~
+
+Mesh Profile specification allows two kinds of bearers for transmitting data:
+
+-  Advertising Bearer
+
+   -  Uses LE advertising to broadcast messages to all nodes that are listening at this time
+   -  Uses non-connectable advertising only
+   -  29 octets of network message
+
+-  GATT Bearer
+
+   -  Uses LE Connections to send messages
+   -  Uses standard GATT service (one for Provisioning and one for Proxy)
+
+Provisioning
+~~~~~~~~~~~~
+
+Provisioning is a process of adding an unprovisioned device to a mesh network managed by a Provisioner. A Provisioner
+provides the unprovisioned device with provisioning data that allows it to become a mesh node (network key, current IV
+index and unicast address). A Provisioner is typically a smart phone or other mobile computing device.
+
+Models
+~~~~~~
+
+Models define basic functionality of nodes on a mesh network. Mesh Profile Specification defines foundation models used
+to configure and manage network. Mesh Model Specification includes models defininig functionality that is standard
+across device types. Those consists of:
+
+-  Generics - root models
+
+   -  On/Off
+   -  Level
+   -  Battery Server
+   -  Location
+   -  Client Property
+   -  and others
+
+-  Sensors - defines a standard way of interfacing with sensors
+-  Time and Scenes - defines a set of functionalities related to time and saved states on devices
+-  Lighting - defines a set functionalities related to lighting control
+
+Complex models e.g. Lighting may contain other models eg Generic On/Off. The following image shows an example of Light
+Lightness Server Model.
+
+.. figure:: mesh_lightning_model.jpg
+   :alt: Light Lightness Server model (source: Mesh Model Specification 1.0)
+
+Mesh Node features supported by Apache Mynewt
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+-  Advertising and GATT bearers
+-  PB-GATT and PB-ADV provisioning
+-  Foundation Models (server role)
+-  Relay support
+-  GATT Proxy
diff --git a/docs/network/ble/mesh/mesh_lightning_model.jpg b/docs/network/ble/mesh/mesh_lightning_model.jpg
new file mode 100644
index 000000000..4c62e057b
Binary files /dev/null and b/docs/network/ble/mesh/mesh_lightning_model.jpg differ
diff --git a/docs/network/ble/mesh/mesh_topology.jpg b/docs/network/ble/mesh/mesh_topology.jpg
new file mode 100644
index 000000000..57ba3f98f
Binary files /dev/null and b/docs/network/ble/mesh/mesh_topology.jpg differ
diff --git a/docs/network/ble/mesh/sample.rst b/docs/network/ble/mesh/sample.rst
new file mode 100644
index 000000000..79a67ce41
--- /dev/null
+++ b/docs/network/ble/mesh/sample.rst
@@ -0,0 +1,30 @@
+Sample application
+------------------
+
+**blemesh** sample application implements Bluetooth Mesh node that supports On/Off and Level models.
+
+To build application use following target. Note that since this application uses Non-resolvable Private Address there is
+no need for configuring public address.
+
+::
+
+    newt target create blemesh
+    newt target set blemesh app=@apache-mynewt-core/apps/blemesh
+    newt target set blemesh bsp=@apache-mynewt-core/hw/bsp/nrf52840pdk
+    newt target set blemesh build_profile=optimized
+    newt target set blemesh syscfg=BLE_MESH_PB_GATT=1:BLE_MESH_DEV_UUID='(uint8_t[16]){0x22, 0x20, 0}'
+
+Every device should have unique Device UUID so config amend and rebuild is needed for each of the devices that will be
+added to a network.
+
+::
+
+    newt target set blemesh syscfg=BLE_MESH_PB_GATT=1:BLE_MESH_DEV_UUID='(uint8_t[16]){0x22, 0x21, 0}'
+    ...
+    newt target set blemesh syscfg=BLE_MESH_PB_GATT=1:BLE_MESH_DEV_UUID='(uint8_t[16]){0x22, 0x22, 0}'
+    ...
+    newt target set blemesh syscfg=BLE_MESH_PB_GATT=1:BLE_MESH_DEV_UUID='(uint8_t[16]){0x22, 0x23, 0}'
+
+GATT bearer is enabled so that it is possible to provision those with Bluetooth Mesh application from Silicon Labs
+(available `here <https://play.google.com/store/apps/details?id=com.siliconlabs.bluetoothmesh>`__) which doesn't
+support advertising bearer.


 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services