Ok, so as I understand it now, you want to place an UpperFilter on the
(virtual) COM port device created by the Bluetooth stack (BTENUM) in
response to an SPP profile being enumerated on your device.
I believe that can be accomplished by standard SetupDi style operations
which amount to adding your driver service name to the UpperFilters
REG_MULTI_SZ of the DevNode.
Of course enumeration of SPP profiles into virtual ‘devices’ is stack
specific and thus what you do for one stack (MSFT or WIDCOMM) might not work
for another stack.
To manually find what DevNode your device is in the PnP database use DevMgr
to show the properties on the (virtual) Port device. The property “Device
Instance Path” is the subpath from HKLM\Control\Enum to the HW
configuration. As an example, the generic SPP COM port on my Nokia phone
enumerates as
BTHENUM{00001101-0000-1000-8000-00805F9B34FB}_VID&00010001_PID&1856\7&F819B
74&0&00025B00A5A5_C00000002
The driver on this particular device is BTHMODEM and there are no other
filters (upper or lower). BTHMODEM is acting as the FDO in this case.
Other situations (where it is actually a Modem) often have BTHMODEM as a
lower filter and MODEM (Unimodem) as the FDO, or, alternatively I have seen
where a driver *like* BTHMODEM is the FDO and MODEM (Unimodem) is an upper
filter.
Good Luck,
Dave Cattley
Consulting Engineer
Systems Software Development
-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Hannes Finck
Sent: Thursday, November 06, 2008 11:37 AM
To: Windows System Software Devs Interest List
Subject: Re:[ntdev] Serial Filter Driver
Hi David,
The bluetooth device already looks like a COM port to the system. It
offers a virtual COM port, software can communicate with. I want a
filter driver that can manipulate data coming from the usermode software
and going to the virtual COM port. I don’t know if this might help you,
but the device shows up under the COM port section in FilterMan. It is
enumerated by BTHENUM (Service: BTHMODEM). I don’t exactly know where
the filter must hook in. Till now i thaught this must be PORTS, because
this shown there, too.
Sorry for the incomplete description, this is my first attempt of
developing a driver.
Regards
Hannes
David R. Cattley schrieb:
Hannes,
Do you want the device to look like a serial port to the OS or do you want
the device to look like a Bluetooth radio? (or perhaps it is a serial
attached radio device that pairs with a SPP device you want to look like a
serial port to the OS?)
Is the device actually a serial port integrated into the system or does it
attach to a real/generic serial port and enumerate via SerEnum?
If you can do a more complete job of describing the actual hardware
attachment and enumerated driver stack it would be easier to suggest how
you
might accomplish your goal.
Good Luck,
Dave Cattley
Consulting Engineer
Systems Software Development
-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Hannes Finck
Sent: Thursday, November 06, 2008 9:58 AM
To: Windows System Software Devs Interest List
Subject: [ntdev] Serial Filter Driver
Hi,
I want do develop a filter driver for a bluetooth device that registers
itself as a COM port. If a software opens a handle to the device and
sets parameters like baud rate the driver should block this and instead
send a specified string to the device. Now i have this filter sample
from the toaster directory and don’t really know how I should realize
this. Can anyone tell me (in theory) what i have to do to achieve this
functionality? I don’t know from which event i have to open a queue and
how to access the data in the incoming IRP. I think it must be
IPR_MJ_CREATE and IRP_MJ_DEVICE_CONTROL (Serial Device Controle
Request?), right?
Thank you in advance.
Hannes
NTDEV is sponsored by OSR
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
NTDEV is sponsored by OSR
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