-
Notifications
You must be signed in to change notification settings - Fork 45
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Potential android.media.midi bug sending SysEx over BLE #72
Comments
Hi @ragtimekeys, thanks for reporting this issue. What device and Android version are you testing on? I do see some issues on my side with a Pixel 6a and Android 13, but it seems im not the only one struggling with that: The issue you've linked seems very likely to be the cause of the problems you are having. I'm currently testing with a Samsung phone running Android 12 and that works as intended. Regarding the MIDI device appearing twice in the list, is something I am also seeing, but only on my Pixel6a/A13. |
Hi @ragtimekeys, if you are still having issues you can try to run with this branch: https://github.com/InvisibleWrench/FlutterMidiCommand/tree/selfcontained-ble-midi |
Hi @mortenboye sorry for the late reply. After extensive testing with both android.media.midi and your new branch, here's what I've discovered. I think general SysEx sending and receiving do work for the most part so hopefully that was a OS issue. Sometimes if I send things too quickly, aka less than 150 ms apart, there can be hangs, but yeah pretty good for the most part! Let me know if you'd like this to be listed as a separate issue. The selfcontained-ble-midi is a good solution for reliably connecting over BLE. Unfortunately the downside for this implementation is that when you connect a BLE device through a flutter app, that device won't show up on any other apps like bandlab or a synth app. From what I've seen, FlutterMidiCommand's iOS implementation has the same issue unless a developer opens the native Apple's CABTMIDICentralViewController menu from within a flutter application. The android.media.midi properly adds the BLE device to the entire android OS, so to speak, since that device will show up on multiple other apps like Bandlab. Both the master branch and selfcontained-ble-midi have the next issue I will elaborate on: Let's say you use the "Bluetooth MIDI Connect" App to connect to a BLE device. Then open your flutter app and attempt to connect to the device that appears as a "native" device since it was already connected over bluetooth. I am unable to actually connect past that point. The errors that I get are below (from the master branch version). Thank you so much for working on Android implementation!
|
Regarding the native device bug, I discovered that it is due to the filter line in FlutterMidiCommandPlugin.kt
Since that filtered the array to a size of 0, there's probably several ways to get the right device from that list, I can try some things soon. |
Reproduce:
Everything works over USB to the device, but not BLE.
Hoping that what I've experienced is related to the android.media.midi bug described here. They mentioned on December 23rd that it's fixed and "will be available in a future build".
This link above says less than 18 or 19 bytes should be working, but for me it's not. I tried breaking it up into chunks of 10 or less bytes.
Every now and then, I'd say about 10% of the time I fresh open my app, I can send data and it does work. When it does work, the BLE midi device shows up twice in the list of devices. Very strange.
The text was updated successfully, but these errors were encountered: