蓝牙工具 bluetoothctl 用法简介

硬件: 树莓派 Raspberry 3B+  

系统: Raspbian GNU/Linux 9 (stretch)

内核: Linux raspberrypi 4.14.93-v7+ #1189 SMP, armv7l GNU/Linux


1 启动蓝牙工具软件 bluetoothctl

$ sudo bluetoothctl

蓝牙工具 bluetoothctl 用法简介_第1张图片

2. help 命令

[bluetooth]# help
Available commands:
  list                       List available controllers
  show [ctrl]                Controller information
  select               Select default controller
  devices                    List available devices
  paired-devices             List paired devices
  power              Set controller power
  pairable           Set controller pairable mode
  discoverable       Set controller discoverable mode
  agent   Enable/disable agent with given capability
  default-agent              Set agent as the default one
  advertise     Enable/disable advertising with given type
  set-advertise-uuids [uuid1 uuid2 ...] Set advertise uuids
  set-advertise-service [uuid][data=[xx xx ...] Set advertise service data
  set-advertise-manufacturer [id][data=[xx xx ...] Set advertise manufacturer data
  set-advertise-tx-power  Enable/disable TX power to be advertised
  set-scan-filter-uuids [uuid1 uuid2 ...] Set scan filter uuids
  set-scan-filter-rssi [rssi] Set scan filter rssi, and clears pathloss
  set-scan-filter-pathloss [pathloss] Set scan filter pathloss, and clears rssi
  set-scan-filter-transport [transport] Set scan filter transport
  set-scan-filter-clear      Clears discovery filter.
  scan               Scan for devices
  info [dev]                 Device information
  pair [dev]                 Pair with device
  trust [dev]                Trust device
  untrust [dev]              Untrust device
  block [dev]                Block device
  unblock [dev]              Unblock device
  remove                Remove device
  connect               Connect device
  disconnect [dev]           Disconnect device
  list-attributes [dev]      List attributes
  set-alias           Set device alias
  select-attribute  Select attribute
  attribute-info [attribute] Select attribute
  read                       Read attribute value
  write    Write attribute value
  notify             Notify attribute value
  register-profile  Register profile to connect
  unregister-profile         Unregister profile
  version                    Display version
  quit                       Quit program

 

你可能感兴趣的:(Raspberry)