Here is a method for capturing bluetooth data packets on Android.
1. Prerequisites
First, you need an Android phone.
Then your Android system version must be 4.4 or later.
I have never done Android development, but I don't know how developers capture Bluetooth packets.
However, I know that hcidump can be used to capture Bluetooth packets.
This method is not described here (You may learn about it later)
2. Enable the Function
There is a function in the developer Option
-[Enable Bluetooth HCI Snoop log/enable Bluetooth HCI Information Collection log]
Enable it
3. packet capture
Then you can perform various Bluetooth operations.
/Sdcard/btsnoop_hci.log
Copy it and place it on the computer. Then you can use Wireshark to view it directly.
You can use filters such as bthci_acl, btl2cap, and bthfp to filter data packets and view the protocols you are concerned about.
Refer:
<Mozilla B2G/Bluetooth>
<Wireshark Bluetooth wiki>
<Wireshark display filter reference>
<Android4.3 capture HCI log by bluetooth>
<Bluetooth packet capture on Android 4.4>