http://git-wip-us.apache.org/repos/asf/incubator-mynewt-site/blob/e98b0c12/develop/network/ble/ble_hs/ble_hs_id/functions/ble_hs_id_copy_addr/index.html
----------------------------------------------------------------------
diff --git 
a/develop/network/ble/ble_hs/ble_hs_id/functions/ble_hs_id_copy_addr/index.html 
b/develop/network/ble/ble_hs/ble_hs_id/functions/ble_hs_id_copy_addr/index.html
new file mode 100644
index 0000000..0019656
--- /dev/null
+++ 
b/develop/network/ble/ble_hs/ble_hs_id/functions/ble_hs_id_copy_addr/index.html
@@ -0,0 +1,618 @@
+<!DOCTYPE html>
+<html lang="en">
+    <head>
+        <meta charset="utf-8">
+        <meta http-equiv="X-UA-Compatible" content="IE=edge">
+        <meta name="viewport" content="width=device-width, initial-scale=1.0">
+        
+        
+        <link rel="canonical" 
href="http://mynewt.apache.org/network/ble/ble_hs/ble_hs_id/functions/ble_hs_id_copy_addr/";>
+        <link rel="shortcut icon" href="../../../../../../img/favicon.ico">
+
+       <title>ble_hs_id_copy_addr - Apache Mynewt</title>
+
+        <link href="../../../../../../css/bootstrap-3.0.3.min.css" 
rel="stylesheet">
+        <link href="../../../../../../css/font-awesome-4.0.3.css" 
rel="stylesheet">
+        <link rel="stylesheet" href="../../../../../../css/highlight.css">
+        <link href="../../../../../../css/base.css" rel="stylesheet">
+        <link href="../../../../../../css/custom.css" rel="stylesheet">
+        <link href="../../../../../../css/v2.css" rel="stylesheet">
+        <link 
href='https://fonts.googleapis.com/css?family=Roboto:400,500,700,900,300,100' 
rel='stylesheet' type='text/css'>
+        <link rel="stylesheet" 
href="https://maxcdn.bootstrapcdn.com/font-awesome/4.5.0/css/font-awesome.min.css";>
+        <link href="../../../../../../extra.css" rel="stylesheet">
+
+        <!-- HTML5 shim and Respond.js IE8 support of HTML5 elements and media 
queries -->
+        <!--[if lt IE 9]>
+            <script 
src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js";></script>
+            <script 
src="https://oss.maxcdn.com/libs/respond.js/1.3.0/respond.min.js";></script>
+        <![endif]-->
+
+        
+            <script>
+                
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
+                (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new 
Date();a=s.createElement(o),
+                
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
+                
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
+
+                ga('create', 'UA-72162311-1', 'auto');
+                ga('send', 'pageview');
+            </script>
+        
+    </head>
+
+
+    <body class="ble_hs_id_copy_addr">
+
+
+        
+
+
+
+
+
+
+<nav id="navbar" class="navbar navbar-inverse navbar-fixed-top" 
role="navigation">
+    <div class="container">
+        <!-- Collapsed navigation -->
+        <div class="navbar-header">
+            <!-- Expander button -->
+            <button type="button" class="navbar-toggle" data-toggle="collapse" 
data-target=".navbar-collapse">
+                <span class="sr-only">Toggle navigation</span>
+                <span class="icon-bar"></span>
+                <span class="icon-bar"></span>
+                <span class="icon-bar"></span>
+            </button>
+
+        </div>
+
+        <!-- Expanded navigation -->
+        <div class="navbar-collapse collapse">
+            <!-- Main navigation -->
+            <ul class="nav navbar-nav navbar-right">
+                <li 
+  class=""
+>
+                    <a href="/">Home</a>
+                </li>
+                <li 
+  class="important"
+>
+                    <a href="/quick-start/">Quick Start</a>
+                </li>
+                <li 
+  class=""
+>
+                    <a href="/about/">About</a>
+                </li>
+                <li 
+  class="active"
+>
+                    <a href="/latest/os/introduction">Documentation</a>
+                </li>
+                <li 
+  class=""
+>
+                    <a href="/download/">Download</a>
+                </li>
+                <li 
+  class=""
+>
+                    <a href="/community/">Community</a>
+                </li>
+                <li 
+  class=""
+>
+                    <a href="/events/">Events</a>
+                </li>
+            </ul>
+
+            <!-- Search, Navigation and Repo links -->
+            <ul class="nav navbar-nav navbar-right">
+                
+            </ul>
+        </div>
+    </div>
+</nav>
+
+        
+
+        <div class="container">
+            
+                <div class="row">
+                    <div class="col-md-3 v2-sidebar"><div id="docSidebar" 
class="hidden-print" role="complementary">
+    <div class="top">
+        <img class="hidden-xs hidden-sm logo-small" src="/img/logo.svg" 
alt="MyNewt" title="MyNewt">
+        <div role="search">
+            <form id="rtd-search-form" class="wy-form" 
action="../../../../../../search.html" method="get">
+                <div class="form-group">
+                    <input type="text" name="q" class="form-control" 
placeholder="Search documentation" />
+                </div>
+            </form>
+        </div>
+    </div>
+    <ul class="toc-nav">
+      <li class="doc-version">
+<select class="form-control" onchange="if (this.value) 
window.location.href=this.value">
+    
+    <option
+      value="/develop/os/introduction"
+      selected="selected"
+    >
+      Version: develop
+    </option>
+    
+    <option
+      value="/v0_9_0/os/introduction"
+      
+    >
+      Version: 0.9.0 (latest)
+    </option>
+    
+</select>
+</li>
+      
+        
+      
+        
+      
+        
+      
+        
+      
+        
+      
+        
+      
+        
+          
+  
+  
+    <li ><a href="../../../../../../os/introduction/">Mynewt Documentation</a>
+  
+  
+    <ul>
+          
+              
+          
+              
+                
+  
+  
+    <li ><a href="../../../../../../os/get_started/get_started/">Basic 
Setup</a>
+  
+  
+    </li>
+
+              
+          
+              
+                
+    <li >
+      <a href="../../../../../../os/get_started/vocabulary/">Concepts</a>
+    </li>
+
+              
+          
+              
+                
+  
+  
+    <li ><a href="../../../../../../os/tutorials/tutorials/">Tutorials</a>
+  
+  
+    </li>
+
+              
+          
+              
+                
+  
+  
+    <li ><a href="../../../../../../os/os_user_guide/">OS User Guide</a>
+  
+  
+    </li>
+
+              
+          
+              
+                
+  
+  
+    <li><a href="
+  ../../../../ble_intro/
+">BLE User Guide</a>
+  
+  
+    <ul>
+          
+              
+                
+    <li >
+      <a href="../../../../ble_intro/">NimBLE Introduction</a>
+    </li>
+
+              
+          
+              
+                
+    <li >
+      <a href="../../../../ble_sec/">NimBLE Security</a>
+    </li>
+
+              
+          
+              
+                
+    <li >
+      <a href="../../../../nimble_setup/">Set up application</a>
+    </li>
+
+              
+          
+              
+                
+  
+  
+    <li ><a href="../../../../ini_stack/ble_ini_intro/">Initialize stack</a>
+  
+  
+    </li>
+
+              
+          
+              
+                
+  
+  
+    <li ><a href="../../../ble_hs/">NimBLE Host API</a>
+  
+  
+    <ul>
+          
+              
+          
+              
+                
+    <li >
+      <a href="../../../ble_hs_return_codes/">Return codes</a>
+    </li>
+
+              
+          
+              
+                
+  
+  
+    <li ><a href="../../../init/init/">Init and config</a>
+  
+  
+    </li>
+
+              
+          
+              
+                
+  
+  
+    <li ><a href="../../../ble_gap/ble_gap/">GAP</a>
+  
+  
+    </li>
+
+              
+          
+              
+                
+  
+  
+    <li ><a href="../../../ble_gattc/ble_gattc/">GATT client</a>
+  
+  
+    </li>
+
+              
+          
+              
+                
+  
+  
+    <li ><a href="../../../ble_gatts/ble_gatts/">GATT server</a>
+  
+  
+    </li>
+
+              
+          
+              
+                
+  
+  
+    <li ><a href="../../ble_hs_id/">Identity</a>
+  
+  
+    <ul>
+          
+              
+          
+              
+                
+  
+  
+    <li><a href="
+  ./
+">Functions</a>
+  
+  
+    <ul>
+          
+              
+                
+    <li class="active">
+      <a href="./">ble_hs_id_copy_addr</a>
+    </li>
+
+              
+          
+              
+                
+    <li >
+      <a href="../ble_hs_id_set_rnd/">ble_hs_id_set_rnd</a>
+    </li>
+
+              
+          
+              
+                
+    <li >
+      <a href="../ble_hs_id_gen_rnd/">ble_hs_id_gen_rnd</a>
+    </li>
+
+              
+          
+    </ul>
+  
+    </li>
+
+              
+          
+    </ul>
+  
+    </li>
+
+              
+          
+              
+                
+  
+  
+    <li ><a href="../../../other/other/">Other</a>
+  
+  
+    </li>
+
+              
+          
+    </ul>
+  
+    </li>
+
+              
+          
+              
+                
+  
+  
+    <li ><a href="../../../../bletiny_api/">bletiny app Usage API</a>
+  
+  
+    </li>
+
+              
+          
+    </ul>
+  
+    </li>
+
+              
+          
+              
+                
+  
+  
+    <li ><a href="../../../../../../newt/newt_intro/">Newt Tool Guide</a>
+  
+  
+    </li>
+
+              
+          
+              
+                
+  
+  
+    <li ><a href="../../../../../../newtmgr/overview/">Newt Manager Guide</a>
+  
+  
+    </li>
+
+              
+          
+    </ul>
+  
+    </li>
+
+        
+      
+        
+          
+  
+  
+    <li><a href="
+  ../../../../../../faq/how_to_edit_docs/
+">Appendix</a>
+  
+  
+    </li>
+
+        
+      
+    </ul>
+</div></div>
+
+                    <div class="show-sidebar-container">
+                        <button class="show-sidebar">Docs Menu</button>
+                    </div>
+
+                    <div class="col-md-9" role="main">
+                        <div class="row doc-header">
+                            <div class="col-sm-12">
+                                <div role="navigation" aria-label="breadcrumbs 
navigation">
+  <ul class="wy-breadcrumbs pull-right">
+    <li><a href="/develop/os/introduction">Docs</a></li>
+    
+    
+        
+          <li>&raquo; <a href="../../ble_hs_id/">Identity</a></li>
+        
+      
+        
+          <li>&raquo; Functions</li>
+        
+      
+      
+        <li>&raquo; ble_hs_id_copy_addr</li>
+      
+    
+    
+  </ul>
+</div>
+                            </div>
+                        </div>
+                        
+                            <h2 id="ble95hs95id95copy95addr"><font 
color="#F2853F" style="font-size:24pt">ble_hs_id_copy_addr</font></h2>
+<div class="codehilite" style="background: #ffffff"><pre style="line-height: 
125%"><span style="color: #A90D91">int</span>
+<span style="color: #000000">ble_hs_id_copy_addr</span>(<span style="color: 
#A90D91">uint8_t</span> <span style="color: #000000">id_addr_type</span>, <span 
style="color: #A90D91">uint8_t</span> <span style="color: 
#000000">*out_id_addr</span>,
+                    <span style="color: #A90D91">int</span> <span 
style="color: #000000">*out_is_nrpa</span>)
+</pre></div>
+
+
+<h3 id="description">Description</h3>
+<p>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. </p>
+<h3 id="parameters">Parameters</h3>
+<table>
+<thead>
+<tr>
+<th><em>Parameter</em></th>
+<th><em>Description</em></th>
+</tr>
+</thead>
+<tbody>
+<tr>
+<td>id_addr_type</td>
+<td>The type of identity address to retrieve. Valid values are: 
<ul><li>BLE_ADDR_TYPE_PUBLIC</li> <li>BLE_ADDR_TYPE_RANDOM</li></ul></td>
+</tr>
+<tr>
+<td>out_id_addr</td>
+<td>On success, the requested identity address is copied into this buffer.  
The buffer must be at least six bytes in size.</td>
+</tr>
+<tr>
+<td>out_is_nrpa</td>
+<td>On success, the pointed-to value indicates whether the retrieved address 
is a non-resolvable private address.</td>
+</tr>
+</tbody>
+</table>
+<h3 id="returned-values">Returned values</h3>
+<table>
+<thead>
+<tr>
+<th><em>Value</em></th>
+<th><em>Condition</em></th>
+</tr>
+</thead>
+<tbody>
+<tr>
+<td>0</td>
+<td>Success.</td>
+</tr>
+<tr>
+<td>BLE_HS_EINVAL</td>
+<td>An invalid address type was specified.</td>
+</tr>
+<tr>
+<td>BLE_HS_ENOADDR</td>
+<td>The device does not have an identity address of the requested type.</td>
+</tr>
+<tr>
+<td>other</td>
+<td>Other ble host core code on error.</td>
+</tr>
+</tbody>
+</table>
+                        
+                        <div class="row">
+                            
+
+
+
+<ul class="nav nav-pills" style="margin-bottom: 10px">
+    <li>
+    
+    <a href=../../ble_hs_id/>
+        <span class="fa fa-arrow-left"></span>
+        Previous: Identity
+    </a>
+    
+    </li>
+    <li class="pull-right">
+    
+    <a href=../ble_hs_id_set_rnd/>
+        Next: ble_hs_id_set_rnd
+        <span class="fa fa-arrow-right"></span>
+    </a>
+    
+    </li>
+</ul>
+                        </div>
+                        <div class="row">
+                            <footer>
+    <div class="row">
+        <div class="col-md-12">
+            
+                <p class="copyright">Copyright &copy; 2015 The Apache Software 
Foundation, Licensed under the Apache License, Version 2.0 Apache and the 
Apache feather logo are trademarks of The Apache Software Foundation.<br>The 
Apache Software Foundation Apache Incubator</p>
+            
+        </div>
+    </div>
+    <div class="copyright-logos">
+        <div class="row">
+            <div class="col-xs-6 text-right">
+                <img src="/img/apache-feather.png" alt="Apache" title="Apache">
+            </div>
+            <div class="col-xs-6 text-left">
+                <img src="/img/apache-logo.png" alt="Apache Incubator" 
title="Apache Incubator">
+            </div>
+        </div>
+    </div>
+    <div class="row">
+        <div class="col-md-12">
+            <small class="footnote">
+                MyNewt is an effort undergoing incubation at The Apache 
Software Foundation (ASF), sponsored by the Apache Incubator. Incubation is 
required of all newly accepted projects until a further review indicates that 
the infrastructure, communications, and decision making process have stabilized 
in a manner consistent with other successful ASF projects. While incubation 
status is not necessarily a reflection of the completeness or stability of the 
code, it does indicate that the project has yet to be fully endorsed by the ASF.
+            </small>
+        </div>
+    </div>
+</footer>
+                        </div>
+                    </div>
+                </div>
+            
+            
+        </div>
+
+        <script src="../../../../../../js/jquery-1.10.2.min.js"></script>
+        <script src="../../../../../../js/bootstrap-3.0.3.min.js"></script>
+        <script src="../../../../../../js/highlight.pack.js"></script>
+        <script src="../../../../../../js/base.js"></script>
+        <script src="../../../../../../js/custom.js"></script>
+
+    </body>
+</html>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-site/blob/e98b0c12/develop/network/ble/ble_hs/ble_hs_id/functions/ble_hs_id_gen_rnd/index.html
----------------------------------------------------------------------
diff --git 
a/develop/network/ble/ble_hs/ble_hs_id/functions/ble_hs_id_gen_rnd/index.html 
b/develop/network/ble/ble_hs/ble_hs_id/functions/ble_hs_id_gen_rnd/index.html
new file mode 100644
index 0000000..c29baa9
--- /dev/null
+++ 
b/develop/network/ble/ble_hs/ble_hs_id/functions/ble_hs_id_gen_rnd/index.html
@@ -0,0 +1,605 @@
+<!DOCTYPE html>
+<html lang="en">
+    <head>
+        <meta charset="utf-8">
+        <meta http-equiv="X-UA-Compatible" content="IE=edge">
+        <meta name="viewport" content="width=device-width, initial-scale=1.0">
+        
+        
+        <link rel="canonical" 
href="http://mynewt.apache.org/network/ble/ble_hs/ble_hs_id/functions/ble_hs_id_gen_rnd/";>
+        <link rel="shortcut icon" href="../../../../../../img/favicon.ico">
+
+       <title>ble_hs_id_gen_rnd - Apache Mynewt</title>
+
+        <link href="../../../../../../css/bootstrap-3.0.3.min.css" 
rel="stylesheet">
+        <link href="../../../../../../css/font-awesome-4.0.3.css" 
rel="stylesheet">
+        <link rel="stylesheet" href="../../../../../../css/highlight.css">
+        <link href="../../../../../../css/base.css" rel="stylesheet">
+        <link href="../../../../../../css/custom.css" rel="stylesheet">
+        <link href="../../../../../../css/v2.css" rel="stylesheet">
+        <link 
href='https://fonts.googleapis.com/css?family=Roboto:400,500,700,900,300,100' 
rel='stylesheet' type='text/css'>
+        <link rel="stylesheet" 
href="https://maxcdn.bootstrapcdn.com/font-awesome/4.5.0/css/font-awesome.min.css";>
+        <link href="../../../../../../extra.css" rel="stylesheet">
+
+        <!-- HTML5 shim and Respond.js IE8 support of HTML5 elements and media 
queries -->
+        <!--[if lt IE 9]>
+            <script 
src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js";></script>
+            <script 
src="https://oss.maxcdn.com/libs/respond.js/1.3.0/respond.min.js";></script>
+        <![endif]-->
+
+        
+            <script>
+                
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
+                (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new 
Date();a=s.createElement(o),
+                
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
+                
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
+
+                ga('create', 'UA-72162311-1', 'auto');
+                ga('send', 'pageview');
+            </script>
+        
+    </head>
+
+
+    <body class="ble_hs_id_gen_rnd">
+
+
+        
+
+
+
+
+
+
+<nav id="navbar" class="navbar navbar-inverse navbar-fixed-top" 
role="navigation">
+    <div class="container">
+        <!-- Collapsed navigation -->
+        <div class="navbar-header">
+            <!-- Expander button -->
+            <button type="button" class="navbar-toggle" data-toggle="collapse" 
data-target=".navbar-collapse">
+                <span class="sr-only">Toggle navigation</span>
+                <span class="icon-bar"></span>
+                <span class="icon-bar"></span>
+                <span class="icon-bar"></span>
+            </button>
+
+        </div>
+
+        <!-- Expanded navigation -->
+        <div class="navbar-collapse collapse">
+            <!-- Main navigation -->
+            <ul class="nav navbar-nav navbar-right">
+                <li 
+  class=""
+>
+                    <a href="/">Home</a>
+                </li>
+                <li 
+  class="important"
+>
+                    <a href="/quick-start/">Quick Start</a>
+                </li>
+                <li 
+  class=""
+>
+                    <a href="/about/">About</a>
+                </li>
+                <li 
+  class="active"
+>
+                    <a href="/latest/os/introduction">Documentation</a>
+                </li>
+                <li 
+  class=""
+>
+                    <a href="/download/">Download</a>
+                </li>
+                <li 
+  class=""
+>
+                    <a href="/community/">Community</a>
+                </li>
+                <li 
+  class=""
+>
+                    <a href="/events/">Events</a>
+                </li>
+            </ul>
+
+            <!-- Search, Navigation and Repo links -->
+            <ul class="nav navbar-nav navbar-right">
+                
+            </ul>
+        </div>
+    </div>
+</nav>
+
+        
+
+        <div class="container">
+            
+                <div class="row">
+                    <div class="col-md-3 v2-sidebar"><div id="docSidebar" 
class="hidden-print" role="complementary">
+    <div class="top">
+        <img class="hidden-xs hidden-sm logo-small" src="/img/logo.svg" 
alt="MyNewt" title="MyNewt">
+        <div role="search">
+            <form id="rtd-search-form" class="wy-form" 
action="../../../../../../search.html" method="get">
+                <div class="form-group">
+                    <input type="text" name="q" class="form-control" 
placeholder="Search documentation" />
+                </div>
+            </form>
+        </div>
+    </div>
+    <ul class="toc-nav">
+      <li class="doc-version">
+<select class="form-control" onchange="if (this.value) 
window.location.href=this.value">
+    
+    <option
+      value="/develop/os/introduction"
+      selected="selected"
+    >
+      Version: develop
+    </option>
+    
+    <option
+      value="/v0_9_0/os/introduction"
+      
+    >
+      Version: 0.9.0 (latest)
+    </option>
+    
+</select>
+</li>
+      
+        
+      
+        
+      
+        
+      
+        
+      
+        
+      
+        
+      
+        
+          
+  
+  
+    <li ><a href="../../../../../../os/introduction/">Mynewt Documentation</a>
+  
+  
+    <ul>
+          
+              
+          
+              
+                
+  
+  
+    <li ><a href="../../../../../../os/get_started/get_started/">Basic 
Setup</a>
+  
+  
+    </li>
+
+              
+          
+              
+                
+    <li >
+      <a href="../../../../../../os/get_started/vocabulary/">Concepts</a>
+    </li>
+
+              
+          
+              
+                
+  
+  
+    <li ><a href="../../../../../../os/tutorials/tutorials/">Tutorials</a>
+  
+  
+    </li>
+
+              
+          
+              
+                
+  
+  
+    <li ><a href="../../../../../../os/os_user_guide/">OS User Guide</a>
+  
+  
+    </li>
+
+              
+          
+              
+                
+  
+  
+    <li><a href="
+  ../../../../ble_intro/
+">BLE User Guide</a>
+  
+  
+    <ul>
+          
+              
+                
+    <li >
+      <a href="../../../../ble_intro/">NimBLE Introduction</a>
+    </li>
+
+              
+          
+              
+                
+    <li >
+      <a href="../../../../ble_sec/">NimBLE Security</a>
+    </li>
+
+              
+          
+              
+                
+    <li >
+      <a href="../../../../nimble_setup/">Set up application</a>
+    </li>
+
+              
+          
+              
+                
+  
+  
+    <li ><a href="../../../../ini_stack/ble_ini_intro/">Initialize stack</a>
+  
+  
+    </li>
+
+              
+          
+              
+                
+  
+  
+    <li ><a href="../../../ble_hs/">NimBLE Host API</a>
+  
+  
+    <ul>
+          
+              
+          
+              
+                
+    <li >
+      <a href="../../../ble_hs_return_codes/">Return codes</a>
+    </li>
+
+              
+          
+              
+                
+  
+  
+    <li ><a href="../../../init/init/">Init and config</a>
+  
+  
+    </li>
+
+              
+          
+              
+                
+  
+  
+    <li ><a href="../../../ble_gap/ble_gap/">GAP</a>
+  
+  
+    </li>
+
+              
+          
+              
+                
+  
+  
+    <li ><a href="../../../ble_gattc/ble_gattc/">GATT client</a>
+  
+  
+    </li>
+
+              
+          
+              
+                
+  
+  
+    <li ><a href="../../../ble_gatts/ble_gatts/">GATT server</a>
+  
+  
+    </li>
+
+              
+          
+              
+                
+  
+  
+    <li ><a href="../../ble_hs_id/">Identity</a>
+  
+  
+    <ul>
+          
+              
+          
+              
+                
+  
+  
+    <li><a href="
+  ../ble_hs_id_copy_addr/
+">Functions</a>
+  
+  
+    <ul>
+          
+              
+                
+    <li >
+      <a href="../ble_hs_id_copy_addr/">ble_hs_id_copy_addr</a>
+    </li>
+
+              
+          
+              
+                
+    <li >
+      <a href="../ble_hs_id_set_rnd/">ble_hs_id_set_rnd</a>
+    </li>
+
+              
+          
+              
+                
+    <li class="active">
+      <a href="./">ble_hs_id_gen_rnd</a>
+    </li>
+
+              
+          
+    </ul>
+  
+    </li>
+
+              
+          
+    </ul>
+  
+    </li>
+
+              
+          
+              
+                
+  
+  
+    <li ><a href="../../../other/other/">Other</a>
+  
+  
+    </li>
+
+              
+          
+    </ul>
+  
+    </li>
+
+              
+          
+              
+                
+  
+  
+    <li ><a href="../../../../bletiny_api/">bletiny app Usage API</a>
+  
+  
+    </li>
+
+              
+          
+    </ul>
+  
+    </li>
+
+              
+          
+              
+                
+  
+  
+    <li ><a href="../../../../../../newt/newt_intro/">Newt Tool Guide</a>
+  
+  
+    </li>
+
+              
+          
+              
+                
+  
+  
+    <li ><a href="../../../../../../newtmgr/overview/">Newt Manager Guide</a>
+  
+  
+    </li>
+
+              
+          
+    </ul>
+  
+    </li>
+
+        
+      
+        
+          
+  
+  
+    <li><a href="
+  ../../../../../../faq/how_to_edit_docs/
+">Appendix</a>
+  
+  
+    </li>
+
+        
+      
+    </ul>
+</div></div>
+
+                    <div class="show-sidebar-container">
+                        <button class="show-sidebar">Docs Menu</button>
+                    </div>
+
+                    <div class="col-md-9" role="main">
+                        <div class="row doc-header">
+                            <div class="col-sm-12">
+                                <div role="navigation" aria-label="breadcrumbs 
navigation">
+  <ul class="wy-breadcrumbs pull-right">
+    <li><a href="/develop/os/introduction">Docs</a></li>
+    
+    
+        
+          <li>&raquo; <a href="../../ble_hs_id/">Identity</a></li>
+        
+      
+        
+          <li>&raquo; <a href="../ble_hs_id_copy_addr/">Functions</a></li>
+        
+      
+      
+        <li>&raquo; ble_hs_id_gen_rnd</li>
+      
+    
+    
+  </ul>
+</div>
+                            </div>
+                        </div>
+                        
+                            <h2 id="ble95hs95id95gen95rnd"><font 
color="#F2853F" style="font-size:24pt">ble_hs_id_gen_rnd</font></h2>
+<div class="codehilite" style="background: #ffffff"><pre style="line-height: 
125%"><span style="color: #A90D91">int</span>
+<span style="color: #000000">ble_hs_id_gen_rnd</span>(<span style="color: 
#A90D91">int</span> <span style="color: #000000">nrpa</span>, <span 
style="color: #A90D91">uint8_t</span> <span style="color: 
#000000">*out_addr</span>)
+</pre></div>
+
+
+<h3 id="description">Description</h3>
+<p>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. </p>
+<h3 id="parameters">Parameters</h3>
+<table>
+<thead>
+<tr>
+<th><em>Parameter</em></th>
+<th><em>Description</em></th>
+</tr>
+</thead>
+<tbody>
+<tr>
+<td>nrpa</td>
+<td>The type of random address to generate: 0: static 1: non-resolvable 
private</td>
+</tr>
+<tr>
+<td>out_addr</td>
+<td>On success, the generated address gets written here.</td>
+</tr>
+</tbody>
+</table>
+<h3 id="returned-values">Returned values</h3>
+<table>
+<thead>
+<tr>
+<th><em>Value</em></th>
+<th><em>Condition</em></th>
+</tr>
+</thead>
+<tbody>
+<tr>
+<td>0</td>
+<td>Success.</td>
+</tr>
+<tr>
+<td><a href="../../../ble_hs_return_codes/#return-codes-core">BLE host core 
return code</a></td>
+<td>Unexpected error.</td>
+</tr>
+</tbody>
+</table>
+                        
+                        <div class="row">
+                            
+
+
+
+<ul class="nav nav-pills" style="margin-bottom: 10px">
+    <li>
+    
+    <a href=../ble_hs_id_set_rnd/>
+        <span class="fa fa-arrow-left"></span>
+        Previous: ble_hs_id_set_rnd
+    </a>
+    
+    </li>
+    <li class="pull-right">
+    
+    <a href=../../../other/other/>
+        Next: Other
+        <span class="fa fa-arrow-right"></span>
+    </a>
+    
+    </li>
+</ul>
+                        </div>
+                        <div class="row">
+                            <footer>
+    <div class="row">
+        <div class="col-md-12">
+            
+                <p class="copyright">Copyright &copy; 2015 The Apache Software 
Foundation, Licensed under the Apache License, Version 2.0 Apache and the 
Apache feather logo are trademarks of The Apache Software Foundation.<br>The 
Apache Software Foundation Apache Incubator</p>
+            
+        </div>
+    </div>
+    <div class="copyright-logos">
+        <div class="row">
+            <div class="col-xs-6 text-right">
+                <img src="/img/apache-feather.png" alt="Apache" title="Apache">
+            </div>
+            <div class="col-xs-6 text-left">
+                <img src="/img/apache-logo.png" alt="Apache Incubator" 
title="Apache Incubator">
+            </div>
+        </div>
+    </div>
+    <div class="row">
+        <div class="col-md-12">
+            <small class="footnote">
+                MyNewt is an effort undergoing incubation at The Apache 
Software Foundation (ASF), sponsored by the Apache Incubator. Incubation is 
required of all newly accepted projects until a further review indicates that 
the infrastructure, communications, and decision making process have stabilized 
in a manner consistent with other successful ASF projects. While incubation 
status is not necessarily a reflection of the completeness or stability of the 
code, it does indicate that the project has yet to be fully endorsed by the ASF.
+            </small>
+        </div>
+    </div>
+</footer>
+                        </div>
+                    </div>
+                </div>
+            
+            
+        </div>
+
+        <script src="../../../../../../js/jquery-1.10.2.min.js"></script>
+        <script src="../../../../../../js/bootstrap-3.0.3.min.js"></script>
+        <script src="../../../../../../js/highlight.pack.js"></script>
+        <script src="../../../../../../js/base.js"></script>
+        <script src="../../../../../../js/custom.js"></script>
+
+    </body>
+</html>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-site/blob/e98b0c12/develop/network/ble/ble_hs/ble_hs_id/functions/ble_hs_id_set_rnd/index.html
----------------------------------------------------------------------
diff --git 
a/develop/network/ble/ble_hs/ble_hs_id/functions/ble_hs_id_set_rnd/index.html 
b/develop/network/ble/ble_hs/ble_hs_id/functions/ble_hs_id_set_rnd/index.html
new file mode 100644
index 0000000..d5e4b4e
--- /dev/null
+++ 
b/develop/network/ble/ble_hs/ble_hs_id/functions/ble_hs_id_set_rnd/index.html
@@ -0,0 +1,601 @@
+<!DOCTYPE html>
+<html lang="en">
+    <head>
+        <meta charset="utf-8">
+        <meta http-equiv="X-UA-Compatible" content="IE=edge">
+        <meta name="viewport" content="width=device-width, initial-scale=1.0">
+        
+        
+        <link rel="canonical" 
href="http://mynewt.apache.org/network/ble/ble_hs/ble_hs_id/functions/ble_hs_id_set_rnd/";>
+        <link rel="shortcut icon" href="../../../../../../img/favicon.ico">
+
+       <title>ble_hs_id_set_rnd - Apache Mynewt</title>
+
+        <link href="../../../../../../css/bootstrap-3.0.3.min.css" 
rel="stylesheet">
+        <link href="../../../../../../css/font-awesome-4.0.3.css" 
rel="stylesheet">
+        <link rel="stylesheet" href="../../../../../../css/highlight.css">
+        <link href="../../../../../../css/base.css" rel="stylesheet">
+        <link href="../../../../../../css/custom.css" rel="stylesheet">
+        <link href="../../../../../../css/v2.css" rel="stylesheet">
+        <link 
href='https://fonts.googleapis.com/css?family=Roboto:400,500,700,900,300,100' 
rel='stylesheet' type='text/css'>
+        <link rel="stylesheet" 
href="https://maxcdn.bootstrapcdn.com/font-awesome/4.5.0/css/font-awesome.min.css";>
+        <link href="../../../../../../extra.css" rel="stylesheet">
+
+        <!-- HTML5 shim and Respond.js IE8 support of HTML5 elements and media 
queries -->
+        <!--[if lt IE 9]>
+            <script 
src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js";></script>
+            <script 
src="https://oss.maxcdn.com/libs/respond.js/1.3.0/respond.min.js";></script>
+        <![endif]-->
+
+        
+            <script>
+                
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
+                (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new 
Date();a=s.createElement(o),
+                
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
+                
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
+
+                ga('create', 'UA-72162311-1', 'auto');
+                ga('send', 'pageview');
+            </script>
+        
+    </head>
+
+
+    <body class="ble_hs_id_set_rnd">
+
+
+        
+
+
+
+
+
+
+<nav id="navbar" class="navbar navbar-inverse navbar-fixed-top" 
role="navigation">
+    <div class="container">
+        <!-- Collapsed navigation -->
+        <div class="navbar-header">
+            <!-- Expander button -->
+            <button type="button" class="navbar-toggle" data-toggle="collapse" 
data-target=".navbar-collapse">
+                <span class="sr-only">Toggle navigation</span>
+                <span class="icon-bar"></span>
+                <span class="icon-bar"></span>
+                <span class="icon-bar"></span>
+            </button>
+
+        </div>
+
+        <!-- Expanded navigation -->
+        <div class="navbar-collapse collapse">
+            <!-- Main navigation -->
+            <ul class="nav navbar-nav navbar-right">
+                <li 
+  class=""
+>
+                    <a href="/">Home</a>
+                </li>
+                <li 
+  class="important"
+>
+                    <a href="/quick-start/">Quick Start</a>
+                </li>
+                <li 
+  class=""
+>
+                    <a href="/about/">About</a>
+                </li>
+                <li 
+  class="active"
+>
+                    <a href="/latest/os/introduction">Documentation</a>
+                </li>
+                <li 
+  class=""
+>
+                    <a href="/download/">Download</a>
+                </li>
+                <li 
+  class=""
+>
+                    <a href="/community/">Community</a>
+                </li>
+                <li 
+  class=""
+>
+                    <a href="/events/">Events</a>
+                </li>
+            </ul>
+
+            <!-- Search, Navigation and Repo links -->
+            <ul class="nav navbar-nav navbar-right">
+                
+            </ul>
+        </div>
+    </div>
+</nav>
+
+        
+
+        <div class="container">
+            
+                <div class="row">
+                    <div class="col-md-3 v2-sidebar"><div id="docSidebar" 
class="hidden-print" role="complementary">
+    <div class="top">
+        <img class="hidden-xs hidden-sm logo-small" src="/img/logo.svg" 
alt="MyNewt" title="MyNewt">
+        <div role="search">
+            <form id="rtd-search-form" class="wy-form" 
action="../../../../../../search.html" method="get">
+                <div class="form-group">
+                    <input type="text" name="q" class="form-control" 
placeholder="Search documentation" />
+                </div>
+            </form>
+        </div>
+    </div>
+    <ul class="toc-nav">
+      <li class="doc-version">
+<select class="form-control" onchange="if (this.value) 
window.location.href=this.value">
+    
+    <option
+      value="/develop/os/introduction"
+      selected="selected"
+    >
+      Version: develop
+    </option>
+    
+    <option
+      value="/v0_9_0/os/introduction"
+      
+    >
+      Version: 0.9.0 (latest)
+    </option>
+    
+</select>
+</li>
+      
+        
+      
+        
+      
+        
+      
+        
+      
+        
+      
+        
+      
+        
+          
+  
+  
+    <li ><a href="../../../../../../os/introduction/">Mynewt Documentation</a>
+  
+  
+    <ul>
+          
+              
+          
+              
+                
+  
+  
+    <li ><a href="../../../../../../os/get_started/get_started/">Basic 
Setup</a>
+  
+  
+    </li>
+
+              
+          
+              
+                
+    <li >
+      <a href="../../../../../../os/get_started/vocabulary/">Concepts</a>
+    </li>
+
+              
+          
+              
+                
+  
+  
+    <li ><a href="../../../../../../os/tutorials/tutorials/">Tutorials</a>
+  
+  
+    </li>
+
+              
+          
+              
+                
+  
+  
+    <li ><a href="../../../../../../os/os_user_guide/">OS User Guide</a>
+  
+  
+    </li>
+
+              
+          
+              
+                
+  
+  
+    <li><a href="
+  ../../../../ble_intro/
+">BLE User Guide</a>
+  
+  
+    <ul>
+          
+              
+                
+    <li >
+      <a href="../../../../ble_intro/">NimBLE Introduction</a>
+    </li>
+
+              
+          
+              
+                
+    <li >
+      <a href="../../../../ble_sec/">NimBLE Security</a>
+    </li>
+
+              
+          
+              
+                
+    <li >
+      <a href="../../../../nimble_setup/">Set up application</a>
+    </li>
+
+              
+          
+              
+                
+  
+  
+    <li ><a href="../../../../ini_stack/ble_ini_intro/">Initialize stack</a>
+  
+  
+    </li>
+
+              
+          
+              
+                
+  
+  
+    <li ><a href="../../../ble_hs/">NimBLE Host API</a>
+  
+  
+    <ul>
+          
+              
+          
+              
+                
+    <li >
+      <a href="../../../ble_hs_return_codes/">Return codes</a>
+    </li>
+
+              
+          
+              
+                
+  
+  
+    <li ><a href="../../../init/init/">Init and config</a>
+  
+  
+    </li>
+
+              
+          
+              
+                
+  
+  
+    <li ><a href="../../../ble_gap/ble_gap/">GAP</a>
+  
+  
+    </li>
+
+              
+          
+              
+                
+  
+  
+    <li ><a href="../../../ble_gattc/ble_gattc/">GATT client</a>
+  
+  
+    </li>
+
+              
+          
+              
+                
+  
+  
+    <li ><a href="../../../ble_gatts/ble_gatts/">GATT server</a>
+  
+  
+    </li>
+
+              
+          
+              
+                
+  
+  
+    <li ><a href="../../ble_hs_id/">Identity</a>
+  
+  
+    <ul>
+          
+              
+          
+              
+                
+  
+  
+    <li><a href="
+  ../ble_hs_id_copy_addr/
+">Functions</a>
+  
+  
+    <ul>
+          
+              
+                
+    <li >
+      <a href="../ble_hs_id_copy_addr/">ble_hs_id_copy_addr</a>
+    </li>
+
+              
+          
+              
+                
+    <li class="active">
+      <a href="./">ble_hs_id_set_rnd</a>
+    </li>
+
+              
+          
+              
+                
+    <li >
+      <a href="../ble_hs_id_gen_rnd/">ble_hs_id_gen_rnd</a>
+    </li>
+
+              
+          
+    </ul>
+  
+    </li>
+
+              
+          
+    </ul>
+  
+    </li>
+
+              
+          
+              
+                
+  
+  
+    <li ><a href="../../../other/other/">Other</a>
+  
+  
+    </li>
+
+              
+          
+    </ul>
+  
+    </li>
+
+              
+          
+              
+                
+  
+  
+    <li ><a href="../../../../bletiny_api/">bletiny app Usage API</a>
+  
+  
+    </li>
+
+              
+          
+    </ul>
+  
+    </li>
+
+              
+          
+              
+                
+  
+  
+    <li ><a href="../../../../../../newt/newt_intro/">Newt Tool Guide</a>
+  
+  
+    </li>
+
+              
+          
+              
+                
+  
+  
+    <li ><a href="../../../../../../newtmgr/overview/">Newt Manager Guide</a>
+  
+  
+    </li>
+
+              
+          
+    </ul>
+  
+    </li>
+
+        
+      
+        
+          
+  
+  
+    <li><a href="
+  ../../../../../../faq/how_to_edit_docs/
+">Appendix</a>
+  
+  
+    </li>
+
+        
+      
+    </ul>
+</div></div>
+
+                    <div class="show-sidebar-container">
+                        <button class="show-sidebar">Docs Menu</button>
+                    </div>
+
+                    <div class="col-md-9" role="main">
+                        <div class="row doc-header">
+                            <div class="col-sm-12">
+                                <div role="navigation" aria-label="breadcrumbs 
navigation">
+  <ul class="wy-breadcrumbs pull-right">
+    <li><a href="/develop/os/introduction">Docs</a></li>
+    
+    
+        
+          <li>&raquo; <a href="../../ble_hs_id/">Identity</a></li>
+        
+      
+        
+          <li>&raquo; <a href="../ble_hs_id_copy_addr/">Functions</a></li>
+        
+      
+      
+        <li>&raquo; ble_hs_id_set_rnd</li>
+      
+    
+    
+  </ul>
+</div>
+                            </div>
+                        </div>
+                        
+                            <h2 id="ble95hs95id95set95rnd"><font 
color="#F2853F" style="font-size:24pt">ble_hs_id_set_rnd</font></h2>
+<div class="codehilite" style="background: #ffffff"><pre style="line-height: 
125%"><span style="color: #A90D91">int</span>
+<span style="color: #000000">ble_hs_id_set_rnd</span>(<span style="color: 
#A90D91">const</span> <span style="color: #A90D91">uint8_t</span> <span 
style="color: #000000">*rnd_addr</span>)
+</pre></div>
+
+
+<h3 id="description">Description</h3>
+<p>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!). </p>
+<h3 id="parameters">Parameters</h3>
+<table>
+<thead>
+<tr>
+<th><em>Parameter</em></th>
+<th><em>Description</em></th>
+</tr>
+</thead>
+<tbody>
+<tr>
+<td>rnd_addr</td>
+<td>The random address to set.</td>
+</tr>
+</tbody>
+</table>
+<h3 id="returned-values">Returned values</h3>
+<table>
+<thead>
+<tr>
+<th><em>Value</em></th>
+<th><em>Condition</em></th>
+</tr>
+</thead>
+<tbody>
+<tr>
+<td>0</td>
+<td>Success.</td>
+</tr>
+<tr>
+<td><a href="../../../ble_hs_return_codes/#return-codes-core">BLE host core 
return code</a></td>
+<td>Unexpected error.</td>
+</tr>
+</tbody>
+</table>
+                        
+                        <div class="row">
+                            
+
+
+
+<ul class="nav nav-pills" style="margin-bottom: 10px">
+    <li>
+    
+    <a href=../ble_hs_id_copy_addr/>
+        <span class="fa fa-arrow-left"></span>
+        Previous: ble_hs_id_copy_addr
+    </a>
+    
+    </li>
+    <li class="pull-right">
+    
+    <a href=../ble_hs_id_gen_rnd/>
+        Next: ble_hs_id_gen_rnd
+        <span class="fa fa-arrow-right"></span>
+    </a>
+    
+    </li>
+</ul>
+                        </div>
+                        <div class="row">
+                            <footer>
+    <div class="row">
+        <div class="col-md-12">
+            
+                <p class="copyright">Copyright &copy; 2015 The Apache Software 
Foundation, Licensed under the Apache License, Version 2.0 Apache and the 
Apache feather logo are trademarks of The Apache Software Foundation.<br>The 
Apache Software Foundation Apache Incubator</p>
+            
+        </div>
+    </div>
+    <div class="copyright-logos">
+        <div class="row">
+            <div class="col-xs-6 text-right">
+                <img src="/img/apache-feather.png" alt="Apache" title="Apache">
+            </div>
+            <div class="col-xs-6 text-left">
+                <img src="/img/apache-logo.png" alt="Apache Incubator" 
title="Apache Incubator">
+            </div>
+        </div>
+    </div>
+    <div class="row">
+        <div class="col-md-12">
+            <small class="footnote">
+                MyNewt is an effort undergoing incubation at The Apache 
Software Foundation (ASF), sponsored by the Apache Incubator. Incubation is 
required of all newly accepted projects until a further review indicates that 
the infrastructure, communications, and decision making process have stabilized 
in a manner consistent with other successful ASF projects. While incubation 
status is not necessarily a reflection of the completeness or stability of the 
code, it does indicate that the project has yet to be fully endorsed by the ASF.
+            </small>
+        </div>
+    </div>
+</footer>
+                        </div>
+                    </div>
+                </div>
+            
+            
+        </div>
+
+        <script src="../../../../../../js/jquery-1.10.2.min.js"></script>
+        <script src="../../../../../../js/bootstrap-3.0.3.min.js"></script>
+        <script src="../../../../../../js/highlight.pack.js"></script>
+        <script src="../../../../../../js/base.js"></script>
+        <script src="../../../../../../js/custom.js"></script>
+
+    </body>
+</html>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-site/blob/e98b0c12/develop/network/ble/ble_hs/ble_hs_return_codes/index.html
----------------------------------------------------------------------
diff --git a/develop/network/ble/ble_hs/ble_hs_return_codes/index.html 
b/develop/network/ble/ble_hs/ble_hs_return_codes/index.html
new file mode 100644
index 0000000..dc2a5c3
--- /dev/null
+++ b/develop/network/ble/ble_hs/ble_hs_return_codes/index.html
@@ -0,0 +1,1442 @@
+<!DOCTYPE html>
+<html lang="en">
+    <head>
+        <meta charset="utf-8">
+        <meta http-equiv="X-UA-Compatible" content="IE=edge">
+        <meta name="viewport" content="width=device-width, initial-scale=1.0">
+        
+        
+        <link rel="canonical" 
href="http://mynewt.apache.org/network/ble/ble_hs/ble_hs_return_codes/";>
+        <link rel="shortcut icon" href="../../../../img/favicon.ico">
+
+       <title>Return codes - Apache Mynewt</title>
+
+        <link href="../../../../css/bootstrap-3.0.3.min.css" rel="stylesheet">
+        <link href="../../../../css/font-awesome-4.0.3.css" rel="stylesheet">
+        <link rel="stylesheet" href="../../../../css/highlight.css">
+        <link href="../../../../css/base.css" rel="stylesheet">
+        <link href="../../../../css/custom.css" rel="stylesheet">
+        <link href="../../../../css/v2.css" rel="stylesheet">
+        <link 
href='https://fonts.googleapis.com/css?family=Roboto:400,500,700,900,300,100' 
rel='stylesheet' type='text/css'>
+        <link rel="stylesheet" 
href="https://maxcdn.bootstrapcdn.com/font-awesome/4.5.0/css/font-awesome.min.css";>
+        <link href="../../../../extra.css" rel="stylesheet">
+
+        <!-- HTML5 shim and Respond.js IE8 support of HTML5 elements and media 
queries -->
+        <!--[if lt IE 9]>
+            <script 
src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js";></script>
+            <script 
src="https://oss.maxcdn.com/libs/respond.js/1.3.0/respond.min.js";></script>
+        <![endif]-->
+
+        
+            <script>
+                
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
+                (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new 
Date();a=s.createElement(o),
+                
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
+                
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
+
+                ga('create', 'UA-72162311-1', 'auto');
+                ga('send', 'pageview');
+            </script>
+        
+    </head>
+
+
+    <body class="Return codes">
+
+
+        
+
+
+
+
+
+
+<nav id="navbar" class="navbar navbar-inverse navbar-fixed-top" 
role="navigation">
+    <div class="container">
+        <!-- Collapsed navigation -->
+        <div class="navbar-header">
+            <!-- Expander button -->
+            <button type="button" class="navbar-toggle" data-toggle="collapse" 
data-target=".navbar-collapse">
+                <span class="sr-only">Toggle navigation</span>
+                <span class="icon-bar"></span>
+                <span class="icon-bar"></span>
+                <span class="icon-bar"></span>
+            </button>
+
+        </div>
+
+        <!-- Expanded navigation -->
+        <div class="navbar-collapse collapse">
+            <!-- Main navigation -->
+            <ul class="nav navbar-nav navbar-right">
+                <li 
+  class=""
+>
+                    <a href="/">Home</a>
+                </li>
+                <li 
+  class="important"
+>
+                    <a href="/quick-start/">Quick Start</a>
+                </li>
+                <li 
+  class=""
+>
+                    <a href="/about/">About</a>
+                </li>
+                <li 
+  class="active"
+>
+                    <a href="/latest/os/introduction">Documentation</a>
+                </li>
+                <li 
+  class=""
+>
+                    <a href="/download/">Download</a>
+                </li>
+                <li 
+  class=""
+>
+                    <a href="/community/">Community</a>
+                </li>
+                <li 
+  class=""
+>
+                    <a href="/events/">Events</a>
+                </li>
+            </ul>
+
+            <!-- Search, Navigation and Repo links -->
+            <ul class="nav navbar-nav navbar-right">
+                
+            </ul>
+        </div>
+    </div>
+</nav>
+
+        
+
+        <div class="container">
+            
+                <div class="row">
+                    <div class="col-md-3 v2-sidebar"><div id="docSidebar" 
class="hidden-print" role="complementary">
+    <div class="top">
+        <img class="hidden-xs hidden-sm logo-small" src="/img/logo.svg" 
alt="MyNewt" title="MyNewt">
+        <div role="search">
+            <form id="rtd-search-form" class="wy-form" 
action="../../../../search.html" method="get">
+                <div class="form-group">
+                    <input type="text" name="q" class="form-control" 
placeholder="Search documentation" />
+                </div>
+            </form>
+        </div>
+    </div>
+    <ul class="toc-nav">
+      <li class="doc-version">
+<select class="form-control" onchange="if (this.value) 
window.location.href=this.value">
+    
+    <option
+      value="/develop/os/introduction"
+      selected="selected"
+    >
+      Version: develop
+    </option>
+    
+    <option
+      value="/v0_9_0/os/introduction"
+      
+    >
+      Version: 0.9.0 (latest)
+    </option>
+    
+</select>
+</li>
+      
+        
+      
+        
+      
+        
+      
+        
+      
+        
+      
+        
+      
+        
+          
+  
+  
+    <li ><a href="../../../../os/introduction/">Mynewt Documentation</a>
+  
+  
+    <ul>
+          
+              
+          
+              
+                
+  
+  
+    <li ><a href="../../../../os/get_started/get_started/">Basic Setup</a>
+  
+  
+    </li>
+
+              
+          
+              
+                
+    <li >
+      <a href="../../../../os/get_started/vocabulary/">Concepts</a>
+    </li>
+
+              
+          
+              
+                
+  
+  
+    <li ><a href="../../../../os/tutorials/tutorials/">Tutorials</a>
+  
+  
+    </li>
+
+              
+          
+              
+                
+  
+  
+    <li ><a href="../../../../os/os_user_guide/">OS User Guide</a>
+  
+  
+    </li>
+
+              
+          
+              
+                
+  
+  
+    <li><a href="
+  ../../ble_intro/
+">BLE User Guide</a>
+  
+  
+    <ul>
+          
+              
+                
+    <li >
+      <a href="../../ble_intro/">NimBLE Introduction</a>
+    </li>
+
+              
+          
+              
+                
+    <li >
+      <a href="../../ble_sec/">NimBLE Security</a>
+    </li>
+
+              
+          
+              
+                
+    <li >
+      <a href="../../nimble_setup/">Set up application</a>
+    </li>
+
+              
+          
+              
+                
+  
+  
+    <li ><a href="../../ini_stack/ble_ini_intro/">Initialize stack</a>
+  
+  
+    </li>
+
+              
+          
+              
+                
+  
+  
+    <li ><a href="../ble_hs/">NimBLE Host API</a>
+  
+  
+    <ul>
+          
+              
+          
+              
+                
+    <li class="active">
+      <a href="./">Return codes</a>
+    </li>
+
+              
+          
+              
+                
+  
+  
+    <li ><a href="../init/init/">Init and config</a>
+  
+  
+    </li>
+
+              
+          
+              
+                
+  
+  
+    <li ><a href="../ble_gap/ble_gap/">GAP</a>
+  
+  
+    </li>
+
+              
+          
+              
+                
+  
+  
+    <li ><a href="../ble_gattc/ble_gattc/">GATT client</a>
+  
+  
+    </li>
+
+              
+          
+              
+                
+  
+  
+    <li ><a href="../ble_gatts/ble_gatts/">GATT server</a>
+  
+  
+    </li>
+
+              
+          
+              
+                
+  
+  
+    <li ><a href="../ble_hs_id/ble_hs_id/">Identity</a>
+  
+  
+    </li>
+
+              
+          
+              
+                
+  
+  
+    <li ><a href="../other/other/">Other</a>
+  
+  
+    </li>
+
+              
+          
+    </ul>
+  
+    </li>
+
+              
+          
+              
+                
+  
+  
+    <li ><a href="../../bletiny_api/">bletiny app Usage API</a>
+  
+  
+    </li>
+
+              
+          
+    </ul>
+  
+    </li>
+
+              
+          
+              
+                
+  
+  
+    <li ><a href="../../../../newt/newt_intro/">Newt Tool Guide</a>
+  
+  
+    </li>
+
+              
+          
+              
+                
+  
+  
+    <li ><a href="../../../../newtmgr/overview/">Newt Manager Guide</a>
+  
+  
+    </li>
+
+              
+          
+    </ul>
+  
+    </li>
+
+        
+      
+        
+          
+  
+  
+    <li><a href="
+  ../../../../faq/how_to_edit_docs/
+">Appendix</a>
+  
+  
+    </li>
+
+        
+      
+    </ul>
+</div></div>
+
+                    <div class="show-sidebar-container">
+                        <button class="show-sidebar">Docs Menu</button>
+                    </div>
+
+                    <div class="col-md-9" role="main">
+                        <div class="row doc-header">
+                            <div class="col-sm-12">
+                                <div role="navigation" aria-label="breadcrumbs 
navigation">
+  <ul class="wy-breadcrumbs pull-right">
+    <li><a href="/develop/os/introduction">Docs</a></li>
+    
+    
+        
+          <li>&raquo; <a href="../../ble_intro/">BLE User Guide</a></li>
+        
+      
+        
+          <li>&raquo; <a href="../ble_hs/">NimBLE Host API</a></li>
+        
+      
+      
+        <li>&raquo; Return codes</li>
+      
+    
+    
+  </ul>
+</div>
+                            </div>
+                        </div>
+                        
+                            <h2 id="nimble-host-return-codes"><font 
color="F2853F" style="font-size:24pt">NimBLE Host Return Codes</font></h2>
+<ul>
+<li><a href="#introduction">Introduction</a><ul>
+<li><a href="#summary">Summary</a></li>
+<li><a href="#example">Example</a></li>
+</ul>
+</li>
+<li><a href="#return-code-reference">Return Code Reference</a><ul>
+<li><a href="#return-codes-core">Return codes - Core</a></li>
+<li><a href="#return-codes-att">Return codes - ATT</a></li>
+<li><a href="#return-codes-hci">Return codes - HCI</a></li>
+<li><a href="#return-codes-l2cap">Return codes - L2CAP</a></li>
+<li><a href="#return-codes-security-manager-(us)">Return codes - Security 
manager (us)</a></li>
+<li><a href="#return-codes-security-manager-(peer)">Return codes - Security 
manager (peer)</a></li>
+</ul>
+</li>
+</ul>
+<h3 id="introduction">Introduction</h3>
+<h4 id="summary">Summary</h4>
+<p>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.</p>
+<p>A return code of 0 indicates success.  For failure conditions, the return 
codes are partitioned into five separate sets:</p>
+<table>
+<thead>
+<tr>
+<th>Set</th>
+<th>Condition</th>
+</tr>
+</thead>
+<tbody>
+<tr>
+<td>Core</td>
+<td>Errors detected internally by the NimBLE host.</td>
+</tr>
+<tr>
+<td>ATT</td>
+<td>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.</td>
+</tr>
+<tr>
+<td>HCI</td>
+<td>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.</td>
+</tr>
+<tr>
+<td>L2CAP</td>
+<td>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.</td>
+</tr>
+<tr>
+<td>Security manager (us)</td>
+<td>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.</td>
+</tr>
+<tr>
+<td>Security manager (peer)</td>
+<td>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.</td>
+</tr>
+</tbody>
+</table>
+<p>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 <em>formal status codes</em>.  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:</p>
+<table>
+<thead>
+<tr>
+<th>Layer</th>
+<th>Meaning</th>
+</tr>
+</thead>
+<tbody>
+<tr>
+<td>ATT</td>
+<td>Invalid handle.</td>
+</tr>
+<tr>
+<td>HCI</td>
+<td>Unknown HCI command.</td>
+</tr>
+<tr>
+<td>L2CAP</td>
+<td>Signalling MTU exceeded.</td>
+</tr>
+<tr>
+<td>SM</td>
+<td>Passkey entry failed.</td>
+</tr>
+</tbody>
+</table>
+<p>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 <em>[0x100, 0x200)</em>.  To indicate an ATT 
error of 3 (write not permitted), the NimBLE host returns a value 0x103 to the 
application.</p>
+<p>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.</p>
+<table>
+<thead>
+<tr>
+<th>Macro</th>
+<th>Status code set</th>
+<th>Base value</th>
+</tr>
+</thead>
+<tbody>
+<tr>
+<td>BLE_HS_ATT_ERR()</td>
+<td>ATT</td>
+<td>0x100</td>
+</tr>
+<tr>
+<td>BLE_HS_HCI_ERR()</td>
+<td>HCI</td>
+<td>0x200</td>
+</tr>
+<tr>
+<td>BLE_HS_L2C_ERR()</td>
+<td>L2CAP</td>
+<td>0x300</td>
+</tr>
+<tr>
+<td>BLE_HS_SM_US_ERR()</td>
+<td>Security manager (us)</td>
+<td>0x400</td>
+</tr>
+<tr>
+<td>BLE_HS_SM_PEER_ERR()</td>
+<td>Security manager (peer)</td>
+<td>0x500</td>
+</tr>
+</tbody>
+</table>
+<h4 id="example">Example</h4>
+<p>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 <em>my_blocking_enc_proc()</em> 
function, which blocks until the pairing operation has completed.</p>
+<div class="codehilite" style="background: #ffffff"><pre style="line-height: 
125%"><span style="color: #A90D91">void</span>
+<span style="color: #000000">encrypt_connection</span>(<span style="color: 
#A90D91">uint16_t</span> <span style="color: #000000">conn_handle</span>)
+{
+    <span style="color: #A90D91">int</span> <span style="color: 
#000000">rc</span>;
+
+    <span style="color: #177500">/* Perform a blocking GAP encryption 
procedure. */</span>
+    <span style="color: #000000">rc</span> <span style="color: 
#000000">=</span> <span style="color: 
#000000">my_blocking_enc_proc</span>(<span style="color: 
#000000">conn_handle</span>);
+    <span style="color: #A90D91">switch</span> (<span style="color: 
#000000">rc</span>) {
+    <span style="color: #A90D91">case</span> <span style="color: 
#1C01CE">0</span><span style="color: #000000">:</span>
+        <span style="color: #000000">console_printf</span>(<span style="color: 
#C41A16">&quot;success - link successfully encrypted\n&quot;</span>);
+        <span style="color: #A90D91">break</span>;
+
+    <span style="color: #A90D91">case</span> <span style="color: 
#000000">BLE_HS_ENOTCONN</span>:
+        <span style="color: #000000">console_printf</span>(<span style="color: 
#C41A16">&quot;failure - no connection with handle %d\n&quot;</span>,
+                       <span style="color: #000000">conn_handle</span>);
+        <span style="color: #A90D91">break</span>;
+
+    <span style="color: #A90D91">case</span> <span style="color: 
#000000">BLE_HS_ERR_SM_US_BASE</span>(<span style="color: 
#000000">BLE_SM_ERR_CONFIRM_MISMATCH</span>)<span style="color: 
#000000">:</span>
+        <span style="color: #000000">console_printf</span>(<span style="color: 
#C41A16">&quot;failure - mismatch in peer&#39;s confirm and random &quot;</span>
+                       <span style="color: 
#C41A16">&quot;commands.\n&quot;</span>);
+        <span style="color: #A90D91">break</span>;
+
+    <span style="color: #A90D91">case</span> <span style="color: 
#000000">BLE_HS_ERR_SM_PEER_BASE</span>(<span style="color: 
#000000">BLE_SM_ERR_CONFIRM_MISMATCH</span>)<span style="color: 
#000000">:</span>
+        <span style="color: #000000">console_printf</span>(<span style="color: 
#C41A16">&quot;failure - peer reports mismatch in our confirm and &quot;</span>
+                       <span style="color: #C41A16">&quot;random 
commands.\n&quot;</span>);
+        <span style="color: #A90D91">break</span>;
+
+    <span style="color: #A90D91">default</span><span style="color: 
#000000">:</span>
+        <span style="color: #000000">console_printf</span>(<span style="color: 
#C41A16">&quot;failure - other error: 0x%04x\n&quot;</span>, <span 
style="color: #000000">rc</span>);
+        <span style="color: #A90D91">break</span>;
+    }
+}
+</pre></div>
+
+
+<h3 id="return-code-reference">Return Code Reference</h3>
+<h4 id="return-codes-core">Return codes - Core</h4>
+<p>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.</p>
+<div class="codehilite" style="background: #ffffff"><pre style="line-height: 
125%"><span style="color: #633820">#include &quot;host/ble_hs.h&quot;</span>
+</pre></div>
+
+
+<table>
+<thead>
+<tr>
+<th>Value</th>
+<th>Name</th>
+<th>Condition</th>
+</tr>
+</thead>
+<tbody>
+<tr>
+<td>0x00</td>
+<td><em>N/A</em></td>
+<td>Success</td>
+</tr>
+<tr>
+<td>0x01</td>
+<td>BLE_HS_EAGAIN</td>
+<td>Temporary failure; try again.</td>
+</tr>
+<tr>
+<td>0x02</td>
+<td>BLE_HS_EALREADY</td>
+<td>Operation already in progress or completed.</td>
+</tr>
+<tr>
+<td>0x03</td>
+<td>BLE_HS_EINVAL</td>
+<td>One or more arguments are invalid.</td>
+</tr>
+<tr>
+<td>0x04</td>
+<td>BLE_HS_EMSGSIZE</td>
+<td>The provided buffer is too small.</td>
+</tr>
+<tr>
+<td>0x05</td>
+<td>BLE_HS_ENOENT</td>
+<td>No entry matching the specified criteria.</td>
+</tr>
+<tr>
+<td>0x06</td>
+<td>BLE_HS_ENOMEM</td>
+<td>Operation failed due to resource exhaustion.</td>
+</tr>
+<tr>
+<td>0x07</td>
+<td>BLE_HS_ENOTCONN</td>
+<td>No open connection with the specified handle.</td>
+</tr>
+<tr>
+<td>0x08</td>
+<td>BLE_HS_ENOTSUP</td>
+<td>Operation disabled at compile time.</td>
+</tr>
+<tr>
+<td>0x09</td>
+<td>BLE_HS_EAPP</td>
+<td>Application callback behaved unexpectedly.</td>
+</tr>
+<tr>
+<td>0x0a</td>
+<td>BLE_HS_EBADDATA</td>
+<td>Command from peer is invalid.</td>
+</tr>
+<tr>
+<td>0x0b</td>
+<td>BLE_HS_EOS</td>
+<td>Mynewt OS error.</td>
+</tr>
+<tr>
+<td>0x0c</td>
+<td>BLE_HS_ECONTROLLER</td>
+<td>Event from controller is invalid.</td>
+</tr>
+<tr>
+<td>0x0d</td>
+<td>BLE_HS_ETIMEOUT</td>
+<td>Operation timed out.</td>
+</tr>
+<tr>
+<td>0x0e</td>
+<td>BLE_HS_EDONE</td>
+<td>Operation completed successfully.</td>
+</tr>
+<tr>
+<td>0x0f</td>
+<td>BLE_HS_EBUSY</td>
+<td>Operation cannot be performed until procedure completes.</td>
+</tr>
+<tr>
+<td>0x10</td>
+<td>BLE_HS_EREJECT</td>
+<td>Peer rejected a connection parameter update request.</td>
+</tr>
+<tr>
+<td>0x11</td>
+<td>BLE_HS_EUNKNOWN</td>
+<td>Unexpected failure; catch all.</td>
+</tr>
+<tr>
+<td>0x12</td>
+<td>BLE_HS_EROLE</td>
+<td>Operation requires different role (e.g., central vs. peripheral).</td>
+</tr>
+<tr>
+<td>0x13</td>
+<td>BLE_HS_ETIMEOUT_HCI</td>
+<td>HCI request timed out; controller unresponsive.</td>
+</tr>
+<tr>
+<td>0x14</td>
+<td>BLE_HS_ENOMEM_EVT</td>
+<td>Controller failed to send event due to memory exhaustion (combined 
host-controller only).</td>
+</tr>
+<tr>
+<td>0x15</td>
+<td>BLE_HS_ENOADDR</td>
+<td>Operation requires an identity address but none configured.</td>
+</tr>
+</tbody>
+</table>
+<h4 id="return-codes-att">Return codes - ATT</h4>
+<div class="codehilite" style="background: #ffffff"><pre style="line-height: 
125%"><span style="color: #633820">#include &quot;host/ble_hs.h&quot;</span>
+<span style="color: #633820">#include &quot;host/ble_att.h&quot;</span>
+</pre></div>
+
+
+<table>
+<thead>
+<tr>
+<th>NimBLE Value</th>
+<th>Formal Value</th>
+<th>Name</th>
+</tr>
+</thead>
+<tbody>
+<tr>
+<td>0x0101</td>
+<td>0x01</td>
+<td>BLE_ATT_ERR_INVALID_HANDLE</td>
+</tr>
+<tr>
+<td>0x0102</td>
+<td>0x02</td>
+<td>BLE_ATT_ERR_READ_NOT_PERMITTED</td>
+</tr>
+<tr>
+<td>0x0103</td>
+<td>0x03</td>
+<td>BLE_ATT_ERR_WRITE_NOT_PERMITTED</td>
+</tr>
+<tr>
+<td>0x0104</td>
+<td>0x04</td>
+<td>BLE_ATT_ERR_INVALID_PDU</td>
+</tr>
+<tr>
+<td>0x0105</td>
+<td>0x05</td>
+<td>BLE_ATT_ERR_INSUFFICIENT_AUTHEN</td>
+</tr>
+<tr>
+<td>0x0106</td>
+<td>0x06</td>
+<td>BLE_ATT_ERR_REQ_NOT_SUPPORTED</td>
+</tr>
+<tr>
+<td>0x0107</td>
+<td>0x07</td>
+<td>BLE_ATT_ERR_INVALID_OFFSET</td>
+</tr>
+<tr>
+<td>0x0108</td>
+<td>0x08</td>
+<td>BLE_ATT_ERR_INSUFFICIENT_AUTHOR</td>
+</tr>
+<tr>
+<td>0x0109</td>
+<td>0x09</td>
+<td>BLE_ATT_ERR_PREPARE_QUEUE_FULL</td>
+</tr>
+<tr>
+<td>0x010a</td>
+<td>0x0a</td>
+<td>BLE_ATT_ERR_ATTR_NOT_FOUND</td>
+</tr>
+<tr>
+<td>0x010b</td>
+<td>0x0b</td>
+<td>BLE_ATT_ERR_ATTR_NOT_LONG</td>
+</tr>
+<tr>
+<td>0x010c</td>
+<td>0x0c</td>
+<td>BLE_ATT_ERR_INSUFFICIENT_KEY_SZ</td>
+</tr>
+<tr>
+<td>0x010d</td>
+<td>0x0d</td>
+<td>BLE_ATT_ERR_INVALID_ATTR_VALUE_LEN</td>
+</tr>
+<tr>
+<td>0x010e</td>
+<td>0x0e</td>
+<td>BLE_ATT_ERR_UNLIKELY</td>
+</tr>
+<tr>
+<td>0x010f</td>
+<td>0x0f</td>
+<td>BLE_ATT_ERR_INSUFFICIENT_ENC</td>
+</tr>
+<tr>
+<td>0x0110</td>
+<td>0x10</td>
+<td>BLE_ATT_ERR_UNSUPPORTED_GROUP</td>
+</tr>
+<tr>
+<td>0x0111</td>
+<td>0x11</td>
+<td>BLE_ATT_ERR_INSUFFICIENT_RES</td>
+</tr>
+</tbody>
+</table>
+<h4 id="return-codes-hci">Return codes - HCI</h4>
+<div class="codehilite" style="background: #ffffff"><pre style="line-height: 
125%"><span style="color: #633820">#include &quot;host/ble_hs.h&quot;</span>
+<span style="color: #633820">#include &quot;nimble/ble.h&quot;</span>
+</pre></div>
+
+
+<table>
+<thead>
+<tr>
+<th>NimBLE Value</th>
+<th>Formal Value</th>
+<th>Name</th>
+</tr>
+</thead>
+<tbody>
+<tr>
+<td>0x0201</td>
+<td>0x01</td>
+<td>BLE_ERR_UNKNOWN_HCI_CMD</td>
+</tr>
+<tr>
+<td>0x0202</td>
+<td>0x02</td>
+<td>BLE_ERR_UNK_CONN_ID</td>
+</tr>
+<tr>
+<td>0x0203</td>
+<td>0x03</td>
+<td>BLE_ERR_HW_FAIL</td>
+</tr>
+<tr>
+<td>0x0204</td>
+<td>0x04</td>
+<td>BLE_ERR_PAGE_TMO</td>
+</tr>
+<tr>
+<td>0x0205</td>
+<td>0x05</td>
+<td>BLE_ERR_AUTH_FAIL</td>
+</tr>
+<tr>
+<td>0x0206</td>
+<td>0x06</td>
+<td>BLE_ERR_PINKEY_MISSING</td>
+</tr>
+<tr>
+<td>0x0207</td>
+<td>0x07</td>
+<td>BLE_ERR_MEM_CAPACITY</td>
+</tr>
+<tr>
+<td>0x0208</td>
+<td>0x08</td>
+<td>BLE_ERR_CONN_SPVN_TMO</td>
+</tr>
+<tr>
+<td>0x0209</td>
+<td>0x09</td>
+<td>BLE_ERR_CONN_LIMIT</td>
+</tr>
+<tr>
+<td>0x020a</td>
+<td>0x0a</td>
+<td>BLE_ERR_SYNCH_CONN_LIMIT</td>
+</tr>
+<tr>
+<td>0x020b</td>
+<td>0x0b</td>
+<td>BLE_ERR_ACL_CONN_EXISTS</td>
+</tr>
+<tr>
+<td>0x020c</td>
+<td>0x0c</td>
+<td>BLE_ERR_CMD_DISALLOWED</td>
+</tr>
+<tr>
+<td>0x020d</td>
+<td>0x0d</td>
+<td>BLE_ERR_CONN_REJ_RESOURCES</td>
+</tr>
+<tr>
+<td>0x020e</td>
+<td>0x0e</td>
+<td>BLE_ERR_CONN_REJ_SECURITY</td>
+</tr>
+<tr>
+<td>0x020f</td>
+<td>0x0f</td>
+<td>BLE_ERR_CONN_REJ_BD_ADDR</td>
+</tr>
+<tr>
+<td>0x0210</td>
+<td>0x10</td>
+<td>BLE_ERR_CONN_ACCEPT_TMO</td>
+</tr>
+<tr>
+<td>0x0211</td>
+<td>0x11</td>
+<td>BLE_ERR_UNSUPPORTED</td>
+</tr>
+<tr>
+<td>0x0212</td>
+<td>0x12</td>
+<td>BLE_ERR_INV_HCI_CMD_PARMS</td>
+</tr>
+<tr>
+<td>0x0213</td>
+<td>0x13</td>
+<td>BLE_ERR_REM_USER_CONN_TERM</td>
+</tr>
+<tr>
+<td>0x0214</td>
+<td>0x14</td>
+<td>BLE_ERR_RD_CONN_TERM_RESRCS</td>
+</tr>
+<tr>
+<td>0x0215</td>
+<td>0x15</td>
+<td>BLE_ERR_RD_CONN_TERM_PWROFF</td>
+</tr>
+<tr>
+<td>0x0216</td>
+<td>0x16</td>
+<td>BLE_ERR_CONN_TERM_LOCAL</td>
+</tr>
+<tr>
+<td>0x0217</td>
+<td>0x17</td>
+<td>BLE_ERR_REPEATED_ATTEMPTS</td>
+</tr>
+<tr>
+<td>0x0218</td>
+<td>0x18</td>
+<td>BLE_ERR_NO_PAIRING</td>
+</tr>
+<tr>
+<td>0x0219</td>
+<td>0x19</td>
+<td>BLE_ERR_UNK_LMP</td>
+</tr>
+<tr>
+<td>0x021a</td>
+<td>0x1a</td>
+<td>BLE_ERR_UNSUPP_REM_FEATURE</td>
+</tr>
+<tr>
+<td>0x021b</td>
+<td>0x1b</td>
+<td>BLE_ERR_SCO_OFFSET</td>
+</tr>
+<tr>
+<td>0x021c</td>
+<td>0x1c</td>
+<td>BLE_ERR_SCO_ITVL</td>
+</tr>
+<tr>
+<td>0x021d</td>
+<td>0x1d</td>
+<td>BLE_ERR_SCO_AIR_MODE</td>
+</tr>
+<tr>
+<td>0x021e</td>
+<td>0x1e</td>
+<td>BLE_ERR_INV_LMP_LL_PARM</td>
+</tr>
+<tr>
+<td>0x021f</td>
+<td>0x1f</td>
+<td>BLE_ERR_UNSPECIFIED</td>
+</tr>
+<tr>
+<td>0x0220</td>
+<td>0x20</td>
+<td>BLE_ERR_UNSUPP_LMP_LL_PARM</td>
+</tr>
+<tr>
+<td>0x0221</td>
+<td>0x21</td>
+<td>BLE_ERR_NO_ROLE_CHANGE</td>
+</tr>
+<tr>
+<td>0x0222</td>
+<td>0x22</td>
+<td>BLE_ERR_LMP_LL_RSP_TMO</td>
+</tr>
+<tr>
+<td>0x0223</td>
+<td>0x23</td>
+<td>BLE_ERR_LMP_COLLISION</td>
+</tr>
+<tr>
+<td>0x0224</td>
+<td>0x24</td>
+<td>BLE_ERR_LMP_PDU</td>
+</tr>
+<tr>
+<td>0x0225</td>
+<td>0x25</td>
+<td>BLE_ERR_ENCRYPTION_MODE</td>
+</tr>
+<tr>
+<td>0x0226</td>
+<td>0x26</td>
+<td>BLE_ERR_LINK_KEY_CHANGE</td>
+</tr>
+<tr>
+<td>0x0227</td>
+<td>0x27</td>
+<td>BLE_ERR_UNSUPP_QOS</td>
+</tr>
+<tr>
+<td>0x0228</td>
+<td>0x28</td>
+<td>BLE_ERR_INSTANT_PASSED</td>
+</tr>
+<tr>
+<td>0x0229</td>
+<td>0x29</td>
+<td>BLE_ERR_UNIT_KEY_PAIRING</td>
+</tr>
+<tr>
+<td>0x022a</td>
+<td>0x2a</td>
+<td>BLE_ERR_DIFF_TRANS_COLL</td>
+</tr>
+<tr>
+<td>0x022c</td>
+<td>0x2c</td>
+<td>BLE_ERR_QOS_PARM</td>
+</tr>
+<tr>
+<td>0x022d</td>
+<td>0x2d</td>
+<td>BLE_ERR_QOS_REJECTED</td>
+</tr>
+<tr>
+<td>0x022e</td>
+<td>0x2e</td>
+<td>BLE_ERR_CHAN_CLASS</td>
+</tr>
+<tr>
+<td>0x022f</td>
+<td>0x2f</td>
+<td>BLE_ERR_INSUFFICIENT_SEC</td>
+</tr>
+<tr>
+<td>0x0230</td>
+<td>0x30</td>
+<td>BLE_ERR_PARM_OUT_OF_RANGE</td>
+</tr>
+<tr>
+<td>0x0232</td>
+<td>0x32</td>
+<td>BLE_ERR_PENDING_ROLE_SW</td>
+</tr>
+<tr>
+<td>0x0234</td>
+<td>0x34</td>
+<td>BLE_ERR_RESERVED_SLOT</td>
+</tr>
+<tr>
+<td>0x0235</td>
+<td>0x35</td>
+<td>BLE_ERR_ROLE_SW_FAIL</td>
+</tr>
+<tr>
+<td>0x0236</td>
+<td>0x36</td>
+<td>BLE_ERR_INQ_RSP_TOO_BIG</td>
+</tr>
+<tr>
+<td>0x0237</td>
+<td>0x37</td>
+<td>BLE_ERR_SEC_SIMPLE_PAIR</td>
+</tr>
+<tr>
+<td>0x0238</td>
+<td>0x38</td>
+<td>BLE_ERR_HOST_BUSY_PAIR</td>
+</tr>
+<tr>
+<td>0x0239</td>
+<td>0x39</td>
+<td>BLE_ERR_CONN_REJ_CHANNEL</td>
+</tr>
+<tr>
+<td>0x023a</td>
+<td>0x3a</td>
+<td>BLE_ERR_CTLR_BUSY</td>
+</tr>
+<tr>
+<td>0x023b</td>
+<td>0x3b</td>
+<td>BLE_ERR_CONN_PARMS</td>
+</tr>
+<tr>
+<td>0x023c</td>
+<td>0x3c</td>
+<td>BLE_ERR_DIR_ADV_TMO</td>
+</tr>
+<tr>
+<td>0x023d</td>
+<td>0x3d</td>
+<td>BLE_ERR_CONN_TERM_MIC</td>
+</tr>
+<tr>
+<td>0x023e</td>
+<td>0x3e</td>
+<td>BLE_ERR_CONN_ESTABLISHMENT</td>
+</tr>
+<tr>
+<td>0x023f</td>
+<td>0x3f</td>
+<td>BLE_ERR_MAC_CONN_FAIL</td>
+</tr>
+<tr>
+<td>0x0240</td>
+<td>0x40</td>
+<td>BLE_ERR_COARSE_CLK_ADJ</td>
+</tr>
+</tbody>
+</table>
+<h4 id="return-codes-l2cap">Return codes - L2CAP</h4>
+<div class="codehilite" style="background: #ffffff"><pre style="line-height: 
125%"><span style="color: #633820">#include &quot;host/ble_hs.h&quot;</span>
+<span style="color: #633820">#include &quot;host/ble_l2cap.h&quot;</span>
+</pre></div>
+
+
+<table>
+<thead>
+<tr>
+<th>NimBLE Value</th>
+<th>Formal Value</th>
+<th>Name</th>
+</tr>
+</thead>
+<tbody>
+<tr>
+<td>0x0300</td>
+<td>0x00</td>
+<td>BLE_L2CAP_SIG_ERR_CMD_NOT_UNDERSTOOD</td>
+</tr>
+<tr>
+<td>0x0301</td>
+<td>0x01</td>
+<td>BLE_L2CAP_SIG_ERR_MTU_EXCEEDED</td>
+</tr>
+<tr>
+<td>0x0302</td>
+<td>0x02</td>
+<td>BLE_L2CAP_SIG_ERR_INVALID_CID</td>
+</tr>
+</tbody>
+</table>
+<h4 id="return-codes-security-manager-us">Return codes - Security manager 
(us)</h4>
+<div class="codehilite" style="background: #ffffff"><pre style="line-height: 
125%"><span style="color: #633820">#include &quot;host/ble_hs.h&quot;</span>
+<span style="color: #633820">#include &quot;host/ble_sm.h&quot;</span>
+</pre></div>
+
+
+<table>
+<thead>
+<tr>
+<th>NimBLE Value</th>
+<th>Formal Value</th>
+<th>Name</th>
+</tr>
+</thead>
+<tbody>
+<tr>
+<td>0x0401</td>
+<td>0x01</td>
+<td>BLE_SM_ERR_PASSKEY</td>
+</tr>
+<tr>
+<td>0x0402</td>
+<td>0x02</td>
+<td>BLE_SM_ERR_OOB</td>
+</tr>
+<tr>
+<td>0x0403</td>
+<td>0x03</td>
+<td>BLE_SM_ERR_AUTHREQ</td>
+</tr>
+<tr>
+<td>0x0404</td>
+<td>0x04</td>
+<td>BLE_SM_ERR_CONFIRM_MISMATCH</td>
+</tr>
+<tr>
+<td>0x0405</td>
+<td>0x05</td>
+<td>BLE_SM_ERR_PAIR_NOT_SUPP</td>
+</tr>
+<tr>
+<td>0x0406</td>
+<td>0x06</td>
+<td>BLE_SM_ERR_ENC_KEY_SZ</td>
+</tr>
+<tr>
+<td>0x0407</td>
+<td>0x07</td>
+<td>BLE_SM_ERR_CMD_NOT_SUPP</td>
+</tr>
+<tr>
+<td>0x0408</td>
+<td>0x08</td>
+<td>BLE_SM_ERR_UNSPECIFIED</td>
+</tr>
+<tr>
+<td>0x0409</td>
+<td>0x09</td>
+<td>BLE_SM_ERR_REPEATED</td>
+</tr>
+<tr>
+<td>0x040a</td>
+<td>0x0a</td>
+<td>BLE_SM_ERR_INVAL</td>
+</tr>
+<tr>
+<td>0x040b</td>
+<td>0x0b</td>
+<td>BLE_SM_ERR_DHKEY</td>
+</tr>
+<tr>
+<td>0x040c</td>
+<td>0x0c</td>
+<td>BLE_SM_ERR_NUMCMP</td>
+</tr>
+<tr>
+<td>0x040d</td>
+<td>0x0d</td>
+<td>BLE_SM_ERR_ALREADY</td>
+</tr>
+<tr>
+<td>0x040e</td>
+<td>0x0e</td>
+<td>BLE_SM_ERR_CROSS_TRANS</td>
+</tr>
+</tbody>
+</table>
+<h4 id="return-codes-security-manager-peer">Return codes - Security manager 
(peer)</h4>
+<div class="codehilite" style="background: #ffffff"><pre style="line-height: 
125%"><span style="color: #633820">#include &quot;host/ble_hs.h&quot;</span>
+<span style="color: #633820">#include &quot;host/ble_sm.h&quot;</span>
+</pre></div>
+
+
+<table>
+<thead>
+<tr>
+<th>NimBLE Value</th>
+<th>Formal Value</th>
+<th>Name</th>
+<th>Condition</th>
+</tr>
+</thead>
+<tbody>
+<tr>
+<td>0x0501</td>
+<td>0x01</td>
+<td>BLE_SM_ERR_PASSKEY</td>
+<td>The user input of passkey failed, for example, the user cancelled the 
operation.</td>
+</tr>
+<tr>
+<td>0x0502</td>
+<td>0x02</td>
+<td>BLE_SM_ERR_OOB</td>
+<td>The OOB data is not available.</td>
+</tr>
+<tr>
+<td>0x0503</td>
+<td>0x03</td>
+<td>BLE_SM_ERR_AUTHREQ</td>
+<td>The pairing procedure cannot be performed as authentication requirements 
cannot be met due to IO capabilities of one or both devices.</td>
+</tr>
+<tr>
+<td>0x0504</td>
+<td>0x04</td>
+<td>BLE_SM_ERR_CONFIRM_MISMATCH</td>
+<td>The confirm value does not match the calculated compare value.</td>
+</tr>
+<tr>
+<td>0x0505</td>
+<td>0x05</td>
+<td>BLE_SM_ERR_PAIR_NOT_SUPP</td>
+<td>Pairing is not supported by the device.</td>
+</tr>
+<tr>
+<td>0x0506</td>
+<td>0x06</td>
+<td>BLE_SM_ERR_ENC_KEY_SZ</td>
+<td>The resultant encryption key size is insufficient for the security 
requirements of this device.</td>
+</tr>
+<tr>
+<td>0x0507</td>
+<td>0x07</td>
+<td>BLE_SM_ERR_CMD_NOT_SUPP</td>
+<td>The SMP command received is not supported on this device.</td>
+</tr>
+<tr>
+<td>0x0508</td>
+<td>0x08</td>
+<td>BLE_SM_ERR_UNSPECIFIED</td>
+<td>Pairing failed due to an unspecified reason.</td>
+</tr>
+<tr>
+<td>0x0509</td>
+<td>0x09</td>
+<td>BLE_SM_ERR_REPEATED</td>
+<td>Pairing or authentication procedure is disallowed because too little time 
has elapsed since last pairing request or security request.</td>
+</tr>
+<tr>
+<td>0x050a</td>
+<td>0x0a</td>
+<td>BLE_SM_ERR_INVAL</td>
+<td>The Invalid Parameters error code indicates that the command length is 
invalid or that a parameter is outside of the specified range.</td>
+</tr>
+<tr>
+<td>0x050b</td>
+<td>0x0b</td>
+<td>BLE_SM_ERR_DHKEY</td>
+<td>Indicates to the remote device that the DHKey Check value received 
doesn’t match the one calculated by the local device.</td>
+</tr>
+<tr>
+<td>0x050c</td>
+<td>0x0c</td>
+<td>BLE_SM_ERR_NUMCMP</td>
+<td>Indicates that the confirm values in the numeric comparison protocol do 
not match.</td>
+</tr>
+<tr>
+<td>0x050d</td>
+<td>0x0d</td>
+<td>BLE_SM_ERR_ALREADY</td>
+<td>Indicates that the pairing over the LE transport failed due to a Pairing 
Request sent over the BR/EDR transport in process.</td>
+</tr>
+<tr>
+<td>0x050e</td>
+<td>0x0e</td>
+<td>BLE_SM_ERR_CROSS_TRANS</td>
+<td>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.</td>
+</tr>
+</tbody>
+</table>
+                        
+                        <div class="row">
+                            
+
+
+
+<ul class="nav nav-pills" style="margin-bottom: 10px">
+    <li>
+    
+    <a href=../ble_hs/>
+        <span class="fa fa-arrow-left"></span>
+        Previous: NimBLE Host API
+    </a>
+    
+    </li>
+    <li class="pull-right">
+    
+    <a href=../init/init/>
+        Next: Init and config
+        <span class="fa fa-arrow-right"></span>
+    </a>
+    
+    </li>
+</ul>
+                        </div>
+                        <div class="row">
+                            <footer>
+    <div class="row">
+        <div class="col-md-12">
+            
+                <p class="copyright">Copyright &copy; 2015 The Apache Software 
Foundation, Licensed under the Apache License, Version 2.0 Apache and the 
Apache feather logo are trademarks of The Apache Software Foundation.<br>The 
Apache Software Foundation Apache Incubator</p>
+            
+        </div>
+    </div>
+    <div class="copyright-logos">
+        <div class="row">
+            <div class="col-xs-6 text-right">
+                <img src="/img/apache-feather.png" alt="Apache" title="Apache">
+            </div>
+            <div class="col-xs-6 text-left">
+                <img src="/img/apache-logo.png" alt="Apache Incubator" 
title="Apache Incubator">
+            </div>
+        </div>
+    </div>
+    <div class="row">
+        <div class="col-md-12">
+            <small class="footnote">
+                MyNewt is an effort undergoing incubation at The Apache 
Software Foundation (ASF), sponsored by the Apache Incubator. Incubation is 
required of all newly accepted projects until a further review indicates that 
the infrastructure, communications, and decision making process have stabilized 
in a manner consistent with other successful ASF projects. While incubation 
status is not necessarily a reflection of the completeness or stability of the 
code, it does indicate that the project has yet to be fully endorsed by the ASF.
+            </small>
+        </div>
+    </div>
+</footer>
+                        </div>
+                    </div>
+                </div>
+            
+            
+        </div>
+
+        <script src="../../../../js/jquery-1.10.2.min.js"></script>
+        <script src="../../../../js/bootstrap-3.0.3.min.js"></script>
+        <script src="../../../../js/highlight.pack.js"></script>
+        <script src="../../../../js/base.js"></script>
+        <script src="../../../../js/custom.js"></script>
+
+    </body>
+</html>
\ No newline at end of file

Reply via email to