You are reading a single comment by @indianajones and its replies. Click here to read the full conversation.
  • It should go like this:

    Me: SYN
    MIDIDevice: SYN, ACK
    Me: ACK
    MIDIDevice: PSH,ACK
    Me: ACK

    And having access to Wireshark you can look at the data sent.

  • @maze1980 yeah I forgot to add the data, which is super-important, and I've made it a little bit further because I forgot to check wireshark for broadcast packets. So the real A&H driver comms go like this:

    Me: UDP 'Qu Find' on
    MidiDevice: UDP 'Qu-SB' and { address:, port: 51320, size: 6 }
    Me: TCP connect to // note that 51325 is the TCP port
    MidiDevice: TCP 0xEF // <- this is MIDI ActiveSense bit, sent every 300ms forever
    Me: TCP ACK

    So the data you were asking for is the 0xEF byte, which is what's sent (and ACK'd by 'me') forever. Here's how my Espruino code runs:

    Me: UDP 'Qu Find' on
    (nothing happens, so instead...)
    Me: UDP 'Qu Find' on // because I know the IP address already
    MidiDevice: UDP 'Qu-SB' and { address:, port: 51320, size: 6 }
    (cool! so far, so good)
    Me: TCP connect to
    Me: (I get the 'connected' callback, and client.on('data', ...) is never called

    So I'm doing something wrong still, because I don't get the 0xEF message ever.