Re: USB-MIDI: Mojave vs Catalina
Re: USB-MIDI: Mojave vs Catalina
- Subject: Re: USB-MIDI: Mojave vs Catalina
- From: Brian Willoughby via Coreaudio-api <email@hidden>
- Date: Wed, 29 Jul 2020 23:21:35 -0700
Hola, Andy.
If you can grab a copy of USB Prober.app from Apple and send me a dump of the
USB Descriptors for the working and non-working devices, I might be able to
help you.
I've designed several USB-MIDI Devices based on the PIC18F processor, one with
the TMS320VC55xx, and I've also designed USB firmware for the TM4C1294, but
haven't gotten around to doing USB-MIDI on the TM4C. The TivaWare USB library
can be convoluted, but the source code is all provided, and it's possible to
bend it into shape if you really study it.
I also have the Beagle USB Protocol Analyzer, and I recommend it for diagnosing
problems like this, if USB Prober.app and debugging the firmware itself do not
uncover the issues.
Wow! Apple used to host a USB mailing list, but I see that it seems to have
gone away. I was a subscriber, but I don't see any messages since December 2017.
Brian Willoughby
Sound Consulting
On Jul 29, 2020, at 9:43 PM, Andy Peters via Coreaudio-api
<email@hidden> wrote:
> Hola, all, perhaps someone can help. This is a USB program and a MIDI
> problem, and I don’t know which list is best suited for the questions.
>
> I’m developing a product that includes a USB MIDI device interface. I started
> out by implementing support for the USB MIDI Class 1.0 over Full Speed USB
> 2.0 on a Silicon Labs EFM8UB2 (8-bit 8051) microcontroller. The device
> implemented support for two MIDI Ports in each direction IN and OUT. The
> device descriptor includes the proper Jack descriptions to make this happen.
>
> That works. And specifically, by “works” I mean:
>
> a. it enumerates as a USB MIDI device on Mojave and Catalina (and Windows 7)
> b. in Audio MIDI Setup’s MIDI Studio on both Mojave and Catalina, the device
> shows that it has two IN and two OUT ports.
> c. Buttons on the micro board send MIDI messages to the host when pressed,
> and a MIDI monitor program like Pocket MIDI shows the proper messages on its
> incoming-message window.
> d. Messages sent from Pocket MIDI or from Python (pyMidi) control LEDs on the
> board and the micro has a terminal UART port and I parse the received
> messages and route them out that terminal and they are what I sent.
>
> Again, this all works on both Mojave and Catalina.
>
> I ported the code to the Silicon Labs EFM32GG11 device (32-bit ARM Cortex-M4)
> with the same descriptors and mostly the same handling code (Silicon Labs’
> USB device stacks for the ARM and 8051s is highly similar). Like the EFM8
> case it is a Full Speed USB 2.0 device and it works as detailed above.
>
> Next, I ported the code to the TI Tiva TM4C1294 (much faster 32-bit ARM
> Cortex-M4F) processor. The reason is that the Tiva can support High Speed USB
> 2.0 with an external PHY but it also supports Full Speed USB 2.0 over an
> on-chip PHY, and I am using the latter (Full Speed). The TI USB stack is not
> at all like the SiLabs’ stack, and to be honest it’s overcomplicated. It uses
> the same descriptors as the previous implementations, but I had to fit it
> into TI’s weird format. After more effort than I anticipated, I got to the
> point where it “works.”
>
> And by this I mean:
>
> a. On both Mojave and Catalina, the device successfully enumerates as a USB
> MIDI Class Device.
> b. On both Mojave and Catalina, the device appears in Audio MIDI Setup’s MIDI
> Studio.
>
> But.
>
> On Mojave only, the device’s two IN ports and two OUT ports show up in MIDI
> Studio. I can use Pocket MIDI to send messages to the device, which responds
> as expected (prints the messages to the terminal, lights LEDs). I can push
> buttons and send Note On and Note Off messages back to the computer, and
> Pocket MIDI displays the messages in its input monitor terminal. In other
> words, it behaves as expected.
>
> On Catalina, however, the device’s IN and OUT ports _do not_ show up in MIDI
> Studio. Pocket MIDI does not recognize the ports. I can neither send messages
> to nor receive messages from the device.
>
> I’ve searched and searched and cannot find anything describing the
> differences between the USB MIDI implementation on Catalina vs Mojave.
> Obvious something has changed. Catalina is expecting something that was not
> necessary under Mojave.
>
> I do see that after connection and immediately after USB configuration, both
> Mojave and Catalina send a two-byte SYSEX message 06 f0 f7 to the device. (06
> is the cable #0 and code-index-number 6 indicating SYSEX.) I don’t respond to
> it, and I cannot find any documentation explaining what this message is for.
>
> So, please — what are the differences between Mojava and Catalina that allow
> a device to work on the former and fail on the latter?
>
> — a
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Coreaudio-api mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden