2016-12-16 3 views
0

Utilisation du cadre Bluetooth LE MIDI, je vous envoie ce message MIDI SYSEX via Bluetooth:MIDI messages Bluetooth LE, SYSEX ne sont pas complètes

"F0H 26H 79H 0EH 7FH F7H"

Je reçois via Bluetooth:

"F0H 26H 79H 0EH 7FH" (fin de SYSEX manque)

Je dois ajouter l'octet de fin par programmation, mais je ne sais pas, quand alors se termine. Est-ce un bug dans le cadre?

+1

Montrez votre code. –

Répondre

0

Une erreur s'est produite dans la méthode de rappel. Maintenant, cela fonctionne très bien avec le Yamaha MD-BT01.

prises MIDI In données et remplit un tampon circulaire pour le traitement ultérieur:

static void MyMIDIReadProc(const MIDIPacketList *pktlist, void *refCon, void *connRefCon) { 
for (unsigned int i = 0; i < pktlist->numPackets; i++) { 
    if (i == 0) packet2 = pktlist->packet[0]; 
    nBytes2 = packet2.length; 
    iByte2 = 0; 
    while (iByte2 < nBytes2) { 
     inputByte2 = packet2.data[iByte2]; 
     inppoint2++; 
     if (inppoint2 >= bufsize2){ 
      inppoint2 = 0; 
     } 
     inputBuffer2[inppoint2] = inputByte2; 
     iByte2 ++; 
    } 
    packet2 = *MIDIPacketNext(&packet2); 
} 

}