davidmoreno / rtpmidid

RTP MIDI (AppleMIDI) daemon for Linux
Other
185 stars 41 forks source link

Restore Connection After Device Reboots - force client UDP port #117

Open mikecreates86 opened 3 months ago

mikecreates86 commented 3 months ago

I’m trying to have my Linux device automatically connect to an iConnectivity RTP port whenever one or the other powers off. The problem is, with my Linux device set as the initiator, the 5-digit port changes on every connection. With the other device as initiator, it connects but I have to manually select from the newly created ports in the MIDI menu. And it keeps creating ports.

What do I need to do in the ini file to get this working?

Thank you in advance if you have time to answer!

davidmoreno commented 3 months ago

Hi! Thanks for the report!

I just implemented it in the statemachine branch. It's still not ready for master, but I think it already behaves better in some cases. It just need more testing.

It adds a local_udp_port to the ini file. It only works for explicit connections, not autodetected.

I will think a way to have more consistent ports for autodetected (mdns/zeroconf) peers.

Ideally for rtpmidid as client there is a way to always send from the same port for all clients.. but needs more work. Anyway note for myself, it should be possible having an udp router that has the real connection and redirects the data to the peers based on initiator_id or ssrc.

Can you try to compile and test it?

mikecreates86 commented 2 months ago

So I'm fairly novice at compiling and doing command line stuff. How do I install this latest release you mentioned? What commands do I need?

davidmoreno commented 2 months ago

This will work for debian based distros. Other are similar:

  1. Check at https://github.com/davidmoreno/rtpmidid/blob/master/debian/control and install all the build-depends
  2. You will also need the packages fakeroot and dh-make... maybe someother if anything complains on next step
  3. execute make deb at the project root.
  4. At the end several .deb packages are generated, install the rtpmidid_[someversion].deb file.

Alternative you can try make run and it will compile and run at port 1000.

There will be a new release soon, I hope, but there are still some bugs to fix.