This information is targeted to developers, for non-developer information on troubleshooting Bluetooth, see Fix Bluetooth problems in Windows 10.
This readme covers how developers can collect Bluetooth logs for bugs using Windows Performance Recorder (WPR) using the custom Bluetooth tracing Recording Profile found here: BluetoothStack.wprp. There are few ways you can collect these logs:
- Normal Mode (cancels on reboot): Tracing for a single boot session, will not continue tracing after a reboot
- Autologger mode (collects logs across reboots): Tracing for running across reboots until you stop it manually
Note: Only one of the above methods can be used at a time.
More details can be found in the Additional Information section.
-
From an administrative PowerShell session run:
wget https://github.com/Microsoft/busiotools/raw/master/bluetooth/tracing/BluetoothStack.wprp -outfile .\BluetoothStack.wprp wpr.exe -start BluetoothStack.wprp!BluetoothStack -filemode
The above commands download and run the Bluetooth tracing Recording Profile (BluetoothStack.wprp)
-
To ensure we capture connections either:
- Toggle the Bluetooth radio off-on via the quick action menu.
- Force a power cycle of the remote device.
-
Reproduce the issue.
-
From an administrative PowerShell session:
wpr.exe -stop BthTracing.etl
-
From an adminstrative PowerShell session:
wget https://github.com/Microsoft/busiotools/raw/master/bluetooth/tracing/BluetoothStack.wprp -UseBasicParsing -outfile .\BluetoothStack.wprp wpr.exe -boottrace -addboot BluetoothStack.wprp!BluetoothStack -filemode shutdown -r -f -t 0
The above commands download and run the Bluetooth tracing Recording Profile (BluetoothStack.wprp) in Autologger mode.
-
Reboot the machine:
- trace is not running until you reboot the machine
- log will keep running across reboots until you stop it manually
-
Reproduce the issue
-
From an adminstrative PowerShell session:
wpr.exe -boottrace -stopboot BthTracing.etl
This command stops tracing, if you want to start tracing again you'll need to start it again.
Note: To see the status of an autologger trace run the following command:
Wpr -status -instancename wprapp_boottr
Some additional information on the log collection steps above.
From PowerShell execute:
wget https://github.com/Microsoft/busiotools/raw/master/bluetooth/tracing/GetBluetoothRadioInfo.ps1 -UseBasicParsing | iex
The above collects Verbose logs by default. If you don't need verbose logs, replace BluetoothStack.wprp!BluetoothStack
with BluetoothStack.wprp!BluetoothStack.Light
in the above commands.
- Attach
c:\windows\inf\setupapi.*.log
andc:\Windows\Panther\setupact.log
andc:\windows\logs\windowsupdate\*
to the bug. - Attach
Microsoft-Windows-Kernel-PnP%4Configuration.evtx
(In event viewer asMicrosoft-Windows-Kernel-PnP\Configuration
).
-
From an administrative PowerShell session:
wget https://github.com/Microsoft/busiotools/raw/master/bluetooth/tracing/BluetoothStack.wprp -outfile .\BluetoothStack.wprp wpr.exe -start BluetoothStack.wprp!BluetoothStack.Light -start CPU -filemode
The above commands download and run the Bluetooth tracing Recording Profile (BluetoothStack.wprp) to collect performance logs.
Note: This will not continue tracing after a reboot
-
To ensure the device reconnects either:
- Toggle the Bluetooth radio off-on via the quick action menu.
- Force a power cycle of the remote device.
-
Reproduce the issue.
-
From an administrative PowerShell session:
wpr.exe -stop BthTracing_CPU.etl
wpr.exe
is available on all version of windows. More details can be found here.
wpr.exe /?
will also give you more information.