microsoft / busiotools

Tools for debugging and testing io buses for Windows
MIT License
190 stars 100 forks source link

Tracing of HCI commands #110

Open 2tilted opened 2 years ago

2tilted commented 2 years ago

Hi, I am pretty new to Windows tools and am playing around with the Bluetooth logger presented in the How to collect Bluetooth logs section. I followed the instructions and noticed the focus on collecting Bluetooth radio information.

My question is if there is a possibility for the WPR to record Windows HCI events and other Bluetooth-related events to for instance the Bthport driver.

Cheers, Toni Nguyen

erikpe-msft commented 1 year ago

Hi @2tilted,

I have good news for you! If you're collecting logs using the instructions in How to collect Bluetooth logs, then you're already collecting HCI traffic. You can use the Bluetooth ETL parse tool to extract HCI logs in the format of your choice from the .etl file.

Another option is to use the Bluetooth Virtual Sniffer to view Windows Bluetooth HCI logs in real-time.

Thanks, -Erik

2tilted commented 1 year ago

Hi @erikpe-msft ,

Thank you for the answer! the BTVS is precisely what I was looking for. Do you know how the logs are generated in Kernel space and then simply forwarded into User-space?
I am trying to figure out how the tracing software gets its logs from the kernel drivers and what libraries/functions are used to do so.

Cheers, Toni Nguyen