I would like to be able to call gatt.requestMtu(int mtu) upon device connection inside JuceMidiSupport.java. However, I cannot seem to get the instructions here to work properly for debugging. Perhaps I missed some documentation somewhere. Can this feature please be added to JUCE? I am happy to make a request in the Github repo if that is the proper workflow.
public void onConnectionStateChange (BluetoothGatt gatt, int status, int newState)
{
if (newState == BluetoothProfile.STATE_CONNECTED)
{
gatt.requestConnectionPriority (BluetoothGatt.CONNECTION_PRIORITY_HIGH);
gatt.requestMtu(517); // Add your request here
owner.pairBluetoothDeviceStepTwo (gatt.getDevice ());
}
}
You should get a callback here:
public void onMtuChanged (BluetoothGatt gatt, int mtu, int status) {
Log.d ("JUCE", "MTU Changed to: " + mtu);
}
Would be lovely to see this option enabled from within the Projucer!