Commit Graph

207 Commits

Author SHA1 Message Date
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