Repository: incubator-mynewt-site
Updated Branches:
  refs/heads/develop 53bbfbbc9 -> d2def2645


http://git-wip-us.apache.org/repos/asf/incubator-mynewt-site/blob/e0b9d12e/docs/network/ble/ble_hs/ble_hs_id/functions/ble_hs_id_gen_rnd.md
----------------------------------------------------------------------
diff --git a/docs/network/ble/ble_hs/ble_hs_id/functions/ble_hs_id_gen_rnd.md 
b/docs/network/ble/ble_hs/ble_hs_id/functions/ble_hs_id_gen_rnd.md
new file mode 100644
index 0000000..754ddad
--- /dev/null
+++ b/docs/network/ble/ble_hs/ble_hs_id/functions/ble_hs_id_gen_rnd.md
@@ -0,0 +1,24 @@
+## <font color="#F2853F" style="font-size:24pt">ble\_hs\_id\_gen\_rnd</font>
+
+```c
+int
+ble_hs_id_gen_rnd(int nrpa, uint8_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. |
+| [BLE host core return code](../../ble_hs_return_codes/#return-codes-core) | 
Unexpected error. |

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-site/blob/e0b9d12e/docs/network/ble/ble_hs/ble_hs_id/functions/ble_hs_id_set_rnd.md
----------------------------------------------------------------------
diff --git a/docs/network/ble/ble_hs/ble_hs_id/functions/ble_hs_id_set_rnd.md 
b/docs/network/ble/ble_hs/ble_hs_id/functions/ble_hs_id_set_rnd.md
new file mode 100644
index 0000000..61fb25b
--- /dev/null
+++ b/docs/network/ble/ble_hs/ble_hs_id/functions/ble_hs_id_set_rnd.md
@@ -0,0 +1,23 @@
+## <font color="#F2853F" style="font-size:24pt">ble\_hs\_id\_set\_rnd</font>
+
+```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. |
+| [BLE host core return code](../../ble_hs_return_codes/#return-codes-core) | 
Unexpected error. |

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-site/blob/e0b9d12e/docs/network/ble/ble_hs/ble_hs_return_codes.md
----------------------------------------------------------------------
diff --git a/docs/network/ble/ble_hs/ble_hs_return_codes.md 
b/docs/network/ble/ble_hs/ble_hs_return_codes.md
new file mode 100644
index 0000000..9730f04
--- /dev/null
+++ b/docs/network/ble/ble_hs/ble_hs_return_codes.md
@@ -0,0 +1,290 @@
+## <font color="F2853F" style="font-size:24pt">NimBLE Host Return Codes</font>
+
+* [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))
+
+### 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 | Notes|
+|-----|-------------|
+| 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 signalling 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 |
+|-------|---------|
+| ATT   | Invalid handle. |
+| HCI   | Unknown HCI command. |
+| L2CAP | Signalling MTU exceeded. |
+| 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.
+
+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 |
+|-------|-----------------|-------------------|
+| BLE\_HS\_ATT\_ERR() | ATT | 0x100 |
+| BLE\_HS\_HCI\_ERR() | HCI | 0x200 |
+| BLE\_HS\_L2C\_ERR() | L2CAP | 0x300 |
+| BLE\_HS\_SM\_US\_ERR() | Security manager (us) | 0x400 |
+| BLE\_HS\_SM\_PEER\_ERR() | Security manager (peer) | 0x500 |
+
+#### 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.
+
+```c
+void
+encrypt_connection(uint16_t conn_handle)
+{
+    int rc;
+
+    /* Perform a blocking GAP encryption procedure. */
+    rc = my_blocking_enc_proc(conn_handle);
+    switch (rc) {
+    case 0:
+        console_printf("success - link successfully encrypted\n");
+        break;
+
+    case BLE_HS_ENOTCONN:
+        console_printf("failure - no connection with handle %d\n",
+                       conn_handle);
+        break;
+
+    case BLE_HS_ERR_SM_US_BASE(BLE_SM_ERR_CONFIRM_MISMATCH):
+        console_printf("failure - mismatch in peer's confirm and random "
+                       "commands.\n");
+        break;
+
+    case BLE_HS_ERR_SM_PEER_BASE(BLE_SM_ERR_CONFIRM_MISMATCH):
+        console_printf("failure - peer reports mismatch in our confirm and "
+                       "random commands.\n");
+        break;
+
+    default:
+        console_printf("failure - other error: 0x%04x\n", rc);
+        break;
+    }
+}
+```
+
+### Return Code Reference
+
+#### 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.
+
+```c
+#include "host/ble_hs.h"
+```
+
+| 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. |
+
+
+#### Return codes - ATT
+
+
+```c
+#include "host/ble_hs.h"
+#include "host/ble_att.h"
+```
+
+| 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
+
+
+```c
+#include "host/ble_hs.h"
+#include "nimble/ble.h"
+```
+
+| 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
+
+
+```c
+#include "host/ble_hs.h"
+#include "host/ble_l2cap.h"
+```
+
+| 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)
+
+
+```c
+#include "host/ble_hs.h"
+#include "host/ble_sm.h"
+```
+
+| 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)
+
+
+```c
+#include "host/ble_hs.h"
+#include "host/ble_sm.h"
+```
+
+| 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. |

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-site/blob/e0b9d12e/docs/network/ble/ble_hs/init/definitions/init_defs.md
----------------------------------------------------------------------
diff --git a/docs/network/ble/ble_hs/init/definitions/init_defs.md 
b/docs/network/ble/ble_hs/init/definitions/init_defs.md
new file mode 100644
index 0000000..99c4be8
--- /dev/null
+++ b/docs/network/ble/ble_hs/init/definitions/init_defs.md
@@ -0,0 +1,147 @@
+## <font color="#F2853F" style="font-size:24pt">Other definitions</font>
+
+```c
+/* Defines the IO capabilities for the local device. */
+#define BLE_HS_IO_DISPLAY_ONLY              0x00
+#define BLE_HS_IO_DISPLAY_YESNO             0x01
+#define BLE_HS_IO_KEYBOARD_ONLY             0x02
+#define BLE_HS_IO_NO_INPUT_OUTPUT           0x03
+#define BLE_HS_IO_KEYBOARD_DISPLAY          0x04
+```
+
+```c
+struct ble_hs_cfg {
+    /*** HCI settings. */
+    /**
+     * An HCI buffer is a "flat" 260-byte buffer.  HCI buffers are used by the
+     * controller to send unsolicited events to the host.
+     *
+     * HCI buffers can get tied up when the controller sends lots of
+     * asynchronous / unsolicited events (i.e., non-acks).  When the controller
+     * needs to send one of these events, it allocates an HCI buffer, fills it
+     * with the event payload, and puts it on a host queue.  If the controller
+     * sends a quick burst of these events, the buffer pool may be exhausted,
+     * preventing the host from sending an HCI command to the controller.
+     *
+     * Every time the controller sends a non-ack HCI event to the host, it also
+     * allocates an OS event (it is unfortunate that these are both called
+     * "events").  The OS event is put on the host-parent-task's event queue;
+     * it is what wakes up the host-parent-task and indicates that an HCI event
+     * needs to be processsed.  The pool of OS events is allocated with the
+     * same number of elements as the HCI buffer pool.
+     */
+    uint8_t max_hci_bufs;
+
+    /*** Connection settings. */
+    /**
+     * The maximum number of concurrent connections.  This is set
+     * automatically according to the build-time option
+     * NIMBLE_OPT_MAX_CONNECTIONS.
+     */
+    uint8_t max_connections;
+
+    /*** GATT server settings. */
+    /**
+     * These are acquired at service registration time and never freed.  You
+     * need one of these for every service that you register.
+     */
+    uint16_t max_services;
+
+    /**
+     * The total number of in-RAM client characteristic configuration
+     * descriptors (CCCDs).  One of these is consumed each time a peer
+     * subscribes to notifications or indications for a characteristic that
+     * your device serves.  In addition, at service registration time, the host
+     * uses one of these for each characteristic that supports notifications or
+     * indications.  So, the formula which guarantees no resource exhaustion
+     * is:
+     *     (num-subscribable-characteristics) * (max-connections + 1)
+     */
+    uint16_t max_client_configs;
+
+    /*** GATT client settings. */
+    /**
+     * The maximum number of concurrent GATT client procedures.  When you
+     * initiate a GATT procedure (e.g., read a characteristic, discover
+     * services, etc.), one of these is consumed.  The resource is freed when
+     * the procedure completes.
+     */
+    uint8_t max_gattc_procs;
+
+    /*** ATT server settings. */
+    /**
+     * The total number of local ATT attributes.  Attributes are consumed at
+     * service registration time and are never freed.  Attributes are used by
+     * GATT server entities: services, characteristics, and descriptors
+     * according to the following formula:
+     *     (num-services + (num-characteristics * 2) + num-descriptors)
+     *
+     * Every characteristic that supports indications or notifications
+     * automatically gets a descriptor.  All other descriptors are specified by
+     * the application at service registration time.
+     */
+    uint16_t max_attrs;
+
+    /**
+     * A GATT server uses these when a peer performs a "write long
+     * characteristic values" or "write long characteristic descriptors"
+     * procedure.  One of these resources is consumed each time a peer sends a
+     * partial write.  These procedures are not used often.
+     */
+    uint8_t max_prep_entries;
+
+    /*** L2CAP settings. */
+    /**
+     * Each connection requires three L2CAP channels (signal, ATT, and security
+     * manager).  In addition, the nimble host may allow channels to be created
+     * "on the fly" (connection-oriented channels).  This functionality is not
+     * available at the moment, so a safe formula to use is:
+     *     (max-connections * 3)
+     */
+    uint8_t max_l2cap_chans;
+
+    /**
+     * The maximum number of concurrent L2CAP signalling procedures.  Only one
+     * L2CAP signalling procedure is supported: slave-initiated connection
+     * update.  You will never need more of these than the max number of
+     * connections.
+     */
+    uint8_t max_l2cap_sig_procs;
+
+    /**
+     * The maximum number of concurrent security manager procedures.  Security
+     * manager procedures include pairing and restoration of a bonded link.
+     */
+    uint8_t max_l2cap_sm_procs;
+
+    /*** Security manager settings. */
+    uint8_t sm_io_cap;
+    unsigned sm_oob_data_flag:1;
+    unsigned sm_bonding:1;
+    unsigned sm_mitm:1;
+    unsigned sm_sc:1;
+    unsigned sm_keypress:1;
+    uint8_t sm_our_key_dist;
+    uint8_t sm_their_key_dist;
+
+    /*** Store settings. */
+    /**
+     * These function callbacks handle persistence of sercurity material
+     * (bonding).
+     */
+    ble_store_read_fn *store_read_cb;
+    ble_store_write_fn *store_write_cb;
+    ble_store_delete_fn *store_delete_cb;
+
+    /*** privacy settings */
+    /**
+     * The frequency at which new resovlable private addresses are generated.
+     * Units are seconds.
+     */
+    uint16_t rpa_timeout;
+};
+```
+
+```c
+extern const struct ble_hs_cfg ble_hs_cfg_dflt;
+```

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-site/blob/e0b9d12e/docs/network/ble/ble_hs/init/functions/ble_hs_init.md
----------------------------------------------------------------------
diff --git a/docs/network/ble/ble_hs/init/functions/ble_hs_init.md 
b/docs/network/ble/ble_hs/init/functions/ble_hs_init.md
new file mode 100644
index 0000000..5c34ee0
--- /dev/null
+++ b/docs/network/ble/ble_hs/init/functions/ble_hs_init.md
@@ -0,0 +1,24 @@
+## <font color="#F2853F" style="font-size:24pt">ble\_hs\_init</font>
+
+```c
+int
+ble_hs_init(struct os_eventq *app_evq, struct ble_hs_cfg *cfg)
+```
+
+### Description
+
+Initializes the NimBLE host.  This function must be called before the OS is 
started.  The NimBLE stack requires an application task to function.  One 
application task in particular is designated as the "host parent task".  In 
addition to application-specific work, the host parent task does work for 
NimBLE by processing events generated by the host. 
+
+### Parameters
+
+| *Parameter* | *Description* |
+|-------------|---------------|
+| app\_evq | The event queue associated with the host parent task. |
+| cfg | The set of configuration settings to initialize the host with.  
Specify null for defaults. |
+
+### Returned values
+
+| *Value* | *Condition* |
+|---------|-------------|
+| 0 | Success. |
+| [BLE host core return code](../../ble_hs_return_codes/#return-codes-core) | 
Unexpected error. |

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-site/blob/e0b9d12e/docs/network/ble/ble_hs/init/functions/ble_hs_start.md
----------------------------------------------------------------------
diff --git a/docs/network/ble/ble_hs/init/functions/ble_hs_start.md 
b/docs/network/ble/ble_hs/init/functions/ble_hs_start.md
new file mode 100644
index 0000000..8cc860a
--- /dev/null
+++ b/docs/network/ble/ble_hs/init/functions/ble_hs_start.md
@@ -0,0 +1,21 @@
+## <font color="#F2853F" style="font-size:24pt">ble\_hs\_start</font>
+
+```c
+int
+ble_hs_start(void)
+```
+
+### Description
+
+Synchronizes the host with the controller by sending a sequence of HCI 
commands.  This function must be called before any other host functionality is 
used, but it must be called after both the host and controller are initialized. 
 Typically, the host-parent-task calls this function at the top of its task 
routine. 
+
+### Parameters
+
+None
+
+### Returned values
+
+| *Value* | *Condition* |
+|---------|-------------|
+| 0 | Success. |
+| [BLE host core return code](../../ble_hs_return_codes/#return-codes-core) | 
Unexpected error. |

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-site/blob/e0b9d12e/docs/network/ble/ble_hs/init/init.md
----------------------------------------------------------------------
diff --git a/docs/network/ble/ble_hs/init/init.md 
b/docs/network/ble/ble_hs/init/init.md
new file mode 100644
index 0000000..7fbe6bc
--- /dev/null
+++ b/docs/network/ble/ble_hs/init/init.md
@@ -0,0 +1,22 @@
+## <font color="F2853F" style="font-size:24pt">NimBLE Host Init and Config 
Reference</font>
+
+### Introduction
+
+This section is a reference on initializing and configuring the NimBLE host.
+
+### Header
+
+```c
+#include "host/ble_hs.h"
+```
+
+### Definitions
+
+[BLE host init and config definitions](definitions/init_defs.md)
+
+### Functions
+
+| Function | Description |
+|----------|-------------|
+| [ble_hs_init](functions/ble_hs_init.md) | Initializes the NimBLE host. |
+| [ble_hs_start](functions/ble_hs_start.md) | Synchronizes the host with the 
controller by sending a sequence of HCI commands. |

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-site/blob/e0b9d12e/docs/network/ble/ble_hs/other/functions/ble_eddystone_set_adv_data_uid.md
----------------------------------------------------------------------
diff --git 
a/docs/network/ble/ble_hs/other/functions/ble_eddystone_set_adv_data_uid.md 
b/docs/network/ble/ble_hs/other/functions/ble_eddystone_set_adv_data_uid.md
new file mode 100644
index 0000000..d96952b
--- /dev/null
+++ b/docs/network/ble/ble_hs/other/functions/ble_eddystone_set_adv_data_uid.md
@@ -0,0 +1,26 @@
+## <font color="#F2853F" 
style="font-size:24pt">ble\_eddystone\_set\_adv\_data\_uid</font>
+
+```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\_EBUSY | Advertising is in progress. |
+| BLE\_HS\_EMSGSIZE | The specified data is too large to fit in an 
advertisement. |
+| [BLE host core return code](../../ble_hs_return_codes/#return-codes-core) | 
Unexpected error. |

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-site/blob/e0b9d12e/docs/network/ble/ble_hs/other/functions/ble_eddystone_set_adv_data_url.md
----------------------------------------------------------------------
diff --git 
a/docs/network/ble/ble_hs/other/functions/ble_eddystone_set_adv_data_url.md 
b/docs/network/ble/ble_hs/other/functions/ble_eddystone_set_adv_data_url.md
new file mode 100644
index 0000000..f522ccb
--- /dev/null
+++ b/docs/network/ble/ble_hs/other/functions/ble_eddystone_set_adv_data_url.md
@@ -0,0 +1,31 @@
+## <font color="#F2853F" 
style="font-size:24pt">ble\_eddystone\_set\_adv\_data\_url</font>
+
+```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\_NONE if the suffix is embedded in the 
body argument. |
+
+### Returned values
+
+| *Value* | *Condition* |
+|---------|-------------|
+| 0 | Success. |
+| BLE\_HS\_EBUSY | Advertising is in progress. |
+| BLE\_HS\_EMSGSIZE | The specified data is too large to fit in an 
advertisement. |
+| [BLE host core return code](../../ble_hs_return_codes/#return-codes-core) | 
Unexpected error. |

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-site/blob/e0b9d12e/docs/network/ble/ble_hs/other/functions/ble_ibeacon_set_adv_data.md
----------------------------------------------------------------------
diff --git 
a/docs/network/ble/ble_hs/other/functions/ble_ibeacon_set_adv_data.md 
b/docs/network/ble/ble_hs/other/functions/ble_ibeacon_set_adv_data.md
new file mode 100644
index 0000000..df002b2
--- /dev/null
+++ b/docs/network/ble/ble_hs/other/functions/ble_ibeacon_set_adv_data.md
@@ -0,0 +1,26 @@
+## <font color="#F2853F" 
style="font-size:24pt">ble\_ibeacon\_set\_adv\_data</font>
+
+```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. |
+| [BLE host core return code](../../ble_hs_return_codes/#return-codes-core) | 
Unexpected error. |

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-site/blob/e0b9d12e/docs/network/ble/ble_hs/other/functions/ble_uuid_128_to_16.md
----------------------------------------------------------------------
diff --git a/docs/network/ble/ble_hs/other/functions/ble_uuid_128_to_16.md 
b/docs/network/ble/ble_hs/other/functions/ble_uuid_128_to_16.md
new file mode 100644
index 0000000..bcbf0a0
--- /dev/null
+++ b/docs/network/ble/ble_hs/other/functions/ble_uuid_128_to_16.md
@@ -0,0 +1,23 @@
+## <font color="#F2853F" style="font-size:24pt">ble\_uuid\_128\_to\_16</font>
+
+```c
+uint16_t
+ble_uuid_128_to_16(const void *uuid128)
+```
+
+### Description
+
+Attempts to convert the supplied 128-bit UUID into its shortened 16-bit form. 
+
+### Parameters
+
+| *Parameter* | *Description* |
+|-------------|---------------|
+| uuid128 | The 128-bit UUID to attempt to convert. This must point to 16 
contiguous bytes. |
+
+### Returned values
+
+| *Value* | *Condition* |
+|---------|-------------|
+| other | Positive 16-bit unsigned integer on success. |
+| 0 | The uuid cannot be represented in 16 bits. |

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-site/blob/e0b9d12e/docs/network/ble/ble_hs/other/functions/ble_uuid_16_to_128.md
----------------------------------------------------------------------
diff --git a/docs/network/ble/ble_hs/other/functions/ble_uuid_16_to_128.md 
b/docs/network/ble/ble_hs/other/functions/ble_uuid_16_to_128.md
new file mode 100644
index 0000000..64b6165
--- /dev/null
+++ b/docs/network/ble/ble_hs/other/functions/ble_uuid_16_to_128.md
@@ -0,0 +1,24 @@
+## <font color="#F2853F" style="font-size:24pt">ble\_uuid\_16\_to\_128</font>
+
+```c
+int
+ble_uuid_16_to_128(uint16_t uuid16, void *out_uuid128)
+```
+
+### Description
+
+Expands a 16-bit UUID into its 128-bit form. 
+
+### Parameters
+
+| *Parameter* | *Description* |
+|-------------|---------------|
+| uuid16 | The 16-bit UUID to convert. |
+| out\_uuid128 | On success, the resulting 128-bit UUID gets written here. |
+
+### Returned values
+
+| *Value* | *Condition* |
+|---------|-------------|
+| 0 | Success. |
+| BLE\_HS\_EINVAL | Uuid16 is not a valid 16-bit uuid. |

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-site/blob/e0b9d12e/docs/network/ble/ble_hs/other/other.md
----------------------------------------------------------------------
diff --git a/docs/network/ble/ble_hs/other/other.md 
b/docs/network/ble/ble_hs/other/other.md
new file mode 100644
index 0000000..3b8315d
--- /dev/null
+++ b/docs/network/ble/ble_hs/other/other.md
@@ -0,0 +1,25 @@
+## <font color="F2853F" style="font-size:24pt">NimBLE Host Other 
Reference</font>
+
+### Introduction
+
+This section is a reference on miscellaneous parts of the NimBLE host which 
don't fit anywhere else!
+
+### Header
+
+```c
+#include "host/ble_hs.h"
+```
+
+### Definitions
+
+None.
+
+### Functions
+
+| Function | Description |
+|----------|-------------|
+| 
[ble_eddystone_set_adv_data_uid](functions/ble_eddystone_set_adv_data_uid.md) | 
Configures the device to advertise eddystone UID beacons. |
+| 
[ble_eddystone_set_adv_data_url](functions/ble_eddystone_set_adv_data_url.md) | 
Configures the device to advertise eddystone URL beacons. |
+| [ble_ibeacon_set_adv_data](functions/ble_ibeacon_set_adv_data.md) | 
Configures the device to advertise iBeacons. |
+| [ble_uuid_128_to_16](functions/ble_uuid_128_to_16.md) | Attempts to convert 
the supplied 128-bit UUID into its shortened 16-bit form. |
+| [ble_uuid_16_to_128](functions/ble_uuid_16_to_128.md) | Expands a 16-bit 
UUID into its 128-bit form. |

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-site/blob/e0b9d12e/mkdocs.yml
----------------------------------------------------------------------
diff --git a/mkdocs.yml b/mkdocs.yml
index c84550f..c24de92 100644
--- a/mkdocs.yml
+++ b/mkdocs.yml
@@ -347,6 +347,90 @@ pages:
             - 'Initialize controller': 
'network/ble/ini_stack/ble_controller_ini.md'
             - 'Initialize parent task': 
'network/ble/ini_stack/ble_parent_ini.md'
             - 'Initialize host': 'network/ble/ini_stack/ble_host_ini.md'
+        - NimBLE Host API:
+            - toc: 'network/ble/ble_hs/ble_hs.md'
+            - 'Return codes': 'network/ble/ble_hs/ble_hs_return_codes.md'
+
+            - 'Init and config':
+                - toc: 'network/ble/ble_hs/init/init.md'
+                - 'Definitions':
+                    - 'Init and config definitions': 
'network/ble/ble_hs/init/definitions/init_defs.md'
+                - 'Functions':
+                    - 'ble_hs_init': 
'network/ble/ble_hs/init/functions/ble_hs_init.md'
+                    - 'ble_hs_start': 
'network/ble/ble_hs/init/functions/ble_hs_start.md'
+
+            - '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_fields': 
'network/ble/ble_hs/ble_gap/functions/ble_gap_adv_rsp_set_fields.md'
+                    - 'ble_gap_adv_set_fields': 
'network/ble/ble_hs/ble_gap/functions/ble_gap_adv_set_fields.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_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_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'
+
+            - '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': 'network/ble/ble_hs/ble_gattc/ble_gattc.md'
+                    - '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_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_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_reliable': 
'network/ble/ble_hs/ble_gattc/functions/ble_gattc_write_reliable.md'
+
+            - '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_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'
+                    - 'ble_gatts_register_svcs': 
'network/ble/ble_hs/ble_gatts/functions/ble_gatts_register_svcs.md'
+
+            - '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_set_rnd': 
'network/ble/ble_hs/ble_hs_id/functions/ble_hs_id_set_rnd.md'
+                    - 'ble_hs_id_gen_rnd': 
'network/ble/ble_hs/ble_hs_id/functions/ble_hs_id_gen_rnd.md'
+
+            - '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_uuid_16_to_128': 
'network/ble/ble_hs/other/functions/ble_uuid_16_to_128.md'
+                    - 'ble_ibeacon_set_adv_data': 
'network/ble/ble_hs/other/functions/ble_ibeacon_set_adv_data.md'
+                    - 'ble_eddystone_set_adv_data_url': 
'network/ble/ble_hs/other/functions/ble_eddystone_set_adv_data_url.md'
+                    - 'ble_uuid_128_to_16': 
'network/ble/ble_hs/other/functions/ble_uuid_128_to_16.md'
+
         - API for bletiny app:
             - toc: 'network/ble/bletiny_api.md'
             - 'GAP in bletiny': 'network/ble/bletiny/bletiny_GAP.md'

Reply via email to