kshoji / Unity-MIDI-Plugin-supports

Documents and issues for Unity MIDI Plugin
10 stars 0 forks source link

Any way of negotiating MTU? #9

Open FredClaw opened 1 year ago

FredClaw commented 1 year ago

Hi, on android the MTU is limited to 20/23 bytes. Would it be possible to add a way of requesting a higher value via the plugin?

FredClaw commented 1 year ago

The device I'm connecting to is sending a request to increase MTU to 247 bytes, but it isn't working. The app is still only sending sysex messages of 20 bytes. Is there any way of accepting the MTU request? Is BluetoothGattCallback.onMtuChanged being called? image

kshoji commented 1 year ago

The cause of the issue is that my BLE MIDI library sets MTU with `23' constant.

I tried to change requesting MTU to maximum value(517), and then the highest available MTU value was set to the device. I assume this is the expected behavior.

This issue will be fixed with next version.