Browse Source

Add espurna-specific texts to MDNS register

fastled
Xose Pérez 7 years ago
parent
commit
a9a980ab10
2 changed files with 7 additions and 1 deletions
  1. +2
    -1
      code/espurna/config/general.h
  2. +5
    -0
      code/espurna/ota.ino

+ 2
- 1
code/espurna/config/general.h View File

@ -8,6 +8,7 @@
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
#define ADMIN_PASS "fibonacci" // Default password (WEB, OTA, WIFI) #define ADMIN_PASS "fibonacci" // Default password (WEB, OTA, WIFI)
#define DEVICE_NAME MANUFACTURER "_" DEVICE // Concatenate both to get a unique device name
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
// TELNET // TELNET
@ -321,7 +322,7 @@ PROGMEM const char* const custom_reset_string[] = {
// ----------------------------------------------------------------------------- // -----------------------------------------------------------------------------
#ifndef MDNS_SUPPORT #ifndef MDNS_SUPPORT
#define MDNS_SUPPORT 1 // Enable MDNS by default
#define MDNS_SUPPORT 1 // Publish services using mDNS by default
#endif #endif
// ----------------------------------------------------------------------------- // -----------------------------------------------------------------------------


+ 5
- 0
code/espurna/ota.ino View File

@ -55,6 +55,11 @@ void otaSetup() {
ArduinoOTA.begin(); ArduinoOTA.begin();
// Public ESPurna related txt for OTA discovery
MDNS.addServiceTxt("arduino", "tcp", "firmware", APP_NAME);
MDNS.addServiceTxt("arduino", "tcp", "espurna_version", APP_VERSION);
MDNS.addServiceTxt("arduino", "tcp", "espurna_board", DEVICE_NAME);
} }
void otaLoop() { void otaLoop() {


Loading…
Cancel
Save