1
0
mirror of https://github.com/esp8266/Arduino.git synced 2025-04-19 23:22:16 +03:00

31 Commits

Author SHA1 Message Date
Martijn Scheepers
b64e8da2e2
Set a value for SSDP notify interval (#7110)
* Set a value for SSDP notify interval, default to 1200 seconds.

* Changed uint8_t to uint32_t

Co-authored-by: david gauchard <gauchard@laas.fr>
2020-03-03 19:00:38 -03:00
Earle F. Philhower, III
344c4492af [SSDP] add schema(Print &) const (#6798)
* [SSDP] add `schema(Print &) const`

Supercedes #2806

Make SSDP::schema(WiFiClient&) use a by-ref (reduce stack use)

Add a SSDP::schema(Print&)

From @Palatis' original PR:
useful when using AsyncWebServer.

* Use ip.toString, only export Print& schema interface

Because WiFiClient inherits a Print interface, replace the
::schema(WiFiClient&) with ::schema(Print&) which is source compatible
with existing code and allows the functionality requested in the initial
PR.

Use ip.toString() in the templates instead of breaking up the octets of
the address.

* Fix compile errors and backwards compatibility
2019-11-19 02:02:54 -03:00
Allman-astyler
eea9999dc5 Revert "Allman now (#6080)" (#6090)
This reverts commit 98125f88605cd7e46e9be4e1b3ad0600dd5d2b51.
2019-05-14 00:09:54 +02:00
Allman-astyler
98125f8860 Allman now (#6080)
* switch restyle script for CI

* remove confirmation

* restyle with allman
2019-05-13 16:41:34 +02:00
Ahmed El Sharnoby
e829221833 Fix ssdp (#5750)
* Update ESP8266SSDP.h

Fix SSDP bug: The response to M-Search Packet with ST field set to UUID should be with the UUID not the Device Type
Integrated 'uuid:' prefix into the char array of the _uuid

* Update ESP8266SSDP.cpp

Fix SSDP bug: The response to M-Search Packet with ST field set to UUID should be with the UUID not the Device Type
Integrated 'uuid:' prefix into the char array of the _uuid

* include 'uuid:' in format String and in flash

* Update ESP8266SSDP.cpp
2019-03-21 18:21:48 +01:00
Mike C
d7094f2269 Release referenced resources in the destructor for ESP8266SSDP (#5607)
* Release referenced resources in destructor

* Release referenced resources in destructor, corrected for IPV6

* Release referenced resources in destructor, per suggested changes
2019-01-22 00:00:19 -03:00
chilliwebs
53b3aaee60 usn and udn differences cause issues with smarthings (#5401)
I recently starting playing around with a few esp8266-01s and tried to use the SSDP libraries to work with Smarthings discovery:

https://docs.smartthings.com/en/latest/cloud-and-lan-connected-device-types-developers-guide/building-lan-connected-device-types/building-the-service-manager.html

on the docs there are example grovy files that do simple service discovery, i was not able to get SSDP to work correctly, though i was able to find some other projects that did (python fauxmo works for alexa, but with modifications i was able to make it work for custom devices in ST).

after digging to figure out why the python code was working and the ESP SSDP lib was not i noticed there is a string comparison in the grovy file and it was failing to match the udn with the original usn device id. The ST groovy code could be changed to remedy this problem but i wonder if it should be fixed here, because so many other examples of SSDP discovery take care in ensuring the usn and udn match exactly.

___________

Summary, I think the USN and UDN values should match exactly. This will fix issues, allowing for much easier integration with smart hubs that need the device  ids to match. Allowing me to use these libraries and not need to roll a custom SSDP handler.
2018-11-30 22:16:02 -03:00
david gauchard
5c4db3acf4
IPv6 on esp8266-nonos-sdk and arduino (#5136) 2018-11-27 23:07:47 +01:00
Laercio Mendonça
75a6a3f073 Include SetUUID for SSDP (#4981)
* Include SetUUID for SSDP

Inclusion of the SetUUID Method for Custom UUID

* Ajusts PR

* Include IconList Object on XML
2018-07-30 01:52:16 -04:00
Luc
d1e8fe99a2 Fix compilation with LWIP v2 (#3822) 2017-11-17 00:33:19 -03:00
snosrap
369edb616d Case-insensitive deviceType compare and skip NOTIFY processing
* ifndef'd LWIP_OPEN_SRC to prevent a redefined warning
* ABORT on NOTIFY to prevent responding to NOTIFY messages (we should only respond to M-SEARCH messages)
* case-insensitive compare of _deviceType to enable response to all-lowercase Alexa queries (robustness principle)
2017-09-22 03:52:44 -05:00
Chris Mullins
8b27047911 Put SSDP constants in progmem (#3142)
* Put constant strings in progmem

* strlen -> strlen_P
2017-05-09 06:16:40 -05:00
Clemens Kirchgatterer
18297458be allows global object instances be switch off with defines (#2344) 2016-08-01 11:21:50 +08:00
Alex Potsides
8b9f78eed3 Switch SSDP send arguments around
They are in the wrong order - `_ssdp_packet_template` expects `_uuid` to be before the NT/ST header.
2016-04-26 07:55:03 +01:00
Jeremy Green
04deb7ee77 added comments for clarity 2016-03-16 10:54:12 -04:00
Jeremy Green
c8d855c46d Changed templates to include deviceType
Previously, the notify template and and response templates had a
hardcoded NT (or ST) of upnp:root device.  They now include the
deviceType that is set in initialization.
2016-03-10 21:57:59 -05:00
Wyatt Neal
9b880e7af2 only respond to ssdp searches that match our type 2016-01-09 23:25:57 -05:00
Wyatt Neal
1950b10751 more correctly responding to queries
also a small formatting fix. this should now allow the system to
actually respond to SSDP discoveries that are issued on the network ...
i'm still not 100% certain if this is right due to the way that the
switch() statement is setup; it could be processing more than it should
2016-01-06 20:52:31 -05:00
Wyatt Neal
17c3fb9ce6 fixing serial number length
silly goof, it's a string
2016-01-05 22:20:19 -05:00
Wyatt Neal
2e71a536cb should at least respond to discovery 2016-01-05 22:04:21 -05:00
Wyatt Neal
430331a4f8 adding a few new features to the packet format
* can now specify the TTL programmatically
* can now define the device type urn (up to 64 chars)
** still defaults to `Basic:1`
* can now set the serial number using a `uint32_t`, formatted as %08X
2016-01-05 21:53:48 -05:00
Wyatt Neal
dba2f92f78 fixing TTL to 2 per spec
the v1.1 upnp spec indicates that the default TTL should be set to 2
(and should also be configurable):

* http://upnp.org/specs/arch/UPnP-arch-DeviceArchitecture-v1.1.pdf
2016-01-05 20:33:05 -05:00
Me No Dev
a44632b8cf make compiler happier 2015-11-25 18:11:16 +02:00
Ivan Grokhotkov
1b27b6760c Make SSDP event-driven 2015-07-07 17:39:13 +03:00
Ivan Grokhotkov
7fbb4831da Use static allocation, add convenience overloads which take String 2015-07-07 14:42:20 +03:00
John Doe
de70454a2a send not needed to be public 2015-07-07 10:24:12 +03:00
John Doe
e34ae2d6f1 prep for icons 2015-07-07 10:23:59 +03:00
John Doe
bd6c4acfd8 Add ability to change schema url, http port and add base url 2015-07-07 10:23:04 +03:00
John Doe
3c54cb0a26 generate UUID automatically based on chip ID and MAC address 2015-07-07 10:22:57 +03:00
John Doe
9cb80528c7 enable long model versions 2015-07-07 10:22:49 +03:00
John Doe
4fdba1b635 Add SSDP Library and let Print::printf to handle longer strings 2015-07-07 10:22:43 +03:00