blueutil
v2.10.0
OSX의 Bluetooth 용 CLI : Power, Discoverable State, List, Inquire Devices, Connect, Info,…
Usage:
blueutil [options]
Without options outputs current state
-p, --power output power state as 1 or 0
-p, --power STATE set power state
-d, --discoverable output discoverable state as 1 or 0
-d, --discoverable STATE set discoverable state
--favourites, --favorites
list favourite devices; returns empty list starting with macOS 12/Monterey
--inquiry [T] inquiry devices in range, 10 seconds duration by default excluding time for name updates
--paired list paired devices
--recent [N] list recently used devices, 10 by default, 0 to list all; returns empty list starting with macOS 12/Monterey
--connected list connected devices
--info ID show information about device
--is-connected ID connected state of device as 1 or 0
--connect ID create a connection to device
--disconnect ID close the connection to device
--pair ID [PIN] pair with device, optional PIN of up to 16 characters will be used instead of interactive input if requested in specific pair mode
--unpair ID EXPERIMENTAL unpair the device
--add-favourite ID, --add-favorite ID
add to favourites; does nothing starting with macOS 12/Monterey
--remove-favourite ID, --remove-favorite ID
remove from favourites; does nothing starting with macOS 12/Monterey
--format FORMAT change output format of info and all listing commands
--wait-connect ID [TIMEOUT]
EXPERIMENTAL wait for device to connect
--wait-disconnect ID [TIMEOUT]
EXPERIMENTAL wait for device to disconnect
--wait-rssi ID OP VALUE [PERIOD [TIMEOUT]]
EXPERIMENTAL wait for device RSSI value which is 0 for golden range, -129 if it cannot be read (e.g. device is disconnected)
-h, --help this help
-v, --version show version
STATE can be one of: 1, on, 0, off, toggle
ID can be either address in form xxxxxxxxxxxx, xx-xx-xx-xx-xx-xx or xx:xx:xx:xx:xx:xx, or name of device to search in paired or recent devices
OP can be one of: >, >=, <, <=, =, !=; or equivalents: gt, ge, lt, le, eq, ne
PERIOD is in seconds, defaults to 1
TIMEOUT is in seconds, default value 0 doesn't add timeout
FORMAT can be one of:
default - human readable text output not intended for consumption by scripts
new-default - human readable comma separated key-value pairs (EXPERIMENTAL, THE BEHAVIOUR MAY CHANGE)
json - compact JSON
json-pretty - pretty printed JSON
Favourite devices and recent access date are not stored starting with macOS 12/Monterey, current time is returned for recent access date by framework instead.
Due to possible problems, blueutil will refuse to run as root user (see https://github.com/toy/blueutil/issues/41).
Use environment variable BLUEUTIL_ALLOW_ROOT=1 to override (sudo BLUEUTIL_ALLOW_ROOT=1 blueutil …).
Exit codes:
0 Success
1 General failure
64 Wrong usage like missing or unexpected arguments, wrong parameters
69 Bluetooth or interface not available
70 Internal error
71 System error like shortage of memory
75 Timeout error
패키지 관리자 홈브류 사용 :
# install
brew install blueutil
# update
brew update
brew upgrade blueutil
# uninstall
brew remove blueutil패키지 관리자 Macports 사용 :
# install
port install blueutil
# update
port selfupdate
port upgrade blueutil
# uninstall
port uninstall blueutil sudo 와 모든 명령을 접두사해야 할 것입니다.
git clone https://github.com/toy/blueutil.git
cd blueutil
# build
make
# install/update
git pull
make install
# uninstall
make uninstall sudo 와 함께 설치/업데이트를 접두사 및 업데이트하지 않아야 할 수도 있습니다.
iobluetooth 프레임 워크 (예 : IOBluetoothPreference*() )에서 개인 API를 사용합니다.
Bluetooth 기본 설정 창을 열면 Bluetooth 전원이 켜져 있거나 기본 설정 창이 열릴 때 전환되는 경우 항상 발견 가능성이 켜집니다.이 상태 변경은 blueutil 이 사용하는 기능에 의해보고되지 않습니다.
사용법을 구축하고 업데이트하려면 :
make build update_usageClang-format를 적용하려면 :
make format테스트하려면 :
make test새 버전을 출시하려면 :
./release major | minor | patchGithub에서 릴리스를 작성하려면 :
./verify_release유효성 검사 오류가 없으면 새 릴리스에 대한 설명에 대한 복사 마크 다운을 복사하십시오.
open " https://github.com/toy/blueutil/releases/new?tag= $( git describe --tags --abbrev=0 ) " 원래 Frederik seiffert [email protected] http://www.frederikseiffert.de/blueutil/
저작권 (C) 2011-2024 Ivan Kuchin. 자세한 내용은 License.txt를 참조하십시오.