Commit Graph

579 Commits

Author SHA1 Message Date
Jason K
7aa7c3f0dd Add additional test detail (#1099)
Update test to show more detail to help for checking for poor/inconsistent FLASH operation.
2018-03-04 20:57:45 +01:00
h3ndrik
e3a5ae439b clean up faster (fixes #828) (#1087)
flush tcp buffer instead of reading it byte by byte.
2018-03-04 20:53:04 +01:00
Bernd Giesecke
494ff217aa Make ESPmDNS compatible to ESP8266mDNS (#1085)
The ESP8266 version of the mDNS library expected service name and protocol without leading '_' (underscore). The ESP32 version expected service name and protocol with leading '_' (underscore).
This small change makes the ESP32 version compatible with the ESP8266 version and keeps backward compatible with existing code by accepting service name and protocol either with or without leading '_' (underscore).
2018-03-04 20:50:38 +01:00
Bert Melis
8e29347d4f Add Ticker library (#1057)
* Add Ticker library

* Fix CI (#1)

remove LED_BUILTIN in examples
2018-03-04 20:34:03 +01:00
Ifediora Elochukwu C
3310e2e31d Add EEPROMClass and examples (#1034)
* enchanced EEPROMClass

* Added eeprom examles and modified partition

* added eeprom class and extra examples

* No changes

* No changes

* added eeprom class and examples

* fixed typo

* length() returns user-defined sector size

* updated and annotated example
2018-03-04 20:22:48 +01:00
Laurent Louf
694c3a453f DNS Server : bug fix and prettifying (#1011)
* Retrieve some code from what has been done on the ESP8266. Clarify a bit the signification of several bytes in the response.

* Add the type and class as members of the DNS class for an eventual future use.

* Clarify the sense of a magic number present in DNS server.

* A bit of aesthetics for the DNS server.

* Add a structure for the DNS question, use it DNS server to store the question data and to create the DNS answer from scratch.
2018-03-04 20:17:40 +01:00
me-no-dev
bd932a99de Update BLE lib 2018-01-19 11:34:49 +02:00
me-no-dev
615c9279f7 Add DNS Server 2018-01-18 13:54:51 +02:00
me-no-dev
8332a235d6 fix issue with STA emiting the wrong event 2018-01-18 13:54:26 +02:00
me-no-dev
dde5e297c3 Update BLE lib 2018-01-18 10:52:46 +02:00
me-no-dev
bac560901f Reorder Updater init 2018-01-18 01:19:30 +02:00
lbernstone
d650ac6c3c WiFiClientSecure::lastError() method (#945)
* Added a lastError method to WiFiClientSecure so that a connection error from mbedTLS can be retrieved if connection fails (and then presented to a user).

* Changed to dos CRLF

* Made buffer size a const\nMore cleanup to match source
2018-01-18 01:03:56 +02:00
Clemens Kirchgatterer
2633fc3c74 Add progress callback to Update::writeStream(). (#948) 2018-01-18 01:02:58 +02:00
Joey Babcock
964287727f Small grammar fixes and clarifications (#1003)
* Small grammar fixes and clarifications

Just fixed some small grammar issues in the comments and clarified a few things that might seem confusing.

* More spelling fixes that I introduced...
2018-01-18 00:59:35 +02:00
Me No Dev
600f4c4130
Update IDF to 1c3dd23
* Update mDNS and LEDC

* update toolchain

* Update IDF to 1c3dd23

* Advertise the board variant for Arduino OTA

* Add generic variant definition for mDNS
2018-01-18 00:56:58 +02:00
copercini
70d0d46487 Enable static IP via ethernet (#924) 2017-12-19 14:07:22 +01:00
Jason K
cfbb7300b7 Update to make use of SSL a bit less confusing by ensuring errors are generated if the wrong method is called to retrieve the data stream. (#934) 2017-12-19 14:06:45 +01:00
Frank Sautter
75bc1e648b Allow configuration of Ethernet PHY clock source (#916)
* Allow configuration of Ethernet PHY clock source
Refer to https://github.com/espressif/esp-idf/pull/1127
The internal APLL can be used to generate the 50MHz clock for the internal EMAC and the external Ethernet PHY.
The clock can either be input on GPIO0 (as before) or output on GPIO0, GPIO16 or GPIO17 (only GPIO17 extensively tested).
New example available.

* Allow configuration of Ethernet PHY clock source
Refer to https://github.com/espressif/esp-idf/pull/1127
The internal APLL can be used to generate the 50MHz clock for the internal EMAC and the external Ethernet PHY.
The clock can either be input on GPIO0 (as before) or output on GPIO0, GPIO16 or GPIO17 (only GPIO17 extensively tested).
New example available.
2017-12-19 14:06:01 +01:00
me-no-dev
20db2ee421 Add Time and TimerWDT examples 2017-12-14 21:13:42 +01:00
Masaki Koyanagi
79e5d4c40d Allow PSK instead of passphrase in WiFiSTA::begin (#897) 2017-12-04 17:46:49 +01:00
me-no-dev
f0336b38ad fix change in IDF causing havoc when used as component 2017-11-30 16:17:26 +01:00
zipiju
3198f25c19 Set HSPI ports by default when HSPI is selected (#874)
When user selected HSPI with SPIClass name(HSPI) ESP was, by default,
still using VSPI ports (the ones defined in pins_arduino.h).
With this change when user selects HSPI then HSPI default ports will be
used.
If user won't specify HSPI then VSPI default ports will be used.
If user will specify SCLK, MOSI, MISO and SS with SPI.begin() then user
defined ports will be used no matter if VSPI or HSPI is selected.
With this change fe. SD library can use default HSPI ports. It was
possible to
pass HSPI SPI instance to SD lib, however even then it was using VSPI
ports which were (probably) GPIO matrixed to HSPI.
2017-11-28 11:12:39 +01:00
Me No Dev
81a9c45a1e
Update IDF to e5b2c1c (#865)
* Update BLE Library

* Fix SD driver

* Update toolchain

* Update IDF to e5b2c1c
2017-11-23 23:26:53 +01:00
copercini
8ba91b9453 Feed WDT (#817)
fix for https://github.com/espressif/arduino-esp32/issues/740
2017-11-06 20:17:10 +02:00
allex1978
47cdfff475 Now SmartConfig works! (#807)
* little fix to WiFiSTA.cpp

Now SmartConfig works! Tested on ESP32

* little fix to WiFiSTA.cpp

Now SmartConfig works! Tested on ESP32
2017-11-06 20:10:48 +02:00
me-no-dev
1b994d54be Fix wrong size reported for cards above 16GB
Fixes: https://github.com/espressif/arduino-esp32/issues/803
2017-11-06 16:20:42 +02:00
me-no-dev
45d5d9b360 Fix SD issue on failed mount
fixes: https://github.com/espressif/arduino-esp32/issues/613
2017-11-06 16:13:09 +02:00
copercini
14dd44ad06 Reduce net_would_block calls in handshake verification (#795)
This reduce net_would_block calls and CPU utilization
2017-11-06 15:28:37 +02:00
0xPIT
7890e1192b Allow chaining of methods for more concise code (#809) 2017-11-06 15:25:11 +02:00
davruet
126674c3b6 Fixes for zero length packet bug, buffer overflow in parseInt(), added end() method (#757)
* ArduinoOTA would stop receiving any packets if the port received a zero-length UDP packet, commonly sent by network scanners like nmap. Fixed to flush() after every call to parsePacket(), even if read length is 0.

Additionally, added length checking to fix a potential buffer overflow in parseInt().

Finally, added an end() method that stops the OTA listener and releases resources.

* Only end MDNS in end() if mdns mode is enabled.
2017-10-30 10:44:15 +01:00
Andreas Pokorny
36dba996c1 Extend HTTPClient to allow connecting with a client certificate (#788)
* Forward client certificate to wificlient secure

* remove comment
2017-10-30 09:37:33 +01:00
me-no-dev
4470e28ca1 WiFiClientSecure fail if gethostbyname returns null 2017-10-23 16:19:46 +03:00
Me No Dev
0c038b4063 Update WiFiGeneric.cpp
Missed definition
2017-10-21 09:50:43 +03:00
Me No Dev
43544d89c5 Run WiFi thread on the Arduino core
Fixes: https://github.com/espressif/arduino-esp32/issues/749

Works even when single core mode is selected
2017-10-21 09:47:24 +03:00
me-no-dev
81f225a4c5 Fix ioctl undefined in latest IDF 2017-10-18 10:51:18 +02:00
Testato
3261348e81 remove instead of delete (#730) 2017-10-16 21:27:19 +03:00
Me No Dev
7216977234 Update IDF to 3a271a4 (#735) 2017-10-16 21:25:41 +03:00
Me No Dev
60b8b47455 Update IDF to de750e9 and add BLE (#723)
* Update IDF to de750e9

* Add BLE Library submodule
2017-10-13 22:07:41 +03:00
Rafa Couto
cabc4c5bb5 ESP32 default port in comment (#721)
* ESP32 default port in comment

* ESP32 default hostname.
2017-10-13 11:46:38 +03:00
Allan
f1e87d91be Create ledcWrite_RGB.ino (#688)
* Create ledcWrite_demo_ESP32_RGB.ino

adding the public domain example ledcWrite_demo_ESP32.ino to this repo.  Added RGB to the name for people searching, added some comments, and renames things to make a bit more sense.

* Update ledcWrite_demo_ESP32_RGB.ino

renamed to ledcWrite_RGB.ino and added a couple more comments based on https://github.com/espressif/arduino-esp32/issues/689

* Rename libraries/ESP32/examples/AnalogOut/ledcWrite_demo_ESP32_RGB/ledcWrite_demo_ESP32_RGB.ino to libraries/ESP32/examples/AnalogOut/ledcWrite_RGB/ledcWrite_RGB.ino

Renamed.
2017-10-10 22:42:26 +03:00
Kevin van den Broek
3fea101944 Changed update example to use different controlflow structure (#711) 2017-10-10 22:41:10 +03:00
me-no-dev
22d92e7b7f Change size of fatfs ioctl returns 2017-10-09 07:18:18 +03:00
me-no-dev
17a1a24009 fix SPIFFS example 2017-10-01 10:27:04 +08:00
Jason K
0cd62852da I2c reset functionality (#678)
* Addition of a i2cReset method and timeout handling for the case where the i2c hardware FSM (state machine) gets stuck in a busy state.

* Use newly added i2cReset function within the wire library.
2017-09-29 21:17:13 +08:00
Frederik
10ff1def6d Add example to update ESP32 via SD card (#628)
* Add example to update ESP32 via SD card

* Delete update.bin from sd upon finishing update

* remove precompiled binary from example

* Check whether update.bin is a file
2017-09-29 21:16:30 +08:00
me-no-dev
e72895b722 Quiet SSL and HTTPClient debug 2017-09-29 20:31:45 +08:00
me-no-dev
7aa1913506 Allow HTTPS without certificate to use begin(url) 2017-09-29 17:02:59 +08:00
me-no-dev
4230aeca83 Allow HTTPClient to access HTTPS without providing a certificate 2017-09-28 20:19:23 +08:00
me-no-dev
28b7b4e287 Move network events to their own task 2017-09-28 11:41:35 +08:00
Luc
3ba46c7fbc Add totalBytes / usedBytes to SD/SDMMC (#673)
to be same as SPIFFS
2017-09-28 10:01:02 +08:00
Arvind Ravulavaru
a66b544d18 Added ESPNow Multi-Slave example (#669)
* Added ESPNow basic example

* fixed meta doc for slave

* refactored folder structure

* bug fixes

* Added Single Master Multi-Slave

* updated meta docs
2017-09-27 16:46:17 +08:00
me-no-dev
2b6d47ac17 Fix race in SPI endTransaction 2017-09-27 16:27:44 +08:00
Arvind Ravulavaru
4c36e03381 Added ESPNow basic example (#667)
* Added ESPNow basic example

* fixed meta doc for slave

* refactored folder structure
2017-09-26 17:44:54 +08:00
me-no-dev
eb282131ba Allow DHCP to be started again by giving a zero IP address to STA config
Fixes: https://github.com/espressif/arduino-esp32/issues/654
2017-09-22 12:20:53 +08:00
me-no-dev
1407654c52 Must include sdkconfig.h before testing defines 2017-09-21 19:33:45 +08:00
me-no-dev
c66a020e80 Add guards to not compile BT code if not enabled 2017-09-21 19:08:18 +08:00
Pranav Cherukupalli
17add63139 Add Example Code for WPS Functionality (#648) 2017-09-21 16:47:45 +08:00
me-no-dev
4cf0e98f32 Fix desync with IDF in dhcpserver 2017-09-20 15:36:39 +08:00
me-no-dev
f648ad7cea Allow WiFi Event Callback to read the event info
Helps in cases where Event Info is needed (WPS and others)
2017-09-18 17:54:57 +08:00
Me No Dev
29a253ac98 Add initial SPIFFS library (#627)
* Add initial SPIFFS library

* Fix Deep Sleep Examples

* Missed one example
2017-09-12 11:09:59 +03:00
copercini
9edf65d56e Static IP example 2017-09-09 00:15:54 -03:00
copercini
ad179548e4 SNI support (#592)
Server Name Indication (SNI) support for WiFiClientSecure

Fix https://github.com/espressif/arduino-esp32/issues/571 and https://github.com/espressif/arduino-esp32/issues/550
2017-08-23 21:33:26 -03:00
Tomasz Scislowicz
3a8e28dc87 change esp_wifi_scan_start to async mode (#574) 2017-08-17 16:12:35 +03:00
me-no-dev
9618eec19e Set DNS IP to type V4
Fixes: https://github.com/espressif/arduino-esp32/issues/553
2017-08-02 09:32:05 +03:00
me-no-dev
3af1710a92 Add initial support for Ethernet and examples 2017-08-02 00:02:45 +03:00
copercini
5c1b10f3bb Small improvements in update example (#552)
- 100ms is too low to get server response
2017-08-01 20:12:28 +03:00
me-no-dev
2aed417d09 Enable 1bit SDMMC for Olimex ESP32-EVB
Fixes:
https://github.com/espressif/arduino-esp32/issues/495#issuecomment-31604
2612
2017-08-01 18:16:48 +03:00
sticilface
91d02cc6d5 Change disconnect function (#466)
* Change disconnect function

Current implementation does not disconnect the WiFi. Use of `esp_wifi_disconnect()` does.

* Update WiFiSTA.cpp

put back the clear ssid + password
remove the duplicate `esp_wifi_set_config(WIFI_IF_STA, &conf);`
2017-08-01 12:59:52 +03:00
pbecchi
706bf48708 EEPROM_library_ported_Partition_table_updated (#535)
* EEPROM_library_ported_Partition_table_updated

* Cleanup & formal corrections

* Make formatting of file consistent.

Readability change, Concern about the SubType being 0x99.

* Code formatting cleanup

* Code formatting cleanup

* Code formatting cleanup

* Remove commented out code

* Restore dropped bracket

* Update EEPROM.cpp

* Format Corrections

* deletedExample

* Corrected example

* Deleted interrupts/nointerrupts

* Update EEPROM.cpp
2017-08-01 12:51:38 +03:00
bbx10
37ef5a43e3 Handle partial socket send (#503)
send() can return a value > 0 but less than size indicating it was able to accept some of the data in buffer. The caller must try again after updating the buffer pointer and size remaining.
2017-07-31 22:51:41 +03:00
Glen McGillan
2eaf846134 Spi pattern fix (#502)
* Add files via upload

Calls to writePattern() don't send the desired number of bytes when the pattern size doesn't divide evenly into the hardware FIFO size (e.g. sending 18-bit RGB data, 11 patterns take 63 bytes, so 1/64th of the data is never sent).

* Add files via upload

Remove white space changes.
2017-07-31 22:50:57 +03:00
Andreas Pokorny
b3fdfda914 Bugfix: Put every SPI access between begin / end Transaction (#509)
The change intrdocues a local RAII helper to simplify maintaining begin/end scopes

Signed-off-by: Andreas Pokorny <andreas.pokorny@siemens.com>
2017-07-31 22:46:15 +03:00
dstoiko
d8330cceec Added file.close() in manipulation functions (#514) 2017-07-17 03:44:04 +03:00
me-no-dev
13bb22de30 Fix SD Card not properly initializing 2017-07-07 11:34:54 +03:00
Joey Babcock
ad2adce65e Edit comments for clarity (#478)
* Edit comments for clarity

I was a little confused reading what this sketch did the first time so I attempted to edit these for clarity.

* code edits as well

Grammar fixes for some parts of the code as well
2017-07-02 17:54:20 +02:00
Pranav Cherukupalli
1be6a5c361 ESP32: Add DeepSleep examples (#473)
*Added a Timer wakeup example
*Added a Touch wakeup example
*Added an external source wakeup example
2017-06-29 09:31:39 +02:00
copercini
cfde557916 Heap optimization (#471)
* Remove duplicated include

* Clear certificates just after handshake

It can save up to 7k of heap
2017-06-29 09:30:59 +02:00
Pranav Cherukupalli
87093368d9 ResetReason: Add an additional method and a test case (#467)
Method:
--------
Added a verbose print method for ease.

Test Case:
-----------
Putting ESP32 to sleep will give a different reason on wake than the first
time power up.
2017-06-27 14:17:55 +02:00
Brian Degger
839318c0eb Create hall_effect_esp32.ino (#450)
* Create hall_effect_esp32.ino

A simple example to access the hall effect sensor in the esp32

* Create hall_effect.ino

* Update hall_effect.ino

Simple sketch to access the internal hall effect detector on the esp32

* Delete hall_effect_esp32.ino

* Create HallSensor.ino

* Update HallSensor.ino

* Update HallSensor.ino

* Delete hall_effect.ino
2017-06-21 14:16:47 +02:00
copercini
023a32bc12 Print last reset reason example (#458) 2017-06-21 12:53:44 +02:00
me-no-dev
7811668fb1 Make sure that WiFi is started before trying to erase configuration.
Connected to: https://github.com/espressif/arduino-esp32/issues/400
2017-06-21 12:42:58 +03:00
me-no-dev
409926ef77 Fix commits duplicating methods 2017-06-14 13:48:48 +03:00
bbx10
b05c7dfa59 Additions to WiFiClient and WiFiServer (#404)
Required for WebServer and/or DNSServer libraries
2017-06-14 10:22:16 +02:00
bbx10
26677a4b05 Add WiFiClient localIP and localPort (#428)
Implement methods from ESP8266WiFiClient but use sockets API.
2017-06-14 10:17:14 +02:00
SO_yeah
73cd8d7f7e set max clients from code (#432)
* Update WiFiAP.cpp

set from code the maximum number of clients to smaller than 4 (in my case i must allow only one client at a time)

* Update WiFiAP.h

* Update WiFiAP.cpp

* Update WiFiAP.cpp

* Create WiFiAP.cpp
2017-06-14 10:14:14 +02:00
Joey Babcock
4d47deab24 Some grammar/spelling fixes (#438) 2017-06-14 10:12:59 +02:00
Arvind Ravulavaru
8965358bd3 added OTA Update S3 example with a sample bin (#445)
* added OTA Update S3 example with a sample bin

* Update as per comments
2017-06-14 10:12:39 +02:00
me-no-dev
bf60ca7e3b Fix enable Update partition (only) 2017-06-03 20:11:41 +03:00
me-no-dev
c2f83f48e0 Revert "Fix enable Update partition"
This reverts commit 63e1daa5ea67ce0f9b89b789e4bb26672f64d32e.
2017-06-03 20:11:41 +03:00
me-no-dev
2e5743eaa1 Fix enable Update partition 2017-06-03 20:11:41 +03:00
me-no-dev
5b216b6622 Updater was missing enablePartition 2017-06-02 18:29:37 +03:00
me-no-dev
063d608e18 Optimize Update class
- add roll back API to switch the running partition
- do not write the partition magic until the end to prevent booting
into partially written update
2017-06-02 18:24:26 +03:00
me-no-dev
0e513f3a4b Make sure WiFi is initialized in disconnect.
Fixes: https://github.com/espressif/arduino-esp32/issues/400
2017-05-29 13:12:42 +03:00
me-no-dev
5d92784710 Call esp_wifi_start in WiFi::begin
Fixes: https://github.com/espressif/arduino-esp32/issues/391
2017-05-23 11:32:03 +03:00
bbx10
432bcf5a0a Add WiFiServer hasClient and WiFiTelnetToSerial example (#394)
WiFiTelnetToSerial is also a test for hasClient().
2017-05-23 08:12:39 +02:00
me-no-dev
db09ca8c16 Make SimpleBLE work again
Fixes: https://github.com/espressif/arduino-esp32/issues/373
2017-05-22 17:50:57 +03:00
me-no-dev
b6e83fac62 Initial WiFi auto reconnect implementation
This needs proper testing!
Fixes: https://github.com/espressif/arduino-esp32/issues/353
2017-05-22 16:29:41 +03:00
me-no-dev
21ff3d0e32 Slight rework of WiFi Class
- call esp_wifi_start()
- separate tcp initialization to prepare for Ethernet
- setup dhcp addresses when using custom IP config for SoftAP
2017-05-22 15:31:23 +03:00
me-no-dev
88293a4284 Implement WiFiClient.peek()
Thanks @miomir1981
2017-05-22 15:27:34 +03:00
bbx10
06a76eebe8 Remote tcp disconnect not detected (#389)
* Add setNoDelay and getNoDelay to WiFiServer class

* Remote TCP disconnect not detected
2017-05-22 14:16:07 +02:00
copercini
51a4432ca8 HTTPClient Port (#347)
* Fix possible infinite loop in the example

* Remove workaround of sockets always return -76 

Remove workaround of sockets always return -76 (because it's fixed on IDF now)
Remove delay during handshake (improving stability)

* Remove unusable mbedtls_net of context creation

* Fix bad destructor

* Compatibility with WiFiClient for HTTPClient

* Initial port from ESP8266

Changed SHA1 fingerprint by Root CA verification
Changed log system

* Remove deprecated function
2017-05-19 10:18:20 +02:00
Max
05a3de262a Remove LEDC_BASE_FREQ to calculate duty (#381) 2017-05-19 10:16:55 +02:00
me-no-dev
b1b77a658f WiFiClient::peek should return -1 instead of 0
Fixes: https://github.com/espressif/arduino-esp32/issues/329
2017-05-06 18:30:38 +03:00
WEMOS Electronics
a38ffe58fe Add ESP.getChipId() function to get ESP32's ChipID. (#322)
* Add ESP.getChipId() function to get ESP32's ChipID.

* change getChipId() to getEfuseMac()
2017-05-05 09:59:54 +03:00
tzxespressio
6006308575 fix some compile issue in cpp project(like WiFiMulti.h) (#350) 2017-05-05 09:59:01 +03:00
Me No Dev
6519a35799 Fix WifiUDP::beginMulticastPacket()
Fixes: https://github.com/espressif/arduino-esp32/issues/304

Thanks @jliegner :)
2017-04-11 00:08:18 +03:00
me-no-dev
7e5b278107 Add new control to WiFi Scan 2017-04-04 02:03:54 +03:00
Me No Dev
7e45310771 Fix UDP TX Buffer not set to NULL after free
thans @martinayotte
2017-04-03 20:54:57 +03:00
copercini
b46f1e2e3c Support self signed certificates (#291)
* Support self signed certificates

Fix for https://github.com/espressif/arduino-esp32/issues/265

mbedtls_ssl_conf_authmode was defined before mbedtls_ssl_config_defaults causing several bugs when no CA certificate is defined.

* Implement Arduino's log facility

Replace printf by ESP log handling

* Remove \n from debug messages

log_ doesn't need \n to break line.
2017-03-31 00:01:09 +02:00
me-no-dev
fcbb3e7987 Reconnect WiFi on Auth Expire
Should Fix: https://github.com/espressif/arduino-esp32/issues/234
2017-03-26 00:28:45 +02:00
me-no-dev
a07f9842af Fix SmartConfig not saving the correct config
Fixes: https://github.com/espressif/arduino-esp32/issues/275
2017-03-24 13:20:31 +02:00
me-no-dev
87b7182ef1 Give WiFiClient more time to select for writing
Fixes: https://github.com/espressif/arduino-esp32/issues/263
2017-03-20 11:31:55 +02:00
copercini
9dae9cea37 Fix for WiFiMulti (#264)
Actually WiFiMulti is not working due some functions haven't equal comportment of ESP8266
Replace status == WL_DISCONNECTED => status != WL_CONNECTED
Replace scanComplete() => scanNetworks()

Maybe is more interesting, for keep the maximum compatibility, investigate why WL_DISCONNECTED and scanComplete() doesn't works in this case instead of just replace by this pull request.
2017-03-20 10:23:05 +01:00
me-no-dev
e81d4d3f72 Fix SD Card not mounting on boot
The card seems to need a bit of a nudge at boot to properly mount
sometimes.
Fixes: https://github.com/espressif/arduino-esp32/issues/272
2017-03-20 00:50:27 +02:00
me-no-dev
a70954111b Fix compilation issues is certain situations. 2017-03-19 11:27:58 +02:00
me-no-dev
01b2ef780a Set proper default pins for SPI
Some boards have different default pins for SPI

Thanks @ladyada
2017-03-19 11:14:38 +02:00
copercini
2b24603aab SD library explanation (#262)
It's look more a practical guide "how to use SD lib"
2017-03-14 14:53:59 +01:00
me-no-dev
64ccef75fb Do not use inline functions for mkdir and rename 2017-03-11 09:16:34 +02:00
Me No Dev
fa1716e73e Add Ota and mdns (#257)
* Add Sketch Update Library

* Add MDNS Library

* Add Arduino OTA Library

* add missing library file

* Add library files for Update

* Add missing headers

* fix ota command

* Add espota binary

* remove bad example

* PlatformIO does not auto forward declare methods like Arduino Builder
2017-03-11 07:15:44 +01:00
me-no-dev
2f5efed220 Add pin mapping for SD and SD_MMC examples 2017-03-10 17:35:42 +02:00
copercini
e30447449f WiFiSecureClient fixes and improvements (#255)
* Add CA certificate in example

SHA1 fingerprint is broken now: more info: https://shattered.io

* Best error handling

When occur an error in WiFiClientSecure library just return the error message
and clean the context avoiding crash - fix for https://github.com/espressif/arduino-esp32/issues/211

Translate MbedTLS error codes in messages for best understanding

* Declarate certificates as const

mbedtls_pk_parse_key needs a const unsigned char * certificate. In old implementation the certificate was declarated as char * so first it converts to unsigned and after to const.

When we convert signed to unsigned it may result in a +1 larger output.

Fix issue https://github.com/espressif/arduino-esp32/issues/223
2017-03-10 15:52:50 +01:00
Me No Dev
e625b3b08e Add FS, SD and SD_MMC (#256) 2017-03-10 15:25:38 +01:00
me-no-dev
8fb8478431 Flush client with single call to available 2017-03-03 14:56:18 +02:00
me-no-dev
946e52da98 Break on any error when flushing a client 2017-03-02 12:32:32 +02:00
me-no-dev
6fc96b977f Add WiFiClient flush to clear all non-read data in RX
fixes: https://github.com/espressif/arduino-esp32/issues/119
2017-03-02 02:49:53 +02:00
David Schroeder
f0fc28f0e3 Rework WiFiClient (#238)
* Rework WiFiClient

Rework WiFiClient to correct error where making a copy of a WiFiClient object resulted in the socket being closed prematurely.

Added loop and select to write to handle/prevent EAGAIN errors.

* Rework WiFiClient to use shared_ptr

Rework changes to utilize shared_ptr rather than manually maintaining reference count. 

Revert changes to write

* Incorporate comments from review

Move WiFiClientSocketHandle and fd() into WiFiClient.cpp
2017-03-02 00:47:16 +02:00
David Schroeder
770830aa01 Revise WiFiClient::Write to handle EAGAIN (#240)
The send call may return EAGAIN. This indicates a recoverable error and a retry should be attempted. The current implementation treats this as a fatal error. Further, the current implementation strips the error code, setting it to 0, which prevents the caller from handling it directly. 
This change utilizes select to verify the socket is available prior to calling send and will retry on an EAGAIN condition.
2017-03-01 00:37:00 +02:00
me-no-dev
bcd6dcf5f6 Fix compile error with IDF and mbedtls debug off 2017-02-28 23:18:06 +02:00
me-no-dev
1d759380a6 Major IDF and Arduino Update
WiFi and BlueTooth can now be started and stopped at will.
basic functions added to esp32-hal to start and stop the BT radio
SimpleBLE class added to show the most basic functionality
Example to show how to switch between BT, WiFi or Both
2017-02-23 01:11:57 +02:00
me-no-dev
b5ac95b274 Update RepeatTimer example
Implement semaphore and mutex to safeguard the ISR.
This is the proper way to handle hardware Interrupts with FreeRTOS. The
more regular approach may/will lead to exceptions
2017-02-20 15:08:11 +02:00
Martin Sloup
a83dd5f2b5 Add RepeatTimer example (#216) 2017-02-17 15:55:07 +02:00
wami
95cb54cede [fix] return add --- error: no return statement in function returning non-void (#205) 2017-02-17 00:43:59 +02:00
me-no-dev
3cbc405edf Add helper for sending 16bit color buffers 2017-02-14 11:58:04 +02:00
me-no-dev
d0232d126a SPI implement transaction locking
Use transactions to skip mutex locks for reads and writes
2017-02-14 04:15:38 +02:00
Martin Sloup
a36ef2aea8 Added LEDC Software Fade example (#202)
* Added LEDC Fade exmaple

* Renamed LEDCFade example to LEDCSoftwareFade

Added valueMax parameter for ledcAnalogWrite

* Remove usage of LED_BUILTIN constant to solve CI errors
2017-02-12 17:30:12 +02:00
Martin Sloup
f9ba8e9ccf Refactoring EPS32NVS library to Preferences library (#199)
* Refactoring EPS32NVS library to Preferences library

* Renaming all set* functions to put
* Added functions for float, double and bool

* Small redesign of Preferences API

* added type to put* function names
* for (u)int64_t used functions name with *(U)Long64
* added functions for long and unsigned long (same like int a unsigned int)
2017-02-12 00:08:22 +02:00
copercini
8ab3231e31 Add WiFiClient secure lib (#184)
* Provide SSL/TLS functions to ESP32 with Arduino IDE

* Generate a new random number in case of reconnection
2017-02-11 00:20:24 +02:00
Martin Sloup
0fb5e5ca11 Improves in ESP32NVS library (#196)
* Improved ESP32NVS default value support for read* functions

Fixed uninitialized NVS flash storage. Added example code.

* Add methods for String and remove unnecessary nvs_flash_init() in ESP32NVS class

+ other minor declaration fixes

* ESP32NVS function name renaming

* read* -> get*
* write* -> set*
* erase -> clear / remove
2017-02-11 00:18:57 +02:00
Me No Dev
fb8fe671d6 New partitions (#192)
* Add new partition scheme

* Init NVS early, so it can be used without BT or WiFi
2017-02-10 14:11:24 +02:00
me-no-dev
1f0df1ef97 Fix wrong return values for WiFi::softAPConfig
fixes: https://github.com/espressif/arduino-esp32/issues/191
2017-02-10 13:49:43 +02:00
me-no-dev
0101564219 fix compilation error if debug level is above debug and less or equal to warn 2017-02-10 04:27:48 +02:00
me-no-dev
8df22cac80 Store WiFi settings in flash
Fixes: https://github.com/espressif/arduino-esp32/issues/173
2017-02-10 02:01:16 +02:00
me-no-dev
6a058275e7 Remove unimplemented methods from SPI 2017-02-09 20:40:56 +02:00
Martin Sloup
3e87dcf748 beginPacket can be used without listening on socket (#185)
Currently there is bug in WiFiUDP library when you want to use beginPacket(...) without listening on socket (without calling begin(...) first). You can't send any data because socket is not open and also tx_buffer is not allocated which cause crash while writing data to tx_buffer.
2017-02-08 23:10:16 +02:00
me-no-dev
bfa979a900 Add initial NVS Arduino implementation 2017-02-08 23:09:42 +02:00
me-no-dev
fdc4f53eb6 fix WiFi disconnect reason index 2017-02-08 20:20:00 +02:00
Ion
cea41d965a Add Touchread example (#175)
* Add Touchread example

* Rename libraries/ESP32/examples/Touch/TouchRead.ino to libraries/ESP32/examples/Touch/TouchRead/TouchRead.ino

* Update TouchRead.ino
2017-02-07 03:42:43 +02:00
Me No Dev
d02c1c786e Update IDF, fix SS definition, add custom partitions and debug level selection (#174)
* Add build time partitions compilation

* Fix wrong definition of SS pin

* Add support for core debug level selection

* update idf libs
2017-02-06 15:17:11 +02:00
me-no-dev
ee8149e207 add better debug messages for WiFi status 2017-02-05 23:59:44 +02:00
Ion
c66b54a9eb Add touch example 2017-02-05 18:03:04 +02:00
Jan Hendrik Berlin
bbf48a5d54 Add (ported) SimpleWiFiServer (#158) 2017-02-05 17:21:51 +02:00
me-no-dev
a80b2b24a4 Add ESP32 examples folder and sigma-delta example 2017-02-05 16:14:43 +02:00
Joren Six
97e9a120bd Added a basic WiFi UDP client example (#114)
* Added a basic WiFi UDP client example: a sketch that sends random bytes over udp.

* Updated udp example and included Python and Ruby UDP servers.
2017-02-03 16:31:41 +02:00
me-no-dev
de017a8a1b Optimize SPI transfers to take one lock and do not return until completed 2017-02-01 02:14:36 +02:00
me-no-dev
6dfbdbca29 fix WiFi.config not being applied
fixes: https://github.com/espressif/arduino-esp32/issues/143
2017-01-24 01:08:48 +02:00
me-no-dev
3c7d0e9905 add RSSI return and fix SSID and BSSID methods
fixes: https://github.com/espressif/arduino-esp32/issues/144
2017-01-24 00:56:12 +02:00
Seop Yoon
57dbc9ab77 Add smartConfig support (#136)
* smartConfig support

* fixed bug, added example

* added _smartConfigDone = ture

* changed example name, added explanation
2017-01-20 12:39:51 +02:00
me-no-dev
9e6e3249b6 update windows toolchain and platform.txt 2017-01-19 03:24:21 +02:00
Me No Dev
be7871677f Update WiFiUdp.cpp
Change return value of UDP::endPacket() to match specifications

Ref: https://github.com/espressif/arduino-esp32/issues/138
2017-01-19 02:03:37 +02:00
me-no-dev
7cef2e2954 Add initial IPv6 Support 2017-01-06 00:54:50 +02:00
me-no-dev
f49ac391b2 replace wrong calls to cbuf->size in UDP 2017-01-02 09:46:13 +02:00
me-no-dev
e383a11291 Add Server and UDP and fix WiFi.hostByName 2016-12-30 02:44:45 +02:00
me-no-dev
c19fc061b0 Hopefully fix I2C/Wire
Tested with (all at the same time):
- MPU9250
- HTU21
- TMP102
- BMP180
- AM2320
- SSD1306
2016-12-14 02:41:22 +02:00
Hirotaka
3c81739b33 need close(sockfd) before sockfd = -1, "_connected = false and close socket" means stop() function. (#73) 2016-12-01 13:27:51 +02:00
me-no-dev
8904f52c39 Allow phy to be initialized only if WiFi/BLE is used/enabled
fixes: https://github.com/espressif/arduino-esp32/issues/72
2016-12-01 13:23:17 +02:00
Me No Dev
57c3650ea2 Disconnect WiFiClient on destruct 2016-11-29 03:27:01 +02:00
me-no-dev
1d1aeecde2 simplify WiFi boot procedure to prepare for on-demand stack load
currently ```esp_wifi_init``` have to be called in ```app_main``` or
WiFi will fail to boot. When possible to boot later, code will be moved
into ```_esp_wifi_start``` to be executed when necessary
2016-11-28 00:50:21 +02:00
me-no-dev
c30012ab78 Add Kconfig for IDF and option to disable HAL mutexes
IDF Options:
- Autostart Arduino (implements app_main)
- Disable HAL locks
- Set HAL debug level
- Auto-connect STA if configured (else will connect after WiFi.begin())
2016-11-18 15:07:25 +02:00
me-no-dev
c82699a83d Make Wire inherit Stream
fixes: https://github.com/espressif/arduino-esp32/issues/57
2016-11-17 12:37:23 +02:00
Drake Youngkun Min
c0266615d5 Add TwoWire::write(const char *) (#56) 2016-11-17 12:33:42 +02:00
me-no-dev
d8aa61fa52 Optimize some error messages 2016-11-13 17:30:21 +02:00
me-no-dev
7e0811ec56 Update tools to latest IDF 2016-11-13 17:23:44 +02:00
me-no-dev
b5e0ebfc89 Set Wire to use the pins defined in pins_arduino.h
thanks @ladyada
2016-11-13 16:57:25 +02:00
me-no-dev
3c071e1d89 update IDF libraries and includes 2016-10-28 01:53:02 +03:00
me-no-dev
bdd98828c7 fix some returns types 2016-10-26 02:39:15 +03:00
me-no-dev
917286acf2 Remove non-working WiFi examples and fix some that require changes 2016-10-08 13:09:54 +03:00
Me No Dev
ac19ecf3d5 On app cpu (#1)
* move loop task to APP CPU

* Rework WiFi boot so it works when loop is on APP CPU
2016-10-06 18:16:00 +03:00
Me No Dev
a72b8d5635 Remove leftover debug 2016-10-06 07:09:45 -06:00
me-no-dev
5f3a205955 initial import 2016-10-06 07:09:44 -06:00