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

52 Commits

Author SHA1 Message Date
david gauchard
5c4db3acf4
IPv6 on esp8266-nonos-sdk and arduino (#5136) 2018-11-27 23:07:47 +01:00
david gauchard
74ca42f829 Sketch emulation on host (#5342)
* WIP compile examples on host with 'make examples'

* WIP bufferize tcp input

* WIP Makefile

* WIP network to rework, tcp/udp to factorize, udp addresses broken

* minor changes to the core

* WIP basic udp working

* WIP mdns

* WIP mcast receiving, not sending

* WIP mdns OK

* beta version

* SSL + doc

* update travis host test command

* licenses

* typo

* doc: arduino builder is not around: declare functions before calling them

* fix with latest SSL PR, compile in 32 bits mode

* fix make clean

* make -m32 optional

* 32bits compiler ability tester

* WIP

* WIP (fix 1 vtable error, still another one to hunt with using spiffs)

* example astyle

* fix os_printf_plus

* load / save mock spiffs

* fix style

* fix using spiffs/mock

* don't mess ram

* update doc

* remove leftover

* optimization -Os except for CI, rename ARCH32 to FORCE32

* revert useless cast (not even compiled)

* remove unused function

* use proper type for pointer arithmetics

* makefile: sketch object and cpp file moved to bin/ directories
easier to clean, and IDE don't like them

* changes for review

* make use of %zd

* less verbose makefile by default (option)

* update readme
2018-11-20 18:51:45 -02:00
A C SREEDHAR REDDY
e0b6242e04 clear mdns.queryservice()'s previous result when called (#4894)
cleared the linkedlist.
* issue #4893
2018-07-05 23:17:53 -04:00
Mike Morrison
ea4720b03e fix issue with compressed pointer (issue 4648) (#4752) 2018-06-07 12:31:49 -04:00
Jonatan Olofsson
461c922586 Compressed dns (#3769)
* Add UdpContext seek and tell

* Add support for DNS compressed messages

* mDNS compressed pointer: Validate offset before jumping
2018-03-16 09:46:35 -03:00
Develo
bb5787a1cd
Fix mdns buffer overrun by 1 (#4317)
* fix mdns buffer overflow, minor indent/prettify
2018-02-07 14:39:27 -03:00
Bryce Schober
20b7e480b5 Make ESP8266mDNS debug output like other ESP libs 2017-10-22 13:56:45 +08:00
david gauchard
85078f47a0 yet less warnings for Wall Wextra guys 2017-05-18 06:43:22 -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
7a35ee4813 advertise all hosted services (written by me-no-dev) 2016-01-16 20:39:52 +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
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
mpromonet
7c37346839 avoid to dereference a NULL pointer if update is called before begin 2015-10-04 17:42:52 +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
John Doe
dc9072b94b Initial Upload From IDE
For Test ONLY
2015-07-06 12:25:17 +03:00
Ivan Grokhotkov
a82796f83f Revert a460efb 2015-07-06 12:22:30 +03:00
John Doe
25aa2cdc08 MDNS-SD 2015-06-29 02:27:14 +03:00
Ivan Grokhotkov
b959e82165 add missing includes to mDNS library 2015-05-12 21:05:00 +03:00
Ivan Grokhotkov
699b06b875 implement async replies in mDNS library
No need to call mdns.update() from loop() any more.
2015-05-12 17:59:24 +03:00
Ivan Grokhotkov
727c61efe2 UDP multicast APIs fix
fix #74, fix #7
2015-04-29 07:01:46 +08:00
Ivan Grokhotkov
79e0aa361a Update maintainer info 2015-03-27 12:18:06 +03:00