iOS 15: new USB MIDI Port ID at each re-connection

Hi,

we are facing a weird issue with iOS 15: for some USB/MIDI devices, each time they get connected to the iPad via USB (or rebooted), we get a different Port ID.
Since our host relies on the Port ID to reconnect the Port to the graph, the result is that the Port appears disconnected, and of course, the user is frustrated :slight_smile:
We cannot yet understand what those devices have in common. A couple of devices that show the problem are: Yamaha Motif, Yamaha Piaggero.
Here is an excerpt of the XML where we save the Port IDs each time a MIDI device connects.

      <MIDIOUTPUT name="YAMAHA MOTIF XF7 Porta 1" id="-119648265 1118310184" custom_name=""/>
      <MIDIOUTPUT name="YAMAHA MOTIF XF7 Porta 1" id="201398083 -1156807127" custom_name=""/>
      <MIDIOUTPUT name="YAMAHA MOTIF XF7 Porta 1" id="1881473804 1258374163" custom_name=""/>

Someone experiencing the same issue?

Best,
Emanuele

1 Like

Hi Emanuele,

This would explain what is happening to my 2021 M1 iPad Pro when I use it to play live. I use a MIDI Keyboard controller connected via USB. I use the GarageBand and KORG app and they both do the same thing.

Since updating to iOS 15 on the the connection to the keyboard will not resume if it is interrupted. When it gets disconnected it takes me up to 10+ attempts before it reconnects. I try rebooting the apps and the iPad.

So now I have to leave the iPad and Keyboard on all the time throughout the set which isn’t the end of the world, it just drains the battery quite quickly.

Looks like maybe that ID change might be the cause. The issue is easily reproducable.

Seems it’s an Apple bug?

Upgraded to 15.2.1 and the bug is fixed. My keyboard reconnects properly every time.

In our case no iOS 15 update has solved the issue.
With 15.4.1 it is even worst: connecting the MOTIF to the iPad via USB makes it unusable with any music application. Many apps do not boot, they get stuck. If I disconnected the MOTIF everything works. The connection was direct without using hub or not apple adapters.

Could you clarify – is the “Port ID” you’re showing here from MidiDeviceInfo::identifier?

Hi @refusesoftware, yes the “Port ID” is MidiDeviceInfo::identifier .
Note: this issue has been solved in iOS 16

OK, thanks for the info. Glad to hear it’s working for you in iOS 16.

I was asking because I was trying to reconcile this idea of MidiDeviceInfo::identifier being a consistent value for a given device with what was written in this thread by JUCE devs:

My experience with this on macOS is that MidiDeviceInfo::identifier does indeed change depending on which port it gets plugged into. So in my development work I have only been able to rely on MidiDeviceInfo::name to match a given piece of MIDI hardware.

Maybe it’s fundamentally different on iOS, because there’s only one port available on the iOS device? Just guessing, though. I can dive deeper into the JUCE code to have a better look at where the device id is originating.

@refusesoftware we don’t experience such difference for most devices on macOS and iOS. Indeed, on our Camelot Pro application, if you unplug a USB MIDI device and then plug it in another USB port, it reconnects the port.
This doesn’t happen on Windows, though: if you plug the same device on a different USB port, Windows does change both the name (adding a number to it) and the ID.

OK, just verified on macOS Mojave that the same MIDI hardware plugged into different USB jacks gives different MidiDeviceInfo::identifier Strings, at least some of the time.

For example, an X-Touch Mini here will have a MidiDeviceInfo::identifier of 1878780887 if plugged into one USB C port, but that identifier will be -1779811009 when plugged into the USB C port right next to the first one. (Both of these USB C ports are on a MacBook itself, not using a USB hub.)

On an M1 laptop running Catalina here, it’s a different situation – the X-Touch Mini has the same MidiDeviceInfo::identifier regardless of which port it is plugged into. (However, that id string is different than either of the id strings that appear on the Mojave system.)