jdachtera / node-rtpmidi

A node js implementation of Apples Network Midi Protocol.
91 stars 17 forks source link

"Ignoring invalid command" on Ubuntu. Coming from MidiMessage.js #15

Closed Reiszecke closed 7 years ago

Reiszecke commented 7 years ago

Hey thanks for this rep!!!

Anyway, I tried to put a sendMessage statement from send-receive.js into a stidn keyboard listener and the other side of the connection didn't get any message. I then tried the whole session.on('ready', function() { block which also didn't work. After setting the log level to 4, "Ignoring invalid command" appeared every time I tried to send a message.

"Ignoring invalid command" comes from MidMessage.js and happens when the command item is empty (or let's say smaller than 1).

I am on Ubuntu 16.something and I got nothing fancy going on in my script. Any idea why this is happening? Was planning to trace the path the empty command is going in order to check where the null happens but it's 3am and I haven't slept for days hahaha

Cheers

Reiszecke commented 7 years ago

Little update: The error only kicks in after a connection has been established. Currently doing what I wanted to do, printing the command content where ever it gets passed. The Buffer in the sendMessage function also is not empty.

sendUdpMessage gets called and executes the if (message.isValid) block (Outgoing Message = . . . gets printed) but I have no idea how to debug this block as it leaves the rtpmidi scope, continuing with dgram which I don't know how to debug properly.

Now installing wireshark


Solved

I have no idea why this happens or what I did to make this happen but it appears to be working now.

Been messing around with Wireshark but couldn't find the exact packets that I was looking for so I changed a sendMessage call's parameters to 80,81,82 and idk why but this somehow worked.

Thanks again for this fantastic job, can't wait to not do anything useful with it <3 <3