USB Host Library MIDI hanging

@ithinu:

I had another look at your sketch in post #21 above, and this time I may have found something for you to look at. I don't believe that you should be making a call to hostMidi.begin() in your setup(). AFAIK, the only calls that you should make on the MIDIDevice_BigBuffer devices in setup() are the setHandle* functions to set the particular MIDI handler routines.

In your loop(), you correctly call the read() function for your USBhost MIDI interface. You can also make calls to the send*() functions to send specific MIDI message types on your USBhost MIDI interface.

For reference MIDI.begin() is not for the USBhost MIDI interface . . . that is for a traditional serial (COM port) MIDI interface, so I don't believe that it has anything to do with what you are working with/on.

Hope that helps . . .

Mark J Culross
KD5RXT
 
Well, what can I say ?!?!? before making my most recent post, I looked specifically at my current TMPS sketch & in it, I did not make a begin() call on my MIDIDevice_BigBuffer devices. So, now I'm not sure which way is actually correct. If it turns out that begin() should not be called (maybe someone with more expertise can set this straight), I can only offer my sincere apologies for posting incorrect info in the form of an example !! Bad examples are the last thing needed when someone is trying to get started with a completely new capability (I've certainly felt that pain) !!

Hopefully someone else will settle this for certain. Unfortunately, the original example post indicates that it is "Not open for further replies.", so I will not be able to post an update/correction if it turns out to be incorrect.

Mark J Culross
KD5RXT
 
Mark, it's only your will to guess that helped me here. Otherwise, I might still be stuck. Thanks again.

Moreover, I'd say that the problem is with the public API and not with your interpretation.
 
Last edited:
Back
Top