7 Replies Latest reply on Mar 12, 2015 9:40 AM by jota_1939431

    Apple's MIDI over Bluetooth Spec?

      Has anyone been able to get Apple's MIDI over Bluetooth Spec implemented and working?

       

      My MIDI service and characteristic are there, and the iPad sees them, but it doesn't recognize it nor connect.

       

      It might have something to do with LEGATTDB_PERM_RELIABLE_WRITE. Even though I don't specify reliable write in my characteristic, the iOS Bluetooth logs report the BCM20736 as having the extended prop "reliable write". Is there a way to force that permission to turn off?

       

      Here's the relevant section in my GATT database:

       

       

       // Handle : MIDI Service.
              PRIMARY_SERVICE_UUID128 (HANDLE_MIDI_SERVICE_UUID, UUID_MIDI_SERVICE),
      // Handle : MIDI I/O Characteristic
       CHARACTERISTIC_UUID128_WRITABLE ((HANDLE_MIDI_TX_VALUE_NOTIFY - 1), HANDLE_MIDI_TX_VALUE_NOTIFY, UUID_MIDI_CHARACTERISTIC,
                                     LEGATTDB_CHAR_PROP_READ | LEGATTDB_CHAR_PROP_NOTIFY | LEGATTDB_CHAR_PROP_WRITE,
                                     LEGATTDB_PERM_READABLE | LEGATTDB_PERM_WRITE_CMD, BLE_MAX_PACKET_LENGTH),
                  0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
                  // for 20 chars long (Broadcom maximum):
                  0x00,0x00,0x00,0x00,
      
       CHAR_DESCRIPTOR_UUID16_WRITABLE (HANDLE_MIDI_CLIENT_CONFIGURATION_DESCRIPTOR,
                                               UUID_DESCRIPTOR_CLIENT_CHARACTERISTIC_CONFIGURATION,
                                               LEGATTDB_PERM_READABLE | LEGATTDB_PERM_WRITE_REQ, 2),
                  0x00,0x00,
      
      

       

       

      Not sure if I need the CHAR_DESCRIPTOR there to enable notifications?

       

      Here's the relevant Bluetooth logs from the iOS device (full ones attached):

       

      
      
      
      0x000F Primary Service  
      [ UUID: 03B80E5A-EDE8-4B33-A751-6CE34EC4C700, endHandle: 0x0013 ] ID: 0x00030001
      
      
      0x0010 Characteristic   
      [ valueHandle: 0x0011, valueUUID: 7772E5DB-3868-4112-A1A9-F2669D106BF3 properties: read responseless-writes notify extended ]
      
      
      
      0x0011 7772E5DB-3868-4112-A1A9- [ NULL ]
      0x0012 Extended Properties  [ reliable-write ]
      0x0013 Client Configuration [ none ]
      

       

       

      Anyone have any theories of how to get rid of the "Extended Properties  [ reliable-write ]" part? Or is that even what would be messing it up? Other MIDI over BLE devices that DO work do not have that property.

       

      Also, the Apple spec says the connection must be encrypted. Does this mean I should use LEGATTDB_PERM_AUTH_READABLE and LEGATTDB_PERM_AUTH_WRITABLE with LEGATTDB_CHAR_PROP_AUTHD_WRITES? Or does encryption work without those?

       

      Thanks!