-
-
Notifications
You must be signed in to change notification settings - Fork 16
How to get HCI log on Android device
In case your kettle is not working with my integration or it's working with some issues you can help me to investigate the problem and improve integration. I tested it on my kettle only: SkyKettle RK-G211 with firmware 3.9. I'm not sure that it will work with other kettles correctly.
I can analyze the Bluetooth traffic of your smartphone to understand how your kettle works. It's possible to capture traffic on Android devices. Note that it can be difficult for an average user. There are instructions:
Go to Settings, About phone, Software Information and tap the “Build Number” row 7 times. The phone will show a notification counting down once you’ve tapped it a few times, and will confirm that developer options have been enabled.
Go to the newly enabled “Developer options” section of the Settings menu, toggle “Enable Bluetooth HCI snoop log” to enable the logs, and “USB Debugging” to allow us to extract the logs over USB later. Then toggle bluetooth on and off. The log is now enabled (although it doesn’t save to the user accessible part of the filesystem — read on for how to extract it). At this point you should use whatever app you want to capture the bluetooth traffic from to generate some logs.
Crucially, you don’t need the full Android development studio. The tools can be downloaded from https://developer.android.com/studio/releases/platform-tools.html, and will need to be placed somewhere in your PATH so they can be called easily.
Plug your device into your computer with a USB cable. Run adb
devices to see a list of devices adb
recognizes. I had to unlock the phone and tap around in the USB Options section of the notification you get when the phone is plugged in to get a screen up asking me to authorize my computer before it would show as authorized:
Once authorized, adb
will show the device as attached:
$ adb devices
List of devices attached
RF8M55WFB4W device
Start the official app and connect to the Kettle. Do some actions that can't be done using Home Assistant: pair with the kettle if HA can't pair with it, enable/disable light if HA can't do it, etc.
Use the adb bugreport filename
command to generate a bug report, which will create filename.zip in
the current directory. In this zip, in the FS/data/log/bt directory, there is the btsnoop_hci.log
file. It can be missed on some devices, try to find it in the phone memory or SD card in this case.
Create Issue, describe your problem, write which Kettle you using and the firmware version. Attach the btsnoop_hci.log
file and write which actions have you done during the capture process.
Also, generate and attach a Home Assistant log file if you can.
If you have some problems with my integration please check those pages: