diff --git a/RX_FSK/RX_FSK.ino b/RX_FSK/RX_FSK.ino index 9476a6a..8c669c5 100644 --- a/RX_FSK/RX_FSK.ino +++ b/RX_FSK/RX_FSK.ino @@ -464,6 +464,7 @@ struct st_configitems config_list[] = { {"led_pout", "LED output port", 0, &sonde.config.led_pout}, {"gps_rxd", "GPS RXD pin (-1 to disable)", 0, &sonde.config.gps_rxd}, {"gps_txd", "GPS TXD pin (not really needed)", 0, &sonde.config.gps_txd}, + {"mdnsname", "mDNS name", 14, &sonde.config.mdnsname}, }; const static int N_CONFIG = (sizeof(config_list) / sizeof(struct st_configitems)); @@ -1726,7 +1727,7 @@ String translateEncryptionType(wifi_auth_mode_t encryptionType) { void enableNetwork(bool enable) { if (enable) { - MDNS.begin("rdzsonde"); + MDNS.begin(sonde.config.mdnsname); SetupAsyncServer(); udp.begin(WiFi.localIP(), LOCALUDPPORT); MDNS.addService("http", "tcp", 80); diff --git a/libraries/SondeLib/Sonde.cpp b/libraries/SondeLib/Sonde.cpp index 14c5993..9f9e519 100644 --- a/libraries/SondeLib/Sonde.cpp +++ b/libraries/SondeLib/Sonde.cpp @@ -147,6 +147,7 @@ void Sonde::defaultConfig() { config.noisefloor = -125; strcpy(config.call,"NOCALL"); strcpy(config.passcode, "---"); + strcpy(config.mdnsname, "rdzsonde"); config.maxsonde=15; config.debug=0; config.wifi=1; @@ -236,6 +237,8 @@ void Sonde::setConfig(const char *cfg) { config.wifi = atoi(val); } else if(strcmp(cfg,"wifiap")==0) { config.wifiap = atoi(val); + } else if(strcmp(cfg,"mdnsname")==0) { + strncpy(config.mdnsname, val, 14); } else if(strcmp(cfg,"display")==0) { int i = 0; char *ptr; diff --git a/libraries/SondeLib/Sonde.h b/libraries/SondeLib/Sonde.h index a600920..dc19733 100644 --- a/libraries/SondeLib/Sonde.h +++ b/libraries/SondeLib/Sonde.h @@ -173,6 +173,7 @@ typedef struct st_rdzconfig { int maxsonde; // number of max sonde in scan (range=1-99) int norx_timeout; // Time after which rx mode switches to scan mode (without rx signal) int noisefloor; // for spectrum display + char mdnsname[15]; // mDNS-Name, defaults to rdzsonde // receiver configuration int showafc; // show afc value in rx screen int freqofs; // frequency offset (tuner config = rx frequency + freqofs) in Hz