bluetooth USB dongle firmware download

troy zhu 21 Reputation points
2022-11-29T04:32:45.687+00:00

I need to develop Bluetooth USB driver for my host controller.
Windows generic adapter driver (with bthusb.sys) should be used, but it has no firmware download function.
Should I develop new USB driver instead bthusb.sys(refer uart sample)or any way to add firmware download function based on Windows generic adapter driver?

Windows for business | Windows Client for IT Pros | Devices and deployment | Other
0 comments No comments
{count} votes

Accepted answer
  1. Doron Holan 1,801 Reputation points
    2022-11-29T20:03:59.903+00:00

    You should write a device lower filter that sits below bthusb. You are not allowed to touch hardware in AddDevice, instead implement the firmware download in EvtDevicePrepareHardware().

    0 comments No comments

2 additional answers

Sort by: Most helpful
  1. troy zhu 21 Reputation points
    2022-11-29T08:12:05.277+00:00

    can I put firmware download in filter driver's deviceAdd function,
    Like the following sample code ?
    Thank you for any help

    265129-image.png

    0 comments No comments

  2. troy zhu 21 Reputation points
    2022-11-30T02:16:42.14+00:00

    Thank you

    May I register the prepare hardware function in the bluetooth filter driver like the following code?

    DriverEntry{
    WDF_DRIVER_CONFIG_INIT(
    &DriverConfig,
    BthEchoSrvEvtDriverDeviceAdd
    );

    BthEchoSrvEvtDriverDeviceAdd
    {
    WDF_PNPPOWER_EVENT_CALLBACKS_INIT(&pnpPowerCallbacks);
    pnpPowerCallbacks.EvtDevicePrepareHardware = BthFirmwareDownloadAndDeviceReset;
    }

    The usb driver in bthusb.sys has AddDevice, BthEchoSrvEvtDriverDeviceAdd was just a patch for it
    download bluetooth controller firmware and restart the chip.


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.