Commit Graph

249 Commits

Author SHA1 Message Date
BuzzRage
f5246cf4c1 Adding a getClockDivider function (#1355)
* Adding getClockDivider function

* indentation correction
2018-05-14 13:08:27 +02:00
Tim P
6bf7619ccc std::functioanl for WFIF event + Minor fix (#1366)
* add missing bits from esp8266 to help porting other libs

* Clean Up of Wifi event

* Exampl of Wifi Events
2018-05-14 13:05:49 +02:00
chemicstry
611db61d84 Fix WiFiClient error handling (#1388) 2018-05-14 13:01:22 +02:00
chemicstry
00f962439a Port SSL fingerprint checking from ESP8266 WiFiClientSecure to ESP32 (#1397) 2018-05-14 13:00:40 +02:00
Clemens Kirchgatterer
0ea9ea4447 Fix WiFi.persistent(false); having no effect. (#1406)
This PR calls `esp_wifi_set_storage(WIFI_STORAGE_RAM);` when
  persistent WiFi configuration is not desired.
2018-05-14 12:59:59 +02:00
AlistairSymonds
68265084b1 Created example program showing usage of both VSPI/HSPI within arduino API (#1368) 2018-05-02 15:22:56 +02:00
sticilface
1424b6d1a4 Add guard to handle to check for _initialized (#1321)
The wifi stack initialisation must be complete before calling  `_udp_ota.parsePacket()` otherwise you just get a screen filled with 
```
```
and due to the more async methods in ESP32 `handle()` may be called before this can occur.
2018-04-16 18:56:58 +02:00
Craig Leres
c92b617397 Convert the few remaining cr/lf files to use lf for eol. (#1316)
If you develop on windows and need cr/lf files, see this:

    https://git-scm.com/book/en/v2/Customizing-Git-Git-Configuration#_formatting_and_whitespace

    Git can handle this by auto-converting CRLF line endings into LF
    when you add a file to the index, and vice versa when it checks out
    code onto your filesystem. You can turn on this functionality with
    the core.autocrlf setting. If you're on a Windows machine, set it
    to true - this converts LF endings into CRLF when you check out code:

    $ git config --global core.autocrlf true
2018-04-16 16:34:39 +02:00
copercini
febcda0095 add WiFiClientSecure::peek(); (#1310) 2018-04-14 09:44:21 +02:00
Me No Dev
69f72eca84
Update IDF to f586f5e (#1296)
* Update BLE lib

* Update IDF to f586f5e

* Restructure Bluetooth Serial includes

* Update esptool and gen_esp32part

* Add partition scheme selection for menuconfig

* Add partition scheme selection for Arduino IDE

* Fix BLE example

* Second attempt BLE fix

* Add exceptions to PIO
2018-04-07 09:45:18 +03:00
FloX
2ded419486 Update WiFiMulti.cpp (#1220)
* Update WiFiMulti.cpp

added 5 sec timeout from ESP8266

* Update WiFiMulti.cpp

* Update WiFiMulti.h
2018-04-06 19:10:06 +03:00
chuck todd
7998e2321d Preserver custom pin assigments (#1239)
This code allows Wire.begin() to assign the default values of SDA, and SCL only if they have not been previously configured.  Arduino libraries that use Wire() usually re-init the I2C interface in their initialization code with a call to Wire.begin().  If a user app sets custom pins assignment in setup(); These assignments will be overwritten with the default values  whenever Wire.begin() is called.
2018-04-06 19:05:48 +03:00
Shawn A
f6a4b024c7 fixes #1249 (#1269) 2018-04-06 19:02:21 +03:00
me-no-dev
25dff4f044 Fix Bluetooth Serial 2018-04-03 11:09:29 +03:00
copercini
3a4ec66d41 Add hasClient for BluetoothSerial (#1183)
* Add hasClient for BluetoothSerial

* Add SPP_TAG
2018-03-09 11:16:18 +01:00
per1234
146b2f6a23 Use correct separator in keywords.txt (#1175)
The Arduino IDE currently requires the use of a tab separator between the name and identifier. Without this tab the keyword is not highlighted.

Reference:
https://github.com/arduino/Arduino/wiki/Arduino-IDE-1.5:-Library-specification#keywords
2018-03-05 07:38:39 +01:00
copercini
b4b9a79eea Add BluetoothSerial library (#1144)
* Add BluetoothSerial library

A simple UART to Classical Bluetooth bridge for ESP32

* Create README.md

* Fix typos

* Replace deprecated header and small fixes

* Add coexistence with BLE

* Add missing semicolon
2018-03-05 07:34:10 +01:00
Luc
adf513fc17 Unify time modification on SD and SPIFFS (#738)
* Add access to last write date time

add example

* rename cpp to ino orz

* wrong copy -past

* No comment orz

* Add missing space
2018-03-04 21:20:34 +01:00
Shawn A
848f98e5f0 fix event reason logging > 176 (#1132)
off by one
2018-03-04 21:05:54 +01:00
Marco Tombesi
bb8b255429 fix issue 1081 and 1086 Wifi connection error when using STATIC IP settings (#1129) 2018-03-04 21:05:24 +01:00
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