Add SSDP Support

SSDP protocol work outo the box with window
Module is seen as "ESP Module" serial is Chip ID, and other information
are espressif ones for ESP 01
Not sure if need to set module name in EEPROM to be configurable =>TBD
This commit is contained in:
Luc
2015-07-25 05:51:01 +08:00
parent 9e90ef38b8
commit 2c027d81f7
3 changed files with 38 additions and 0 deletions

View File

@@ -39,6 +39,9 @@
#ifdef MDNS_FEATURE
#include <ESP8266mDNS.h>
#endif
#ifdef SSDP_FEATURE
#include <ESP8266SSDP.h>
#endif
extern "C" {
#include "user_interface.h"
}
@@ -99,6 +102,19 @@ void setup() {
}
#endif
#ifdef SSDP_FEATURE
SSDP.setSchemaURL("description.xml");
SSDP.setHTTPPort( wifi_config.iweb_port);
SSDP.setName("ESP8266 Module");
SSDP.setSerialNumber(String(system_get_chip_id()).c_str());
SSDP.setURL("/");
SSDP.setModelName("ESP8266 01");
SSDP.setModelNumber("01");
SSDP.setModelURL("http://espressif.com/en/products/esp8266/");
SSDP.setManufacturer("Espressif Systems");
SSDP.setManufacturerURL("http://espressif.com");
SSDP.begin();
#endif
}