mirror of
https://github.com/pine64/bl_iot_sdk.git
synced 2024-10-06 23:10:07 +00:00
1172 lines
36 KiB
HTML
1172 lines
36 KiB
HTML
|
||
|
||
<!DOCTYPE html>
|
||
<html class="writer-html5" lang="zh" >
|
||
<head>
|
||
<meta charset="utf-8">
|
||
|
||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||
|
||
<title>简介 — BL602 IoT SDK release_bl_iot_sdk_1.6.11-1-g66bb28da 文档</title>
|
||
|
||
|
||
|
||
<link rel="stylesheet" href="../../_static/css/theme.css" type="text/css" />
|
||
<link rel="stylesheet" href="../../_static/pygments.css" type="text/css" />
|
||
<link rel="stylesheet" href="../../_static/style.css" type="text/css" />
|
||
<link rel="stylesheet" href="../../_static/css/custom.css" type="text/css" />
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<!--[if lt IE 9]>
|
||
<script src="../../_static/js/html5shiv.min.js"></script>
|
||
<![endif]-->
|
||
|
||
|
||
<script type="text/javascript" id="documentation_options" data-url_root="../../" src="../../_static/documentation_options.js"></script>
|
||
<script src="../../_static/jquery.js"></script>
|
||
<script src="../../_static/underscore.js"></script>
|
||
<script src="../../_static/doctools.js"></script>
|
||
<script src="../../_static/language_data.js"></script>
|
||
|
||
<script type="text/javascript" src="../../_static/js/theme.js"></script>
|
||
|
||
|
||
<link rel="index" title="索引" href="../../genindex.html" />
|
||
<link rel="search" title="搜索" href="../../search.html" />
|
||
</head>
|
||
|
||
<body class="wy-body-for-nav">
|
||
|
||
|
||
<div class="wy-grid-for-nav">
|
||
|
||
<nav data-toggle="wy-nav-shift" class="wy-nav-side">
|
||
<div class="wy-side-scroll">
|
||
<div class="wy-side-nav-search" >
|
||
|
||
|
||
|
||
<a href="../../index.html" class="icon icon-home" alt="Documentation Home"> BL602 IoT SDK
|
||
|
||
|
||
|
||
</a>
|
||
|
||
|
||
|
||
|
||
<div class="version">
|
||
release_bl_iot_sdk_1.6.11-1-g66bb28da
|
||
</div>
|
||
|
||
|
||
|
||
|
||
<div role="search">
|
||
<form id="rtd-search-form" class="wy-form" action="../../search.html" method="get">
|
||
<input type="text" name="q" placeholder="在文档中搜索" />
|
||
<input type="hidden" name="check_keywords" value="yes" />
|
||
<input type="hidden" name="area" value="default" />
|
||
</form>
|
||
</div>
|
||
|
||
|
||
</div>
|
||
|
||
|
||
<div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation">
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<p class="caption"><span class="caption-text">Developer_Environment</span></p>
|
||
<ul>
|
||
<li class="toctree-l1"><a class="reference internal" href="../../Developer_Environment/Developer_Environment.html">1. Developer Environment</a></li>
|
||
<li class="toctree-l1"><a class="reference internal" href="../../Developer_Environment/BLFlashEnv/BLFlashEnv.html">2. BLFlashEnv</a></li>
|
||
<li class="toctree-l1"><a class="reference internal" href="../../Developer_Environment/freedom_studio/freedom_studio.html">3. Freedom Studio</a></li>
|
||
<li class="toctree-l1"><a class="reference internal" href="../../Developer_Environment/eclipse/eclipse.html">4. Eclipse</a></li>
|
||
</ul>
|
||
<p class="caption"><span class="caption-text">Examples</span></p>
|
||
<ul>
|
||
<li class="toctree-l1"><a class="reference internal" href="../helloworld/helloworld.html">1. Helloword</a></li>
|
||
<li class="toctree-l1"><a class="reference internal" href="../demo_aws/aws.html">2. aws</a></li>
|
||
<li class="toctree-l1"><a class="reference internal" href="../demo_peripherals_gpio/GPIO.html">3. GPIO</a></li>
|
||
<li class="toctree-l1"><a class="reference internal" href="../demo_peripherals_uart_echo/uart_echo.html">4. UART_echo</a></li>
|
||
<li class="toctree-l1"><a class="reference internal" href="../demo_peripherals_uart_ioctl/uart_ioctl.html">5. UART_ioctl</a></li>
|
||
<li class="toctree-l1"><a class="reference internal" href="../demo_protocols_http/http.html">6. Http client</a></li>
|
||
<li class="toctree-l1"><a class="reference internal" href="../demo_protocols_httpc/httpc.html">7. Httpc client</a></li>
|
||
<li class="toctree-l1"><a class="reference internal" href="../demo_storage_psm/psm.html">8. PSM</a></li>
|
||
<li class="toctree-l1"><a class="reference internal" href="../demo_storage_romfs/romfs.html">9. Romfs</a></li>
|
||
<li class="toctree-l1"><a class="reference internal" href="../demo_system_cli/cli.html">10. cli</a></li>
|
||
<li class="toctree-l1"><a class="reference internal" href="../demo_system_fdt/fdt.html">11. FDT</a></li>
|
||
<li class="toctree-l1"><a class="reference internal" href="../demo_wifi/wifi.html">12. WiFi</a></li>
|
||
<li class="toctree-l1"><a class="reference internal" href="../demo_ble/ble.html">13. BLE</a></li>
|
||
<li class="toctree-l1"><a class="reference internal" href="../demo_mesh/mesh.html">14. Mesh</a></li>
|
||
<li class="toctree-l1"><a class="reference internal" href="../demo_blsync_ble/blsync_ble.html">15. BLSYNC-BLE</a></li>
|
||
<li class="toctree-l1"><a class="reference internal" href="../sdk_app_easyflash_boottimes/easyflash_boottimes.html">16. Easyflash4 boot times</a></li>
|
||
</ul>
|
||
<p class="caption"><span class="caption-text">Components</span></p>
|
||
<ul>
|
||
<li class="toctree-l1"><a class="reference internal" href="../../Components/arch.html">1. arch</a></li>
|
||
<li class="toctree-l1"><a class="reference internal" href="../../Components/Command_line/helper.html">2. helper</a></li>
|
||
<li class="toctree-l1"><a class="reference internal" href="../../Components/Command_line/aos_cli.html">3. cli</a></li>
|
||
<li class="toctree-l1"><a class="reference internal" href="../../Components/Hal_drv/gpio.html">4. GPIO</a></li>
|
||
<li class="toctree-l1"><a class="reference internal" href="../../Components/Middleware/bloop/bloop.html">5. BLOOP</a></li>
|
||
<li class="toctree-l1"><a class="reference internal" href="../../Components/Middleware/blsync/blsync.html">6. BLSYNC</a></li>
|
||
<li class="toctree-l1"><a class="reference internal" href="../../Components/Middleware/dts/devicetree.html">7. device tree</a></li>
|
||
<li class="toctree-l1"><a class="reference internal" href="../../Components/Middleware/log/blog.html">8. blog</a></li>
|
||
<li class="toctree-l1"><a class="reference internal" href="../../Components/Middleware/security/security.html">9. Security</a></li>
|
||
<li class="toctree-l1"><a class="reference internal" href="../../Components/Middleware/vfs/vfs.html">10. AOS VFS</a></li>
|
||
<li class="toctree-l1"><a class="reference internal" href="../../Components/Middleware/yloop/yloop.html">11. yloop</a></li>
|
||
<li class="toctree-l1"><a class="reference internal" href="../../Components/Network/httpc/httpc.html">12. HTTPC</a></li>
|
||
<li class="toctree-l1"><a class="reference internal" href="../../Components/Network/https/https.html">13. HTTPS</a></li>
|
||
<li class="toctree-l1"><a class="reference internal" href="../../Components/Network/tls/tls.html">14. TLS</a></li>
|
||
<li class="toctree-l1"><a class="reference internal" href="../../Components/BLE/provision_WiFi/provision_WiFi.html">15. Provision_WiFi</a></li>
|
||
<li class="toctree-l1"><a class="reference internal" href="../../Components/BLE/mesh/mesh.html">16. Mesh</a></li>
|
||
<li class="toctree-l1"><a class="reference internal" href="../../Components/BLE/ble_stack/ble_stack.html">17. BLE</a></li>
|
||
</ul>
|
||
<p class="caption"><span class="caption-text">API</span></p>
|
||
<ul>
|
||
<li class="toctree-l1"><a class="reference internal" href="../../API/sys/cronalarms.html">1. cronalarms</a></li>
|
||
<li class="toctree-l1"><a class="reference internal" href="../../API/wifi/wifi_mgmr.html">2. Wi-Fi Manager</a></li>
|
||
</ul>
|
||
|
||
|
||
|
||
</div>
|
||
|
||
</div>
|
||
</nav>
|
||
|
||
<section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">
|
||
|
||
|
||
<nav class="wy-nav-top" aria-label="top navigation">
|
||
|
||
<i data-toggle="wy-nav-top" class="fa fa-bars"></i>
|
||
<a href="../../index.html">BL602 IoT SDK</a>
|
||
|
||
</nav>
|
||
|
||
|
||
<div class="wy-nav-content">
|
||
|
||
<div class="rst-content">
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<div role="navigation" aria-label="breadcrumbs navigation">
|
||
|
||
<ul class="wy-breadcrumbs">
|
||
|
||
<li><a href="../../index.html" class="icon icon-home"></a> »</li>
|
||
|
||
<li>简介</li>
|
||
|
||
|
||
<li class="wy-breadcrumbs-aside">
|
||
|
||
|
||
<a href="../../_sources/Examples/demo_at/AT.rst.txt" rel="nofollow"> 查看页面源码</a>
|
||
|
||
|
||
</li>
|
||
|
||
</ul>
|
||
|
||
|
||
<hr/>
|
||
</div>
|
||
<div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
|
||
<div itemprop="articleBody">
|
||
|
||
<div class="section" id="id1">
|
||
<h1>简介<a class="headerlink" href="#id1" title="永久链接至标题">¶</a></h1>
|
||
<p>本文主要介绍博流 AT指令集以及使用方法。指令集包含:基础 AT 指令、Wi-Fi 功能 AT 指令、TCP/IP ⼯具箱 AT 指令、BLE 相关 AT 指令。</p>
|
||
<table class="docutils align-default" id="id7">
|
||
<caption><span class="caption-text">指令类型</span><a class="headerlink" href="#id7" title="永久链接至表格">¶</a></caption>
|
||
<colgroup>
|
||
<col style="width: 17%" />
|
||
<col style="width: 22%" />
|
||
<col style="width: 61%" />
|
||
</colgroup>
|
||
<tbody>
|
||
<tr class="row-odd"><td><p>类型</p></td>
|
||
<td><p>格式</p></td>
|
||
<td><p>描述</p></td>
|
||
</tr>
|
||
<tr class="row-even"><td><p>查询指令</p></td>
|
||
<td><p>AT+<x>?</p></td>
|
||
<td><p>该指令用于返回当前参数的值</p></td>
|
||
</tr>
|
||
<tr class="row-odd"><td><p>设置指令</p></td>
|
||
<td><p>AT+<x>=<···></p></td>
|
||
<td><p>该指令用于设置用户自定义的参数</p></td>
|
||
</tr>
|
||
<tr class="row-even"><td><p>执行指令</p></td>
|
||
<td><p>AT+<x></p></td>
|
||
<td><p>该指令用于执行模块内部变参数不可变的功能</p></td>
|
||
</tr>
|
||
</tbody>
|
||
</table>
|
||
</div>
|
||
<div class="section" id="at">
|
||
<h1>基础AT指令<a class="headerlink" href="#at" title="永久链接至标题">¶</a></h1>
|
||
<div class="section" id="id2">
|
||
<h2>基础AT指令总览<a class="headerlink" href="#id2" title="永久链接至标题">¶</a></h2>
|
||
<table class="docutils align-default" id="id8">
|
||
<caption><span class="caption-text">指令列表</span><a class="headerlink" href="#id8" title="永久链接至表格">¶</a></caption>
|
||
<colgroup>
|
||
<col style="width: 34%" />
|
||
<col style="width: 66%" />
|
||
</colgroup>
|
||
<tbody>
|
||
<tr class="row-odd"><td><p>指令</p></td>
|
||
<td><p>描述</p></td>
|
||
</tr>
|
||
<tr class="row-even"><td><p><a class="reference internal" href="#at-uart">AT+UART</a></p></td>
|
||
<td><p>设置 UART 配置</p></td>
|
||
</tr>
|
||
<tr class="row-odd"><td><p><a class="reference internal" href="#at-gmr">AT+GMR</a></p></td>
|
||
<td><p>查看版本信息</p></td>
|
||
</tr>
|
||
<tr class="row-even"><td><p><a class="reference internal" href="#at-s-help">AT+S.HELP</a></p></td>
|
||
<td><p>查看AT帮助信息</p></td>
|
||
</tr>
|
||
<tr class="row-odd"><td><p><a class="reference internal" href="#at-rst">AT+RST</a></p></td>
|
||
<td><p>重启模块</p></td>
|
||
</tr>
|
||
<tr class="row-even"><td><p><a class="reference internal" href="#at-restore">AT+RESTORE</a></p></td>
|
||
<td><p>恢复出厂设置</p></td>
|
||
</tr>
|
||
<tr class="row-odd"><td><p><a class="reference internal" href="#at-gslp">AT+GSLP</a></p></td>
|
||
<td><p>进入 Deep-sleep 模式</p></td>
|
||
</tr>
|
||
</tbody>
|
||
</table>
|
||
</div>
|
||
<div class="section" id="id3">
|
||
<h2>基础AT指令描述<a class="headerlink" href="#id3" title="永久链接至标题">¶</a></h2>
|
||
<div class="section" id="at-uart">
|
||
<h3>AT+UART<a class="headerlink" href="#at-uart" title="永久链接至标题">¶</a></h3>
|
||
<blockquote>
|
||
<div><table class="docutils align-default">
|
||
<colgroup>
|
||
<col style="width: 7%" />
|
||
<col style="width: 47%" />
|
||
<col style="width: 46%" />
|
||
</colgroup>
|
||
<tbody>
|
||
<tr class="row-odd"><td rowspan="2"><p>指令</p></td>
|
||
<td rowspan="2"><p>查询指令</p>
|
||
<p>AT+UART?</p>
|
||
</td>
|
||
<td rowspan="2"><p>设置指令</p>
|
||
<p>AT+UART=<baudrate>,<databits>,<stopbits>,<parity>,<flow control></p>
|
||
</td>
|
||
</tr>
|
||
<tr class="row-even"></tr>
|
||
<tr class="row-odd"><td rowspan="2"><p>响应</p></td>
|
||
<td colspan="2" rowspan="2"><p>+UART_CUR:<baudrate>,<databits>,<stopbits>,<parity>,<flow control> | OK</p>
|
||
<p>OK |</p>
|
||
</td>
|
||
</tr>
|
||
<tr class="row-even"></tr>
|
||
<tr class="row-odd"><td rowspan="19"><p>参数说明</p></td>
|
||
<td colspan="2" rowspan="19"><ul class="simple">
|
||
<li><p><baudrate>: UART 波特率</p></li>
|
||
<li><p><databits>: 数据位</p>
|
||
<ul>
|
||
<li><p>5: 5-bit 数据位</p></li>
|
||
<li><p>6: 6-bit 数据位</p></li>
|
||
<li><p>7: 7-bit 数据位</p></li>
|
||
<li><p>8: 8-bit 数据位</p></li>
|
||
</ul>
|
||
</li>
|
||
<li><p><stopbits>: 停止位</p>
|
||
<ul>
|
||
<li><p>1: 1-bit 停⽌位</p></li>
|
||
<li><p>2: 1.5-bit 停⽌位</p></li>
|
||
<li><p>3: 2-bit 停⽌位</p></li>
|
||
</ul>
|
||
</li>
|
||
<li><p><parity>: 校验位</p>
|
||
<ul>
|
||
<li><p>0: None</p></li>
|
||
<li><p>1: Odd</p></li>
|
||
<li><p>2: Even</p></li>
|
||
</ul>
|
||
</li>
|
||
<li><p><flow control>: 流控</p>
|
||
<ul>
|
||
<li><p>0: 不使能流控</p></li>
|
||
<li><p>1: 使能 RTS</p></li>
|
||
<li><p>2: 使能 CTS</p></li>
|
||
<li><p>3: 同时使能 RTS 和 CTS</p></li>
|
||
</ul>
|
||
</li>
|
||
</ul>
|
||
</td>
|
||
</tr>
|
||
<tr class="row-even"></tr>
|
||
<tr class="row-odd"></tr>
|
||
<tr class="row-even"></tr>
|
||
<tr class="row-odd"></tr>
|
||
<tr class="row-even"></tr>
|
||
<tr class="row-odd"></tr>
|
||
<tr class="row-even"></tr>
|
||
<tr class="row-odd"></tr>
|
||
<tr class="row-even"></tr>
|
||
<tr class="row-odd"></tr>
|
||
<tr class="row-even"></tr>
|
||
<tr class="row-odd"></tr>
|
||
<tr class="row-even"></tr>
|
||
<tr class="row-odd"></tr>
|
||
<tr class="row-even"></tr>
|
||
<tr class="row-odd"></tr>
|
||
<tr class="row-even"></tr>
|
||
<tr class="row-odd"></tr>
|
||
</tbody>
|
||
</table>
|
||
</div></blockquote>
|
||
</div>
|
||
<div class="section" id="at-gmr">
|
||
<h3>AT+GMR<a class="headerlink" href="#at-gmr" title="永久链接至标题">¶</a></h3>
|
||
<blockquote>
|
||
<div></div></blockquote>
|
||
</div>
|
||
<div class="section" id="at-rst">
|
||
<h3>AT+RST<a class="headerlink" href="#at-rst" title="永久链接至标题">¶</a></h3>
|
||
<blockquote>
|
||
<div><table class="docutils align-default">
|
||
<colgroup>
|
||
<col style="width: 61%" />
|
||
<col style="width: 39%" />
|
||
</colgroup>
|
||
<tbody>
|
||
<tr class="row-odd"><td><p>执行指令</p></td>
|
||
<td><p>AT+RST</p></td>
|
||
</tr>
|
||
<tr class="row-even"><td><p>响应</p></td>
|
||
<td><p>OK</p></td>
|
||
</tr>
|
||
</tbody>
|
||
</table>
|
||
</div></blockquote>
|
||
</div>
|
||
<div class="section" id="at-restore">
|
||
<h3>AT+RESTORE<a class="headerlink" href="#at-restore" title="永久链接至标题">¶</a></h3>
|
||
<blockquote>
|
||
<div><table class="docutils align-default">
|
||
<colgroup>
|
||
<col style="width: 61%" />
|
||
<col style="width: 39%" />
|
||
</colgroup>
|
||
<tbody>
|
||
<tr class="row-odd"><td><p>执行指令</p></td>
|
||
<td><p>AT+RESTORE</p></td>
|
||
</tr>
|
||
<tr class="row-even"><td><p>响应</p></td>
|
||
<td><p>OK</p></td>
|
||
</tr>
|
||
</tbody>
|
||
</table>
|
||
</div></blockquote>
|
||
</div>
|
||
<div class="section" id="at-s-help">
|
||
<h3>AT+S.HELP<a class="headerlink" href="#at-s-help" title="永久链接至标题">¶</a></h3>
|
||
<blockquote>
|
||
<div><table class="docutils align-default">
|
||
<colgroup>
|
||
<col style="width: 61%" />
|
||
<col style="width: 39%" />
|
||
</colgroup>
|
||
<tbody>
|
||
<tr class="row-odd"><td><p>执行指令</p></td>
|
||
<td><p>AT+S.HELP</p></td>
|
||
</tr>
|
||
<tr class="row-even"><td><p>响应</p></td>
|
||
<td><p>OK</p></td>
|
||
</tr>
|
||
</tbody>
|
||
</table>
|
||
</div></blockquote>
|
||
</div>
|
||
<div class="section" id="at-gslp">
|
||
<h3>AT+GSLP<a class="headerlink" href="#at-gslp" title="永久链接至标题">¶</a></h3>
|
||
<blockquote>
|
||
<div><table class="docutils align-default">
|
||
<colgroup>
|
||
<col style="width: 11%" />
|
||
<col style="width: 89%" />
|
||
</colgroup>
|
||
<tbody>
|
||
<tr class="row-odd"><td rowspan="2"><p>指令</p></td>
|
||
<td rowspan="2"><p>设置指令:</p>
|
||
<p>AT+GSLP=<time></p>
|
||
</td>
|
||
</tr>
|
||
<tr class="row-even"></tr>
|
||
<tr class="row-odd"><td rowspan="2"><p>响应</p></td>
|
||
<td rowspan="2"><p><time></p>
|
||
<p>OK</p>
|
||
</td>
|
||
</tr>
|
||
<tr class="row-even"></tr>
|
||
<tr class="row-odd"><td><p>参数说明</p></td>
|
||
<td><ul class="simple">
|
||
<li><p><time>: 设置 BL602 的睡眠时长,单位:秒。 BL602 会在休眠设定时长后唤醒</p></li>
|
||
</ul>
|
||
</td>
|
||
</tr>
|
||
</tbody>
|
||
</table>
|
||
</div></blockquote>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
<div class="section" id="wi-fi-at">
|
||
<h1>Wi-Fi 功能 AT 指令<a class="headerlink" href="#wi-fi-at" title="永久链接至标题">¶</a></h1>
|
||
<table class="docutils align-default" id="id9">
|
||
<caption><span class="caption-text">指令列表</span><a class="headerlink" href="#id9" title="永久链接至表格">¶</a></caption>
|
||
<colgroup>
|
||
<col style="width: 30%" />
|
||
<col style="width: 70%" />
|
||
</colgroup>
|
||
<tbody>
|
||
<tr class="row-odd"><td><p>指令</p></td>
|
||
<td><p>描述</p></td>
|
||
</tr>
|
||
<tr class="row-even"><td><p><a class="reference internal" href="#at-cwmode">AT+CWMODE</a></p></td>
|
||
<td><p>设置 Wi-Fi 模式 (STA/AP/STA+AP)</p></td>
|
||
</tr>
|
||
<tr class="row-odd"><td><p><a class="reference internal" href="#at-cwlap">AT+CWLAP</a></p></td>
|
||
<td><p>扫描附近AP</p></td>
|
||
</tr>
|
||
<tr class="row-even"><td><p><a class="reference internal" href="#at-cwjap">AT+CWJAP</a></p></td>
|
||
<td><p>连接AP</p></td>
|
||
</tr>
|
||
<tr class="row-odd"><td><p><a class="reference internal" href="#at-cwqap">AT+CWQAP</a></p></td>
|
||
<td><p>断开AP</p></td>
|
||
</tr>
|
||
<tr class="row-even"><td><p><a class="reference internal" href="#at-cwautoconn">AT+CWAUTOCONN</a></p></td>
|
||
<td><p>设置自动重连</p></td>
|
||
</tr>
|
||
<tr class="row-odd"><td><p><a class="reference internal" href="#at-softap">AT+SOFTAP</a></p></td>
|
||
<td><p>开启AP</p></td>
|
||
</tr>
|
||
</tbody>
|
||
</table>
|
||
<div class="section" id="id4">
|
||
<h2>基础AT指令描述<a class="headerlink" href="#id4" title="永久链接至标题">¶</a></h2>
|
||
<div class="section" id="at-cwmode">
|
||
<h3>AT+CWMODE<a class="headerlink" href="#at-cwmode" title="永久链接至标题">¶</a></h3>
|
||
<blockquote>
|
||
<div><table class="docutils align-default">
|
||
<colgroup>
|
||
<col style="width: 9%" />
|
||
<col style="width: 27%" />
|
||
<col style="width: 64%" />
|
||
</colgroup>
|
||
<tbody>
|
||
<tr class="row-odd"><td rowspan="3"><p>指令</p></td>
|
||
<td rowspan="3"><p>查询指令</p>
|
||
<p>AT+CWMODE?</p>
|
||
<p>功能:查询BL602 Wi-Fi 模式</p>
|
||
</td>
|
||
<td rowspan="3"><p>设置指令</p>
|
||
<p>AT+CWMODE=<mode></p>
|
||
<p>功能:设置BL602 Wi-Fi 模式</p>
|
||
</td>
|
||
</tr>
|
||
<tr class="row-even"></tr>
|
||
<tr class="row-odd"></tr>
|
||
<tr class="row-even"><td><p>响应</p></td>
|
||
<td><p>+CWMODE:<mode></p></td>
|
||
<td><p>OK</p></td>
|
||
</tr>
|
||
<tr class="row-odd"><td rowspan="5"><p>参数说明</p></td>
|
||
<td colspan="2" rowspan="5"><ul>
|
||
<li><p><mode>:</p>
|
||
<blockquote>
|
||
<div><ul class="simple">
|
||
<li><p>0: 无 Wi-Fi 模式,并且关闭 Wi-Fi RF</p></li>
|
||
<li><p>1: Station 模式</p></li>
|
||
<li><p>2: SoftAP 模式</p></li>
|
||
<li><p>3: SoftAP+Station 模式</p></li>
|
||
</ul>
|
||
</div></blockquote>
|
||
</li>
|
||
</ul>
|
||
</td>
|
||
</tr>
|
||
<tr class="row-even"></tr>
|
||
<tr class="row-odd"></tr>
|
||
<tr class="row-even"></tr>
|
||
<tr class="row-odd"></tr>
|
||
</tbody>
|
||
</table>
|
||
</div></blockquote>
|
||
</div>
|
||
<div class="section" id="at-cwlap">
|
||
<h3>AT+CWLAP<a class="headerlink" href="#at-cwlap" title="永久链接至标题">¶</a></h3>
|
||
<blockquote>
|
||
<div><table class="docutils align-default">
|
||
<colgroup>
|
||
<col style="width: 9%" />
|
||
<col style="width: 91%" />
|
||
</colgroup>
|
||
<tbody>
|
||
<tr class="row-odd"><td rowspan="3"><p>指令</p></td>
|
||
<td rowspan="3"><p>查询指令</p>
|
||
<p>AT+CWLAP</p>
|
||
<p>功能:扫描附近的AP热点。</p>
|
||
</td>
|
||
</tr>
|
||
<tr class="row-even"></tr>
|
||
<tr class="row-odd"></tr>
|
||
<tr class="row-even"><td rowspan="3"><p>响应</p></td>
|
||
<td rowspan="3"><p>+CWLAP:</p>
|
||
<p><ap list>...</p>
|
||
<p>OK</p>
|
||
</td>
|
||
</tr>
|
||
<tr class="row-odd"></tr>
|
||
<tr class="row-even"></tr>
|
||
<tr class="row-odd"><td><p>响应说明</p></td>
|
||
<td><ul class="simple">
|
||
<li><p><序号>,<SSID>,<BSSID>,<信道>,<信号强度>,<加密方式></p></li>
|
||
</ul>
|
||
</td>
|
||
</tr>
|
||
</tbody>
|
||
</table>
|
||
</div></blockquote>
|
||
</div>
|
||
<div class="section" id="at-cwautoconn">
|
||
<h3>AT+CWAUTOCONN<a class="headerlink" href="#at-cwautoconn" title="永久链接至标题">¶</a></h3>
|
||
<blockquote>
|
||
<div><table class="docutils align-default">
|
||
<colgroup>
|
||
<col style="width: 9%" />
|
||
<col style="width: 28%" />
|
||
<col style="width: 62%" />
|
||
</colgroup>
|
||
<tbody>
|
||
<tr class="row-odd"><td rowspan="3"><p>指令</p></td>
|
||
<td rowspan="3"><p>查询指令</p>
|
||
<p>AT+CWAUTOCONN?</p>
|
||
<p>功能:查询BL602 Wi-Fi 自动重连</p>
|
||
</td>
|
||
<td rowspan="3"><p>设置指令</p>
|
||
<p>AT+CWAUTOCONN=<auto_connect></p>
|
||
<p>功能:设置BL602 Wi-Fi 自动重连</p>
|
||
</td>
|
||
</tr>
|
||
<tr class="row-even"></tr>
|
||
<tr class="row-odd"></tr>
|
||
<tr class="row-even"><td><p>响应</p></td>
|
||
<td><p>+CWAUTOCONN:<mode></p></td>
|
||
<td><p>OK</p></td>
|
||
</tr>
|
||
<tr class="row-odd"><td rowspan="3"><p>参数说明</p></td>
|
||
<td colspan="2" rowspan="3"><ul>
|
||
<li><p><auto_connect>:</p>
|
||
<blockquote>
|
||
<div><ul class="simple">
|
||
<li><p>0: 当WiFi模式变成Station或SoftAP+Station时,不连接WiFi</p></li>
|
||
<li><p>1: 当WiFi模式变成Station或SoftAP+Station(默认配置)时,连接WiFi</p></li>
|
||
</ul>
|
||
</div></blockquote>
|
||
</li>
|
||
</ul>
|
||
</td>
|
||
</tr>
|
||
<tr class="row-even"></tr>
|
||
<tr class="row-odd"></tr>
|
||
</tbody>
|
||
</table>
|
||
</div></blockquote>
|
||
</div>
|
||
<div class="section" id="at-cwjap">
|
||
<h3>AT+CWJAP<a class="headerlink" href="#at-cwjap" title="永久链接至标题">¶</a></h3>
|
||
<blockquote>
|
||
<div><table class="docutils align-default">
|
||
<colgroup>
|
||
<col style="width: 5%" />
|
||
<col style="width: 47%" />
|
||
<col style="width: 48%" />
|
||
</colgroup>
|
||
<tbody>
|
||
<tr class="row-odd"><td rowspan="3"><p>指令</p></td>
|
||
<td rowspan="3"><p>查询指令</p>
|
||
<p>AT+CWJAP?</p>
|
||
<p>功能:查询 BL602 Station 已连接的 AP 信息。</p>
|
||
</td>
|
||
<td rowspan="3"><p>设置指令</p>
|
||
<p>AT+CWJAP=<ssid>,<pwd></p>
|
||
<p>功能:设置 BL602 Station 需连接的 AP。</p>
|
||
</td>
|
||
</tr>
|
||
<tr class="row-even"></tr>
|
||
<tr class="row-odd"></tr>
|
||
<tr class="row-even"><td rowspan="2"><p>响应</p></td>
|
||
<td rowspan="2"><p>+CWJAP:<ssid>,<ip></p>
|
||
<p>OK</p>
|
||
</td>
|
||
<td rowspan="2"><p>OK</p>
|
||
<p>+EVT:0:wifi connected</p>
|
||
</td>
|
||
</tr>
|
||
<tr class="row-odd"></tr>
|
||
<tr class="row-even"><td rowspan="3"><p>参数说明</p></td>
|
||
<td rowspan="3"><ul class="simple">
|
||
<li><p><ssid>: 字符串串参数,AP 的 SSID</p></li>
|
||
<li><p><ip>: 当前获取到的ip地址</p></li>
|
||
</ul>
|
||
</td>
|
||
<td rowspan="3"><ul class="simple">
|
||
<li><p><ssid>: 目标 AP 的 SSID</p></li>
|
||
<li><p><pwd>: 目标 AP 的 密码</p>
|
||
<ul>
|
||
<li><p>若SSID或密码包含任何特殊字符,例如"或者,则需要转义</p></li>
|
||
</ul>
|
||
</li>
|
||
</ul>
|
||
</td>
|
||
</tr>
|
||
<tr class="row-odd"></tr>
|
||
<tr class="row-even"></tr>
|
||
</tbody>
|
||
</table>
|
||
</div></blockquote>
|
||
</div>
|
||
<div class="section" id="at-cwqap">
|
||
<h3>AT+CWQAP<a class="headerlink" href="#at-cwqap" title="永久链接至标题">¶</a></h3>
|
||
<blockquote>
|
||
<div><table class="docutils align-default">
|
||
<colgroup>
|
||
<col style="width: 11%" />
|
||
<col style="width: 89%" />
|
||
</colgroup>
|
||
<tbody>
|
||
<tr class="row-odd"><td rowspan="2"><p>指令</p></td>
|
||
<td rowspan="2"><p>设置指令:</p>
|
||
<p>AT+CWQAP=<link id></p>
|
||
</td>
|
||
</tr>
|
||
<tr class="row-even"></tr>
|
||
<tr class="row-odd"><td><p>响应</p></td>
|
||
<td><p>OK</p></td>
|
||
</tr>
|
||
</tbody>
|
||
</table>
|
||
</div></blockquote>
|
||
</div>
|
||
<div class="section" id="at-softap">
|
||
<h3>AT+SOFTAP<a class="headerlink" href="#at-softap" title="永久链接至标题">¶</a></h3>
|
||
<blockquote>
|
||
<div><table class="docutils align-default">
|
||
<colgroup>
|
||
<col style="width: 5%" />
|
||
<col style="width: 47%" />
|
||
<col style="width: 48%" />
|
||
</colgroup>
|
||
<tbody>
|
||
<tr class="row-odd"><td rowspan="3"><p>指令</p></td>
|
||
<td rowspan="3"><p>查询指令</p>
|
||
<p>AT+SOFTAP?</p>
|
||
<p>功能:查看开启的AP热点信息。</p>
|
||
</td>
|
||
<td rowspan="3"><p>设置指令</p>
|
||
<p>AT+SOFTAP=<ssid>,[pwd]</p>
|
||
<p>功能:开启一个AP热点。</p>
|
||
</td>
|
||
</tr>
|
||
<tr class="row-even"></tr>
|
||
<tr class="row-odd"></tr>
|
||
<tr class="row-even"><td rowspan="2"><p>响应</p></td>
|
||
<td rowspan="2"><p>+SOFTAP:<ip>,<bssid></p>
|
||
<p>OK</p>
|
||
</td>
|
||
<td rowspan="2"><p>OK</p></td>
|
||
</tr>
|
||
<tr class="row-odd"></tr>
|
||
<tr class="row-even"><td rowspan="3"><p>参数说明</p></td>
|
||
<td rowspan="3"><ul class="simple">
|
||
<li><p><ip>: 开启的AP热点的IP地址</p></li>
|
||
<li><p><bssid>: 当前开启的AP热点的MAC地址</p></li>
|
||
</ul>
|
||
</td>
|
||
<td rowspan="3"><ul class="simple">
|
||
<li><p><ssid>: 设置AP 的 SSID</p></li>
|
||
<li><p>[pwd]: 设置 AP 的 密码,若没有此参数,则该AP为开放式AP</p>
|
||
<ul>
|
||
<li><p>若SSID或密码包含任何特殊字符,例如"或者,则需要转义</p></li>
|
||
</ul>
|
||
</li>
|
||
</ul>
|
||
</td>
|
||
</tr>
|
||
<tr class="row-odd"></tr>
|
||
<tr class="row-even"></tr>
|
||
</tbody>
|
||
</table>
|
||
</div></blockquote>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
<div class="section" id="tcp-ip-at">
|
||
<h1>TCP/IP 相关 AT 指令<a class="headerlink" href="#tcp-ip-at" title="永久链接至标题">¶</a></h1>
|
||
<table class="docutils align-default" id="id10">
|
||
<caption><span class="caption-text">指令列表</span><a class="headerlink" href="#id10" title="永久链接至表格">¶</a></caption>
|
||
<colgroup>
|
||
<col style="width: 29%" />
|
||
<col style="width: 71%" />
|
||
</colgroup>
|
||
<tbody>
|
||
<tr class="row-odd"><td><p>指令</p></td>
|
||
<td><p>描述</p></td>
|
||
</tr>
|
||
<tr class="row-even"><td><p><a class="reference internal" href="#at-cipstart">AT+CIPSTART</a></p></td>
|
||
<td><p>建立 TCP 连接,UDP 传输</p></td>
|
||
</tr>
|
||
<tr class="row-odd"><td><p><a class="reference internal" href="#at-cipclose">AT+CIPCLOSE</a></p></td>
|
||
<td><p>关闭 TCP 连接,UDP 传输</p></td>
|
||
</tr>
|
||
<tr class="row-even"><td><p><a class="reference internal" href="#at-cipserver">AT+CIPSERVER</a></p></td>
|
||
<td><p>删除或创建TCP服务器</p></td>
|
||
</tr>
|
||
<tr class="row-odd"><td><p><a class="reference internal" href="#at-cipsend">AT+CIPSEND</a></p></td>
|
||
<td><p>发送TCP/IP数据</p></td>
|
||
</tr>
|
||
<tr class="row-even"><td><p><a class="reference internal" href="#ipd">+IPD</a></p></td>
|
||
<td><p>收到TCP/IP数据</p></td>
|
||
</tr>
|
||
</tbody>
|
||
</table>
|
||
<div class="section" id="id5">
|
||
<h2>基础AT指令描述<a class="headerlink" href="#id5" title="永久链接至标题">¶</a></h2>
|
||
<div class="section" id="at-cipstart">
|
||
<h3>AT+CIPSTART<a class="headerlink" href="#at-cipstart" title="永久链接至标题">¶</a></h3>
|
||
<table class="docutils align-default" id="id11">
|
||
<caption><span class="caption-text">建立 TCP/UDP 连接</span><a class="headerlink" href="#id11" title="永久链接至表格">¶</a></caption>
|
||
<colgroup>
|
||
<col style="width: 7%" />
|
||
<col style="width: 93%" />
|
||
</colgroup>
|
||
<tbody>
|
||
<tr class="row-odd"><td><p>设置指令</p></td>
|
||
<td><p>AT+CIPSTART=<link id>,<type>,<remote IP>,<remote port></p></td>
|
||
</tr>
|
||
<tr class="row-even"><td rowspan="2"><p>响应</p></td>
|
||
<td rowspan="2"><p>OK</p>
|
||
<p>或者已经建立TCP连接,响应:ALREADY CONNECTTED ERROR</p>
|
||
</td>
|
||
</tr>
|
||
<tr class="row-odd"></tr>
|
||
<tr class="row-even"><td rowspan="4"><p>参数说明</p></td>
|
||
<td rowspan="4"><ul class="simple">
|
||
<li><p><link id>: 需要设置的连接ID</p></li>
|
||
<li><p><type>: 字符串串参数,连接类型,"TCP","UDP"</p></li>
|
||
<li><p><remote IP>: 字符串串参数,远端 IP 地址</p></li>
|
||
<li><p><remote port>: 远端端口号</p></li>
|
||
</ul>
|
||
</td>
|
||
</tr>
|
||
<tr class="row-odd"></tr>
|
||
<tr class="row-even"></tr>
|
||
<tr class="row-odd"></tr>
|
||
<tr class="row-even"><td rowspan="2"><p>示例</p></td>
|
||
<td rowspan="2"><p>AT+CIPSTART=0,TCP,192.168.101,8000</p>
|
||
<p>AT+CIPSTART=1,UDP,192.168.101,5000</p>
|
||
</td>
|
||
</tr>
|
||
<tr class="row-odd"></tr>
|
||
</tbody>
|
||
</table>
|
||
</div>
|
||
<div class="section" id="at-cipclose">
|
||
<h3>AT+CIPCLOSE<a class="headerlink" href="#at-cipclose" title="永久链接至标题">¶</a></h3>
|
||
<blockquote>
|
||
<div><table class="docutils align-default">
|
||
<colgroup>
|
||
<col style="width: 13%" />
|
||
<col style="width: 87%" />
|
||
</colgroup>
|
||
<tbody>
|
||
<tr class="row-odd"><td rowspan="2"><p>指令</p></td>
|
||
<td rowspan="2"><p>设置指令:</p>
|
||
<p>AT+CIPCLOSE=<link id></p>
|
||
</td>
|
||
</tr>
|
||
<tr class="row-even"></tr>
|
||
<tr class="row-odd"><td><p>响应</p></td>
|
||
<td><p>OK</p></td>
|
||
</tr>
|
||
<tr class="row-even"><td><p>参数说明</p></td>
|
||
<td><ul class="simple">
|
||
<li><p><link id>: 需要关闭的ID</p></li>
|
||
</ul>
|
||
</td>
|
||
</tr>
|
||
</tbody>
|
||
</table>
|
||
</div></blockquote>
|
||
</div>
|
||
<div class="section" id="at-cipserver">
|
||
<h3>AT+CIPSERVER<a class="headerlink" href="#at-cipserver" title="永久链接至标题">¶</a></h3>
|
||
<blockquote>
|
||
<div><table class="docutils align-default">
|
||
<colgroup>
|
||
<col style="width: 13%" />
|
||
<col style="width: 87%" />
|
||
</colgroup>
|
||
<tbody>
|
||
<tr class="row-odd"><td rowspan="2"><p>指令</p></td>
|
||
<td rowspan="2"><p>设置指令:</p>
|
||
<p>AT+CIPSERVER=<mode>[,<port>]</p>
|
||
</td>
|
||
</tr>
|
||
<tr class="row-even"></tr>
|
||
<tr class="row-odd"><td><p>响应</p></td>
|
||
<td><p>OK</p></td>
|
||
</tr>
|
||
<tr class="row-even"><td rowspan="5"><p>参数说明</p></td>
|
||
<td rowspan="5"><ul>
|
||
<li><p><mode>:</p>
|
||
<blockquote>
|
||
<div><ul class="simple">
|
||
<li><p>0: 关闭服务器器</p></li>
|
||
<li><p>1: 建立服务器器</p></li>
|
||
</ul>
|
||
</div></blockquote>
|
||
</li>
|
||
<li><p><port>: 端口号,默认为 333</p></li>
|
||
</ul>
|
||
</td>
|
||
</tr>
|
||
<tr class="row-odd"></tr>
|
||
<tr class="row-even"></tr>
|
||
<tr class="row-odd"></tr>
|
||
<tr class="row-even"></tr>
|
||
<tr class="row-odd"><td rowspan="3"><p>示例</p></td>
|
||
<td rowspan="3"><p>// 建立 TCP 服务器器</p>
|
||
<blockquote>
|
||
<div><p>AT+CIPSERVER=1,80</p>
|
||
</div></blockquote>
|
||
</td>
|
||
</tr>
|
||
<tr class="row-even"></tr>
|
||
<tr class="row-odd"></tr>
|
||
</tbody>
|
||
</table>
|
||
</div></blockquote>
|
||
</div>
|
||
<div class="section" id="at-cipsend">
|
||
<h3>AT+CIPSEND<a class="headerlink" href="#at-cipsend" title="永久链接至标题">¶</a></h3>
|
||
<blockquote>
|
||
<div><table class="docutils align-default">
|
||
<colgroup>
|
||
<col style="width: 13%" />
|
||
<col style="width: 87%" />
|
||
</colgroup>
|
||
<tbody>
|
||
<tr class="row-odd"><td rowspan="2"><p>指令</p></td>
|
||
<td rowspan="2"><p>设置指令:</p>
|
||
<p>AT+CIPSEND=<link id>,<data len></p>
|
||
</td>
|
||
</tr>
|
||
<tr class="row-even"></tr>
|
||
<tr class="row-odd"><td><p>响应</p></td>
|
||
<td><p>OK</p></td>
|
||
</tr>
|
||
<tr class="row-even"><td rowspan="3"><p>参数说明</p></td>
|
||
<td rowspan="3"><ul class="simple">
|
||
<li><p><link id>: 连接ID</p></li>
|
||
<li><p><data len>: 需要传输的数据长度(单位:byte)</p></li>
|
||
</ul>
|
||
</td>
|
||
</tr>
|
||
<tr class="row-odd"></tr>
|
||
<tr class="row-even"></tr>
|
||
<tr class="row-odd"><td rowspan="3"><p>示例</p></td>
|
||
<td rowspan="3"><p>AT+CIPSEND=0,20</p>
|
||
<blockquote>
|
||
<div><p>表示即将向id为0的连接发送20字节的数据</p>
|
||
</div></blockquote>
|
||
</td>
|
||
</tr>
|
||
<tr class="row-even"></tr>
|
||
<tr class="row-odd"></tr>
|
||
</tbody>
|
||
</table>
|
||
</div></blockquote>
|
||
</div>
|
||
<div class="section" id="ipd">
|
||
<h3>+IPD<a class="headerlink" href="#ipd" title="永久链接至标题">¶</a></h3>
|
||
<blockquote>
|
||
<div><table class="docutils align-default">
|
||
<colgroup>
|
||
<col style="width: 13%" />
|
||
<col style="width: 87%" />
|
||
</colgroup>
|
||
<tbody>
|
||
<tr class="row-odd"><td rowspan="3"><p>说明</p></td>
|
||
<td rowspan="3"><p>+IPD为收到TCP/UDP对端连接数据时的响应</p>
|
||
<p>+IPD:<link id>,<data len></p>
|
||
<p><data></p>
|
||
</td>
|
||
</tr>
|
||
<tr class="row-even"></tr>
|
||
<tr class="row-odd"></tr>
|
||
<tr class="row-even"><td rowspan="3"><p>参数说明</p></td>
|
||
<td rowspan="3"><ul class="simple">
|
||
<li><p><link id>:发送数据的ID</p></li>
|
||
<li><p><data len>:即将接收的数据长度(单位:byte)</p></li>
|
||
<li><p><data>:接收数据</p></li>
|
||
</ul>
|
||
</td>
|
||
</tr>
|
||
<tr class="row-odd"></tr>
|
||
<tr class="row-even"></tr>
|
||
</tbody>
|
||
</table>
|
||
</div></blockquote>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
<div class="section" id="ble-at">
|
||
<h1>BLE 相关 AT 指令<a class="headerlink" href="#ble-at" title="永久链接至标题">¶</a></h1>
|
||
<table class="docutils align-default" id="id12">
|
||
<caption><span class="caption-text">指令列表</span><a class="headerlink" href="#id12" title="永久链接至表格">¶</a></caption>
|
||
<colgroup>
|
||
<col style="width: 30%" />
|
||
<col style="width: 70%" />
|
||
</colgroup>
|
||
<tbody>
|
||
<tr class="row-odd"><td><p>指令</p></td>
|
||
<td><p>描述</p></td>
|
||
</tr>
|
||
<tr class="row-even"><td><p><a class="reference internal" href="#at-bledatalen">AT+BLEDATALEN</a></p></td>
|
||
<td><p>设置 BLE 数据包⻓度</p></td>
|
||
</tr>
|
||
<tr class="row-odd"><td><p><a class="reference internal" href="#at-blename">AT+BLENAME</a></p></td>
|
||
<td><p>设置 BLE 设备名称</p></td>
|
||
</tr>
|
||
<tr class="row-even"><td><p><a class="reference internal" href="#at-bleaddr">AT+BLEADDR</a></p></td>
|
||
<td><p>设置 BLE 设备地址</p></td>
|
||
</tr>
|
||
</tbody>
|
||
</table>
|
||
<div class="section" id="id6">
|
||
<h2>基础AT指令描述<a class="headerlink" href="#id6" title="永久链接至标题">¶</a></h2>
|
||
<div class="section" id="at-bledatalen">
|
||
<h3>AT+BLEDATALEN<a class="headerlink" href="#at-bledatalen" title="永久链接至标题">¶</a></h3>
|
||
<blockquote>
|
||
<div><table class="docutils align-default">
|
||
<colgroup>
|
||
<col style="width: 13%" />
|
||
<col style="width: 87%" />
|
||
</colgroup>
|
||
<tbody>
|
||
<tr class="row-odd"><td rowspan="3"><p>指令</p></td>
|
||
<td rowspan="3"><p>设置指令:</p>
|
||
<p>AT+BLEDATALEN=<conn_index>,<pkt_data_len></p>
|
||
<p>功能:设置 BLE 数据包⻓度。</p>
|
||
</td>
|
||
</tr>
|
||
<tr class="row-even"></tr>
|
||
<tr class="row-odd"></tr>
|
||
<tr class="row-even"><td><p>响应</p></td>
|
||
<td><p>OK</p></td>
|
||
</tr>
|
||
<tr class="row-odd"><td rowspan="2"><p>参数说明</p></td>
|
||
<td rowspan="2"><ul class="simple">
|
||
<li><p><conn_index>: BLE 连接号, 范围 [0~2].</p></li>
|
||
<li><p><pkt_data_len>: 数据包长度,取值范围: 0x001b ~ 0x00fb</p></li>
|
||
</ul>
|
||
</td>
|
||
</tr>
|
||
<tr class="row-even"></tr>
|
||
<tr class="row-odd"><td><p>注意</p></td>
|
||
<td><ul class="simple">
|
||
<li><p>需要先建立 BLE 连接,才能设置数据包长度</p></li>
|
||
</ul>
|
||
</td>
|
||
</tr>
|
||
<tr class="row-even"><td rowspan="3"><p>示例</p></td>
|
||
<td rowspan="3"><p>AT+BLEINIT=1 // 初始化为 client</p>
|
||
<blockquote>
|
||
<div><blockquote>
|
||
<div><p>AT+BLECONN=0,"24:0a:c4:09:34:23"</p>
|
||
</div></blockquote>
|
||
<p>AT+BLEDATALEN=0,30</p>
|
||
</div></blockquote>
|
||
</td>
|
||
</tr>
|
||
<tr class="row-odd"></tr>
|
||
<tr class="row-even"></tr>
|
||
</tbody>
|
||
</table>
|
||
</div></blockquote>
|
||
</div>
|
||
<div class="section" id="at-blename">
|
||
<h3>AT+BLENAME<a class="headerlink" href="#at-blename" title="永久链接至标题">¶</a></h3>
|
||
<blockquote>
|
||
<div><table class="docutils align-default">
|
||
<colgroup>
|
||
<col style="width: 13%" />
|
||
<col style="width: 37%" />
|
||
<col style="width: 51%" />
|
||
</colgroup>
|
||
<tbody>
|
||
<tr class="row-odd"><td rowspan="3"><p>指令</p></td>
|
||
<td rowspan="3"><p>查询指令</p>
|
||
<p>AT+BLENAME?</p>
|
||
<p>功能:查询 BLE 设备名称。</p>
|
||
</td>
|
||
<td rowspan="3"><p>设置指令</p>
|
||
<p>AT+BLENAME=<device_name></p>
|
||
<p>功能:设置 BLE 设备名称,最大长度为32</p>
|
||
</td>
|
||
</tr>
|
||
<tr class="row-even"></tr>
|
||
<tr class="row-odd"></tr>
|
||
<tr class="row-even"><td rowspan="2"><p>响应</p></td>
|
||
<td rowspan="2"><p>+BLENAME:<device_name></p>
|
||
<p>OK</p>
|
||
</td>
|
||
<td rowspan="2"><p>OK</p></td>
|
||
</tr>
|
||
<tr class="row-odd"></tr>
|
||
<tr class="row-even"><td><p>参数说明</p></td>
|
||
<td colspan="2"><ul class="simple">
|
||
<li><p><device_name>: BLE 设备名称</p></li>
|
||
</ul>
|
||
</td>
|
||
</tr>
|
||
</tbody>
|
||
</table>
|
||
</div></blockquote>
|
||
</div>
|
||
<div class="section" id="at-bleaddr">
|
||
<h3>AT+BLEADDR<a class="headerlink" href="#at-bleaddr" title="永久链接至标题">¶</a></h3>
|
||
<blockquote>
|
||
<div><table class="docutils align-default">
|
||
<colgroup>
|
||
<col style="width: 11%" />
|
||
<col style="width: 46%" />
|
||
<col style="width: 43%" />
|
||
</colgroup>
|
||
<tbody>
|
||
<tr class="row-odd"><td rowspan="3"><p>指令</p></td>
|
||
<td rowspan="3"><p>查询指令</p>
|
||
<p>AT+BLEADDR?</p>
|
||
<p>功能:查询 BLE 设备的 public address。</p>
|
||
</td>
|
||
<td rowspan="3"><p>设置指令</p>
|
||
<p>AT+BLEADDR=<addr_type>[,<random_addr>]</p>
|
||
<p>功能:设置 BLE 设备的地址。</p>
|
||
</td>
|
||
</tr>
|
||
<tr class="row-even"></tr>
|
||
<tr class="row-odd"></tr>
|
||
<tr class="row-even"><td rowspan="2"><p>响应</p></td>
|
||
<td rowspan="2"><p>+BLEADDR:<BLE_public_addr></p>
|
||
<p>OK</p>
|
||
</td>
|
||
<td rowspan="2"><p>OK</p></td>
|
||
</tr>
|
||
<tr class="row-odd"></tr>
|
||
<tr class="row-even"><td rowspan="3"><p>参数说明</p></td>
|
||
<td colspan="2" rowspan="3"><ul>
|
||
<li><p><addr_type>:</p>
|
||
<blockquote>
|
||
<div><ul class="simple">
|
||
<li><p>0: public address</p></li>
|
||
<li><p>1: random address</p></li>
|
||
</ul>
|
||
</div></blockquote>
|
||
</li>
|
||
</ul>
|
||
</td>
|
||
</tr>
|
||
<tr class="row-odd"></tr>
|
||
<tr class="row-even"></tr>
|
||
</tbody>
|
||
</table>
|
||
</div></blockquote>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
|
||
|
||
</div>
|
||
|
||
</div>
|
||
<footer>
|
||
|
||
|
||
<hr/>
|
||
|
||
<div role="contentinfo">
|
||
<p>
|
||
|
||
© 版权所有 2020, Bouffalo Lab
|
||
|
||
</p>
|
||
</div>
|
||
|
||
|
||
|
||
利用 <a href="http://sphinx-doc.org/">Sphinx</a> 构建,使用了
|
||
|
||
<a href="https://github.com/rtfd/sphinx_rtd_theme">主题</a>
|
||
|
||
由 <a href="https://readthedocs.org">Read the Docs</a>开发.
|
||
|
||
</footer>
|
||
|
||
</div>
|
||
</div>
|
||
|
||
</section>
|
||
|
||
</div>
|
||
|
||
|
||
<script type="text/javascript">
|
||
jQuery(function () {
|
||
SphinxRtdTheme.Navigation.enable(true);
|
||
});
|
||
</script>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
</body>
|
||
</html> |