tttapa / Control-Surface

Arduino library for creating MIDI controllers and other MIDI devices.
GNU General Public License v3.0
1.27k stars 140 forks source link

MIDI BLE doesn´t connect to my computer #290

Open jesusolmedac opened 4 years ago

jesusolmedac commented 4 years ago

I´m trying to use this code and it works perfectly when i use it with my phone, but when I try to connect it to my computer to use it with MIDIberry it doesnt connect. Is there any driver or something that I have to install?

#include <MIDI_Interfaces/BluetoothMIDI_Interface.hpp>

BluetoothMIDI_Interface MIDI_BLE;
HardwareSerialMIDI_Interface MIDI_SERIAL = Serial;

MIDI_PipeFactory<2> pipes;

void setup() {
  MIDI_BLE >> pipes >> MIDI_SERIAL; // all incoming midi from BLE is sent to Serial
  MIDI_BLE << pipes << MIDI_SERIAL; // all incoming midi from Serial is sent to BLE

  MIDI_SERIAL.begin();
  MIDI_BLE.begin();
}

void loop() {
  MIDI_BLE.update();
  MIDI_SERIAL.update();
}
tttapa commented 4 years ago

It's been a while since I last tried this on Windows, I don't have any Windows machines at hand right now, so I can't test it. I did test it on Android and Ubuntu 20.04 and I didn't have any problems.

Could it be that Windows doesn't want to connect because your phone is still connected? BLE devices sometimes seem to connect automatically, so you could try turning off your phone's Bluetooth altogether.