The bus driver gives you dynamically enumerable com ports (the ones that never go away), so there isn’t much of an advantage other than you can at runtime decide how many ports to expose to the app. OTOH i am guessing the app has a fixed set of com port numbers it opens, so dynamicism is not desired here either
d
Bent from my phone
From: Roscoe Casitamailto:xxxxx
Sent: ?9/?3/?2014 6:45 PM
To: Windows System Software Devs Interest Listmailto:xxxxx
Subject: RE: [ntdev] USB-COM with persistent handle across disconnect-reconnects.
What’s the advantages/disadvantages of the two approaches?
On Sep 3, 2014 6:41 PM, “Doron Holan” > wrote:
You can go with one driver root enumerated N times or have one root enumerated driver that enumerates N PDOs that a second driver loads on.
d
Bent from my phone
________________________________
From: Roscoe Casitamailto:xxxxx
Sent: ?9/?3/?2014 6:32 PM
To: Windows System Software Devs Interest Listmailto:xxxxx
Subject: Re: [ntdev] USB-COM with persistent handle across disconnect-reconnects.
I believe this is how the current driver works, simple one to one root enumerated device that reconnects as needed.
The goal is to move this to wdf for maintainability.
I was curious about using the bus based approach to enum the device s as needed, so that we only have 1 root enumerated bus, with child fdo’s.
On Sep 3, 2014 6:28 PM, “Mark Roddy” > wrote:
If the driver is not allowing the USB enumerated PDO to complete removal (by for example blocking things at the FDO level) that might account for the bugcheck. Instead of hanging the serial PDOs off of a hot-pluggable FDO, instead a root enumerated FDO could be used for the bus functionality, allowing the related USB FDOs to come and go as needed and maintaining the state of the serial PDOs as per your handle based approach.
Mark Roddy
On Wed, Sep 3, 2014 at 7:41 PM, Roscoe Casita > wrote:
These are usually old point of sale terminals that open a com port at the start of the day, run until close if the store then shutdown.
The problem happens when you unplug or reset the USB scanner device.
Usbser.sys will reattach to the device, but the program still has a handle to the old com port open, which is not reconnected, and usbser enumerates a new com port.
The current driver will enumerate a serial port when the device attaches, and will keep it ‘alive’ as long as a program still has an open handle to the serial port. The driver will reconnect the serial port to the device if it was still active. If the device leaves while no handle is open, or the handle is closed while the device is not attached, then the serial port is removed from the system.
The idea was to use the bus driver to enumerate the serial port, maintain the persistence of the serial port side, facilitate the reconnection, and removal when appropriate.
Let me know any other questions and I will do my best to answer them.
On Sep 3, 2014 4:31 PM, > wrote:
Hmmmm… Which handle gets closed when who resets which the device, by doing what exactly?
Peter
OSR
@OSRDrivers
—
NTDEV is sponsored by OSR
Visit the list at: http://www.osronline.com/showlists.cfm?list=ntdev
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
— NTDEV is sponsored by OSR Visit the list at: http://www.osronline.com/showlists.cfm?list=ntdev 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
— NTDEV is sponsored by OSR Visit the list at: http://www.osronline.com/showlists.cfm?list=ntdev 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
— NTDEV is sponsored by OSR Visit the list at: http://www.osronline.com/showlists.cfm?list=ntdev 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
—
NTDEV is sponsored by OSR
Visit the list at: http://www.osronline.com/showlists.cfm?list=ntdev
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
— NTDEV is sponsored by OSR Visit the list at: http://www.osronline.com/showlists.cfm?list=ntdev 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></mailto:xxxxx></mailto:xxxxx>