Help on BLE MIDI Peripheral

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

I have adapted the python test files in example-gatt-server and example-advertisement to MIDI.

The code is here https://github.com/audetto/ble-midi

I can advertise it properly and in Android I can see the device.
But after it is selected and the android app create a MIDI Device, it drops after 3-4 seconds.

In Android I have used https://github.com/philburk/android-midisuite which is the reference implementation.

I have added a lot of logging to the code and it does not print anything after the initial advertisement phase.

Application.GetManagedObjects
GATT application registered
Advertisement.GetAll
returning props
Advertisement registered
			<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
/org/bluez/example/advertisement0: Released!
Advertisement unregistered

I would expect the Central to Read some values as in the MIDI BLE spec

"The Central will attempt to read the MIDI I/O characteristic of the Peripheral after establishing a
connection with the accessory. The accessory shall respond to the initial MIDI I/O characteristic
read with a packet that has no payload."

And I get the exact same behaviour if I use the wrong UUID for the characteristic, or if I don't add it at all.

I have the feeling the Characteristic is not registered properly.

Here is the key code:

class MIDICharacteristic(egs.Characteristic):
    def __init__(self, bus, index, service):
        flags = ['notify', 'read', 'write', 'write-without-response']
        super().__init__(bus, index, MIDI_CHARACTERISTIC_UUID, flags, service)

and

class MIDIService(egs.Service):
    def __init__(self, bus, index):
        super().__init__(bus, index, MIDI_SERVICE_UUID, True)
        self.add_characteristic(MIDICharacteristic(bus, 0, self))

Is there anything that comes to your mind with these symptoms?

Thank you




[Index of Archives]     [Bluez Devel]     [Linux Wireless Networking]     [Linux Wireless Personal Area Networking]     [Linux ATH6KL]     [Linux USB Devel]     [Linux Media Drivers]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux