Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

usb connection

Solved!
Go to solution

I have severral arduino leonardos in for a midi in and output application.

The usb connections are remeberd when i shut off the system.

How can i define a good connection?

Thanks in advance.

 

greetings Paul

0 Kudos
Message 1 of 3
(180 Views)
Solution
Accepted by topic author moving_machines

@moving_machines wrote:

I have severral arduino leonardos in for a midi in and output application.

The usb connections are remeberd when i shut off the system.

How can i define a good connection?

Thanks in advance.


This makes not much sense. Did you forgot the word NOT in the sentence: The usb connections are NOT remembered when I shut off the system.

 

If so the problem is that your USB devices do not provide a unique serial number in their initial USB descriptor message. That is the only way Windows can identify identical hardware and distinguish it from another hardware of the same type. And if they do not provide such a unique serial number there is no simple way to magically force that into the system afterwards.

 

The only possible option is if there is anyhow some unique identifier that you can query on the device with its own commands. On startup enumerate all serial ports, go through each and query that unique identifier, build a table with serial port and identifier and store it somewhere, let the user assign somewhere in your app, which identifier belongs to which operation, functionality or resource and use the right identifier when trying to communicate to that resource.

 

On next startup repeat and compare the new enumerated hardware with the table you stored to disk. Reassign the various entries accordingly and prompt the user for configuration of new not earlier encountered hardware. All done! 😁

 

Or you buy a different and probably more expensive MIDI adapter which does have a unique serial number in its USB descriptor.

Rolf Kalbermatter
My Blog
0 Kudos
Message 2 of 3
(122 Views)

thanks for your answer

 

rolf

 

greetimgs paul

0 Kudos
Message 3 of 3
(70 Views)