General Bluetooth Inspection ToolsThese general tools will help you explore bluetooth devices that you are attempting to communicate with: - chrome://bluetooth-internals
- Displays Bluetooth information Chrome is able to access, allowing you to experiment without going through the device chooser dialog, blocklist, or other web platform security aspects of Web Bluetooth.
- nRF Connect for Android or nRF Connect for iOS
- Generic tool that allows you to scan, advertise and explore your Bluetooth low energy (BLE) devices and communicate with them.
chrome://device-logchrome://device-log displays a filtered view of logs on multiple platforms. - Change the Log level to Debug
- Filter to only Bluetooth.
However, more detailed platform logs may be necessary to diagnose issues, see below: Mac
- Quit any running instance of Chrome.
- Launch /Applications/Utilities/Terminal.app
- At the command prompt enter:
/Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome --enable-logging=stderr --vmodule=*bluetooth*=2
- Install Apple's Additional Tools for XCode if you have XCode 8+, otherwise install Apple's Hardware IO Tools for Xcode.
- Use Bluetooth Explorer in that package to try to discover and connect to your device.
- Devices | Low Energy Devices will let you scan for and connect to BLE devices. If you can't find or use your device with Bluetooth Explorer, there's likely a bug in MacOS rather than Chrome. Please file a bug in Apple's bug tracker.
- "Tools" and select "Device Cache Explorer", from there you can click "Delete All" button to clear device cache if needed to help reproduce errors.
- Use PacketLogger to capture a log of Bluetooth packets while you're reproducing your bug. Remember to clear the packet log before you start so you send us mostly relevant packets.
- Quit any running instance of chrome.
- Execute in a console:
google-chrome --enable-logging=stderr --vmodule=*bluetooth*=9 --enable-experimental-web-platform-features
- Get BlueZ version with dpkg -l bluez
- Get Linux kernel version with uname -r
- Start monitoring bluetooth via sudo btmon or record traces in btsnoop format via sudo btmon -w ~/Downloads/btmon.btsnoop
Chrome OS
- Put the device into Developer Mode so you can get a Root Shell
- Open Chrome OS Shell with [Ctrl] + [Alt] + T
- Enter shell and run these shell commands:
sudo su
cp /etc/chrome_dev.conf /usr/local/
mount --bind /usr/local/chrome_dev.conf /etc/chrome_dev.conf
echo "--vmodule=*bluetooth*=9" >> /etc/chrome_dev.conf
- Restart the UI via:
restart ui
- Check out messages logged by Chrome at file:///home/chronos/user/log/chrome
Platform logs
Check out System Logs:
- Go to file:///var/log/messages
- Look for "bluetooth"
Enter a Bluetooth debugging console:
- Open Chrome OS Shell with [Ctrl] + [Alt] + T
- Enter bt_console and type help to get to know commands
Monitor Bluetooth traffic:
- Put the device into Developer Mode so you can get a Root Shell
- Open Chrome OS Shell with [Ctrl] + [Alt] + T
- Enter shell
- Start monitoring bluetooth via sudo btmon or record traces in btsnoop format via sudo btmon -w ~/Downloads/btmon.btsnoop
Monitor BlueZ messages going through a D-Bus message bus:
- Put the device into Developer Mode so you can get a Root Shell
- Open Chrome OS Shell with [Ctrl] + [Alt] + T
- Enter shell
- Start monitoring with dbus-monitor --system "interface=org.freedesktop.DBus.Properties" "interface=org.freedesktop.DBus.ObjectManager"
Getting the BlueZ package version:
- Put the device into Developer Mode so you can get a Root Shell
- Open Chrome OS Shell with [Ctrl] + [Alt] + T
- Enter shell
- Get the version with more /etc/portage/make.profile/package.provided/chromeos-base.packages | grep bluez
And if you're enthusiastic, you can also build BlueZ from source on your Chromebook in Developer Mode, with crouton and run it by following these instructions.
- If you have Android SDK installed
- Use adb logcat, perhaps filtering it through grep to highlight interesting bits for you:
- adb logcat -v time | grep -E " |[Bb]luetooth|cr.Bluetooth|BtGatt|BluetoothGatt|bt_btif_config"
- If you do not have Android SDK installed
- Enable USB Debugging via Developer options
- Settings > About phone and tap Build number seven times. Return to the previous screen to find Developer options.
- Enable USB Debugging
- Take a bug report
- Settings > Debeloper options > Take a bug report
- Send the bug report to yourself, it contains more information than we need.
- Extract the bug report .zip file
- Search within the bug report text file to find the logcat output.
- Copy the relevant section that includes Bluetooth information to a new file, and send that.
WindowsPacket capture - Install the Windows Driver Kit for Windows 10.
- Open an administrator command prompt.
- Run the command: logman create trace "bth_hci" -ow -o C:\bth_hci.etl -p {8a1f9517-3a8c-4a9e-a018-4f17a200f277} 0xffffffffffffffff 0xff -nb 16 16 -bs 1024 -mode Circular -f bincirc -max 4096 -ets
- Reproduce your issue.
- Run the command: logman stop "bth_hci" -ets
- Find BtEtlParse.exe in the WDK and run the command: btetlparse C:\bth_hci.etl
- The resulting file can be opened using Wireshark.
|
|