mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-10-29 05:40:27 -04:00
Merge branch 'bluetooth-debug' into 'master'
Draft: bluez5: Add script to collect debug info for bluetooth See merge request pipewire/pipewire!393
This commit is contained in:
commit
328f3d73bc
1 changed files with 43 additions and 0 deletions
43
src/tools/pw-gather-bluetooth-debug-info.sh
Executable file
43
src/tools/pw-gather-bluetooth-debug-info.sh
Executable file
|
|
@ -0,0 +1,43 @@
|
|||
#!/bin/bash
|
||||
|
||||
LOGNAME=bt-debuginfo-$(date +%Y%m%d-%H%M%S).txt
|
||||
|
||||
echo "-------- cat /proc/version" >> "/tmp/$LOGNAME"
|
||||
cat /proc/version > "/tmp/$LOGNAME"
|
||||
|
||||
echo "-------- lsusb -v 2>&1 | egrep 'bDeviceProtocol(.*)Bluetooth' -B7 | head -1 " >> "/tmp/$LOGNAME"
|
||||
lsusb -v 2>&1 | egrep 'bDeviceProtocol(.*)Bluetooth' -B7 | head -1 >> "/tmp/$LOGNAME"
|
||||
|
||||
echo "-------- btmgmt info" >> "/tmp/$LOGNAME"
|
||||
btmgmt info >> "/tmp/$LOGNAME"
|
||||
|
||||
echo "-------- hciconfig hci0 features" >> "/tmp/$LOGNAME"
|
||||
hciconfig hci0 features >> "/tmp/$LOGNAME"
|
||||
|
||||
|
||||
if [ "$(id -u)" = "0" ]; then
|
||||
echo "-------- cat /sys/kernel/debug/usb/devices" >> "/tmp/$LOGNAME"
|
||||
cat /sys/kernel/debug/usb/devices >> "/tmp/$LOGNAME"
|
||||
else
|
||||
echo "-------- cat /sys/kernel/debug/usb/devices skipped" >> "/tmp/$LOGNAME"
|
||||
echo "WARNING: Skipping the collection of kernel usb debug info (can only be accessed as root)"
|
||||
echo " To include kernel usb debug info, re-run the script as root/via sudo"
|
||||
echo " "
|
||||
fi
|
||||
|
||||
echo "-------- bluetoothctl devices" >> "/tmp/$LOGNAME"
|
||||
bluetoothctl devices >> "/tmp/$LOGNAME"
|
||||
|
||||
echo "-------- bluetoothctl info" >> "/tmp/$LOGNAME"
|
||||
bluetoothctl devices | awk '{ print $2 }' | xargs -n 1 bluetoothctl info >> "/tmp/$LOGNAME"
|
||||
|
||||
# avinfo is not installed on every system
|
||||
echo "-------- avinfo codec information" >> "/tmp/$LOGNAME"
|
||||
AVINFO=$(which avinfo)
|
||||
if [ "$AVINFO" = "" ]; then
|
||||
echo "avinfo not found - probably not installed on system" >> "/tmp/$LOGNAME"
|
||||
else
|
||||
bluetoothctl devices | awk '{ print $2 }' | xargs -n 1 "$AVINFO"
|
||||
fi
|
||||
|
||||
echo "Information on your bluetooth setup collected into /tmp/$LOGNAME"
|
||||
Loading…
Add table
Add a link
Reference in a new issue