mirror of
https://github.com/esp8266/Arduino.git
synced 2025-06-06 05:21:22 +03:00
prep for icons
This commit is contained in:
parent
bd6c4acfd8
commit
e34ae2d6f1
@ -35,6 +35,8 @@ extern "C" {
|
|||||||
}
|
}
|
||||||
#include "lwip/igmp.h"
|
#include "lwip/igmp.h"
|
||||||
|
|
||||||
|
//#define DEBUG_SSDP Serial
|
||||||
|
|
||||||
#define SSDP_INTERVAL 1200
|
#define SSDP_INTERVAL 1200
|
||||||
#define SSDP_PORT 1900
|
#define SSDP_PORT 1900
|
||||||
#define SSDP_METHOD_SIZE 10
|
#define SSDP_METHOD_SIZE 10
|
||||||
@ -70,7 +72,7 @@ const char* _ssdp_packet_template =
|
|||||||
"CACHE-CONTROL: max-age=%u\r\n" // SSDP_INTERVAL
|
"CACHE-CONTROL: max-age=%u\r\n" // SSDP_INTERVAL
|
||||||
"SERVER: Arduino/1.0 UPNP/1.1 %s/%s\r\n" // _modelName, _modelNumber
|
"SERVER: Arduino/1.0 UPNP/1.1 %s/%s\r\n" // _modelName, _modelNumber
|
||||||
"USN: uuid:%s\r\n" // _uuid
|
"USN: uuid:%s\r\n" // _uuid
|
||||||
"LOCATION: http://%u.%u.%u.%u:%u/%s\r\n" // WiFi.localIP(), _port, _shemaURL
|
"LOCATION: http://%u.%u.%u.%u:%u/%s\r\n" // WiFi.localIP(), _port, _schemaURL
|
||||||
"\r\n";
|
"\r\n";
|
||||||
|
|
||||||
const char* _ssdp_schema_template =
|
const char* _ssdp_schema_template =
|
||||||
@ -98,6 +100,22 @@ const char* _ssdp_schema_template =
|
|||||||
"<manufacturerURL>%s</manufacturerURL>"
|
"<manufacturerURL>%s</manufacturerURL>"
|
||||||
"<UDN>uuid:%s</UDN>"
|
"<UDN>uuid:%s</UDN>"
|
||||||
"</device>"
|
"</device>"
|
||||||
|
// "<iconList>"
|
||||||
|
// "<icon>"
|
||||||
|
// "<mimetype>image/png</mimetype>"
|
||||||
|
// "<height>48</height>"
|
||||||
|
// "<width>48</width>"
|
||||||
|
// "<depth>24</depth>"
|
||||||
|
// "<url>icon48.png</url>"
|
||||||
|
// "</icon>"
|
||||||
|
// "<icon>"
|
||||||
|
// "<mimetype>image/png</mimetype>"
|
||||||
|
// "<height>120</height>"
|
||||||
|
// "<width>120</width>"
|
||||||
|
// "<depth>24</depth>"
|
||||||
|
// "<url>icon120.png</url>"
|
||||||
|
// "</icon>"
|
||||||
|
// "</iconList>"
|
||||||
"</root>\r\n"
|
"</root>\r\n"
|
||||||
"\r\n";
|
"\r\n";
|
||||||
|
|
||||||
@ -154,7 +172,7 @@ void SSDPClass::begin(){
|
|||||||
uint8_t mac[6];
|
uint8_t mac[6];
|
||||||
WiFi.macAddress(mac);
|
WiFi.macAddress(mac);
|
||||||
uint32_t chipId = ESP.getChipId();
|
uint32_t chipId = ESP.getChipId();
|
||||||
sprintf(_uuid, "38323636-4558-%04X-%04X-%02X%02X%02X%02X%02X%02X",
|
sprintf(_uuid, "38323636-4558-%04x-%04x-%02x%02x%02x%02x%02x%02x",
|
||||||
(chipId >> 16) & 0xFFFF, chipId & 0xFFFF,
|
(chipId >> 16) & 0xFFFF, chipId & 0xFFFF,
|
||||||
mac[0], mac[1], mac[2], mac[3], mac[4], mac[5]
|
mac[0], mac[1], mac[2], mac[3], mac[4], mac[5]
|
||||||
);
|
);
|
||||||
|
@ -33,8 +33,6 @@ License (MIT license):
|
|||||||
#include <ESP8266WiFi.h>
|
#include <ESP8266WiFi.h>
|
||||||
#include <WiFiUdp.h>
|
#include <WiFiUdp.h>
|
||||||
|
|
||||||
#define DEBUG_SSDP Serial
|
|
||||||
|
|
||||||
typedef enum {
|
typedef enum {
|
||||||
NONE,
|
NONE,
|
||||||
SEARCH,
|
SEARCH,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user