Send IOCTL to other driver

Is there any way to send IOCTL from one driver to other driver?

More specifically, I have a lower filter driver “filter.sys” under BTHUSB.sys. From this filter driver, I need to send a specific IOCTL to BTHPORT.sys which, I believe, is on top of BTHUSB.sys but it is not a part of driver stack.

Does anyone know how to send the IOCTL to other driver?

Thanks.

Bthusb is a miniport driver. The port driver is bthport. Like any miniport driver, the two drivers share a single device object. Which ioctl do you want to send? What problem are you trying to solve?

d

Bent from my phone


From: xxxxx@gmail.commailto:xxxxx
Sent: ?5/?2/?2013 10:04 PM
To: Windows System Software Devs Interest Listmailto:xxxxx
Subject: [ntdev] Send IOCTL to other driver

Is there any way to send IOCTL from one driver to other driver?

More specifically, I have a lower filter driver “filter.sys” under BTHUSB.sys. From this filter driver, I need to send a specific IOCTL to BTHPORT.sys which, I believe, is on top of BTHUSB.sys but it is not a part of driver stack.

Does anyone know how to send the IOCTL to other driver?

Thanks.


NTDEV is sponsored by OSR

OSR is HIRING!! See http://www.osr.com/careers

For our schedule of WDF, WDM, debugging and other seminars visit:
http://www.osr.com/seminars

To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer</mailto:xxxxx></mailto:xxxxx>

Hi Doron, thanks for quick reply.

I am trying to send IOCTL_BTH_DISCONNECT_DEVICE.

I am trying to disconnect any connected devices before disable the BT driver. In my filter driver, I sent the “HCI disconnect” event to the upper stack, and it doesn’t seem to work well. One of L2CAP connection is not disconnected immediately (takes about 1 minutes). So, as an alternative solution, if I can send this IOCTL, I expects all L2CAP connections are disconnected immediately and also I don’t need to send HCI disconnect event to the upper stack.

Regarding this IOCTL_BTH_DISCONNECT_DEVICE, is it possible to send from user space via DeviceIoControl()? If yes, how to get the handle for BTHPORT?

What do you mean by disable? Turn it off? Is bthport going to be aware of this change of radio state?

d

Bent from my phone


From: xxxxx@gmail.commailto:xxxxx
Sent: ?5/?3/?2013 9:26 AM
To: Windows System Software Devs Interest Listmailto:xxxxx
Subject: RE:[ntdev] Send IOCTL to other driver

Hi Doron, thanks for quick reply.

I am trying to send IOCTL_BTH_DISCONNECT_DEVICE.

I am trying to disconnect any connected devices before disable the BT driver. In my filter driver, I sent the “HCI disconnect” event to the upper stack, and it doesn’t seem to work well. One of L2CAP connection is not disconnected immediately (takes about 1 minutes). So, as an alternative solution, if I can send this IOCTL, I expects all L2CAP connections are disconnected immediately and also I don’t need to send HCI disconnect event to the upper stack.

Regarding this IOCTL_BTH_DISCONNECT_DEVICE, is it possible to send from user space via DeviceIoControl()? If yes, how to get the handle for BTHPORT?


NTDEV is sponsored by OSR

OSR is HIRING!! See http://www.osr.com/careers

For our schedule of WDF, WDM, debugging and other seminars visit:
http://www.osr.com/seminars

To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer</mailto:xxxxx></mailto:xxxxx>

Yes, you should be able to send the IOCTL from user mode. To get a handle, call BluetoothFindFirstRadio, http://msdn.microsoft.com/en-us/library/windows/desktop/aa362786(v=vs.85).aspx

-----Original Message-----
From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of xxxxx@gmail.com
Sent: Friday, May 3, 2013 9:28 AM
To: Windows System Software Devs Interest List
Subject: RE:[ntdev] Send IOCTL to other driver

Hi Doron, thanks for quick reply.

I am trying to send IOCTL_BTH_DISCONNECT_DEVICE.

I am trying to disconnect any connected devices before disable the BT driver. In my filter driver, I sent the “HCI disconnect” event to the upper stack, and it doesn’t seem to work well. One of L2CAP connection is not disconnected immediately (takes about 1 minutes). So, as an alternative solution, if I can send this IOCTL, I expects all L2CAP connections are disconnected immediately and also I don’t need to send HCI disconnect event to the upper stack.

Regarding this IOCTL_BTH_DISCONNECT_DEVICE, is it possible to send from user space via DeviceIoControl()? If yes, how to get the handle for BTHPORT?


NTDEV is sponsored by OSR

OSR is HIRING!! See http://www.osr.com/careers

For our schedule of WDF, WDM, debugging and other seminars visit:
http://www.osr.com/seminars

To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer