Skip to content

Commit 84af1da

Browse files
committed
Address feedback
1 parent 55e5f96 commit 84af1da

2 files changed

Lines changed: 187 additions & 107 deletions

File tree

README.md

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,12 @@ Opening Bluetooth preference pane always turns on discoverability if bluetooth p
1010

1111
## Alternative Method
1212

13-
By default, `blueutil` uses IOBluetooth framework APIs to query paired devices. As an alternative, you can use the `--use-system-profiler` option or set the `BLUEUTIL_USE_SYSTEM_PROFILER=1` environment variable to use the `system_profiler` command instead.
13+
By default, `blueutil` uses IOBluetooth framework APIs to query paired devices. As an alternative, you can set the `BLUEUTIL_USE_SYSTEM_PROFILER=1` environment variable to use the `system_profiler` command instead.
1414

1515
The system_profiler method resolves an issue where some multi-point Bluetooth devices (devices that can connect to multiple devices simultaneously) may not report their connection status correctly through the IOBluetooth APIs, but do show the correct status via system_profiler.
1616

17+
**Note:** The system_profiler method is experimental and may have compatibility issues with some blueutil commands.
18+
1719
## Usage
1820

1921
<!--USAGE[-->
@@ -48,7 +50,6 @@ Without options outputs current state
4850
4951
--format FORMAT change output format of info and all listing commands
5052
51-
--use-system-profiler use system_profiler instead of IOBluetooth API for paired device queries
5253
5354
--wait-connect ID [TIMEOUT]
5455
EXPERIMENTAL wait for device to connect
@@ -77,7 +78,7 @@ Due to possible problems, blueutil will refuse to run as root user (see https://
7778
Use environment variable BLUEUTIL_ALLOW_ROOT=1 to override (sudo BLUEUTIL_ALLOW_ROOT=1 blueutil …).
7879
7980
Environment variables:
80-
BLUEUTIL_USE_SYSTEM_PROFILER=1 use system_profiler instead of IOBluetooth API (same as --use-system-profiler)
81+
BLUEUTIL_USE_SYSTEM_PROFILER=1 EXPERIMENTAL: use system_profiler instead of IOBluetoothDevice API for paired device queries
8182
8283
Exit codes:
8384
0 Success
@@ -98,9 +99,14 @@ List paired devices using IOBluetooth API (default):
9899
blueutil --paired
99100
```
100101

101-
List paired devices using system_profiler:
102+
Use system_profiler for a single command:
103+
```sh
104+
BLUEUTIL_USE_SYSTEM_PROFILER=1 blueutil --paired
105+
```
106+
107+
Use system_profiler outside of shell (e.g., in scripts):
102108
```sh
103-
blueutil --use-system-profiler --paired
109+
/usr/bin/env BLUEUTIL_USE_SYSTEM_PROFILER=1 blueutil --paired
104110
```
105111

106112
Set environment variable to always use system_profiler:

0 commit comments

Comments
 (0)