esp8266 / esp8266/Arduino

ESP8266SSDP Search Terms for response do not include all valid responses

Open
#4,216 3 comments 0 reactions 0 assignees View on GitHub
Dominant language
C++
Stars
16.7k
Forks
13.1k
PR merge metrics
No merged PRs in 30d

Description

### Basic Infos

#### Hardware
Hardware: ESP-07
Core Version: 2.4.0

### Description

In the ESP8266SSDP library the update method checks the search term (ST) header before deciding whether to respond.
It appears to reject searches for ssdp:all and only respond if the deviceType matches. This does not gel with the documentation I have read at e.g. [How a UPnP Search works](http://buildingskb.schneider-electric.com/view.php?AID=15197)
My understanding is it should respond to ssdp:all, deviceType, uuid and upnp:rootdevice

`void SSDPClass::_update()`

`case VALUE:`

```
case ST:
// if the search type matches all, root, our type, or our id, we should respond instead of ABORT
if(strcmp(buffer, "ssdp:all") || strcmp(buffer, "upnp:rootdevice") || strcasecmp(buffer, _deviceType) == 0 || strcasecmp(buffer, _uuid) == 0) {
_pending = true;
_process_time = millis();
state = KEY;
}
break;
```
If my understanding of this function is wrong, can you explain why and if the above is 'correct' should I submit a PR?

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.