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

2336 Commits

Author SHA1 Message Date
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
Ivan Grokhotkov
c5c138ec5a axtls: update to bddda2a0
- update ssl_client_new signature
- add max fragment length negotiation support (hardcoded to 4096 bytes)
- build axtls with -f{function,data}-sections, ~1k less DRAM usage,
  ~3k less flash
- strip prefix from build paths in debug symbols
2017-04-29 22:58:19 +08:00
Ivan Grokhotkov
0b672668bf progmem: replace C version of pgm_read_{word,byte} with assembly
See discussion in https://github.com/esp8266/Arduino/issues/3140
2017-04-28 11:47:09 +08:00
david gauchard
a41f55c469 prepare lwip2 (#3129)
* minimum changes for libraries to compile with lwip2

* add WiFiClient::availableForWrite() (similar to Serial::) which indicates how much data can be sent without buffering
2017-04-25 08:55:01 -05:00
Sergio Tomasello
a9224266f3 Arduino boards with ESP8266 (#3121)
default crystal freq 26M for all boards, 40M for arduino
2017-04-11 10:19:30 -05:00
Ivan Grokhotkov
a01638f3b5 readme: mention axTLS library
fixes https://github.com/esp8266/Arduino/issues/3038
2017-03-13 15:35:06 +08:00
Stephen Warren
04df3adb54 Add an LLMNR responder implementation (#2880)
This is a simple implementation of an LLMNR responder for the ESP8266
Arduino package. Only support for advertizing a single hostname is
currently implemented.

LLMNR is a very similar protocol to MDNS. The primary practical
difference is that Windows systems (at least Windows 7 and later;
perhaps earlier) support the protocol out-of-the-box, whereas additional
software is required to support MDNS. However, Linux support is
currently more complex, and MacOS X support appears non-existent.
2017-02-20 21:18:49 -06:00
akaJes
d2b370b22d add AsyncPing library to libraries.md (#2889)
fully asynchronous Ping library (have full ping statistic and hardware MAC address).
2017-02-19 21:39:50 -06:00
bsilvereagle
adeed6b828 Updated arduino-esp8266fs-plugin link to 0.3.0 (#2846) 2017-02-19 09:51:09 -06:00
Erik van Roode
b701b9899f Update libraries.md (#2808)
fixed a few typos
2017-02-19 09:30:40 -06:00
Erik van Roode
898d280176 Update readme.md (#2809)
fixed some typos/style/grammar
2017-02-19 09:30:23 -06:00
Ivan Grokhotkov
93413efcf4 Remove queue.h contents originating from BSD (#2982)
fixes #2981
2017-02-19 05:36:30 +03:00
Frank Sautter
af58a74cc0 Allow usage of byte arrays to set RootCAs (#2968) 2017-02-15 14:22:23 +03:00
themindfactory
f30c03b9e1 many users have asked to mention this earlier
I know it was in the body, but so many users have had questions and found esp8266.com late in their searches for answers.... really don't know, just making people happy....
2017-02-14 20:45:30 -05:00
wosk
e9dea9af99 Update keywords.txt for coloring syntax (#2892)
Add ESP keywords and update ESP8266Wifi library
2017-02-06 13:25:27 +03:00
Ivan Grokhotkov
808bf50ff2 wifi: add SoftAPModeProbeRequestReceived event handler (#2917)
- add probe request event handler (#2910)
- update WiFi events handling example to use new handler

Pro tip: replace blinking LED with ‘analogWrite’ and connect the pin to
a loudspeaker (or use a servo to hit a bell). Get notified when someone
with a smartphone wanders around your country house.
2017-02-06 13:24:34 +03:00
Matt
cc84a64793 Set DHCP subnet correctly for softAP (#2648)
Removes hard coded subnet of 255.255.255.0 and fetches the correct subnet from wifi_get_ip_info()
2017-02-03 10:27:06 +03:00
Ivan Grokhotkov
ae13809c81 Update SDK to 2.0.0
- Update SDK header files and libraries to SDK 2.0.0 plus 2.0.0_16_08_09
  patch
- Remove mem_manager.o from libmain.a (replaced with umm_malloc)
- Disable switch from DIO to QIO mode for certain flash chips (saves
  IRAM space)
- Add user_rf_cal_sector_set; it points to rf_init_data sector.
- Change the way rf_init_data is spoofed.
  This is now done by wrapping spi_flash_read and returning the data we
  need during startup sequence.
- Place lwip library into flash using linker script instead of section
  attributes (saves IRAM space)
2017-02-03 04:21:20 +03:00
joelucid
61787b23af ClientConnection uses too much heap when streaming files #2871 (#2874)
* ClientConnection uses too much heap when streaming files #2871

* make write_chunk_size a member variable

* untabify
2017-01-31 11:04:45 +03:00
Ivan Kravets
90729ea50c Update @PlatformIO links 2017-01-31 11:00:26 +03: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
Rodion Kvashnin
d85e783806 Fixed libb64 decoder. (#2883)
* Fixed libb64 decoder.

Libb64 decoder works when "char" type is signed. In esp8266 xtensa gcc "char" is unsigned, so libb64 decoder does not work. In the implementation file I replaced "char" to "int8_t" and created function wrappers in order to keep existing interface.

* For style consistency.
2017-01-20 16:37:53 +08:00
Родион Квашнин
9791a48d4a Fixed incorrect usage of memset() in PWM code which leads to incomplete initialization of struct. Thanks to GCC warning -Wsizeof-pointer-memaccess. 2017-01-19 20:18:31 +08:00
pfeerick
a444898900 Prevent divide by zero error causing tone() to crash (#2780)
* Prevent divide by zero error causing code to crash

As per the issue at #2491, there is a divide by error issue resulting from the specification of 0 as the frequency. This does not appear to affect the AVR implementation, but it crashes on ESP8266s. I have merely removed the division if the frequency is zero, which appears to be giving the expected results (no tone), without any code crashes. 

To test, simply load the toneMelody sketch included with the Arduino IDE (Examples -> 02. Digital -> toneMelody) and change the piezo to something else if you need to. On the Witty module used to test this, I could also tell by the wifi led blinking every time the code crashed as the ESP8266 immediately rebooted.

* Use noTone when frequency is zero

When a frequency of zero is given to tone(), instead call noTone() and exit. Placed after some of the initialisation stuff to ensure the pin is mapped as a output, etc. Tested as functional against a Node MCU 1.0 board and the toneMelody example sketch, using GPIO5 (pin D1).

* Errant tab in formatting

* Rest of tabs that crept in from web editor

Defaulted to tabs and 8 indent :sigh:
2017-01-17 10:09:08 +08:00
hreintke
f18b18d53d move libstdc++ to flash (#2804)
* move stdc++ to flash

* Update : change tab to leading spaces, correct indentation
2017-01-17 10:08:11 +08:00
Vicne
cdad2849c5 Added a section on filesystem limitations due to issue #2858 (#2860) 2017-01-17 10:07:08 +08: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
Jose M Viloria
0291a6e32a Update Blink.ino
Typo
2017-01-05 11:50:43 -06:00
Adam Bogdał
b4368ba870 Update curl command 2017-01-05 11:43:26 -06:00
Albert J wong
c6c54e710f Use correct cast for downcasting reference.
For downcasting, static_cast<> is the appropriate cast. Using reinterpret_cast<> will NOT correctly adjust the `this` pointer and dereferencing such a value is undefined by spec. See [expr.reinterpret.cast]p7 for the relevant passage. The only legal use of this pointer is in another set of reinterpret_cast expressions that either land it into a numeric value, or back to the original type.
2017-01-05 11:36:56 -06:00
Ivan Grokhotkov
7b32e6ad37 Merge pull request #2534 from jabelone/patch-1
Corrected a typo and improved grammar
2016-11-14 11:03:37 -06:00
Ivan Grokhotkov
da4cab5b27 Merge pull request #2554 from Makuna/SPIFFSFileSeek
Add Arduino File standard seek call
2016-11-14 11:02:46 -06:00
Ivan Grokhotkov
7ccafadb41 Merge pull request #2649 from WereCatf/WiFiClientExamples
Use WIFI_STA in WiFiClient-examples
2016-11-14 11:02:00 -06:00
Ivan Grokhotkov
2f9b13ce1a Merge pull request #2646 from gadgeteer/patch-1
Fixed PUT(String) method, it called POST in error
2016-11-14 11:01:27 -06:00
Ivan Grokhotkov
209c877157 Merge pull request #2444 from krzychb/master
New FAQ - How to resolve "Board generic (platform esp8266, package esp8266) is unknown" error?
2016-11-14 10:55:58 -06:00
Ivan Grokhotkov
3e7b4b8e0c Merge pull request #2640 from Lauszus/variants
Add PIN defines, so the pins can easily be used by external libraries
2016-11-14 10:55:20 -06:00
Ivan Grokhotkov
f4c391032a const-correctness IPAddress::toString() (#2507)
it doesn't modify any member variables, should be safe to be const.
2016-11-14 10:43:40 -06:00
WereCatf
d46d742db1 Use WIFI_STA in WiFiClient-examples
Many people have problems with using ESP8266 as WiFi-client due to
none of the examples mentioning that you should use WIFI_STA if you
only want the ESP8266 to act as a WiFi-client. Many WiFi-devices
will randomly try to connect to the ESP8266 if used as STA+AP and
complain about not being able to access the Internet or other devices
on the network.
2016-10-29 12:40:06 +03:00
Allen Smith
4dd9fef491 Fixed PUT(String) method, it called POST in error
About the simplest change possible, just delete two characters and add one. The PUT(String) convenience method called the full POST method instead of calling the PUT method
2016-10-28 14:12:38 -04:00
Kristian Sloth Lauszus
6d6f22e6be Add PIN defines, so the pins can easily be used by external libraries
See: arduino/Arduino#4814

For instance this is used by the USB Host library: 231fb542a8
2016-10-26 01:29:14 -05:00
Michael Miller
b5b7169e51 Add Arduino File standard seek call 2016-09-26 23:54:53 -07:00
Jaimyn Mayer
bdc43a0206 Corrected some typos and improved grammar
Corrected some typos and improved grammar
2016-09-18 04:07:42 +10:00
Victor Tseng
5666ec2ec1 const-correctness IPAddress::toString()
it doesn't modify any member variables, should be safe to be const.
2016-09-13 00:32:29 +08:00
krzychb
cd2e04b6dd Extended troubleshooting section
* Missing reset after serial upload, ref. #2438, #2465
* Port not visible in IDE, ref. #2415
* `[alt text]` added
* Typo corrections
2016-09-02 19:15:30 +02:00
Me No Dev
4897e0006b match headers using equalsIgnoreCase (#2474)
Should fix: https://github.com/esp8266/Arduino/issues/2131
2016-09-02 11:49:14 +03:00
Ivan Grokhotkov
c2414a2252 Update axTLS to 144994c
https://github.com/igrr/axtls-8266/pull/23
2016-08-29 13:48:54 +08:00
Me No Dev
889775c6fe ArduinoOTA optimizations (#2445)
- Added option to control if the ESP should be rebooted on success
- Added delay before ESP.restart() is called
- Added some comments to the header
2016-08-27 18:32:26 +03:00