Control-Surface icon indicating copy to clipboard operation
Control-Surface copied to clipboard

ESP32 <-> ESP32 BLEMidi connectivity

Open shelson opened this issue 1 year ago • 2 comments

I may be holding/reading things wrong but I haven't found anything in the code/docs about this. I'm building the following:

<Midi Controller with knobs/buttons w/ESP32 running control-surface, BLEMidi Interface> ---- (BLEMidi) ---- <Small box with ESP32 and 5 pin DIN socket purely piping midi between BLEMidi and HardwareSerialMidi>

The first bit (the controller) has been super easy and thanks so much for the cool library etc - if I pair it to my mac and run up a DAW I can play notes etc. The second bit - the box with the pipes - again it works perfectly if I connect my laptop to it. However the bit I'm stuck on is - can I make the two ESP32's talk to each other? I had a hunt through the code and I can see there's stuff about advertising and accepting connections, but not so much intiating them, which I'm guessing currently is the job of my mac when I hit the "connect" button. I'm guessing there's also some kind of identification thing - which BLEmidi.setName() is dealing with - and in my case I would want the devices to find each other - or the client find the server if that terminology even works here.

If there is a way to do this currently I would love to know how - and if not and you have some pointers I'm more than happy to work on a PR to see if I can't make it work - it's been a super interesting project and I'm happy to muck in vs just demanding features :)

Thanks!

Codewise I'm using https://github.com/tttapa/Control-Surface/blob/main/examples/1.%20MIDI%20Output/2.%20Buttons%20%26%20Switches/1.%20Momentary%20Push%20Buttons/NoteButton/NoteButton.ino for the client but with BluetoothMIDI_Interface and https://tttapa.github.io/Control-Surface-doc/Doxygen/d0/dc4/MIDI_Pipes-Routing_8ino-example.html for the second box - nothing at all special right now.

shelson avatar Jun 28 '23 00:06 shelson