InvisibleWrench / FlutterMidiCommand

A Flutter plugin to send and receive MIDI
BSD 3-Clause "New" or "Revised" License
95 stars 50 forks source link

Bluetooth connection between Android and MacOS -> No Midi device visible on Mac #54

Closed anzbert closed 1 year ago

anzbert commented 2 years ago

Has anyone had luck using Bluetooth Midi with this package between an Android phone and Macos?

Steps I have been following:

  1. Bluetooth pair phone to macbook
  2. open Audio Midi Setup on mac and enter bluetooth settings
  3. advertise bluetooth midi device
  4. open Flutter Midi Command example app on phone and search for bluetooth devices -> macbook is visible
  5. connect to macbook, which "appears" to be successful
  6. check midi monitor app and/or ableton for any midi devices -> None visible!

if i run the example app in debug mode it will only show reoccuring onScanResult messages.

Any tips? Could there be a connection bug that I could try and find in the example app or Kotlin code?

edit: I dont have an iOS device to test it there. This comment is only regarding my Android experience.

jrmilholland commented 2 years ago

Running into a similar issue with iOS and bluetooth where the device will initially show, but then disappear out of the available devices listed. The really odd part is the device is still connected and will continue to function, but there's no devices listed.

PasqualeTotaro commented 2 years ago

Hi everyone. Have you since solved this?

I am on macOs, I can connect to my bluetooth MIDI device, the device seems connected (by looking at the device's status LED), but I do not see any MIDI input associated to it in my DAW.

Any suggestions?

anzbert commented 2 years ago

Yeah not sure. My guess is it requires a deep dive into the kotlin code 🤷. Maybe I'll find the time for that someday, if no-one else is keen 😜

On Tue, 24 May 2022, 09:18 PasqualeTotaro, @.***> wrote:

Hi everyone. Have you since solved this?

I am on macOs, I can connect to my bluetooth MIDI device, the device seems connected (by looking at the device's status LED), but I do not see any MIDI input associated to it in my DAW.

Any suggestions?

— Reply to this email directly, view it on GitHub https://github.com/InvisibleWrench/FlutterMidiCommand/issues/54#issuecomment-1135296075, or unsubscribe https://github.com/notifications/unsubscribe-auth/AJIGOFECLZGTTETHKL74QADVLQU6DANCNFSM5RDSNZQA . You are receiving this because you authored the thread.Message ID: @.***>

anzbert commented 2 years ago

In the android midi documentation , Google links to this BLE Midi test app :

https://play.google.com/store/apps/details?id=com.mobileer.example.midibtlepairing

I haven't had any luck connecting to MacOS with it either. So maybe there is a problem beyond what we can solve in this packages code.

On Tue, 24 May 2022, 09:18 PasqualeTotaro, @.***> wrote:

Hi everyone. Have you since solved this?

I am on macOs, I can connect to my bluetooth MIDI device, the device seems connected (by looking at the device's status LED), but I do not see any MIDI input associated to it in my DAW.

Any suggestions?

— Reply to this email directly, view it on GitHub https://github.com/InvisibleWrench/FlutterMidiCommand/issues/54#issuecomment-1135296075, or unsubscribe https://github.com/notifications/unsubscribe-auth/AJIGOFECLZGTTETHKL74QADVLQU6DANCNFSM5RDSNZQA . You are receiving this because you authored the thread.Message ID: @.***>

PasqualeTotaro commented 2 years ago

From my end it looks like the device connects but it is not internally set-up as a MIDI device, it is just seen as a BLE device.

I think some extra steps are missing.

@mortenboye can you help us out on this?

anzbert commented 2 years ago

Did you follow these steps on the Mac:

https://support.apple.com/en-au/guide/audio-midi-setup/ams33f013765/mac

These instructions require you to advertise the computer as a Bluetooth midi device in the audio midi setup app.

I had no luck with it, neither with the fluttermidicommand example app or the midi BLE test app, which I linked to before.

I have connected to other midi BLE devices before from my pixel phone, and there is always that process of not connecting through the regular Bluetooth settings, but through an app instead. So keep that in mind.

Ill look further into it, when I get the chance. Just time is a bit tight right now.

PasqualeTotaro commented 2 years ago

I can connect my device via the default bluetooth MIDI menu on mac and it works. I trying to find a way to make it all automatic.

anzbert commented 2 years ago

By it works, do you mean it actually shows up in the DAW?

On Tue, 24 May 2022, 09:48 PasqualeTotaro, @.***> wrote:

I can connect my device via the default bluetooth MIDI menu on mac and it works. I trying to find a way to make it all automatic.

— Reply to this email directly, view it on GitHub https://github.com/InvisibleWrench/FlutterMidiCommand/issues/54#issuecomment-1135311149, or unsubscribe https://github.com/notifications/unsubscribe-auth/AJIGOFGJA6RLCFY4UCRUKI3VLQYNTANCNFSM5RDSNZQA . You are receiving this because you were mentioned.Message ID: @.***>

PasqualeTotaro commented 2 years ago

Yes :)

mortenboye commented 2 years ago

Hi @PasqualeTotaro I just replied to your email, but in the meantime I can offer a few details on things mentioned in this issue. First, the issue that @jrmilholland mentions was isolated to the iOS implementation of this package and should be fixed in 0.4.8. Second, the android implementation is simply a dart/flutter wrapper around android-media-midi which handles all BLE specifics, aside from scanning, behind the scenes. This is different from the iOS implementation, where there is no API to handle BLE MIDI, there is only the BLE (CoreBluetooth) APIs so the MIDI specifics are implemented on top of that by this package. The android implementation, combined with the way BLE Midi is controlled on MacOS, which as @anzbert mentioned is through the Audio Midi Setup, makes is hard to dive deeper into the code to troubleshoot.

If possible, please provide more details about your setup, what is connecting to what and how, and what applications are running where, etc. etc.

anzbert commented 2 years ago

Oh wow that's great ! I am not sure if it gets better than that haha

On Tue, 24 May 2022, 09:52 PasqualeTotaro, @.***> wrote:

Yes :)

— Reply to this email directly, view it on GitHub https://github.com/InvisibleWrench/FlutterMidiCommand/issues/54#issuecomment-1135313556, or unsubscribe https://github.com/notifications/unsubscribe-auth/AJIGOFCGNRB5DCVT7BXTFQLVLQY7LANCNFSM5RDSNZQA . You are receiving this because you were mentioned.Message ID: @.***>