Skip to content

Commit

Permalink
prep for icons
Browse files Browse the repository at this point in the history
  • Loading branch information
John Doe authored and igrr committed Jul 7, 2015
1 parent bd6c4ac commit e34ae2d
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 4 deletions.
22 changes: 20 additions & 2 deletions libraries/ESP8266SSDP/ESP8266SSDP.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@ extern "C" {
}
#include "lwip/igmp.h"

//#define DEBUG_SSDP Serial

#define SSDP_INTERVAL 1200
#define SSDP_PORT 1900
#define SSDP_METHOD_SIZE 10
Expand Down Expand Up @@ -70,7 +72,7 @@ const char* _ssdp_packet_template =
"CACHE-CONTROL: max-age=%u\r\n" // SSDP_INTERVAL
"SERVER: Arduino/1.0 UPNP/1.1 %s/%s\r\n" // _modelName, _modelNumber
"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";

const char* _ssdp_schema_template =
Expand Down Expand Up @@ -98,6 +100,22 @@ const char* _ssdp_schema_template =
"<manufacturerURL>%s</manufacturerURL>"
"<UDN>uuid:%s</UDN>"
"</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"
"\r\n";

Expand Down Expand Up @@ -154,7 +172,7 @@ void SSDPClass::begin(){
uint8_t mac[6];
WiFi.macAddress(mac);
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,
mac[0], mac[1], mac[2], mac[3], mac[4], mac[5]
);
Expand Down
2 changes: 0 additions & 2 deletions libraries/ESP8266SSDP/ESP8266SSDP.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,6 @@ License (MIT license):
#include <ESP8266WiFi.h>
#include <WiFiUdp.h>

#define DEBUG_SSDP Serial

typedef enum {
NONE,
SEARCH,
Expand Down

0 comments on commit e34ae2d

Please sign in to comment.