这是最新(主)开发分支的文档。如果您正在查找以前版本的文档,使用左侧的下拉菜单选择所需的版本。

Bluetooth: Shell

概述

本示例演示在 Shell 下,操控蓝牙功能。

环境要求

  • 支持 BLE 功能的开发板

编译和烧录

示例位置:

examples/bluetooth/bt_cli

编译、烧录等操作,具体参考 快速入门 章节 。

运行结果

W800: help

COMMAND LIST:

cls                   -- clear command line
help                  -- show help info
btfalconnect          -- connect with filter accept list enabled cmd
btfalclear            -- clear filter accept list cmd
btfalrem              -- remove filter accept list cmd
btfaladd              -- clear add filter accept list cmd
btoobclear            -- clear remote oob cmd
btoobremote           -- config remote oob cmd
btauthooktk           -- input tk for oob cmd
btauthpairingconfirm  -- confirm auth pairing cmd
btauthpasskeyconfirm  -- confirm auth passkey cmd
btauthpasskey         -- input auth passkey cmd
btauthcancel          -- cancel default connection auth cmd
btauth                -- config auth method cmd
btconnections         -- show all connections information cmd
btbonds               -- show all bonds information cmd
btbondable            -- on off bondable cmd
btsecurity            -- select security level cmd
btclear               -- clear pair cmd
btoob                 -- show oob information cmd
btchannelmap          -- channel map update cmd
btconnupdate          -- update connection param cmd
btconninfo            -- show connection information cmd
btselect              -- select default connection cmd
btdisconnect          -- disconnect with remote device cmd
btconnectname         -- connect remote device by name cmd
btconnect             -- connect remote device cmd
btdirectedadv         -- directed advertise cmd
btadv                 -- advertise cmd
btscanverbose         -- scan verbose output cmd
btfilteraddressclear  -- remove scan filter address cmd
btfilteraddress       -- scan filter by address cmd
btfilterclear         -- scan filter clear cmd
btfilterintv          -- scan filter by interval cmd
btfilterrssi          -- scan filter by rssi cmd
btfiltername          -- scan filter by name cmd
btscan                -- scan cmd
btidselect            -- select identity cmd
btidshow              -- show identity list cmd
btiddelete            -- delete identity cmd
btidreset             -- reset identity cmd
btidcreate            -- create identity cmd
btappearance          -- show/change bt appearance cmd
btname                -- show/change bt name cmd
bthci                 -- send hci cmd
btload                -- load bt settings cmd
btdeinit              -- disable bt cmd
btinit                -- enable bt cmd
btattmtu              -- read mtu of default connection cmd
btshowdb              -- show gatt database cmd
btset                 -- write by handle cmd
btget                 -- read remote handle list cmd
btunsubscribe         -- unsubscribe notification or indication cmd
btwritewithoutrsp     -- write without response cmd
btwrite               -- write cmd
btresubscribe         -- resubscribe notification or indication cmd
btsubscribe           -- subscribe notification or indication cmd
btsignedwrite         -- signed write cmd
btreadmultiple        -- read multiple by handle cmd
btreaduuid            -- read character or descriptor by uuid cmd
btread                -- read character or descriptor by handle cmd
btexchangemtu         -- exchange ATT mtu cmd
btdiscoversecondary   -- discover secondary service cmd
btdiscoverprimary     -- discover primary service cmd
btdiscoverinclude     -- discover include service cmd
btdiscoverdescriptor  -- discover descriptor cmd
btdiscovercharacter   -- discover characteristic cmd
btdiscover            -- discover service cmd