1
0
mirror of https://github.com/esp8266/Arduino.git synced 2025-04-21 10:26:06 +03:00

65 Commits

Author SHA1 Message Date
Bryce Schober
20b7e480b5 Make ESP8266mDNS debug output like other ESP libs 2017-10-22 13:56:45 +08:00
James Stanley
2abbc36da4 Put WiFi into station mode in examples (#3731) 2017-10-22 13:53:01 +08:00
david gauchard
85078f47a0 yet less warnings for Wall Wextra guys 2017-05-18 06:43:22 -05:00
Ivan Grokhotkov
283eb97cd3 docs: convert to .rst and add readthedocs 2017-05-14 11:44:16 -05:00
Christopher Cooper
0c66c8a88f [Issue #3145] ESP8266mDNS: Improve compliance with DNS-SD RFC6763
- When the "_services._dns_sd._udp.local" meta-query is received, an
enumeration of services types is now returned (e.g. "_http._tcp.local")
instead of an enumeration of instances (e.g.
"MyService._http._tcp.local").  This is consistent with Section 9 of the
RFC.

- When a response is sent, the response records are now properly
partitioned as either answers or additional records.  Only response
records that were explicitly requested as a result of the questions
should be treated as answers.  This is consistent with Section 12 of the
RFC.

- The "MDNSResponder::advertiseServices()" method has been removed as it
was declared as "private" and is no longer being called.  This method
was sending a response on multiple interfaces when available, but this
wasn't really necessary since the interface from which the request was
received that caused it to be invoked is known.
2017-05-01 05:31:10 -05:00
Stephen Warren
2450ec6803 ESP8266mDNS: support multiple interfaces in query code
Add a loop over all known interfaces to queryService() so that it will
find devices attached to all available WiFi networks.
2017-05-01 05:31:10 -05:00
Stephen Warren
4cf7909df9 Fix typo in MDNS multi-interface advertising code
MDNSResponder::advertiseServices() was transmitting all service adverts
on the same interface (AP) rather than once on STA and once on AP. Fix
this simple mistake.

With this change, both "ping esp8266.local" and "avahi-browse -a" see
the ESP8266 from a test Linux PC, on both AP and STA interfaces (where
applicable), with the ESP8266 running mDNS_Web_Server.ino modified for
each of AP-only, STA-only and AP+STA modes.

Note that no attempt has been made to make MDNSResponder::queryService()
operate correctly with multiple interfaces, either in this commit or the
commit this commit fixes.

Fixes: a546d64e07d2 ("ESP8266mDNS: support AP and STA interfaces at once")
Fixes #3101
2017-05-01 05:31:10 -05:00
Rodion Kvashnin
2126146e20 Fix warnings (#2881)
* Suppressed -Wunused-parameter and -Wunused-function by casting to void unused identifiers.

* Explicit initialization of all fields to suppress -Wmissing-field-initializers.

* Fixed signed/unsigned integer comparison.

* memset initialization of structs.

* More -Wunused-parameter fixes.
2017-01-31 10:07:59 +03:00
Stephen Warren
a546d64e07 ESP8266mDNS: support AP and STA interfaces at once
Bind the UDP connection to IP_ADDR_ANY rather than a specific interface
IP, so that it can receive queries from all interfaces at once.

When processing a query, detect which interface it was received on, and
pass this information to the reply code. Set the IP multicast interface
before each transmission, so that we can route each packet to a
different interface if required. These changes enable the code to
respond correctly on both AP and STA interfaces at once. The original
code only worked correctly for the STA interface if both were enabled.

When advertizing all services, do it on both AP and STA interfaces if
they're both enabled.

Provide an API for the application to notify the MDNS code if the AP
configuration changes (enabled, disabled, IP changed). Ideally, the WiFi
core would provide an event callback for this purpose, as it does for
STA changes, but it does not appear to, so the application must provide
this information.
2017-01-17 10:06:01 +08:00
Stephen Warren
eb1ac103e4 Revert "ESP8266mDNS using the provided IP in the begin method (#2349)"
Manually specifying the AP IP isn't required; the next change will modify
the MDNS code to correctly handle any combination of AP and STA modes, and
correctly respond to requests on all active interfaces.

This reverts commit b682d597c5f100ac71e74997880d95404200d759.
2017-01-17 10:06:01 +08:00
Clemens Kirchgatterer
4ececda82b fixed crash in mDNS destructor (#2389) 2016-08-12 21:51:11 +03:00
Radu Pascal
b682d597c5 ESP8266mDNS using the provided IP in the begin method (#2349)
this fix forces the mDNS to use the provided IP in the begin method
instead of the auto detected IP. this is required if the ESP8266 starts
in the AP_STA mode and activates only the AP initially.
2016-08-01 11:49:47 +08:00
Me No Dev
c4c207a85e Optimize MDNS to prevent overflow and endless loop (#2333)
* Optimize MDNS to prevent overflow and endless loop

* Handle better non-esp services

* leave debug off

* better name resolution for external devices

* strip name length (did not show in IDE)
2016-08-01 11:48:23 +08:00
Clemens Kirchgatterer
18297458be allows global object instances be switch off with defines (#2344) 2016-08-01 11:21:50 +08:00
martinayotte
bd01e44c76 fix link list bug in ESP8266mDNS (#2347) 2016-08-01 11:21:21 +08:00
Ivan Grokhotkov
17c02ff252 ESP8266mDNS: restart listening when WiFi STA is connected/disconnected (#1828) 2016-06-12 14:17:27 +08:00
unaiur
30720ce87a Fix #2015 ESP8266mDNS doesn't accept queryService responses from avahi-daemon (#2023)
Ignore unknown records (AAAA) in the query response; this way we can extract
the IPv4 address and connect to the server.
2016-06-01 11:11:11 +08:00
Me No Dev
bfe9f7be69 Update and move lwIP headers, add options to use different lwIP build for generic device
Makefile added to lwip source folder to build and install liblwip_gcc.a
2016-04-10 21:55:22 +03:00
Lars Englund
609c84b29f Delete query and answer list in destructor 2016-03-10 10:11:52 +01:00
Lars Englund
59c6667050 Fixed bug when making multiple consecutive queries 2016-03-09 15:43:09 +01:00
Lars Englund
e09c939c42 Clean code and add example 2016-03-09 11:12:47 +01:00
Lars Englund
0426e000cf Clean up 2016-03-09 09:59:17 +01:00
Lars Englund
42cb81938f Changed to blocking behaviour 2016-03-08 15:26:23 +01:00
Lars Englund
d46f84821e Basic query (and answer parsing) working 2016-03-07 14:25:31 +01:00
probonopd
160f84a6f6 Make advertiseServices() private 2016-01-16 20:51:08 +01:00
probonopd
7a35ee4813 advertise all hosted services (written by me-no-dev) 2016-01-16 20:39:52 +01:00
probonopd
0b42f53bf4 advertise all hosted services 2016-01-16 20:37:06 +01:00
Buzz Burrowes
9b369dbae4 empty committ for pull request 2016-01-01 00:14:41 -05:00
Buzz Burrowes
939e3430de Fixed crash bug with mDNS where a string buffer could be used uninitialized. 2015-12-30 23:30:15 -05:00
Eric Wilkison
c40cb79ec2 -replace char _hostName[63], char _instanceName[63], and char _txt[128] with Strings. Calling enableArduino allocates four TXT records, and there is quite an overhead of storing tcp_check=no inside an 128-byte buffer. Plus you gain flexibility by supporting TXT records larger than 128 bytes. Host and instance names should also be less than 63 characters most of the time.\n-move definitions of struct MDNSService and struct MDNSTxt to .cpp file, and use forward declaratio 2015-12-18 11:37:53 -08:00
Eric Wilkison
f7d8a027e8 Fix begin overwriting instancename 2015-12-17 14:29:15 -08:00
Eric Wilkison
99b3e2df26 remove debug code 2015-12-17 14:13:03 -08:00
Eric Wilkison
8d9f174826 Add human readable instance name property 2015-12-15 13:29:59 -08:00
Eric Wilkison
971bd9b75c Change addServiceTxt to key/val pair 2015-12-15 06:05:35 -08:00
Eric Wilkison
758107f35d Add TXT support 2015-12-15 05:39:49 -08:00
Eric Wilkison
f34f84be74 Fix add multiple services 2015-12-15 05:17:53 -08:00
Eric Wilkison
d45294efff fix invalid packets, removes compression 2015-12-15 05:07:57 -08:00
Me No Dev
a44632b8cf make compiler happier 2015-11-25 18:11:16 +02:00
Me No Dev
a8976a01fd Add MD5 to core, Fix OTA examples and Digest Authentication to OTA and espota.py 2015-11-09 00:42:30 +02:00
Me No Dev
e613e42249 Fix example sketch, espota output and failing updater
I get 100% success with OTA now
2015-11-08 02:01:12 +02:00
Me No Dev
843e11100d mDNS, platform and espota.py changes for IDE Upload
mDNS responds with more TXT properties
platform change to support OTA functions
espota.py added authentication parameter
IDE branch: https://github.com/me-no-dev/Arduino-1/tree/esp8266-ota
2015-11-07 22:02:43 +02:00
Pascal Gollor
c773140a5b use ArduinoOTA class in OTA-mDNS.SPIFFS example 2015-10-22 16:43:00 +02:00
mpromonet
7c37346839 avoid to dereference a NULL pointer if update is called before begin 2015-10-04 17:42:52 +02:00
Pascal Gollor
0034697b6e use String instead of char pointer for SSID() and psk() 2015-09-30 18:15:53 +02:00
Pascal Gollor
093cb1b081 update espota.py help and add chipd id to hostname from OTA-mDNS-SPIFFS example for better identification 2015-09-28 17:19:42 +02:00
Pascal Gollor
ec1c43b5f7 compare wifi settings from config file with sdk config 2015-09-28 16:49:19 +02:00
Pascal Gollor
fb2545f72f example was in wrong folder 2015-09-28 13:27:45 +02:00
Pascal Gollor
da7114cac9 add SPIFFS flashing over the air 2015-09-18 16:03:14 +02:00
Ivan Grokhotkov
6cf18ed1a2 Multicast in SoftAP mode (#96)
SDK 1.3 fixed a bug which caused multicast UDP to fail on SoftAP interface. Update MDNSResponder and documentation appropriately.
2015-08-10 16:14:26 +03:00
Ivan Grokhotkov
496da02f14 Verify sketches as part of travis build
Squashed commits:
[7d1b42f] Encrypt token, skip some tests
[17b8f39] Fix sha1 example path
[f3050b1] Fix build, add webhook
[fd2c9bd] Fix build errors, update mDNS library readme
[7b87031] Make common.sh more flexible
[3ba3eb2] Test all sketches
[87beb8a] Build all sketches in esp8266 core
[f2464f1] Fix paths
[823a9ae] Remove sudo usage
[7fce734] Fix arduino commands
[619bc7d] Move all commands into travis script
[15a5ada] First attempt test runner
2015-07-23 16:06:07 +03:00