Hello,
I previously used an android lib, to make my phone act as a BLE MIDI device and send data.
private @NotNull final BluetoothGattCharacteristic measurement = new BluetoothGattCharacteristic(MIDI_MEASUREMENT_CHARACTERISTIC_UUID, PROPERTY_READ | PROPERTY_WRITE_NO_RESPONSE | PROPERTY_NOTIFY, PERMISSION_READ | PERMISSION_WRITE);
While playing around with the flutter example, I found out that I need to set service UUID, and now I can connect to the MIDI-BLE-peripheral.
But I don't know how to send changing data (from a loop etc...) .
In weliems BleSeverExample I can just call " notifyCharacteristicChanged(event, measurement);
after setting up and establishing the connection.
My config with weliems Java example is:
public void startAdvertising(UUID serviceUUID) {
AdvertiseSettings advertiseSettings = new AdvertiseSettings.Builder()
.setAdvertiseMode(AdvertiseSettings.ADVERTISE_MODE_LOW_LATENCY)
.setConnectable(true)
.setTimeout(0)
.setTxPowerLevel(AdvertiseSettings.ADVERTISE_TX_POWER_MEDIUM)
.build();
AdvertiseData advertiseData = new AdvertiseData.Builder()
.setIncludeTxPowerLevel(true)
.addServiceUuid(new ParcelUuid(serviceUUID))
.build();
AdvertiseData scanResponse = new AdvertiseData.Builder()
.setIncludeDeviceName(true)
.build();
peripheralManager.startAdvertising(advertiseSettings, advertiseData, scanResponse);`
My questions are:
Is it possible with the flutter plugin to write flags to Gatt Characteristics? (PROPERTY_READ | PROPERTY_WRITE_NO_RESPONSE | PROPERTY_NOTIFY, PERMISSION_READ | PERMISSION_WRITE)
Is it possible to setTimeout(0) ? I want the service to keep advertising, and send data when i want to. notifyCharacteristicChanged(event, measurement).
can I set Descriptors? In the Java example I need to use measurement.addDescriptor(getCccDescriptor()); for it to work.
Is it possible to use this flutter plugin as BLE-Midi- peripheral which can read and write data?
Hello, I previously used an android lib, to make my phone act as a BLE MIDI device and send data.
private @NotNull final BluetoothGattCharacteristic measurement = new BluetoothGattCharacteristic(MIDI_MEASUREMENT_CHARACTERISTIC_UUID, PROPERTY_READ | PROPERTY_WRITE_NO_RESPONSE | PROPERTY_NOTIFY, PERMISSION_READ | PERMISSION_WRITE);
While playing around with the flutter example, I found out that I need to set service UUID, and now I can connect to the MIDI-BLE-peripheral. But I don't know how to send changing data (from a loop etc...) .
In weliems BleSeverExample I can just call "
notifyCharacteristicChanged(event, measurement);
after setting up and establishing the connection.My config with weliems Java example is:
My questions are:
Is it possible with the flutter plugin to write flags to Gatt Characteristics? (PROPERTY_READ | PROPERTY_WRITE_NO_RESPONSE | PROPERTY_NOTIFY, PERMISSION_READ | PERMISSION_WRITE)
Is it possible to setTimeout(0) ? I want the service to keep advertising, and send data when i want to. notifyCharacteristicChanged(event, measurement).
can I set Descriptors? In the Java example I need to use
measurement.addDescriptor(getCccDescriptor());
for it to work.Is it possible to use this flutter plugin as BLE-Midi- peripheral which can read and write data?
thanks