bl_iot_sdk/docs/html/Components/Command_line/helper.html
2020-11-08 13:32:47 -06:00

560 lines
20 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<!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>2. helper &mdash; 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" />
<link rel="next" title="3. cli" href="aos_cli.html" />
<link rel="prev" title="1. arch" href="../arch.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="../../Examples/helloworld/helloworld.html">1. Helloword</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../Examples/demo_aws/aws.html">2. aws</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../Examples/demo_peripherals_gpio/GPIO.html">3. GPIO</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../Examples/demo_peripherals_uart_echo/uart_echo.html">4. UART_echo</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../Examples/demo_peripherals_uart_ioctl/uart_ioctl.html">5. UART_ioctl</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../Examples/demo_protocols_http/http.html">6. Http client</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../Examples/demo_protocols_httpc/httpc.html">7. Httpc client</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../Examples/demo_storage_psm/psm.html">8. PSM</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../Examples/demo_storage_romfs/romfs.html">9. Romfs</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../Examples/demo_system_cli/cli.html">10. cli</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../Examples/demo_system_fdt/fdt.html">11. FDT</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../Examples/demo_wifi/wifi.html">12. WiFi</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../Examples/demo_ble/ble.html">13. BLE</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../Examples/demo_mesh/mesh.html">14. Mesh</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../Examples/demo_blsync_ble/blsync_ble.html">15. BLSYNC-BLE</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../Examples/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 class="current">
<li class="toctree-l1"><a class="reference internal" href="../arch.html">1. arch</a></li>
<li class="toctree-l1 current"><a class="current reference internal" href="#">2. helper</a><ul>
<li class="toctree-l2"><a class="reference internal" href="#cli">2.1. cli 命令表</a></li>
<li class="toctree-l2"><a class="reference internal" href="#id1">2.2. 常用命令</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="aos_cli.html">3. cli</a></li>
<li class="toctree-l1"><a class="reference internal" href="../Hal_drv/gpio.html">4. GPIO</a></li>
<li class="toctree-l1"><a class="reference internal" href="../Middleware/bloop/bloop.html">5. BLOOP</a></li>
<li class="toctree-l1"><a class="reference internal" href="../Middleware/blsync/blsync.html">6. BLSYNC</a></li>
<li class="toctree-l1"><a class="reference internal" href="../Middleware/dts/devicetree.html">7. device tree</a></li>
<li class="toctree-l1"><a class="reference internal" href="../Middleware/log/blog.html">8. blog</a></li>
<li class="toctree-l1"><a class="reference internal" href="../Middleware/security/security.html">9. Security</a></li>
<li class="toctree-l1"><a class="reference internal" href="../Middleware/vfs/vfs.html">10. AOS VFS</a></li>
<li class="toctree-l1"><a class="reference internal" href="../Middleware/yloop/yloop.html">11. yloop</a></li>
<li class="toctree-l1"><a class="reference internal" href="../Network/httpc/httpc.html">12. HTTPC</a></li>
<li class="toctree-l1"><a class="reference internal" href="../Network/https/https.html">13. HTTPS</a></li>
<li class="toctree-l1"><a class="reference internal" href="../Network/tls/tls.html">14. TLS</a></li>
<li class="toctree-l1"><a class="reference internal" href="../BLE/provision_WiFi/provision_WiFi.html">15. Provision_WiFi</a></li>
<li class="toctree-l1"><a class="reference internal" href="../BLE/mesh/mesh.html">16. Mesh</a></li>
<li class="toctree-l1"><a class="reference internal" href="../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> &raquo;</li>
<li><span class="section-number">2. </span>helper</li>
<li class="wy-breadcrumbs-aside">
<a href="../../_sources/Components/Command_line/helper.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="helper">
<h1><span class="section-number">2. </span>helper<a class="headerlink" href="#helper" title="永久链接至标题"></a></h1>
<p>这里主要介绍现阶段支持到部分命令,包括系统命令和用户命令,当然有的命令板子不一定支持,可以通过<code class="docutils literal notranslate"><span class="pre">help</span></code>查看其支持到命令,更多的命令请参考源码或者自行添加</p>
<div class="section" id="cli">
<h2><span class="section-number">2.1. </span>cli 命令表<a class="headerlink" href="#cli" title="永久链接至标题"></a></h2>
<ul class="simple">
<li><p><strong>系统命令</strong></p></li>
</ul>
<table class="docutils align-default">
<colgroup>
<col style="width: 34%" />
<col style="width: 66%" />
</colgroup>
<thead>
<tr class="row-odd"><th class="head"><p>name</p></th>
<th class="head"><p>help</p></th>
</tr>
</thead>
<tbody>
<tr class="row-even"><td><p>help</p></td>
<td><p>print this</p></td>
</tr>
<tr class="row-odd"><td><p>p</p></td>
<td><p>print memory</p></td>
</tr>
<tr class="row-even"><td><p>m</p></td>
<td><p>modify memory</p></td>
</tr>
<tr class="row-odd"><td><p>cho</p></td>
<td><p>echo for command</p></td>
</tr>
<tr class="row-even"><td><p>xit</p></td>
<td><p>close CLI</p></td>
</tr>
<tr class="row-odd"><td><p>evname</p></td>
<td><p>print device name</p></td>
</tr>
<tr class="row-even"><td><p>ysver</p></td>
<td><p>system version</p></td>
</tr>
<tr class="row-odd"><td><p>eboot</p></td>
<td><p>reboot system</p></td>
</tr>
<tr class="row-even"><td><p>oweroff</p></td>
<td><p>poweroff system</p></td>
</tr>
<tr class="row-odd"><td><p>ime</p></td>
<td><p>system time</p></td>
</tr>
<tr class="row-even"><td><p>ta</p></td>
<td><p>system ota</p></td>
</tr>
<tr class="row-odd"><td><p>s</p></td>
<td><p>thread dump</p></td>
</tr>
</tbody>
</table>
<ul class="simple">
<li><p><strong>用户命令</strong></p></li>
</ul>
<table class="docutils align-default">
<colgroup>
<col style="width: 32%" />
<col style="width: 68%" />
</colgroup>
<thead>
<tr class="row-odd"><th class="head"><p>name</p></th>
<th class="head"><p>help</p></th>
</tr>
</thead>
<tbody>
<tr class="row-even"><td><p>test_trng</p></td>
<td><p>Test TRNG</p></td>
</tr>
<tr class="row-odd"><td><p>tcpc</p></td>
<td><p>create a tcpc for in a new task</p></td>
</tr>
<tr class="row-even"><td><p>ipc</p></td>
<td><p>iperf TCP client</p></td>
</tr>
<tr class="row-odd"><td><p>ips</p></td>
<td><p>iperf TCP server</p></td>
</tr>
<tr class="row-even"><td><p>ipu</p></td>
<td><p>iperf UDP client</p></td>
</tr>
<tr class="row-odd"><td><p>psm_set</p></td>
<td><p>psm set</p></td>
</tr>
<tr class="row-even"><td><p>psm_unset</p></td>
<td><p>psm unset</p></td>
</tr>
<tr class="row-odd"><td><p>psm_get</p></td>
<td><p>psm get</p></td>
</tr>
<tr class="row-even"><td><p>psm_dump</p></td>
<td><p>psm dump</p></td>
</tr>
<tr class="row-odd"><td><p>psm_erase</p></td>
<td><p>psm dump</p></td>
</tr>
<tr class="row-even"><td><p>amr</p></td>
<td><p>amr encode test</p></td>
</tr>
<tr class="row-odd"><td><p>test_sdh</p></td>
<td><p>test SDH based on fatfs</p></td>
</tr>
<tr class="row-even"><td><p>http</p></td>
<td><p>http client download test</p></td>
</tr>
<tr class="row-odd"><td><p>mjpeg_start</p></td>
<td><p>start mjpeg tasks</p></td>
</tr>
<tr class="row-even"><td><p>msg_set</p></td>
<td><p>message set</p></td>
</tr>
<tr class="row-odd"><td><p>msg_get</p></td>
<td><p>message get</p></td>
</tr>
<tr class="row-even"><td><p>msg_dump</p></td>
<td><p>message dump</p></td>
</tr>
<tr class="row-odd"><td><p>msg_reset</p></td>
<td><p>erase all message regions</p></td>
</tr>
<tr class="row-even"><td><p>msg_set_t1</p></td>
<td><p>message set test 1</p></td>
</tr>
<tr class="row-odd"><td><p>rf_dump</p></td>
<td><p>rf dump</p></td>
</tr>
<tr class="row-even"><td><p>wifi_ap_start</p></td>
<td><p>start AP mode</p></td>
</tr>
<tr class="row-odd"><td><p>wifi_scan</p></td>
<td><p>wifi scan</p></td>
</tr>
<tr class="row-even"><td><p>wifi_mon</p></td>
<td><p>wifi monitor</p></td>
</tr>
<tr class="row-odd"><td><p>wifi_raw_send: wifi</p></td>
<td><p>raw send test</p></td>
</tr>
<tr class="row-even"><td><p>wifi_sta_disconnect</p></td>
<td><p>wifi station disconnect</p></td>
</tr>
<tr class="row-odd"><td><p>wifi_sta_connect</p></td>
<td><p>wifi station connect</p></td>
</tr>
<tr class="row-even"><td><p>airkiss</p></td>
<td><p>airkiss</p></td>
</tr>
<tr class="row-odd"><td><p>rc_fix_en</p></td>
<td><p>wifi rate control fixed rate enable</p></td>
</tr>
<tr class="row-even"><td><p>rc_fix_dis</p></td>
<td><p>wifi rate control fixed rate diable</p></td>
</tr>
<tr class="row-odd"><td><p>wifi_capcode</p></td>
<td><p>capcode utils, wifi_capcode [cap_in] [cap_out]</p></td>
</tr>
<tr class="row-even"><td><p>blfdt</p></td>
<td><p>blfdt</p></td>
</tr>
<tr class="row-odd"><td><p>tc_uart</p></td>
<td><p>bl test uart</p></td>
</tr>
<tr class="row-even"><td><p>audio_play_ram</p></td>
<td><p>play sound fm ram</p></td>
</tr>
<tr class="row-odd"><td><p>audio_config_es8311</p></td>
<td><p>config ES831</p></td>
</tr>
<tr class="row-even"><td><p>audio_mp3</p></td>
<td><p>play sou mp3</p></td>
</tr>
<tr class="row-odd"><td><p>audio_test</p></td>
<td><p>play test</p></td>
</tr>
<tr class="row-even"><td><p>audio_play</p></td>
<td><p>audio play</p></td>
</tr>
</tbody>
</table>
</div>
<div class="section" id="id1">
<h2><span class="section-number">2.2. </span>常用命令<a class="headerlink" href="#id1" title="永久链接至标题"></a></h2>
<ul>
<li><p><strong>查看支持的所有命令</strong></p>
<p>可以通过按键<code class="docutils literal notranslate"><span class="pre">TAB</span></code>查看,或者命令输入<code class="docutils literal notranslate"><span class="pre">help</span></code>如下:</p>
<p><strong>#</strong> <code class="docutils literal notranslate"><span class="pre">help</span></code></p>
</li>
<li><p><strong>配置wifi的临时ssid和passwd重启恢复使用默认值</strong></p>
<p>例如配置wifi:<code class="docutils literal notranslate"><span class="pre">bl_wifi_005</span></code>和密码:<code class="docutils literal notranslate"><span class="pre">123456789</span></code>
命令行输入如下命令:</p>
<p><strong>#</strong> <code class="docutils literal notranslate"><span class="pre">wifi_sta_connect</span> <span class="pre">bl_wifi_005</span> <span class="pre">123456789</span></code></p>
</li>
<li><p><strong>配置wifi的默认ssid和passwd</strong></p>
<p>例如配置wifi:<code class="docutils literal notranslate"><span class="pre">bl_wifi_005</span></code>和密码:<code class="docutils literal notranslate"><span class="pre">123456789</span></code>
命令行输入如下命令:</p>
<p><strong>#</strong> <code class="docutils literal notranslate"><span class="pre">psm_set</span> <span class="pre">conf_ap_ssid</span> <span class="pre">bl_wifi_005</span></code></p>
<p><strong>#</strong> <code class="docutils literal notranslate"><span class="pre">psm_set</span> <span class="pre">conf_ap_psk</span> <span class="pre">123456789</span></code></p>
</li>
<li><p><strong>启动AP</strong></p>
<p>使用<code class="docutils literal notranslate"><span class="pre">wifi_ap_start</span></code>命令可以启动AP但使用前需要使用<code class="docutils literal notranslate"><span class="pre">psm_erase</span></code>擦除STA相关配置信息并重启。启动的AP
SSID为<code class="docutils literal notranslate"><span class="pre">BL60X_uAP_</span></code>加上MAC地址的后3三个字节的HEX串密码为<code class="docutils literal notranslate"><span class="pre">bouffalolab</span></code></p>
</li>
<li><p><strong>系统重启</strong></p>
<p><strong>#</strong> <code class="docutils literal notranslate"><span class="pre">reboot</span></code></p>
</li>
<li><p><strong>播音与录音</strong></p>
<p>该模块需要硬件有SD卡支持暂时仅支持 pcm 格式文件,其他格式待更新</p>
<ul>
<li><p>配置音频的采样频率</p>
<p><strong>#</strong> audio_config 11p025</p>
<p>如果没有参数默认使用16Khz支持
8k、16k、24k、32k、48k、11p025、22p05、44p1
采样频率(11.025khz用11p025表示其他类似),例如这里配置采样频率为
11.025Khz</p>
</li>
<li><p>录音</p>
<p><strong>#</strong> audio_record test.pcm</p>
<p>如果没有参数默认录音放在sd卡根目录中录音文件名record.pcm这里配置文件名test.pcm即存放在在根目录test.pcm文件中同时默认录音10S左右</p>
</li>
<li><p>放音</p>
<p><strong>#</strong> audio_play test.pcm</p>
<p>如果没有参数默认使用sd卡根目录中录音文件名record.pcm这里配置文件名test.pcm即播放SD卡中的test.pcm音频</p>
</li>
</ul>
</li>
<li><p><strong>图传</strong></p>
<p>使用<code class="docutils literal notranslate"><span class="pre">mjpeg_start</span></code>命令可以启动图传的相关任务</p>
</li>
<li><p><strong>保存图片至SD卡</strong></p>
<p>该模块需要硬件有SD卡支持暂时仅支持 jpeg 格式文件,其他格式待更新</p>
<ul>
<li><p>配置mjpeg图片的quality</p>
<p><strong>#</strong> mjpegsd_config 50</p>
<p>暂时支持6种 quality 5、10、25、50、75、100</p>
</li>
<li><p>启动保存图片</p>
<p><strong>#</strong> mjpegsd_start</p>
<p>启动保存图片默认保存50帧数据</p>
</li>
<li><p><strong>注意</strong></p>
<ul class="simple">
<li><p>如上示例命令会在SD卡根目录保存50张
0.jpeg、1.jpeg...49.jpeg图片</p></li>
</ul>
</li>
</ul>
</li>
<li><p><strong>保存AVI至SD卡</strong></p>
<p>该模块需要硬件有SD卡支持暂时仅支持 AIV 格式文件,其他格式待更新</p>
<ul>
<li><p>配置mjpeg图片的quality</p>
<p><strong>#</strong> avisd_config 50 bl_avi_q50.avi</p>
<p>暂时支持6种 quality 5、10、25、50、75、100</p>
</li>
<li><p>启动保存avi</p>
<p><strong>#</strong> avisd_start</p>
<p>启动保存avi默认保存750帧图片</p>
</li>
<li><p><strong>注意</strong></p>
<ul class="simple">
<li><p>如上示例命令会在SD卡根目录保存一个&quot;bl_avi_q50.avi&quot;文件</p></li>
<li><p>内存卡建议格式化为分配单元64KB文件系统FAT32</p></li>
<li><p>avisd_start之后如果想修改quality需重启一下开发板</p></li>
<li><p>该模块需要有psram、camera支持需要开启使能PSRAM、camera相关开关</p></li>
</ul>
</li>
</ul>
</li>
<li><p><strong>二维码配网</strong></p>
<p>该模块是通过手机分享热点的二维码连接WiFi</p>
<ul>
<li><p>启动命令</p>
<p><code class="docutils literal notranslate"><span class="pre">qrcode_connect_wifi</span></code></p>
<p>输入命令后摄像头会初始化然后开始循环识别二维码</p>
</li>
<li><p><strong>注意</strong></p>
<ul class="simple">
<li><p>成功识别的到二维码后,会先打印二维码信息,如果不是分享热点的二维码会继续扫描</p></li>
<li><p>支持SSID为中文但是要求unicode编码规则为UTF-8</p></li>
<li><p>支持开放热点</p></li>
<li><p>该模块需要psram、camera支持需要开启使能PSRAM、camera相关开关</p></li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
</div>
</div>
</div>
<footer>
<div class="rst-footer-buttons" role="navigation" aria-label="footer navigation">
<a href="aos_cli.html" class="btn btn-neutral float-right" title="3. cli" accesskey="n" rel="next">下一页 <span class="fa fa-arrow-circle-right"></span></a>
<a href="../arch.html" class="btn btn-neutral float-left" title="1. arch" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left"></span> 上一页</a>
</div>
<hr/>
<div role="contentinfo">
<p>
&copy; 版权所有 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>