Go Down

Topic: Renaming an Arduino midi device.... (Read 3 times) previous topic - next topic

Nantonos

Aha, I see what you mean. But I don't think the OP was having a problem with channel conflicts. Instead, they were having a problem with inconsistent device names. I can see how that would be really irritating if you save a project in your DAW where 'Moco for Lufa 1' is controlling some synth, but when you reload the project you have to edit it because that physical device now is called 'Moco for Lufa 2' and 'Moco for Lufa 1' is something else.

The basic problem is that the USB spec allows a manufacturer name and a device name, these are typically hardcoded in firmware and not user editable. So if you have two of the same device then Windows tacks on a number to distinguish them; and that number can change.

If you make two Arduino MIDI devices, say a keyboard and a set of drum pads, both using the same USB controller part, it would be better to be able to edit the device name to something meaningful like 'Super Padset' or 'Awesome Key61' or whatever.

However it looks as if you have to register as a manufacturer and get assigned some code. The values are not simple text strings.

Looking in the HIDUNNO source, Descriptors.c, I see:

Code: [Select]
.VendorID               = 0x03EB,
.ProductID              = 0x2048,
.ReleaseNumber          = VERSION_BCD(00.01),

.ManufacturerStrIndex   = 0x01,
.ProductStrIndex        = 0x02,


oh but wait, later on I see

Code: [Select]
/** Product descriptor string. This is a Unicode string containing the product's details in human readable form,
*  and is read out upon request by the host when the appropriate string ID is requested, listed in the Device
*  Descriptor.
*/
USB_Descriptor_String_t PROGMEM ProductString =
{
.Header                 = {.Size = USB_STRING_LEN(8), .Type = DTYPE_String},

.UnicodeString          = L"HIDUINO"
};


that looks editable.

nicnut

Nantonos,

So in your last post are you suggesting that I upload Descriptors.c into my code? I still haven't tried Grumpy Mike's suggestion as I am having a hard time finding a friend with a windows machine.

Descriptors.c looks editable, but where would you type in what you would like to name the device? Next to .UnicodeString   maybe?

If you have a suggestion please let me know and thank you for your help.

Nick

Nantonos

#12
Sep 25, 2012, 09:35 pm Last Edit: Sep 25, 2012, 09:41 pm by Nantonos Reason: 1

Nantonos,

So in your last post are you suggesting that I upload Descriptors.c into my code?


Not exactly. I was suggesting editing Descriptors.c and then recompiling HIDUNNO to make a new library with a modified name and product ID.

Descriptors.c looks editable, but where would you type in what you would like to name the device? Next to .UnicodeString   maybe?


It looks as if you would change from
Code: [Select]

.ProductID              = 0x2048,

.UnicodeString          = L"HIDUINO"

to
Code: [Select]

.ProductID              = 0x2049,

.UnicodeString          = L"NICK001"


Go Up