Author Topic: Composite USB device with differing VIDs and PIDs per 'device'?  (Read 12429 times)

neema_t

  • Member
  • ***
  • Posts: 2
Hi,

I'm very new to USB development and I'm quite sure the answer is 'No, stop being lazy', but I thought I'd ask anyway just in case.

I've got an Arduino Leonardo that I'm using to introduce myself to USB with a degree of help (in pre-existing files and libraries that I can poke around), but I'm trying to develop a device that uses the drivers that already exist for a different device - think of it as a different set of transducers that will eventually do the same job. The problem is I'm programming the Leonardo (which has an Atmel ATMega 32u4 with native USB) over USB, not the ICSP header, and (as I've read in USB Complete) the VID and PID are how Windows determines which drivers to use to communicate with the device. That obviously results in a conflict where with the normal Arduino VID and PID I'm able to program the device but can't communicate with the intended driver, but with the new VID and PID I can't program the board with the Arduino IDE any more. It's probably worth noting that the driver in question is not my property and I won't, can't and don't want to modify it at all.

I thought about making my own add-on board for Arduino but that would mean making a driver that responds to the new VID and PID, but that would cause a conflict with the existing driver. So then I thought maybe I could program the board so that the Arduino drivers see their VID and PID, the drivers I want to interface with see theirs, and they coexist in the same device... But I suspect that would mean rolling an entirely new driver with an entirely new VID and PID, right?

So the solution is probably that this can't be done and I should use an ICSP programmer instead. Am I right? Sadly I have some sort of ADHD or something where I can't just read the book, I manage to read maybe a page or five then get restless and reach for the board and IDE instead and learn by doing. No matter how obvious the flaws in that style of learning are, I can't help myself.

Jan Axelson

  • Administrator
  • Frequent Contributor
  • *****
  • Posts: 3033
    • Lakeview Research
Re: Composite USB device with differing VIDs and PIDs per 'device'?
« Reply #1 on: March 08, 2016, 09:16:51 am »
Yes, if the VID and PID identify the device as a virtual COM port device, and if you need that driver for programming, there is no easy way to load a VID and PID that use a different driver and still be able to program the device using the virtual COM port.

Why don't you use the ICSP programmer?


neema_t

  • Member
  • ***
  • Posts: 2
Re: Composite USB device with differing VIDs and PIDs per 'device'?
« Reply #2 on: March 08, 2016, 11:08:18 am »
Why don't you use the ICSP programmer?

Well it was because I didn't have one, but I just made one out of an old Nano that someone soldered with the headers on practically sideways. Thanks for confirming!

Jan Axelson

  • Administrator
  • Frequent Contributor
  • *****
  • Posts: 3033
    • Lakeview Research
Re: Composite USB device with differing VIDs and PIDs per 'device'?
« Reply #3 on: March 08, 2016, 11:18:43 am »
Excellent! Glad you found a solution.