最終更新:2023-10-03 (火) 05:13:54 (200d)  

bluetoothctl
Top / bluetoothctl

interactive bluetooth control tool

コマンド

  • bluetoothctl/advertiseAdvertise Options Submenu
    bluetoothctl/scan?Scan Options Submenu
    bluetoothctl/gatt?Generic Attribute Submenu
    bluetoothctl/list?List available controllers利用可能なコントローラをすべて表示bt-adapter -l
    bluetoothctl/show [ctrl]Controller informationデフォルトのコントローラの情報を表示bt-adapter -i
    bluetoothctl/select? <ctrl>Select default controllerデフォルトのコントローラを選択
    bluetoothctl/devicesList available devices
    bluetoothctl/paired-devicesList paired devices
    bluetoothctl/system-alias? <name>Set controller alias
    bluetoothctl/reset-alias?Reset controller alias
    bluetoothctl/power <on/off>Set controller power
    bluetoothctl/pairable? <on/off>Set controller pairable mode
    bluetoothctl/discoverable <on/off>Set controller discoverable mode
    bluetoothctl/agent <on/off/capability>Enable/disable agent with given capability
    bluetoothctl/default-agentSet agent as the default one
    bluetoothctl/advertise <on/off/type>Enable/disable advertising with given type
    bluetoothctl/set-alias? <alias>Set device alias
    bluetoothctl/scan? <on/off>Scan for devices
    bluetoothctl/info [dev]Device information
    bluetoothctl/pair [dev]Pair with deviceペアリング
    bluetoothctl/trust [dev]Trust device再起動してもペアリング情報を保持
    bluetoothctl/untrust? [dev]Untrust device
    bluetoothctl/block? [dev]Block device
    bluetoothctl/unblock? [dev]Unblock device
    bluetoothctl/remove? <dev>Remove device
    bluetoothctl/connect <dev>Connect device
    bluetoothctl/disconnect? [dev]Disconnect device
    bluetoothctl/menu <name>Select submenu
    bluetoothctl/version?Display version
    bluetoothctl/quit?Quit program
    bluetoothctl/exit?Quit program
    bluetoothctl/helpDisplay help about this programヘルプ表示

help

  • Menu main:
    Available commands:
    -------------------
    advertise                                         Advertise Options Submenu
    scan                                              Scan Options Submenu
    gatt                                              Generic Attribute Submenu
    list                                              List available controllers
    show [ctrl]                                       Controller information
    select <ctrl>                                     Select default controller
    devices                                           List available devices
    paired-devices                                    List paired devices
    system-alias <name>                               Set controller alias
    reset-alias                                       Reset controller alias
    power <on/off>                                    Set controller power
    pairable <on/off>                                 Set controller pairable mode
    discoverable <on/off>                             Set controller discoverable mode
    agent <on/off/capability>                         Enable/disable agent with given capability
    default-agent                                     Set agent as the default one
    advertise <on/off/type>                           Enable/disable advertising with given type
    set-alias <alias>                                 Set device alias
    scan <on/off>                                     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 <dev>                                      Remove device
    connect <dev>                                     Connect device
    disconnect [dev]                                  Disconnect device
    menu <name>                                       Select submenu
    version                                           Display version
    quit                                              Quit program
    exit                                              Quit program
    help                                              Display help about this program

メモ

  • bluetoothctl コマンドを自動化するには、echo -e "command1\ncommand2\n" | bluetoothctl または bluetoothctl -- command を使用します。
    $ echo paired-devices | bluetoothctl
    $ echo -e 'power on\nconnect \t \nquit' | bluetoothctl

help

  • bluetoothctl ver 5.55
    Usage:
    	bluetoothctl [--options] [commands]
    Options:
    	--agent 	Register agent handler: <capability>
    	--monitor 	Enable monitor output
    	--timeout 	Timeout in seconds for non-interactive mode
    	--version 	Display version
    	--help 		Display help
    Commands:
    	list		List available controllers
    	show		Controller information
    	select		Select default controller
    	devices		List available devices
    	paired-devices	List paired devices
    	system-alias	Set controller alias
    	reset-alias	Reset controller alias
    	power		Set controller power
    	pairable	Set controller pairable mode
    	discoverable	Set controller discoverable mode
    	discoverable-timeout	Set discoverable timeout
    	agent		Enable/disable agent with given capability
    	default-agent	Set agent as the default one
    	advertise	Enable/disable advertising with given type
    	set-alias	Set device alias
    	scan		Scan for devices
    	info		Device information
    	pair		Pair with device
    	cancel-pairing	Cancel pairing with device
    	trust		Trust device
    	untrust		Untrust device
    	block		Block device
    	unblock		Unblock device
    	remove		Remove device
    	connect		Connect device
    	disconnect	Disconnect device
    
    	advertise.:
    		uuids		Set/Get advertise uuids
    		service		Set/Get advertise service data
    		manufacturer	Set/Get advertise manufacturer data
    		data		Set/Get advertise data
    		discoverable	Set/Get advertise discoverable
    		discoverable-timeout	Set/Get advertise discoverable timeout
    		tx-power	Show/Enable/Disable TX power to be advertised
    		name		Configure local name to be advertised
    		appearance	Configure custom appearance to be advertised
    		duration	Set/Get advertise duration
    		timeout		Set/Get advertise timeout
    		secondary	Set/Get advertise secondary channel
    		clear		Clear advertise config
    
    	scan.:
    		uuids		Set/Get UUIDs filter
    		rssi		Set/Get RSSI filter, and clears pathloss
    		pathloss	Set/Get Pathloss filter, and clears RSSI
    		transport	Set/Get transport filter
    		duplicate-data	Set/Get duplicate data filter
    		discoverable	Set/Get discoverable filter
    		pattern		Set/Get pattern filter
    		clear		Clears discovery filter.
    
    	gatt.:
    		list-attributes	List attributes
    		select-attribute	Select attribute
    		attribute-info	Select attribute
    		read		Read attribute value
    		write		Write attribute value
    		acquire-write	Acquire Write file descriptor
    		release-write	Release Write file descriptor
    		acquire-notify	Acquire Notify file descriptor
    		release-notify	Release Notify file descriptor
    		notify		Notify attribute value
    		clone		Clone a device or attribute
    		register-application	Register profile to connect
    		unregister-application	Unregister profile
    		register-service	Register application service.
    		unregister-service	Unregister application service
    		register-includes	Register as Included service in.
    		unregister-includes	Unregister Included service.
    		register-characteristic	Register application characteristic
    		unregister-characteristic	Unregister application characteristic
    		register-descriptor	Register application descriptor
    		unregister-descriptor	Unregister application descriptor
    

help

  • bluetoothctl --help
    bluetoothctl ver 5.48
    Usage:
    	bluetoothctl [options]
    Options:
    	--agent 	Register agent handler: <capability>
    	--version 	Display version
    	--help 		Display help
    

ソースコード

関連

参考