petegoodliffe / PGMidi

PGMidi iOS MIDI library and example code
297 stars 83 forks source link

Detect connection to a central device (acting as peripheral) #24

Open KronosRemote opened 7 years ago

KronosRemote commented 7 years ago

Hi Pete,

actually I'm not sure if this is really a problem in PGMidi or if it's somewhere else down the line, but maybe someone around here is able to help me out here: I'm using PGMidi in my app to connect to MIDI devices that are connected via USB and Bluetooth. When I connect with Bluetooth the iPad is usually the Central and connects to a Peripheral - upon connection all events are correctly triggered and I get a message that a new device has connected (same as with USB connections). So far PG Midi has really helped me out on a lot of stuff, I appreciate that you're publishing your code here!

Now I want to do the same with the iPad as a Peripheral controller to connect to another device acting as Central, but nothing happens (using CABTMIDILocalPeripheralViewController). The Central device sees the iPad which is advertising and can connect to it - but I can't find a way to see it on the iPad :( there's no event triggered as I would have expected it, also when I output the available devices there's nothing new showing up... guess I am missing something here?