You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+33-11Lines changed: 33 additions & 11 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,24 +2,24 @@
2
2
Console utility to discover and pair Bluetooth and Bluetooth Low Energy devices.
3
3
4
4
# Note on connecting to Bluetooth devices
5
-
If you pair a device which is not already paired, the utility will also connect to it (this is default behaviour of Windows Bluetooth API)<br>
6
-
However, if device is paired but not connected, the pairing will fail.<br>
7
-
Unfortunately, currently it is not possible to simulate what "Connect" button from Windows `Bluetooth and Other devices` dialog does.
5
+
If you pair a device that is not already paired, the utility will also connect to it (this is the default behavior of Windows Bluetooth API)<br>
6
+
However, the pairing will fail if a device is paired but not connected.<br>
7
+
Unfortunately, it is impossible to simulate what the "Connect" button from Windows `Bluetooth and Other devices` dialog does.
8
8
More details can be found here: [How to connect to a paired audio Bluetooth device](https://stackoverflow.com/questions/62502414/how-to-connect-to-a-paired-audio-bluetooth-device-using-windows-uwp-api). Specifically, [here](https://github.com/inthehand/32feet/issues/132#issuecomment-1019786324) I have described my failed attempts to implement this functionality.<br>
9
9
10
10
# System requirements
11
11
Windows 10 1809 (10.0.17763) or higher
12
12
13
13
# How to use
14
14
* Download and unpack the latest [release](https://github.com/PolarGoose/BluetoothDevicePairing/releases).
15
-
* Run `BluetoothDevicePairing.exe --help` and `BluetoothDevicePairing.exe <command> --help` to get usage information and check the `Examples` section bellow.
15
+
* Run `BluetoothDevicePairing.exe --help` and `BluetoothDevicePairing.exe <command> --help` to get usage information and check the `Examples` section below.
16
16
17
17
# Examples
18
18
* Discover devices:
19
19
```
20
20
BluetoothDevicePairing.exe discover
21
21
```
22
-
* Pair a device using its mac address:
22
+
* Pair a device using its Mac address:
23
23
```
24
24
BluetoothDevicePairing.exe pair-by-mac --mac 12:34:56:78:9A:BC --type Bluetooth
*[Windows.Devices.Enumeration API](https://docs.microsoft.com/en-us/uwp/api/Windows.Devices.Enumeration?redirectedfrom=MSDN&view=winrt-22000) to work with Bluetooth.
54
76
*[Costura Fody](https://github.com/Fody/Costura) to create a single file executable.
55
77
56
78
### Device pairing by name
57
-
In order to pair a device by name, the utility starts with discovering all available devices and tries to find a device with the required name. After a device is found its mac address is used to request pairing. The command will fail if there are several devices with the same name.
79
+
To pair a device by name, the utility starts by discovering all available devices and tries to find a device with the required name. After a device is found, its Mac address is used to request pairing. The command will fail if there are several devices with the same name.
58
80
59
81
# Return values
60
-
In case of failure the command returns value `-1`. In case of success the`0` is returned.
82
+
If the command fails, it returns the value `-1`. If it succeeds, it returns`0`.
61
83
62
84
# Build
63
85
* Use `Visual Studio 2022` to open the solution file and work with the code
64
-
* Run `.github/workflows/build.ps1` to build a release (to run this script `git.exe` should be in your PATH)
86
+
* Run `.github/workflows/build.ps1` to build a release (to run this script,`git.exe` should be in your PATH)
65
87
66
88
# References
67
89
*[Windows.Devices.Enumeration API usage examples](https://github.com/microsoft/Windows-universal-samples/tree/master/Samples/DeviceEnumerationAndPairing)
0 commit comments