Skip to content

Commit cbb1fc6

Browse files
John Doeigrr
authored andcommitted
prep for icons
1 parent cfd6d4a commit cbb1fc6

File tree

2 files changed

+20
-4
lines changed

2 files changed

+20
-4
lines changed

hardware/esp8266com/esp8266/libraries/ESP8266SSDP/ESP8266SSDP.cpp

Lines changed: 20 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,8 @@ extern "C" {
3535
}
3636
#include "lwip/igmp.h"
3737

38+
//#define DEBUG_SSDP Serial
39+
3840
#define SSDP_INTERVAL 1200
3941
#define SSDP_PORT 1900
4042
#define SSDP_METHOD_SIZE 10
@@ -70,7 +72,7 @@ const char* _ssdp_packet_template =
7072
"CACHE-CONTROL: max-age=%u\r\n" // SSDP_INTERVAL
7173
"SERVER: Arduino/1.0 UPNP/1.1 %s/%s\r\n" // _modelName, _modelNumber
7274
"USN: uuid:%s\r\n" // _uuid
73-
"LOCATION: http://%u.%u.%u.%u:%u/%s\r\n" // WiFi.localIP(), _port, _shemaURL
75+
"LOCATION: http://%u.%u.%u.%u:%u/%s\r\n" // WiFi.localIP(), _port, _schemaURL
7476
"\r\n";
7577

7678
const char* _ssdp_schema_template =
@@ -98,6 +100,22 @@ const char* _ssdp_schema_template =
98100
"<manufacturerURL>%s</manufacturerURL>"
99101
"<UDN>uuid:%s</UDN>"
100102
"</device>"
103+
// "<iconList>"
104+
// "<icon>"
105+
// "<mimetype>image/png</mimetype>"
106+
// "<height>48</height>"
107+
// "<width>48</width>"
108+
// "<depth>24</depth>"
109+
// "<url>icon48.png</url>"
110+
// "</icon>"
111+
// "<icon>"
112+
// "<mimetype>image/png</mimetype>"
113+
// "<height>120</height>"
114+
// "<width>120</width>"
115+
// "<depth>24</depth>"
116+
// "<url>icon120.png</url>"
117+
// "</icon>"
118+
// "</iconList>"
101119
"</root>\r\n"
102120
"\r\n";
103121

@@ -154,7 +172,7 @@ void SSDPClass::begin(){
154172
uint8_t mac[6];
155173
WiFi.macAddress(mac);
156174
uint32_t chipId = ESP.getChipId();
157-
sprintf(_uuid, "38323636-4558-%04X-%04X-%02X%02X%02X%02X%02X%02X",
175+
sprintf(_uuid, "38323636-4558-%04x-%04x-%02x%02x%02x%02x%02x%02x",
158176
(chipId >> 16) & 0xFFFF, chipId & 0xFFFF,
159177
mac[0], mac[1], mac[2], mac[3], mac[4], mac[5]
160178
);

hardware/esp8266com/esp8266/libraries/ESP8266SSDP/ESP8266SSDP.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,6 @@ License (MIT license):
3333
#include <ESP8266WiFi.h>
3434
#include <WiFiUdp.h>
3535

36-
#define DEBUG_SSDP Serial
37-
3836
typedef enum {
3937
NONE,
4038
SEARCH,

0 commit comments

Comments
 (0)