Need to create a com port for a usb printer device.

We have a printer which has FTDI chip. We are facing some issue with serial signal. So we need to create a driver which enumerate usb printer device as a com port and handle the serial signal. I have taken reference from the serial driver and remove all the things which are touching the real hardware and modify the .inf file accordingly. I able to update this driver on my printer device and when I attached or removed this printer then I found my driver is loading for this printer. But when I am attaching the second printer with same vid and pid then in which my driver is not loading and when I have checked the driver details then I found that usbser.sys has been loaded for the second printer. Please give me some suggestion.

What hardware ID did the second device match against? If you open up the props page for the device in device manager and view the details tab, find the Matching device id property. I am guessing it is a usb compatible ID, not a usb hardware ID. If that is correct, you need to open up setupapi.dev.log and see why your driver package was not selected. Your driver not being signed is one reason.

d

pritosh_mishra wrote:

…But when I am attaching the second printer with same vid and pid then in which my driver is not loading and when I have checked the driver details then I found that usbser.sys has been loaded for the second printer.

Have you checked \windows\inf\setupapi.dev.log to see if it has any
information?  If you install your driver package using something like
“devcon dp_add” or “pnputil /add-driver /install”, and your INF has your
exact VID/PID, then the system should always choose that INF when it
sees your device.

@Tim_Roberts said:
pritosh_mishra wrote:

…But when I am attaching the second printer with same vid and pid then in which my driver is not loading and when I have checked the driver details then I found that usbser.sys has been loaded for the second printer.

Have you checked \windows\inf\setupapi.dev.log to see if it has any
information? If you install your driver package using something like
“devcon dp_add” or “pnputil /add-driver /install”, and your INF has your
exact VID/PID, then the system should always choose that INF when it
sees your device.

Thanks for suggestion I am working on it. I have one doubt after modifying the serial driver I able to install it and when I am sending the data from the serial application then I found that write function is invoking. But problem is that I have to communicate with usb device so how i can do this task. I have to create another usb driver or I need to change in serial driver and convert the serial request in usb request. Please give some suggestion on it.