tarsjoris / x-air

Tooling for the Behringer X-Air series mixers (XR18) and control surfaces (X-Touch).
GNU General Public License v3.0
8 stars 0 forks source link

IP discovery instead of hardcoding? #20

Open gilou opened 1 year ago

gilou commented 1 year ago

Hi,

It's good that we can configure the IP Address in the conf for the proxy, and the x-air console, but it might be better to discover the IP address rather than hardcoding the listening one. I'm guessing there are libraries in Java that might allow you to say "well what seems to be our IP addresses", and just listen there… or simply just listen to all IPs (:: / 0.0.0.0). If you're IP is not the one set in conf, this happens:

2023-07-02 12:46:57.923 [main] INFO ktor.application - Responding at http://192.168.0.4:8080 Exception in thread "main" java.net.BindException: Cannot assign requested address

Same goes for the X-Air, even though I'm guessing adding a port scanner is not funny (think like the X-Air Edit scanner does… over LAN IP, try to find an open OSC port that advertises an xr18 ;)).

Cheers, Gilou