Author Topic: Changing Vendor ID  (Read 48799 times)

digistump

  • Administrator
  • Hero Member
  • *****
  • Posts: 1465
Re: Changing Vendor ID
« Reply #15 on: June 26, 2014, 05:55:37 pm »
I thought open source is all about sharing and learning. If it is tied to a particular vendor and project, then it should be closed source as it cannot be modified further. Also, I have read a lot about VUSB and there are a thousand projects which use shared VID/PID. Maybe yes, I am new to this and may not understand it fully, but if I ever recreate one like this, I am sure to make it as customizable as possible such that anyone can just change VID/PID and use it for their own purposes (no harm in dreaming I guess :)

It is - which is why people are here helping you on their own time for free. It is also why even the VID/PID of Digispark/Micronucleus is open source and can be used for any compatible device. That doesn't mean people will go out of their way to make the code ready for any change anyone wants to make. You can easily change the VID/PID - you're on the right track for it - it looks like you have some other errors going on/and or are running micronucleus with your device already plugged in. You also need to recompile the command line upload tool to use the new vid pid.

All that said - as has been said - you cannot convert micronucleus into a avrdude/usbisp compatible bootloader without completely rewriting it - its not because it wasn't made to be open source "enough" - its because it is a totally different protocol that is not related in any way.

As far as littlewire - that is a separate project, that happens to run on the Digispark, is unrelated to the micronucleus bootloader and uses a vid/pid (with permission) that is owned by Adafruit - so while it is also easy to change that VID/PID pair - that is completely different then micronucleus changes.

Ok, just if someone is interested, all devices using libusb (includes USBASP also) uses the same free VID/PID pair.
They definitely do not - those are just free non-commercial ones that they "may" use. There are endless devices that use their own VID/PIDs that use libusb for their drivers - (it is after all a host side library for usb devices - and has nothing to do with the bootloader on the device itself).

I'd encourage you to keep reading and learning before making assertions about what is open and closed - thats just a good way to get people to not help you.

Welcome to our community - I hope you'll learn more about bootloaders and VUSB and come back and share/ask questions once you've absorbed the info that is out there - the VUSB site/wiki/and forums is a great place to start learning.

natarajan

  • Newbie
  • *
  • Posts: 11
Re: Changing Vendor ID
« Reply #16 on: June 26, 2014, 10:52:03 pm »
Thanks for the reply. I appreciate you responding to this.

Quote
It is - which is why people are here helping you on their own time for free. It is also why even the VID/PID of Digispark/Micronucleus is open source and can be used for any compatible device. That doesn't mean people will go out of their way to make the code ready for any change anyone wants to make.

I did not know that Micronucleus VID is opensource that can be used for any compatible device. Happy to know that your are not forcing one with "Written Permission" while using your VID/PID. (If I have understood it right from your words).

Quote
You can easily change the VID/PID - you're on the right track for it - it looks like you have some other errors going on/and or are running micronucleus with your device already plugged in. You also need to recompile the command line upload tool to use the new vid pid.
I am not sure where it is going wrong. Probably I will compile and upload the code with the new changes if it is allowed here. Somebody can suggest if it should'nt be.

Quote
I'd encourage you to keep reading and learning before making assertions about what is open and closed - thats just a good way to get people to not help you.

Welcome to our community - I hope you'll learn more about bootloaders and VUSB and come back and share/ask questions once you've absorbed the info that is out there - the VUSB site/wiki/and forums is a great place to start learning.


Thanks for the words. I will research and will sure give back to this community which is helping me so much. Always admire the power of opensource software or hardware.

gogol

  • Sr. Member
  • ****
  • Posts: 398
Re: Changing Vendor ID
« Reply #17 on: June 27, 2014, 02:04:43 am »
Ok, just if someone is interested, all devices using libusb (includes USBASP also) uses the same free VID/PID pair. Here is an extract of these pairs:
PID dec (hex) | VID dec (hex) | Description of use
==============+===============+===================
1500 (0x05dc) | 5824 (0x16c0) | For Vendor Class devices with libusb
-------------------+-------------------+--------------------------------------------
1503 (0x05df) | 5824 (0x16c0) | For generic HID class devices (which are
                       |                         | NOT mice, keyboards or joysticks)
------------------+-------------------+--------------------------------------------
1505 (0x05e1) | 5824 (0x16c0) | For CDC-ACM class devices (modems)
-------------------+-------------------+--------------------------------------------
1508 (0x05e4) | 5824 (0x16c0) | For MIDI class devices
-------------------+-------------------+--------------------------------------------
Also, for ones information, micronucleus depends on libusb too I guess. I may stop today, but will keep my research on. If in case I succeed, will share it across with all of you

Of course, there are Hundreds of devices using libusb.  Libusb is only a set of methods for communication with USB devices on lower levels.  There are printers, smartcard readers, wireless radios and other devices, using libusb for communication.
However you can't make a digispark to an printer, by using the printers VID/PID pair!
Its the choice of the developer, if he will use libusb or if he will implement the communication by other ways.

The VID/PID Information tells the operating system, which kind of device is connected, and which drivers are needed to talk to that specific device.  The protocol, which is used to talk to that device, differs totally.

You will see some manufactures, which own large ranges of PID, that they use different PID for very similar devices.  In that case the driver knows only by PID, which sub-type of a device is connected, and uses all features associated with that device.
Other manufactures use the same PID for devices with much more differences.  They use a more intelligent protocol, where one of the first actions is, that the device will identify itself with all usable features.

For example it would have been a possibility, that the new micronucleus 2.0 uses a different PID.  But instead of that, the developer decided, to implement a version field into the protocol, so that the most current client is capable to differentiate between old and new version of the bootloader and can use therefore a slightly different protocol.

Owners of VID/PID are trying to make as sure as possible, that their VID/PID pair will not be used for any other product/protocol, because that will harm their product!  If you have a system, which associates wrong drivers to a VID/PID, the original product will fail to communicate. That failure will be seen as an error of that product and will spoil the good name of that product.

Because of that, even in the OPENSOURCE world, VID/PID pairs are associated with a very specific product and protocol. Many companies allow the use of their VID/PID only for unchanged code or with prior written permission.  The whole code is opensource and you are free to modify it.  But it is similar to the name': If you produce a clone of a digispark, you are free to to so, but you are not free, to name that clone digispark.  The same with the original Arduinos. You are free to produce a clone of the Arduino DUE, as long it has another name.  The VID/PID is very similar, as it identifies a very specific device.

natarajan

  • Newbie
  • *
  • Posts: 11
Re: Changing Vendor ID
« Reply #18 on: June 27, 2014, 06:05:09 am »
Quote
Of course, there are Hundreds of devices using libusb.  Libusb is only a set of methods for communication with USB devices on lower levels.  There are printers, smartcard readers, wireless radios and other devices, using libusb for communication.
However you can't make a digispark to an printer, by using the printers VID/PID pair!
Its the choice of the developer, if he will use libusb or if he will implement the communication by other ways.

Quote
For example it would have been a possibility, that the new micronucleus 2.0 uses a different PID.  But instead of that, the developer decided, to implement a version field into the protocol, so that the most current client is capable to differentiate between old and new version of the bootloader and can use therefore a slightly different protocol.

Ah! Now I seem to get a flavor of this. The VID/PID for USBASP has some way to communicate with the PC and say that this protocol is for USBASP and cannot be used for USBTinyISP. Since the comments said that we can change it to free VID/PID's from Obdev, I thought simply replacing should work as it is just a series of numbers. Also, if INF file and command line code has the same ID, I thought it should work.

Quote
Because of that, even in the OPENSOURCE world, VID/PID pairs are associated with a very specific product and protocol. Many companies allow the use of their VID/PID only for unchanged code or with prior written permission.  The whole code is opensource and you are free to modify it.  But it is similar to the name': If you produce a clone of a digispark, you are free to to so, but you are not free, to name that clone digispark.  The same with the original Arduinos. You are free to produce a clone of the Arduino DUE, as long it has another name.  The VID/PID is very similar, as it identifies a very specific device.

Thank you for this. This makes it more clear about opensource and its usage.

If someone is interested, I have compiled and uploaded the files with modified VID/PID under windows. I have only modified VID/PID in micronucleus_lib.h and usbconfig.h.

digistump

  • Administrator
  • Hero Member
  • *****
  • Posts: 1465
Re: Changing Vendor ID
« Reply #19 on: June 27, 2014, 09:46:56 am »
Ah! Now I seem to get a flavor of this. The VID/PID for USBASP has some way to communicate with the PC and say that this protocol is for USBASP and cannot be used for USBTinyISP. Since the comments said that we can change it to free VID/PID's from Obdev, I thought simply replacing should work as it is just a series of numbers. Also, if INF file and command line code has the same ID, I thought it should work.

The notes in that file are from the original VUSB file - which is why they aren't more specific - the usbconfig.h file was just copied over (and changed to match the chip being used).

If someone is interested, I have compiled and uploaded the files with modified VID/PID under windows. I have only modified VID/PID in micronucleus_lib.h and usbconfig.h.

Sounds like you figured it out - great!

Bluebie

  • Sr. Member
  • ****
  • Posts: 486
Re: Changing Vendor ID
« Reply #20 on: July 09, 2014, 07:13:22 pm »
Micronucleus project founder here:

The micronucleus vid/pid pair is free for all to use. While digistump did register it, they have donated it to the community. You are welcome to use it for any piece of software which implements the micronucleus protocol, even if it doesn't use any code we have written! You don't need to ask anyone permission. Just do it.

There is no sensible reason to use a different vid/pid pair. There is no technical or cultural basis in doing so. You are simply making things less compatible, open, and interoperable. The way micronucleus identifies itself as a device that implements the micronucleus protocol is using the vid/pid pair. No micronucleus programming tool has any way to detect if a device implements the protocol other than this, so they will all ignore every other USB device. This is pretty standard behaviour for USB devices! There is no universal usb-if defined standard for programming devices like AVRs compactly. There is no more open way to do it.

Of course you are free to change the vid/pid to be proprietary if you want to.. our liberal open source licensing allows you to do that.. but there really is no reason to do so. It is kind of a weird and anticompetitive thing to do. We haven't gone to any effort to make changing those details easy, because there is no good reason to do it! Don't be a jerk. Stop breaking the standards!

gogol

  • Sr. Member
  • ****
  • Posts: 398
Re: Changing Vendor ID
« Reply #21 on: July 09, 2014, 11:31:30 pm »
Hi Bluebie,

back from a longer break? Glad to see you and your valuable comments again!