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

3604 Commits

Author SHA1 Message Date
Korzo
b623613b2a Remove SD file available size saturation 2017-05-09 06:17:55 -05:00
Ivan Grokhotkov
7de81270a3 ClientContext: don’t read DataSource in TCP callback
Previously, _write_some function would be called each time TCP stack
notifies the application that some data was delivered (via the `sent`
callback). In turn, _write_some would obtain more data to be sent from
the DataSource. In case of a DataSource backed by a Stream, this would
read from a stream. Some libraries (such as SD) may call `yield` and
other blocking operations from Stream read function, which can not be
used in TCP stack callbacks.

This change moves the data sending loop back into the Arduino task, with
a negligible loss of performance. TCP callback now wakes the main task
via `esp_schedule`, which performs stream read and provides more data
to the TCP stack.

Possible future optimization would be to buffer Stream data ahead of
time. That way, buffered data could be sent immediately from the TCP
callback. On the other hand, this optimization would need extra TCP_MSS
of temporary storage, per connection.

Fixes #2399.
2017-05-09 06:17:32 -05:00
Ivan Grokhotkov
03baea27ef ArduinoOTA: forward errors from Update.begin to espota.py
If Update.begin fails, instead of printing “No response from device”,
espota.py will print the actual error message from the Updater.
2017-05-09 06:17:06 -05:00
Ivan Grokhotkov
01e1c586cb Updater: if low on heap memory, use smaller write buffer 2017-05-09 06:17:06 -05:00
Ivan Grokhotkov
9b0ad39e94 Updater: check boot mode before starting update
ref. https://github.com/esp8266/Arduino/issues/1017
2017-05-09 06:17:06 -05:00
Ivan Grokhotkov
22c7d792f0 Updater: place debug strings into progmem 2017-05-09 06:17:06 -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
Ivan Grokhotkov
1d41859238 axTLS: update to 1b2c299
Includes memory optimizations (less .rodata, less heap)
2017-05-09 17:40:52 +08:00
Andrew DeLisa
2881e910ec Fix typo in client-class.md (#3045) 2017-05-08 11:13:32 -05:00
Karl Palsson
0f50fc01d1 readme: update target milestones (#2692)
Signed-off-by: Karl Palsson <karlp@tweak.net.au>
2017-05-08 06:20:17 -05:00
Dhruv Acharya
97373e716d Add instructions how to re-enable DHCP (#2600)
In WiFi.config, if we pass 0.0.0.0 for all three parameters (as local_ip, gateway and subnet mask), it will re enable the DHCP. We need to re connect the device to get the IP from router.
2017-05-08 05:35:40 -05:00
Trygve Laugstøl
2d9e767630 Fixing a few compiler warnings to allow compilation with -Wall -Wextra and -Werror. (#3153) 2017-05-08 04:56:08 -05:00
Pablo Mendoza
db4d3e0098 Free memory we allocated and actually stop i2s. (#3191) 2017-05-08 03:33:20 -05:00
jpmendoza
af0f5ed956 Issue #1062: Implement support for HSPI overlap mode. 2017-05-08 03:04:11 -05:00
Beau Hardy
157698bef9 Base64: add option to disable any newlines in output. (#3208)
Closes #3194
2017-05-08 03:01:24 -05:00
4D Systems
ca3a1728d0 Addition of gen4-IoD Range boards (#3202) 2017-05-06 06:26:58 -05:00
Ivan Grokhotkov
5488792aff package: move toolchains to Github 2017-05-06 10:52:20 +08:00
Chris Mullins
72ed29ad5f allow for overridable value for HTTP_UPLOAD_BUFLEN 2017-05-01 05:33:20 -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
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