Commit Graph

1119 Commits

Author SHA1 Message Date
Darkl0ud
6b3a9a9bff
Fixed typo for adc_continuous_data typedef in esp32-hal-adc.h/.c (#9529)
* Fixed typo in adc_continuous_data typedef

Fixed typo in adc_continuous_data typedef

* Additional typo fix for adc_continuous_data typedef

Additional commit for previous commit (#9529) adding typo corrections within

1. /docs/en/api/adc.rst
2. /libraries/ESP32/examples/AnalogReadContinuous\AnalogReadContinuous.ino
3. tests/periman/periman.ino

---------

Co-authored-by: Lucas Saavedra Vaz <32426024+lucasssvaz@users.noreply.github.com>
2024-04-19 12:42:41 +03:00
Lucas Saavedra Vaz
da5c6ab9ae
Refactor repository with pre-commit hooks (#9515)
* Add Config

* Add Cache and remove pre-commit action

* [pre-commit.ci lite] apply automatic fixes

* Remove freeze

* Fix

* Update action

* Use latest stable Python 3 version

* Improve caching

* Improve cache tag

* Improve bot message

* fix(typos): Fix typos

* fix(typos): Fix more typos

* refactor(udp_server): Convert script from Python 2 to 3

* Fix whitespace

* Clang-format fixes

* Prettier fixes

* Black formatting

* Manual fixes

* Line endings

* Fix flake and make Vale manual

* Fix flake and reformat

---------

Co-authored-by: pre-commit-ci-lite[bot] <117423508+pre-commit-ci-lite[bot]@users.noreply.github.com>
Co-authored-by: Rodrigo Garcia <rodrigo.garcia@espressif.com>
2024-04-15 19:40:56 +03:00
Lucas Saavedra Vaz
557380682c
refactor(udp_server): Convert script from Python 2 to 3 (#9513) 2024-04-15 17:44:38 +03:00
Ikko Eltociear Ashimine
394ebb673b
Fix typo in Updater.cpp (#9511)
arguement -> argument
2024-04-15 12:00:31 +03:00
Lucas Saavedra Vaz
908ca9f022
fix(ftm): Fix compilation warning (#9508) 2024-04-15 11:07:08 +03:00
Me No Dev
49b94644c6
IDF release/v5.1 (#9498)
* fix(ble): rename esp_ble_gap_ext_adv_report_t

* IDF release/v5.1 d23b7a0361
2024-04-12 18:21:27 +03:00
Sly Gryphon
3a0dd1cbe5
fix(dns): Fix IPv6-only network, by checking IPv6 first if you have public address (#9443)
Work around because AF_UNSPEC does not check available addresses when
determining result.

If you have a global scope IPv6 address, then first check for IPv6 DNS result;
if you don't have an IPv6, or there is no IPv6 result, then check IPv4.

This allows IPv6-only networks to connect to dual-stack destinations, as they
will get the IPv6 address (rather than the unusable IPv4).

It also means a dual-stack host to a dual-stack destination will preference
IPv6.

There is no effect if you are on an IPv4-only network, or it is an IPv4-only
destination.
2024-04-12 12:28:12 +03:00
Rodrigo Garcia
04b70bbf6a
Change name to HWCDC_Events.ino (From HWSerial_Events.ino) (#9483)
* Create HWCDC_Events.ino

* Delete libraries/ESP32/examples/HWSerial_Events/.skip.esp32

* Delete libraries/ESP32/examples/HWSerial_Events/.skip.esp32s2

* Delete libraries/ESP32/examples/HWSerial_Events/HWSerial_Events.ino

* Create .skip.esp32

* Create .skip.esp32s2

* Fixes HWCDC_Events.ino

* Fixes CI for S3
2024-04-11 18:19:11 +03:00
Nathan Nau
93448d7f34
Handle large octet-stream (master branch) (#9440)
* Handle large octet-stream

* Add exemple Upload Huge File

* Remove unuse function printDirectory

* Fix upload path

* Simplify and generalize the body parsing.

* Create .skip.esp32h2

---------

Co-authored-by: me-no-dev <hristo@espressif.com>
2024-04-11 14:42:31 +03:00
s-hadinger
f7b4959994
fix(ethernet): move event listener earlier to avoid missing event ETH_CONNECTED (#9481)
* Ethernet: Move event listener earlier

* fix(ethernet): move network listener after initNetif
2024-04-11 01:55:32 +03:00
Me No Dev
8c75c35290
feat(wifi): Add support for NAPT to WIFI AP (#9478)
Allows another interface's connection to be shared to the AP
2024-04-10 15:09:22 +03:00
Rodrigo Garcia
8ceb4bacb2
fix: USB HID Keyboard raw report (#9473) 2024-04-10 11:54:31 +03:00
Sly Gryphon
858b107bdf
feat(dns): Check type of IP addresses and clear DNS cache if they changed (#9476) 2024-04-10 11:53:16 +03:00
Sly Gryphon
17888679c7
fix(tls): Enable IPv6 support in ssl_client connect (#9470)
Similar to NetworkClient, check the family of the passed in address and configure the socket and socket address accordingly, for both IPv6 and IPv4 support.
2024-04-09 16:33:51 +03:00
Jan Procházka
b6ca5a8630
fix(sd): AquireSPI lock in sdcard_uninit (#9468) 2024-04-09 14:01:43 +03:00
Me No Dev
8dbb7c0c13
feat(net): Add support for esp_netif flags (#9460)
* feat(net): Add support for esp_netif flags

Provides better automation for setting IP/DNS

* feat(net): Show DHCPC status as OFF when static IP is used
2024-04-08 12:10:11 +03:00
Me No Dev
d805b88c32
feat(net): Add support for selecting the default network interface (#9457) 2024-04-05 15:38:11 +03:00
Juraj Andrássy
9b32541c0c
WiFiClient - rename flush() to clear() (breaking) (#9453)
Co-authored-by: Lucas Saavedra Vaz <32426024+lucasssvaz@users.noreply.github.com>
2024-04-05 14:41:26 +03:00
Me No Dev
cff2a18aa2
Add option to specify AP auth mode and cipher (#9454) 2024-04-04 13:27:06 +03:00
Lucas Saavedra Vaz
78820f2236
ESP-NOW: Fix examples and improve logging (#9455) 2024-04-04 13:25:01 +03:00
Lucas Saavedra Vaz
dcc307665f
Fix NetworkManager compilation warning (#9452) 2024-04-04 00:04:43 +03:00
Sly Gryphon
64235dc6d6
Network refactoring - fix some IPv6 DNS issues (#9439)
* fix(dns): Handle IPv6 DNS server address results

If the result from esp_netif_get_dns_info is an IPv6 address, then parse to an IPAddress.

* fix(dns): Use getaddrinfo for DNS, to fix some IPv6 issues

Replace hostbyname with getaddrinfo for better IPv6 support. The API is also
simpler, as it has no callbacks (they are handled internally). Allows
dual-stack networks to connect to IPv6-only destinations.

Still does not work for IPv6-only networks, as IPv6 DNS is not enabled in the
pre-built ESP-IDF libraries.
2024-04-03 18:23:11 +03:00
Jan Procházka
1a80829435
Add ESP-NOW Arduino library (#9395)
* feat(libs): Add ESP-NOW Arduino library

* Update libraries/ESP_NOW/src/ESP32_NOW.cpp

Co-authored-by: Lucas Saavedra Vaz <32426024+lucasssvaz@users.noreply.github.com>

* Update libraries/ESP_NOW/src/ESP32_NOW.cpp

Co-authored-by: Lucas Saavedra Vaz <32426024+lucasssvaz@users.noreply.github.com>

* fix(esp-now): Add check if Wifi is started.

* Fix ESP_NOW_Serial

* Add ESP NOW Serial Example

* Add comment

* Skip esp-now example for esp32h2

* Add broadcast address constant

* Change return value to align with other APIs

* Apply suggested changes

* Improve example

* Fix example

* Improve serial example

* Add argument to receive callback to know if a message was broadcasted

* Update libraries/ESP_NOW/src/ESP32_NOW_Serial.cpp

* Simplify example

* Add broadcast example

* Change comments

* Change comment

* Improve broadcast master example

* Remove examples using IDF's API

* Fix example

* Add network example

* Add skip file

* Add LMK back

* Add logs

* Improve example

* Fix example

* Apply @suglider suggestions from code review

Co-authored-by: Rodrigo Garcia <rodrigo.garcia@espressif.com>

* Add documentation

* fix examples links in docs

* Apply @lucasssvaz suggestions to docs

Co-authored-by: Lucas Saavedra Vaz <32426024+lucasssvaz@users.noreply.github.com>

* Update espnow.rst

* Update examples

* make onSent optional and remove underscores for virtual functions

* Make onRecieve also optional and make constructor protected

---------

Co-authored-by: Lucas Saavedra Vaz <32426024+lucasssvaz@users.noreply.github.com>
Co-authored-by: me-no-dev <hristo@espressif.com>
Co-authored-by: Rodrigo Garcia <rodrigo.garcia@espressif.com>
2024-04-03 18:18:57 +03:00
Rodrigo Garcia
e709b9a388
Set Apache license to Update Library (#9446)
* feat: update license

* feat: update license

* feat: update license

* feat: update license

* feat: license

* Update Update.h

* Update HttpsOTAUpdate.h

* Update HttpsOTAUpdate.cpp

* Update HttpsOTAUpdate.cpp

* Update HttpsOTAUpdate.cpp

* Update HttpsOTAUpdate.cpp

* Update HttpsOTAUpdate.cpp

* Update HttpsOTAUpdate.h
2024-04-02 19:35:05 +03:00
Me No Dev
e4a57854a6
Ensure that Static IP configuration for network interfaces is kept until STOP (#9445) 2024-04-02 19:18:46 +03:00
Juraj Andrássy
3c1885f8ef
WiFi.config handle Arduino parameters ordering and auto dns,gw,mask (#9425)
Co-authored-by: Me No Dev <me-no-dev@users.noreply.github.com>
2024-04-02 18:36:54 +03:00
Me No Dev
7bdf67e518
Use WiFi.mode to enable/disable the Network Interfaces (#9436) 2024-04-02 12:26:17 +03:00
Juraj Andrássy
7b29bac625
WiFi BSSID getter fix (#9434)
Co-authored-by: Me No Dev <me-no-dev@users.noreply.github.com>
2024-03-29 12:28:05 +02:00
lbernstone
654aeada0a
Matched pin numbers in doco to numbers in variants files (#9422)
* Matched pin numbers in doco to numbers in variants files

* Non-breaking dashes

* Changed SD examples to make REASSIGN_PINS more transparent. Fixes #9082

---------

Co-authored-by: Jan Procházka <90197375+P-R-O-C-H-Y@users.noreply.github.com>
2024-03-27 12:07:12 +02:00
Me No Dev
f2026f1e34
3.0.0 Network Refactoring (#8760)
* Create ESP_NetworkInterface class and have Ethernet extending it

* Update CMakeLists.txt

* Split networking from WiFi (H2 can now use Ethernet)

Now all libs have been checked yet. More to do on WiFi side

* Fix build errors

* Guard WiFi classes and fix RMII ETH examples

* Decouple network related libraries from WiFi

* Fix examples and WiFiUpdate

* Guard WiFiProv lib to compile only on WiFi chips

* Add periman string for network and "fix" mdns on the first ETH

* Revert back location of Client/Server/Udp in order to accept some PRs

* Fix periman

* Some fixes from merging master

* Fix web server missing fs.h

* Move Client, Server and Udp out of WiFi

* More fixes

* more fixes

* Fix CMakekLists and rework lib menu dependencies

* Fix CMake issues

* move back WiFiClient to rebase with master

* Update ETH_TLK110.ino

* Move back WiFiClient

* Update progress

* Update WiFiGeneric.cpp

* More fixes

* Switch AP to the new interface

* Cleanup

* Rename AP methods

* Add extra interface info for Printable

* Rename IPv6 getters to clarify that they are returning LinkLocal address

cc @sgryphon

* Rename network classes

cc @sgryphon

* Update NetworkManager.h

* Rename WiFi Server and UDP

* Rename WiFiClient and WiFiClientSecure

* Update CMakeLists.txt

* Update on-push.sh

* Rename Network library

* Remove unnecessary guard

* Get the correct interface MAC address for mDND Workstation service

* Apply suggestions from code review

Co-authored-by: Lucas Saavedra Vaz <32426024+lucasssvaz@users.noreply.github.com>

---------

Co-authored-by: Lucas Saavedra Vaz <32426024+lucasssvaz@users.noreply.github.com>
2024-03-26 23:31:23 +02:00
Rodrigo Garcia
6345350584
Adds a new example: onReceiveExample.ino (#9415)
* feat: onReceiveExample.ino

Adds a new example that uses HardwareSerial::onReceive(). The example demosntrates how to read all the data sent to UART0, considering that the end of transmission is defined by a period of time with UART in idle state.

* fix: onReceiveExample.ino

Fixes typos

* feat: add explanation header

* fix: mutex release

* fix: add Mutex verification

* feat: Mutex error message

* feat: Mutex NULL testing
2024-03-26 12:21:41 +02:00
Lucas Saavedra Vaz
9c0d59f9c4
Add method to set the WiFi radio channel (#9405)
* Add method to set the WiFi radio channel

* Fix Tab

* Add check

* Change name

* Fix description

* Add check

* Add error return

* Improve error message
2024-03-26 12:21:00 +02:00
Akeem Hart
896f072f67
Fixing small typo in DiscoverConnect.ino BluetoothSerial example (#9389) 2024-03-20 14:11:59 +02:00
Lucas Saavedra Vaz
dce754b693
Improve USBVendor Example (#9349)
* Add WebUSB console

* Improve Console Page

* Improve example

* Add comments

* Add flush method

---------

Co-authored-by: Jan Procházka <90197375+P-R-O-C-H-Y@users.noreply.github.com>
2024-03-11 15:10:46 +02:00
Lucas Saavedra Vaz
4123e20a2c
Fix indentation (#9343) 2024-03-05 20:56:46 +02:00
Jan Procházka
aed7b4fa59
ETH: Support physical address auto detection (#9313)
* feat(eth): Support phy address auto detection

* fix(eth): add phy_address check
2024-03-01 18:50:19 +02:00
Rodrigo Garcia
2fdd901639
fixes default 100ms delay with HWCDC write() is CDC is not connected (#9307)
* feat(hwcdc): fix delay

Fixes delay when CDC is disconnected. At this time is only fixes it when USB cable is unplugged.

* feat(hwcdc): fix delay

fixes delay when CDC is not connected. It was only considering when the USB cable was not plugged.

* feat(hwcdc): add 2 methods

Adds 2 new methods:
- isPlugged() will return true when USB cable is plugged, false otherwise.
- isConnected() will return true when USB CDC is connected to a application in the USB Host side and communication is stablished.

* feat(hwcdc): adjusts APIs

Fixes the example to use the new added APIs for checking if USB cable is plugged and for checking if CDC is connected.

* fixes api declaration

* fixes API declaration
2024-02-29 08:40:28 +02:00
Rodrigo Garcia
b7af090f71
Fixes the hardware cdc jtag plugged/unplugged status and related timeout/delay (#9275)
* feat(hw_cdc):fixes the hardware cdc jtag plugged/unplugged status

This will use a new IDF 5.1 feature to detect if the USB HW CDC is plugged or not. This can be checked testing HWCDCSerial.
It also fixes issues related to timeout or delays while writing to the HW Serial when USB is unplugged.

* feat(usb): Creates HWSerial_Events.ino example

* feat: adds .skip.esp32

Skips the ESP32 SoC test given that it has no USB

* feat: adds .skip.esp32s2

Skips the ESP32S2 because it has no HW CDC JTAG interface

* fix: fixes issues with Ubuntu CI 

Only compiles the example in case it is using Hardware CD and JTAG mode.

* feat(serialcdc): non block functions

modifies write and flush to do not clock in case CDC host is not connected to the CDC client from the C3/S3/C6/H2

* fix(HWCDC): changes made demands testing for CDC ON BOOT

* feat(hwcdc): Improves HWSerial_Events.ino

Improves the example by adding more information about USB being plugged and CDC being connected.

* feat(hwcdc): solves CDC connection issue

Detects correctly when CDC is or not connected. 
Deals with USB unplugged while the sketch is printing to CDD.

* Update cores/esp32/HWCDC.cpp

* Update cores/esp32/HWCDC.cpp

* Update cores/esp32/HWCDC.cpp

* Update cores/esp32/HWCDC.cpp

* Update cores/esp32/HWCDC.cpp

* Update cores/esp32/HWCDC.cpp

* Update cores/esp32/HWCDC.cpp

* Update cores/esp32/HWCDC.cpp

* Update cores/esp32/HWCDC.cpp

* Update cores/esp32/HWCDC.cpp

* Update cores/esp32/HWCDC.cpp

* Update cores/esp32/HWCDC.cpp

* Update cores/esp32/HWCDC.cpp

* Update cores/esp32/HWCDC.cpp

* Update cores/esp32/HWCDC.cpp

* Update cores/esp32/HWCDC.cpp

* Apply suggestions from code review

---------

Co-authored-by: Lucas Saavedra Vaz <32426024+lucasssvaz@users.noreply.github.com>
2024-02-28 18:14:21 +02:00
Me No Dev
22d7fc91eb
Enable USB Serial only if selected (#9294)
* Enable USB Serial only if selected

* fix examples

---------

Co-authored-by: Rodrigo Garcia <rodrigo.garcia@espressif.com>
2024-02-27 17:32:19 +02:00
TD-er
113de1fa02
[Enhancement] Support no-IRQ for SPI Ethernet W5500 (#9251)
* [W5500] Support no-IRQ

Requires this commit from ESP-IDF to be cherry picked:
fd0a1dc53c

* Remove unrelated code to support ETH_PHY_JL1101

* remove the commented check and fix the error message

* Guard feature to be enabled when IDF backports it to v5.1

---------

Co-authored-by: Lucas Saavedra Vaz <32426024+lucasssvaz@users.noreply.github.com>
Co-authored-by: Me No Dev <me-no-dev@users.noreply.github.com>
2024-02-22 12:31:31 +02:00
Kinon
72f9fe3b8b
Fixed "Invalid mbox" error in SimpleTime example (#9262)
* fix(esp32): 🐛 Fixed "Invalid mbox" in the Wi-Fi example

* fix: changes the code to actually connect to the WiFi in roder to get time and date

* fix: removing call to WiFi.begin() at the end of the sketch. It must be called at first.

---------

Co-authored-by: Rodrigo Garcia <rodrigo.garcia@espressif.com>
2024-02-21 16:24:07 +02:00
Jan Procházka
c4b55bb9f1
feature(ledc): Add output invert option for LEDC pin + minor fixes (#9257)
* feat(ledc): Add output invert option for LEDC pin + minor fixes

* docs(ledc): Document LEDC functions in header file

* feat(ledc): Replace log2 with __builtin_ctz

* fix(ledc): Fixing free_channel for > 8 supported channels

* fix(ledc): Apply suggestions from code review

Co-authored-by: Rodrigo Garcia <rodrigo.garcia@espressif.com>

* fix(ledc): Added freq check to ledcChangeFrequency

* docs(ledc): Fix ledc documentation formatting

* docs(migration): Add new functions to the migration guide

* docs(ledc): Fix functions name and parameters

---------

Co-authored-by: Rodrigo Garcia <rodrigo.garcia@espressif.com>
Co-authored-by: Lucas Saavedra Vaz <32426024+lucasssvaz@users.noreply.github.com>
2024-02-21 16:15:06 +02:00
clyne
3c3079851c
fix(webserver): Ignore extra headers within multipart forms (#9253)
Update subpart ("PostArg") parsing to ignore extra headers instead of silently failing.

Co-authored-by: Lucas Saavedra Vaz <32426024+lucasssvaz@users.noreply.github.com>
2024-02-20 15:13:15 +02:00
Rodrigo Garcia
7eb1ce89b4
Adds RMT End of Transmission Level API (#9238)
* RMT (featt):  adds a new function to set EOT level after RMT writing

* RMT (feat): adds new feature to set the EOT level after writing RMT channel

* adds return value to rmtSetEOT()

* adds bool return to rmtSetEOT()

* adds return value to the rmtSetEOT() function

* FIX (rmt): fixes eot_level setting using flags in the TX structure

* RMT(feat): Create RMT_EndOfTransmissionState.ino example

* Update cores/esp32/esp32-hal-rmt.h

Co-authored-by: Jan Procházka <90197375+P-R-O-C-H-Y@users.noreply.github.com>

* Update cores/esp32/esp32-hal-rmt.c

Co-authored-by: Jan Procházka <90197375+P-R-O-C-H-Y@users.noreply.github.com>

* Update cores/esp32/esp32-hal-rmt.c

Co-authored-by: Jan Procházka <90197375+P-R-O-C-H-Y@users.noreply.github.com>

---------

Co-authored-by: Jan Procházka <90197375+P-R-O-C-H-Y@users.noreply.github.com>
2024-02-14 15:26:51 +02:00
Jan Procházka
90036a2c1b
fix(eth): Eth pins check in examples to avoid redefinition (#9242) 2024-02-14 15:25:25 +02:00
Rodrigo Garcia
0a2a487259
Fixes Pointer and Call using Serial BT callback (#9245)
* SerialBT (fix): fixes the callback function pointer

* SerialBT(fix): fixes callback pointer reference and call

* Update BluetoothSerial.h
2024-02-14 15:24:37 +02:00
Dirk-Willem van Gulik
48072ee098
Support for STARTLS/STARTSSL in-band transport upgrades/renegotation (#9100)
* Split start_ssl_client into two phases; to allow the implementation of protocols that use some sort of in-band STARTTLS or STARTSSL signal to upgrade a plaint text connection to SSL/TLS. Examples of these protocols are XMPP, SMTP and various database TCP connections.

* Remove removed setTimeout that was accidentally included (was removed for IDF >=5), bring timeout inline with the other timeouts (ints), fix cert/key checks to look if there is actually something there (all issues caught by the CI/CD on windows-latest

* Quell compiler warning; use the right timeout

* Newer versions of MBEDTLS make the client key struct private (and most of the x509 struct too), so absent of a non-null pointer we cannot check wether it is populated. Solve this by looking at the version (as 0 is not a valid x509 version).

* Fix another \(rightfull\) compiler warning iwth the version pointer

* Quell CI/CD runs on non-WiFi supporting hardare

* Quell CI/CD runs on non-WiFi supporting hardare

* Fix typo in directory name

* Apply suggestions from code review

Co-authored-by: Jan Procházka <90197375+P-R-O-C-H-Y@users.noreply.github.com>

* Rename Files

* Remove leftover file

---------

Co-authored-by: Me No Dev <me-no-dev@users.noreply.github.com>
Co-authored-by: Jan Procházka <90197375+P-R-O-C-H-Y@users.noreply.github.com>
Co-authored-by: Lucas Saavedra Vaz <32426024+lucasssvaz@users.noreply.github.com>
2024-02-09 21:40:33 +02:00
Dirk-Willem van Gulik
13fac0876b
feature: create a Trust on First Use example (#9103)
* feature: create a Trust on First Use example the quell the increasingly common copy & paste of the insecure approach making it to production

* Quell CI/CD runs on non-WiFi supporting hardare

* Update libraries/WiFiClientSecure/examples/WiFiClientInsecure/WiFiClientInsecure.ino

typo/improvement to text

Co-authored-by: Lucas Saavedra Vaz <32426024+lucasssvaz@users.noreply.github.com>

* Update libraries/WiFiClientSecure/examples/WiFiClientTrustOnFirstUse/WiFiClientTrustOnFirstUse.ino

typo/improvement to text

Co-authored-by: Lucas Saavedra Vaz <32426024+lucasssvaz@users.noreply.github.com>

* Update libraries/WiFiClientSecure/examples/WiFiClientTrustOnFirstUse/WiFiClientTrustOnFirstUse.ino

Fix formatting

Co-authored-by: Lucas Saavedra Vaz <32426024+lucasssvaz@users.noreply.github.com>

* Update libraries/WiFiClientSecure/examples/WiFiClientTrustOnFirstUse/WiFiClientTrustOnFirstUse.ino

typo/improvement to text

Co-authored-by: Lucas Saavedra Vaz <32426024+lucasssvaz@users.noreply.github.com>

* Update libraries/WiFiClientSecure/examples/WiFiClientTrustOnFirstUse/WiFiClientTrustOnFirstUse.ino

typo/improvement to text

Co-authored-by: Lucas Saavedra Vaz <32426024+lucasssvaz@users.noreply.github.com>

* Update libraries/WiFiClientSecure/examples/WiFiClientTrustOnFirstUse/WiFiClientTrustOnFirstUse.ino

typo/improvement to text

Co-authored-by: Lucas Saavedra Vaz <32426024+lucasssvaz@users.noreply.github.com>

* Update libraries/WiFiClientSecure/examples/WiFiClientTrustOnFirstUse/WiFiClientTrustOnFirstUse.ino

typo/improvement to text

Co-authored-by: Lucas Saavedra Vaz <32426024+lucasssvaz@users.noreply.github.com>

* Update libraries/WiFiClientSecure/examples/WiFiClientTrustOnFirstUse/WiFiClientTrustOnFirstUse.ino

typo/improvement to text

Co-authored-by: Lucas Saavedra Vaz <32426024+lucasssvaz@users.noreply.github.com>

* Various things can all stop_ssl_socket() which sets the socket to -1; but the WiFiClientSecure checks for _connected. So we want to make sure the latter is always set. And thus have moved the state handling around *ssl_client down into the C code; below WiFiClientSecure.

* Unitialized NVRAM/EEPROM is actual set to 0xFF; so adjust for this. And print the LF/CR for the header lines.

* Update libraries/WiFiClientSecure/examples/WiFiClientTrustOnFirstUse/WiFiClientTrustOnFirstUse.ino

---------

Co-authored-by: Me No Dev <me-no-dev@users.noreply.github.com>
Co-authored-by: Lucas Saavedra Vaz <32426024+lucasssvaz@users.noreply.github.com>
2024-02-09 21:39:04 +02:00
Lucas Saavedra Vaz
58bea5c131
Fix C2 compilation for Updater.cpp (#9228) 2024-02-09 21:35:11 +02:00
Cyril Danilevski
f18b690d76
Fix AdvancedWebServer.ino uptime conversion (#9224)
* fix(examples): Fix AdvancedWebServer.ino uptime conversion

* Fix build error

---------

Co-authored-by: Me No Dev <me-no-dev@users.noreply.github.com>
2024-02-09 16:03:41 +02:00
Lucas Saavedra Vaz
c21a8cdaa5
Server Side Events (#9222)
* feat: Server Side Events (SSE)

* Update libraries/WiFi/src/WiFiClient.cpp

Co-authored-by: Lucas Saavedra Vaz <32426024+lucasssvaz@users.noreply.github.com>

---------

Co-authored-by: Miquel Martin <miqmago@gmail.com>
Co-authored-by: Miquel <miqmago@users.noreply.github.com>
2024-02-07 17:05:58 +02:00
theeprawn
aceea3e519
Adds feature to decrypt uploaded image bin files. Used esp-idf to encrypt a bin file. (#5807)
* Update Update.h

* Update Updater.cpp

* Add files via upload

* Add files via upload

* Add files via upload

* Update Update.h

* Update Updater.cpp

* Add files via upload

* Revert changes

* Revert changes

* Fix CI

* Fix format

* Skip H2

* Use new

* Fix comments and formatting

* Format example

* Remove binaries and QoL improvements

---------

Co-authored-by: Me No Dev <me-no-dev@users.noreply.github.com>
Co-authored-by: Lucas Saavedra Vaz <32426024+lucasssvaz@users.noreply.github.com>
2024-02-07 16:29:37 +02:00
Theo Arends
bbbbec977a
Fix ESP32-Solo WDT on HTTP OTA update (#5426)
* Fix ESP32-Solo WDT on HTTP OTA update

* Fix ESP32-Solo WDT on HTTP OTA update

* Fix commits

---------

Co-authored-by: Lucas Saavedra Vaz <32426024+lucasssvaz@users.noreply.github.com>
2024-02-07 15:49:01 +02:00
LiveSparks
e1a3525b5a
fix(esp32): Added a timeout option to the BLEClient's connect function (#9005)
* fix(esp32): Added timeout to BLEClient.connect fn

* Update libraries/BLE/src/BLEClient.cpp

Co-authored-by: Lucas Saavedra Vaz <32426024+lucasssvaz@users.noreply.github.com>

---------

Co-authored-by: Lucas Saavedra Vaz <32426024+lucasssvaz@users.noreply.github.com>
Co-authored-by: Jan Procházka <90197375+P-R-O-C-H-Y@users.noreply.github.com>
2024-02-07 14:45:27 +02:00
Lucas Saavedra Vaz
4cbce10cb1
Add support for hidden networks in WiFiMulti (#9202)
* Add support for hidden networks in WiFiMulti

* Update WiFiMulti.cpp

* Update WiFiMulti.cpp
2024-02-05 13:59:16 +02:00
Jan Procházka
d14873ab8a
Add Zigbee examples (#9024)
* feat: added zigbee light and switch examples

* fix: added skip files for unsupported socs

* fix(example): Removed Serial and updated readme.

* fix(): Simplify examples + fix zigbee partition table
2024-02-01 15:38:07 +02:00
Clemens Kirchgatterer
7c5196df1b
fix(webserver): Proposal for simplifying webserver file uploads via form POST. (#9167)
* Proposal for fixing file webserver uploads via form upload.

The form parser has shown to have issues with files ending with "--\r\n". This commit replaces the form parser with the parser from ESP8266, which passes the test case.

* Replace _uploadReadByte() in WebServer/Parsing.cpp with ESP8266 implementation.
2024-02-01 12:24:14 +02:00
Andrea Canale
b163583bf8
feat(usb): Add more keys in USBHIDKeyboard (#9190)
* Add more keys value that can be used with Keyboard.press()
2024-02-01 11:16:13 +02:00
Leif
77b64506a6
ArduinoOTA upload intermittent failure fixed (#4657)
* OTA upload often fails when client.read() return -1 and we subsequently try to write 4 gigabytes to flash. Fixed by signed comparison and retry.

* Delay of 1ms already solves the issue

* Update libraries/ArduinoOTA/src/ArduinoOTA.cpp

Co-authored-by: Jan Procházka <90197375+P-R-O-C-H-Y@users.noreply.github.com>

---------

Co-authored-by: Leif <git@leif.lc>
Co-authored-by: Lucas Saavedra Vaz <32426024+lucasssvaz@users.noreply.github.com>
Co-authored-by: Jan Procházka <90197375+P-R-O-C-H-Y@users.noreply.github.com>
2024-01-31 12:54:34 +02:00
Dirk O. Kaar
f764af0d1c
Ticker updated to match extensions in ESP8266 API (#2849)
* Update Ticker API to compatibility with ESP8266, prepares for co-op loop Scheduler

* Fixing Build server complaints

* Fix omitted casts in template member function

* Changes after review

* Expose µs resolution of OS API in Ticker class

* Return Ticker to libraries only for modularity.

* Unify Ticker examples.

* Default for LED_BUILTIN

* In Ticker, the *scheduled functions become available in another development branch.

* Astyle from ESP8266

* Fixed Arduino keywords.txt

* 64bit integers instead of 32bits, timer functions on ESP32 accept 64bit integers.

* Move code from header into compiliation unit.

Reformat.

* Test case same as ESP8266

* Implementing inline in header saves 204+ bytes program size.

* Examples

* Fix a compiler warning due to c-style casting.

* Revert formatting changes

* More format reversions

* Revert

* Revert

* Revert

---------

Co-authored-by: Lucas Saavedra Vaz <32426024+lucasssvaz@users.noreply.github.com>
2024-01-31 12:53:56 +02:00
safocl
7966f4ae79
Fix ambiguous for TwoWire::requestFrom() methods and align API with Arduino.cc (#8817)
* Fix ambiguous for TwoWire::requestFrom() methods.

* Remove TwoWire::begin(int) overload
Inside the function, this overload truncated the data type to a shorter one. This could break some users' hopes.

* Rewrite TwoWire with using HardwareI2C
- implement proposal https://github.com/espressif/arduino-esp32/pull/8818#issuecomment-1792191815
  to bring the HARDWARE interface into compliance

* Fix TwoWire::end() return type.

* Fix TwoWire::setClock() return type.

* Fix no return statement in the TwoWire::requestFrom.

* fix(libraries/Wire): fix bad return-statement

Remove non-void values of the return-statements in function returning 'void'.

* style(libraries/Wire): replace tabs with spaces

* refactor(libraries/Wire): use slave without support
TwoWire::begin(uint8_t address) should be available without slave
support by SoC?

* refactor(libraries/Wire): remove unused variables
Compiler reports "Wire.cpp:393:15: error: variable 'err' set but not used [-Werror=unused-but-set-variable]".

* refactor(libraries/Wire): remove unused variables
Compiler reports "Wire.cpp:337:15: error: variable 'err' set but not used [-Werror=unused-but-set-variable]".

* fix(libraries/Wire): hide slave support elements
TwoWire::user_onRequest is used only in conjunction with slave support?

* refactor(libraries/Wire): remove temporary comment

* fix(libraries/Wire): restore an accidentally deleted implementation
TwoWire::endTransmission() was accidentally deleted from a cpp file.

* refactor(libraries/Wire): return return types
In TwoWire class return return types.

* fix(libraries/Wire): fix return type

* refactor(libraries/Wire): add return statement if slave isn't supported

Co-authored-by: Jan Procházka <90197375+P-R-O-C-H-Y@users.noreply.github.com>

* refactor(libraries/Wire): fix indentation

Co-authored-by: Jan Procházka <90197375+P-R-O-C-H-Y@users.noreply.github.com>

* refactor(libraries/Wire): fix indentation

Co-authored-by: Jan Procházka <90197375+P-R-O-C-H-Y@users.noreply.github.com>

* refactor(libraries/Wire): fix indentation

Co-authored-by: Jan Procházka <90197375+P-R-O-C-H-Y@users.noreply.github.com>

* refactor(libraries/Wire): remove unnecessary empty lines

---------

Co-authored-by: Lucas Saavedra Vaz <32426024+lucasssvaz@users.noreply.github.com>
Co-authored-by: Jan Procházka <90197375+P-R-O-C-H-Y@users.noreply.github.com>
2024-01-31 12:50:35 +02:00
Rodrigo Garcia
cceebb58f1
Improves WiFiMulti (#9139)
* feat(wifi): Improves WiFiMulti

* fix(wifi): Fixes Initialization of Security Mode

* feat(wifi): simplifies the example by using HTTPClient

* fix(WiFi): fixes a type in the commentaries
2024-01-23 16:28:30 +02:00
Juraj Andrássy
39043b8586
WiFiServer - don't inherit from Print and Server (#8930)
because print-to-all-clients is not implemented

Co-authored-by: Rodrigo Garcia <rodrigo.garcia@espressif.com>
Co-authored-by: Me No Dev <me-no-dev@users.noreply.github.com>
2024-01-23 15:05:12 +02:00
Juraj Andrássy
e73af48e22
Revert "undeprecate available() (#9027)" (#9165)
This reverts commit 5d97e02ad7.
2024-01-23 14:54:54 +02:00
Jason2866
7fbd9a163c
Update LittleFS Platformio example (#9151)
* rm not anymore needed `LittleFS Builder.py`

* use custom partition scheme

to guarantee a big enough SPIFFS partition scheme is used.
2024-01-23 12:52:10 +02:00
Lucas Saavedra Vaz
1149650105
Add I2S examples and documentation (#9030)
* feat(i2s): Add I2S examples

- ES8388 loopback example using the LyraT board
- ESP32-S3-EYE record WAV to SD card example
- Simple tone example

* docs(i2s): Add I2S API docs
2024-01-19 17:25:07 +02:00
Jan Procházka
2e5c932aeb
SPI - Allow detaching of some SPI pins without stopping SPI (#9117)
* feature(spi): Allow detach of some SPI pins

* fix(spi): Remove unnecessary check

Co-authored-by: Lucas Saavedra Vaz <32426024+lucasssvaz@users.noreply.github.com>

* feat(spi): Rename CS pin to SS to match Arduino standard

* fix(spi): Remove unnecessary checks

* remove lock from spiAttackMISO

---------

Co-authored-by: Lucas Saavedra Vaz <32426024+lucasssvaz@users.noreply.github.com>
Co-authored-by: Me No Dev <me-no-dev@users.noreply.github.com>
Co-authored-by: me-no-dev <hristo@espressif.com>
2024-01-19 17:21:19 +02:00
Juraj Andrássy
47666082ff
WiFi.disconnect() "aligned with Aduino.cc". waiting for status change. (#9062)
WiFi.disconnect renamed to disconnectAsync

new WiFi.disconnect waits for status change
2024-01-18 13:39:56 +02:00
Dirk-Willem van Gulik
e581717bf3
Web server simplifications and handers (#7429)
* First stab ad simplyfing webserver auth and adding a handler.

* Tweaks after testing against docs and latest Library tree

* Add documentatin for callback handler

* Bodge to allow things to compile without the dependencies

* Remove dependency on sodium to make it compile with 4.4

* Fix hex conversion

* Move some common HEX functions into a static HEX class, remove those from MD5 and add some examples. This allows for the cleanup of various to/from HEX routines elsewhere.

* Remove some duplicated code

* Add simplfiied HEXBuilder under MD5Bulder to CMakefile.

* Update for 3.0.0 and QoL improvements

* Remove examples that depend on external libraries

* Skip H2 testing

* Formatting improvements

* Move builders examples to Utilities folder

* Fix indentation

* Add HashBuilder abstract class

* Add SHA1Builder

* Fix comment

* Fix whitespace

* Fix crashes and improve log messages

* Fix indentation for webserver

---------

Co-authored-by: Rodrigo Garcia <rodrigo.garcia@espressif.com>
Co-authored-by: Lucas Saavedra Vaz <32426024+lucasssvaz@users.noreply.github.com>
2024-01-16 15:49:46 +02:00
TANAKA Masayuki
90bef0b80b
fix(esp32): Set the maximum value of AnalogRead to 4095 (#9114)
The 12-bit MAX is 4095, not 4096.
2024-01-16 15:35:08 +02:00
Juraj Andrássy
29995eb604
WiFiClient - assignment shouldn't stop connection (#9029)
there may be other copy of WiFiClient working with that connection.
let shared_ptr stop the connection when it is not refered anymore.

Co-authored-by: Me No Dev <me-no-dev@users.noreply.github.com>
2024-01-16 15:18:24 +02:00
Me No Dev
768719c68f
This is a continuation on the topic of adding IPv6 Support to ESP32 Arduino (#9016)
* IPv6 for Arduino 3.0.0

* Fix warning in WifiUdp

* remove comment / formating

* Add zone to IPAddress and update WiFiUDP and WiFiGeneric

* Add from ip_addr_t conversion and better toString implementation

* Use constant for IPAddress offset

@sgryphon is this better?

* Combine hostByName to support both IPv6 and IPv4 results

* implement logic to use v6 dns only when global v6 address is assigned and remove IPv6Address

* Rename softAPenableIPv6

* Rename mDNS methods

* fix IPAddress method to work with const address

* Some cleanup and do not print zone in IPAddress

* rename WiFiMulti method

* Fix AP DHCPS not properly working on recent IDF

* Add option to print the zone at the end of IPv6

@TD-er

* remove log prints from hostByName

* Use correct array length for listing IPv6 addresses

* Implement some Tasmota requirements

Added constructor that takes `const ip_addr_t *`.
Added `addr_type()` getter
Organize header to highlight the Espressif additions to IPAddress

* add 'const' to IPAddress::addr_type()

* Fix WiFiUdp not updating mapped v4 address

* Update WiFiServer.cpp

---------

Co-authored-by: Jason2866 <24528715+Jason2866@users.noreply.github.com>
Co-authored-by: s-hadinger <49731213+s-hadinger@users.noreply.github.com>
2024-01-15 15:24:34 +02:00
Clemens Kirchgatterer
c040f9528d
sd_diskio.cpp: return 0 instead of false when return type != bool (#9075) 2024-01-08 14:01:59 +02:00
Michael
b2e7338a5e
SD library: Fix format (#9034)
Pass correct work buffer size to f_mkfs
2023-12-28 14:46:47 +02:00
lbernstone
4d469c8f86
Added missing identifiers in esp_vfs_littlefs_conf_t (#9046) 2023-12-28 14:46:09 +02:00
Neale Petrillo
812a59aadd
Added example to demonstrate using HardwareSerial with RS485 interfaces (#8941)
* Added Serial as RS485 interface demo

* Added more detail to initial comment

* Switched to UART_MODE definitions from uart_types.h in order to accomodate some versions of Arduino core

* Update libraries/ESP32/examples/Serial/RS485_Echo_Demo/RS485_Echo_Demo.ino

Co-authored-by: Lucas Saavedra Vaz <lucassvaz@yahoo.com.br>

* Update libraries/ESP32/examples/Serial/RS485_Echo_Demo/RS485_Echo_Demo.ino

Co-authored-by: Lucas Saavedra Vaz <lucassvaz@yahoo.com.br>

* Update libraries/ESP32/examples/Serial/RS485_Echo_Demo/RS485_Echo_Demo.ino

Co-authored-by: Lucas Saavedra Vaz <lucassvaz@yahoo.com.br>

* Removed HardwareSerial.h include. Switched RTS pin to GPIO 4 for broader compatability.

* using 115200 for UART0 - console

---------

Co-authored-by: Lucas Saavedra Vaz <lucassvaz@yahoo.com.br>
Co-authored-by: Rodrigo Garcia <rodrigo.garcia@espressif.com>
2023-12-20 16:35:31 +02:00
Rodrigo Garcia
5d97e02ad7
undeprecate available() (#9027) 2023-12-20 16:26:35 +02:00
Juraj Andrássy
ad4f0acea9
Revert "WiFiSTA - allow using DHCP again after disconnecting static IP (#8848)" (#8873)
This reverts commit a9a72d1fdc.

Co-authored-by: Rodrigo Garcia <rodrigo.garcia@espressif.com>
2023-12-20 16:22:40 +02:00
vortigont
d91271019c
DNSServer refactoring, switch to AsyncUDP (#7482)
* DNSServer: switch to AsyncUDP instead of WiFiUDP

AsyncUDP offers event driven approch for handling udp dns req's
WiFiUDP hooks to loop() for packet processing and making useless malloc's each run

* DNSServer code refactoring

get rid of intermediate mem buffers and extra data copies,
most of the data could be referenced or copied from the source packet
 - removed _buffer member
 - replaced DNSQuestion.QName from uint8_t[] to char*

added sanity checks for mem bounds
optimize label/packet length calculations
other code cleanup

* DNSServer drop dynamically allocated member structs

DNSHeader and DNSQuestion structs could be created on stack
no need to keep it as obj members

* DNSServer: labels min length checks, simplified labels parser

* DNSServer use default settings for catch-all setup

 - default constructor and start() method simply runs a catch-all DNS setup
 - avoid string comparison for domain reqs in catch-all mode
 - use IPaddress class for _resolvedIP (looking for IPv6 support in future)

* CaptivePortal example refactored

 - use webserver instead of simple tcp setver
 - use redirects to allows CaptivePortal detection pop-ups in modern systems

* DNSServer status getters added

add isUp() method - returns 'true' if server is up and UDP socket is listening for UDP req's
add isCaptive() method - returns 'true' if server runs in catch-all (captive portal mode)
some doxygen comments added
start() method now keeps existing IP address if any

---------

Co-authored-by: Lucas Saavedra Vaz <lucas.vaz@espressif.com>
Co-authored-by: Me No Dev <me-no-dev@users.noreply.github.com>
2023-12-18 14:47:04 +02:00
Rodrigo Garcia
71b1d767af
Fixes Malloc (#9012)
Fixes `malloc()` call preventing it from using function pointer reference instead of actually calling the function itself.
2023-12-18 11:35:12 +02:00
Juraj Andrássy
6c919f40f1
WiFiClients.setConnectionTimeout added (#8863) 2023-12-14 17:16:07 +02:00
Jan Procházka
07fa3441c6
fix: Remove setTimeout (#8998) 2023-12-14 14:06:31 +02:00
Jan Procházka
29cde94bb9
ESPLwIPClient::setTimeout conflict fix with Stream::setTimeout (#6676)
* Removed virtual + moved socketOptions ot read/write

* Removed no needed code + edit

* removed Client::getTimeout

* removed setTimeout from WifiClient - read/write timeouts in constructor now

* Changed seconds to miliseconds in other classes relaed + examples

* Applied same changes for WifiClientSecure

* Added 0 init values to constructor

* Seconds are not rounded now

* removed +500 for previous rounding

+ unnecessary comments removed.

* fix rebased code in WifiClientSecure

* Fix rebased code

* Fix rebase code
2023-12-13 16:02:54 +02:00
David McCurley
02b384a54a
Replace new with malloc for non-class calls (#7868)
* Resolve potential crashes

* Update Esp.cpp

Resolved possible crash in EspClass::getSketchMD5().
2023-12-13 10:22:54 +02:00
Rodrigo Garcia
8d1a84557c
Wifi async scan example and fix (#8981)
* Create WiFiScanAsync.ino

* Create .skip.esp32h2

* Create README.md

* Update README.md - adds C6

* Update wifi.rst with new example

* avoid timeout with Async Mode

---------

Co-authored-by: Me No Dev <me-no-dev@users.noreply.github.com>
2023-12-11 13:34:40 +02:00
Mattias Schäffersmann
51cb927712
Fix race condition in WiFiGenericClass::hostByName (#8672)
dns_gethostbyname, as used in hostByName, is required to run in lwIP's TCP/IP
context. This can be verified by enabling LWIP_CHECK_THREAD_SAFETY in the
sdkconfig.

Calling dns_gethostbyname from the Arduino task can trigger race conditions
in lwIP or lower layers. One possibility is a corruption of IDF's Ethernet
buffers, causing an unstoppable flood of "insufficient TX buffer size" errors,
effectively severing all Ethernet connectivity.

This patch makes sure to call dns_gethostbyname from lwIP's TCP/IP context.
2023-12-05 18:54:53 +02:00
David McCurley
2696a127de
Example: ResetReason2 (#8105)
* Create ResetReason2.ino

* Separate Reset Examples

Moved examples to separate sub folders
2023-12-05 17:23:40 +02:00
Daniel Egnor
67c027ce17
Add documentation on threading issues with WiFi.onEvent() to examples (#8081)
* Compile error if CONFIG_FREERTOS_HZ != 1000

* add a check at the CMake level, per feedback

* fix a punctuation glitch

* Remove `_Static_assert` per feedback

* add documentation on threading issues with WiFi.onEvent()

* more comments

* thin out comments, add docs

* Update WiFiProv.ino merge conflict issue fixed

* Added the CLK type and MAC from eFuse to Ethernet begin

* Fixed the order and arguments on the Ethernet begin function

---------

Co-authored-by: Pedro Minatel <pedro.minatel@espressif.com>
Co-authored-by: Pedro Minatel <pminatel@gmail.com>
2023-12-05 13:50:26 +02:00
Jan Procházka
7ecde87701
UpdateClass::setMD5 store expected md5 in lowercase (#8959)
* set _target_md5 to lowercase

* fix errors
2023-12-05 13:30:26 +02:00
Marcel Toele
1a7a893497
Add USB MIDI support to libraries/USB (#8166)
* Added USBMIDI support to libraries/USB

* Added MIDI examples to libraries/USB

* Added missing newline at end of file to MidiController.ino

* Added USBMIDI.cpp to CMake file

* Fix narrowing conversion warning in USBMIDI.cpp

* Fix incomplete initializers warning in USBMIDI.cpp

* Apply suggestions from code review

Co-authored-by: Lucas Saavedra Vaz <lucassvaz@yahoo.com.br>

* add skip files for C6+H2

* remove already patched workaroud for bug

* move #define to top of file

---------

Co-authored-by: Me No Dev <me-no-dev@users.noreply.github.com>
Co-authored-by: Lucas Saavedra Vaz <lucas.vaz@espressif.com>
Co-authored-by: Jan Procházka <90197375+P-R-O-C-H-Y@users.noreply.github.com>
Co-authored-by: Lucas Saavedra Vaz <lucassvaz@yahoo.com.br>
2023-12-05 10:42:53 +02:00
RefactorFactory
9a9ec09f63
Make USBHIDKeyboard work at boot (#6964)
1. Like a real keyboard, the USB interface descriptor will have an interface
   subclass of boot and an interface protocol of keyboard. This will cause
   some PC BIOS to send a SET PROTOCOL BOOT request to the device.

2. When the device sends reports to the host, if the host requested boot
   protocol, don't send a report ID because boot protocol does not use report
   IDs.

3. To work with some simple PC BIOS:
   a. Use endpoint address of 1 for input and output.
   b. Use separate reports for the shift key. These extra reports can be
      disabled by calling USBHIDKeyboard::setShiftKeyReports(false).

Co-authored-by: Rodrigo Garcia <rodrigo.garcia@espressif.com>
Co-authored-by: Me No Dev <me-no-dev@users.noreply.github.com>
Co-authored-by: Jan Procházka <90197375+P-R-O-C-H-Y@users.noreply.github.com>
2023-11-30 20:53:25 +02:00
Matthias Hertel
89fd90d669
Supporting ETag http headers on static files (#7687)
* Supporting ETag http headers on static files

* Supporting ETag http headers on static files

* WebServer Example and Doku

* new template for readme added.

* example updated, som more TRACE output.

* better TRACE formatting.

* upload and trace enhancements

* Create .skip.esp32h2

* Update libraries/WebServer/examples/WebServer/data/index.htm

Co-authored-by: Lucas Saavedra Vaz <lucassvaz@yahoo.com.br>

* files.htm trailing newLine

---------

Co-authored-by: Jan Procházka <90197375+P-R-O-C-H-Y@users.noreply.github.com>
Co-authored-by: Lucas Saavedra Vaz <lucassvaz@yahoo.com.br>
2023-11-30 20:52:49 +02:00
Chester
5fcdb8412d
Kernel panic when delete BLEClient object with descriptor characteristic (#8010)
* Update BLERemoteCharacteristic.cpp

Fix kernel panic issue when trying to release BLEClient when the target device have a ble descriptor.

* Update BLERemoteCharacteristic.cpp

Co-authored-by: Lucas Saavedra Vaz <lucassvaz@yahoo.com.br>

---------

Co-authored-by: Lucas Saavedra Vaz <lucas.vaz@espressif.com>
Co-authored-by: Lucas Saavedra Vaz <lucassvaz@yahoo.com.br>
2023-11-30 14:26:23 +02:00
Luca Burelli
e97a519032
fix: pin_remap: make periman APIs private and non-remapped (#8940)
Turns out that disabling the periman APIs from remap has a negligible
effect on the source: the core is already excluded from remapping, as
are most of the libraries. It's also expected to be a private API not
exposed by default.
This patch removes it from both esp32-hal.h and io_pin_remap.h,
adjusting the relevant libraries.
2023-11-29 16:46:03 +02:00
Vlastimil Hajek
8c150e2184
feat: adding possibility to manually set MD5 checksum for HTTP update (#7629) 2023-11-29 15:53:07 +02:00
Me No Dev
5ca45bebdf
Add support for I2S Slot Mask (#8936)
Needed for some setups, where only the right channel is being used.
2023-11-29 15:48:34 +02:00
dpnebert
c1417e9b7d
Added methods to remove service UUID from BLEAdvertising (#8747)
* Modified 'BLEAdvertising.h' & 'BLEAdvertising.cpp'

Added three methods for removing service UUID from BLEAdvertised

* Update BLEAdvertising.cpp

Changed 'i' to 'index'

---------

Co-authored-by: Jan Procházka <90197375+P-R-O-C-H-Y@users.noreply.github.com>
2023-11-29 14:26:48 +02:00
tobozo
bd39fcfac6
Absolute mouse support (was #6331) (#8831)
* Added absolute mouse support

* make click() virtual

---------

Co-authored-by: Rodrigo Garcia <rodrigo.garcia@espressif.com>
Co-authored-by: Jan Procházka <90197375+P-R-O-C-H-Y@users.noreply.github.com>
2023-11-29 14:25:26 +02:00
Christian Ferbar
dbf0b18d49
Bluetooth-classic: release BLE memory when BT classic only is requested (#8051)
* esp32-hal-bt.c free Bluetooth LE memory if CONFIG_BTDM_CONTROLLER_MODE_BR_EDR_ONLY is set

BLE memory can be released if bluetooth-classic - only is requested

* tStart( add error output

* ble mem_release only for esp32

* disable BLE with BT_MODE define

* BluetoothSerial add begin()+disableBLE; add memrelease

* btStart with BT_MODE parameter

* beautification

* Update BluetoothSerial.cpp fix wrong merges

---------

Co-authored-by: Me No Dev <me-no-dev@users.noreply.github.com>
2023-11-29 12:44:23 +02:00
Luca Burelli
7d26b070d7
Add support for the Arduino Nano ESP32 on 3.x branch (#8909)
* [pin_remap 1/3] platform: define ARDUINO_CORE_BUILD when building core files

* [pin_remap 2/3] core,libs: add pin remap hooks

* platform: remove previous build options if file is missing

"touch" would create the file if not present, but not delete its
contents if a previous run left the file in the build dir.

* platform: make debug_custom.json file customizable by board

* platform: fix default debug prefix

"debug.toolchain.prefix" must end with a dash, since only the tool name is
appended to this string.

The reason this is not a major issue is that the "debug_custom.json" file
(copied in the sketch directory when debugging is enabled) forces its own
prefix. And to make things more interesting, the "toolchainPrefix" entry
in that file should _not_ end with a dash.

* [pin_remap 3/3]: add Arduino Nano ESP32 board

* fix: periman: include it by default, add include guard

* fix: io_pin_remap: adjust for new perimap APIs

* fix: libraries: manually handled pin remapping files

Previously all libraries invoked either high-level APIs (transparently
remapped, like the user sketch) or low-level ESP-IDF calls (where the
remap to GPIO numbers had to be added manually).

Since 3.x, some of these are mixed (for example, periman* APIs are
remapped, while soc* are not). This must be handled by disabling the
automatic API remapping and making sure all calls use GPIO numbers.

* feat: show remapped pins in chip debug reports

---------

Co-authored-by: Jan Procházka <90197375+P-R-O-C-H-Y@users.noreply.github.com>
Co-authored-by: Me No Dev <me-no-dev@users.noreply.github.com>
2023-11-29 12:43:59 +02:00
dpnebert
595dc01830
Added example 'get mac address' (#8618)
* Example sketch prints MAC for different interfaces

Interfaces described in documenation: https://docs.espressif.com/projects/esp-idf/en/latest/esp32/api-reference/system/misc_system_api.html#mac-address

* Update README.md to include 'MacAddress'

* Add files via upload

* Delete libraries/ESP32/examples/MacAddress/GetMacAddress.ino

* Delete libraries/ESP32/examples/MacAddress/GetMacAddress/GetMacAddress.ino

* Delete libraries/ESP32/examples/MacAddress/GetMacAddress/MacAddress directory

* Add files via upload

* Add files via upload

* Adds necessary MAC header file

* Reverting - moving to the sketch

* Adds include with esp_mac_type_t values

---------

Co-authored-by: Jan Procházka <90197375+P-R-O-C-H-Y@users.noreply.github.com>
Co-authored-by: Rodrigo Garcia <rodrigo.garcia@espressif.com>
2023-11-29 12:11:46 +02:00
Mirco Pizzichini
db7b3495d5
Add lock to protect concurrent i2c transactions performed by different tasks (#8127)
Co-authored-by: Me No Dev <me-no-dev@users.noreply.github.com>
2023-11-29 11:42:56 +02:00
rtpmsys
e99437c850
Add missing function getSocketOption (#7807)
* Update WiFiClient.h

Added missing getSocketOption() with full access to level and option

* Update WiFiClient.h

* Handle timeout settings below 1 second

Fix error with connect timeout settings below 1000ms.
Add getsocketoptions function.

* Add cast for setsockopt length

---------

Co-authored-by: Me No Dev <me-no-dev@users.noreply.github.com>
2023-11-29 10:04:34 +02:00
Gonzalo Brusco
ac1c00121b
Added WiFi Bandwidth Setting Methods for AP and STA modes. (#7619)
* Added Bandwith setting method

* Separted AP and STA on it's own class each

* Missing WiFi

* Rename for consistency

---------

Co-authored-by: Me No Dev <me-no-dev@users.noreply.github.com>
2023-11-29 10:03:48 +02:00
Juraj Andrássy
990e3d5b43
WiFiServer - deprecate available(), use accept() everywhere (#8860)
esp8266 and esp32 server.available() is not implemented as documented
it is implemented like server.accept() is documented by Arduino

Co-authored-by: Rodrigo Garcia <rodrigo.garcia@espressif.com>
2023-11-27 14:51:59 +02:00
lbernstone
1e980bd738
Added KEY_SPACE to USBHIDKeyboard.h (#8920) 2023-11-27 11:16:44 +02:00
Jan Procházka
0d0d27fba8
Extend bus types and structure for Peripheral Manager (#8888)
* Extended bus types for peripheral manager

* add extra_type to peripheral manager

* Fix function call

* Fix check for no extra_type

* Add extra_type for SD and ETH CS pin

* added bus_num and bus_channel to pin structure

* update printPerimanInfo with new fields

* replaced setting bus to INIT with DetachPin call

* add defines for extra attributes

* use new required parameters in perimanSetPinBus

* function rename

* removed duplicate define

* Update print format

---------

Co-authored-by: Rodrigo Garcia <rodrigo.garcia@espressif.com>
2023-11-25 21:26:03 +02:00
Jason2866
5d9a7a13b0
Add ESP32-C2 support (#8881)
* add c2

* Fix typo

* changes from code review

* rm hack needed to compile for c2

* rm `DARDUINO_USB_MODE=1` not needed for c2

* log_e message no RMT support

* correct log_e

* Update esp32-hal-rgb-led.c

* Add component test build for ESP32-C2

* Disable most components for ESP32-C2

* Add missing ADC SOC defines for ESP32-C2

* Add hidden board definition and fix LED pin in variant

* Add default empty zigbee libs and mode

* Change SPI default pins

* change rx1 tx1 default gpio

---------

Co-authored-by: Me No Dev <me-no-dev@users.noreply.github.com>
Co-authored-by: me-no-dev <hristo@espressif.com>
Co-authored-by: Jan Procházka <90197375+P-R-O-C-H-Y@users.noreply.github.com>
2023-11-21 15:16:47 +02:00
Me No Dev
76782f2c75
Fully guard I2C Slave in preparation for C2 support (#8882) 2023-11-13 22:46:46 +02:00
Juraj Andrássy
fbfcb802b6
WiFiSTA - method setDNS as in WiFi libraries by Arduino (#8854)
https://www.arduino.cc/reference/en/libraries/wifi/wifi.setdns/
2023-11-11 00:30:36 +02:00
Juraj Andrássy
0b6d20ed65
WiFi.BSSID and scan result BSSID with parameter as in WiFi libraries by (#8853)
Arduino
2023-11-11 00:29:46 +02:00
Juraj Andrássy
3fa2807aad
WiFiSTA - new status constant WL_STOPPED (#8849)
to change initial WiFi.status() because WL_NO_SHIELD
is checked in any generic Arduino WiFi example

Co-authored-by: Rodrigo Garcia <rodrigo.garcia@espressif.com>
2023-11-11 00:28:49 +02:00
Juraj Andrássy
a9a72d1fdc
WiFiSTA - allow using DHCP again after disconnecting static IP (#8848)
reset _useStaticIp to false in WiFi.disconnect()

Co-authored-by: Rodrigo Garcia <rodrigo.garcia@espressif.com>
2023-11-11 00:27:07 +02:00
Me No Dev
b1335dce41
IDF release/v5.1 (#8865)
* IDF release/v5.1 b6a66b7d8c

* Fix CI - RMakerCustomAirCooler.ino

No use of `#include "led_strip.h"` in the code

---------

Co-authored-by: Rodrigo Garcia <rodrigo.garcia@espressif.com>
2023-11-10 21:40:14 +02:00
lbernstone
6b287db119
Update/upgrade OTAWebUpdater.ino example (#8839)
* Update/upgrade OTAWebUpdater.ino example

* Wrong side of the MAC address in ssid

* Better not to cheat it on an example :)

* Changes requested by @me-no-dev
2023-11-10 01:27:38 +02:00
Rodrigo Garcia
6cc307255b
Increase BT SPP task priority (#8859) 2023-11-09 23:15:50 +02:00
Rodrigo Garcia
de7cac11ae
Neopixel fix (#8845)
* improve neopixel definition for all boards

* Improve NeoPixel definition for all boards

* neopixelWrite uses Peirpheral Manager now

The function can now be used for many GPIOs in the same sketch by using Peripheral Manager attach/detach, not being necesary to worry about initialization.

* improve error message

* check if pin is RGB_BUILTIN

* fixes boards that don't RGB_BUILTIN
2023-11-09 23:15:10 +02:00
Rodrigo Garcia
1e2ee37104
Fixes Rainmaker to be a Managed Component (#8842)
* Uses IDF Managed Components

This changes is targeted to be used within Arduino Lib Builder and with projects that use Arduino as IDF Component.

* Fixes RainMaker QR code

Fixes RainMaker in order to use it as Managed Component and with the latest RainMaker release.

* Removes Camera Component

* SR Component only needed for the S3
2023-11-09 23:08:39 +02:00
JDavid
6357663f33
Fix linker failure when using BluetoothSerial on latest release with Arduino as Component. (#8784) 2023-10-27 12:51:13 +03:00
Lucas Saavedra Vaz
f04b7d9202
BluetoothSerial: Fix SPP service mode (#8806) 2023-10-25 13:43:46 +03:00
Rodrigo Garcia
9dd9bde682
Serial as a #define (#8798)
* Serial as a #define

* Typo

* fixes USBCDC declaration

* Fixes Examples

* simplifies examples

* Adds USB Serial Events

* adds error msg when ESP32 is used with USB
2023-10-25 10:50:51 +03:00
Jan Procházka
819aae4061
I2S fix missing perimanSetBusDeinit() (#8782)
* add missing perimanSetBusDeinit

* fix printPerimanInfo
2023-10-20 16:36:06 +03:00
Me No Dev
601efed98f
[I2S][SR] Add new I2S library and Sound Recognition support (#8714)
* [I2S][SR] Add new I2S library and Sound Recognition support

* periman + TDM and PDM support

* separated init function + default values for pins

* fix SR example

* fix init functions

* remove old I2S from CmakeList

* Add ESP_I2S and ESP_SR to Cmakelist includedirs

* TDM slot_mask fix

* Peripheral manager pin check fix

* Compile ESP_SR Arduino code only if ESP-SR is available as component

* Guard I2S modes, depending on what is supported by the chip

* add check if i2s is supported

* Remove old I2S Example

---------

Co-authored-by: Jan Procházka <90197375+P-R-O-C-H-Y@users.noreply.github.com>
2023-10-18 12:05:26 +03:00
JDavid
4b3aebe11f
Fix linker failure when using SPIFFS or LittleFS with Arduino as component. (#8768)
Co-authored-by: Me No Dev <me-no-dev@users.noreply.github.com>
2023-10-17 13:22:42 +03:00
Rodrigo Garcia
f21820946a
sets BLEScanResults by reference (#8759) 2023-10-16 23:46:43 +03:00
Rodrigo Garcia
a8622c4f91
HardwareSerial::end(bool) review + Baud Rate detection review and example (#8762)
* removes pin detaching from end(false)

* adds UART0 baud rate detection example

* fixes baud rate messages
2023-10-16 23:45:09 +03:00
Jason2866
093680e065
provide grow_on_mount feature (#8769) 2023-10-16 23:42:40 +03:00
Me No Dev
f3b5994219
IDF release/v5.1 (#8758)
* IDF release/v5.1 6b1f40b9bf

* Fix WPA2 examples

* Fix typo
2023-10-12 10:05:50 +03:00
Me No Dev
a844073d85
Update toolchains to use the tar.gz format for IDE1 compatibility (#8757)
* Update toolchains to use the tar.gz format for IDE1 compatibility

* Update WiFiSTA.cpp

* Implement the new EAP API for STA
2023-10-11 18:34:15 +03:00
me-no-dev
7cf353bdd1 Fix libs download for release and add FS::mounpoint() getter 2023-10-06 16:11:09 +03:00
Me No Dev
822f252b35
BLE upgrades (#8724)
* Renamed library description

* Updated Eddystone URL (not complete)

* Updated Eddystone URL

* Updated Eddystone classes and beacon scanner

* Renamed examples - removing prefix BLE_

* Renamed Beacon_Scanner

* Updated TLM

* Changed std::string to Arduino String

* More std::string -> String

* Changed String in forgotten file

* Changed .data to .c_str

* Reverting single String type change

* Few more fixes related to the String transition

* Fixed URL and Utils error

* Added and modified compatibility safeguards for BLE5 examples

* Added #include WString.h

* Fixed Beacon_Scanner

* Remove commented include

Co-authored-by: Lucas Saavedra Vaz <lucassvaz@yahoo.com.br>

---------

Co-authored-by: Tomas Pilny <tomas.pilny@espressif.com>
Co-authored-by: Lucas Saavedra Vaz <lucassvaz@yahoo.com.br>
2023-10-06 15:50:11 +03:00
Me No Dev
02e7fd884a
BT serial: SSP improvements, added missing events (#8723)
* Renamed SerialToSerialBT_SSP_pairing

* Clarified useage of SPP example

* Added missing events

* Implemented dropCache() method to remove bonded devices

* Removed legacy pairing, enhaced SSP

* Minor updates to examples

* Updated README + asociated comments in source and example

* Implemented more methods to manipulate bonded devices + modified example

* Added SPP event

* Reordered event to match enum declaration; added missing events; added comments

* Re-implemented legacy pairing support

* Spelling fixes in README

* Removed unnecessary test in discover()

* Updates

---------

Co-authored-by: Tomas Pilny <tomas.pilny@espressif.com>
Co-authored-by: Tomáš Pilný <pilnyt@seznam.cz>
2023-10-06 15:49:51 +03:00
Christian Baars
1a504a6726
WebServer: use MD5Builder instead of mbed (#8667)
Co-authored-by: Me No Dev <me-no-dev@users.noreply.github.com>
2023-10-06 13:58:47 +03:00
Ben Lye
6091d526f6
Fix broken link (#8441)
Fix the link to the certificate bundle instructions.
2023-10-06 13:54:55 +03:00
Me No Dev
1da0ca88e8
Add TFLite Micro examples (#8717)
* create TFLite library

* add TFLite hello_world example

* add TFLite micro_speech example

---------

Co-authored-by: Sanket Wadekar <67091512+sanketwadekar@users.noreply.github.com>
2023-10-06 13:50:53 +03:00
MathewHDYT
709c935064
Fix memory leak and undefined behavour in Updater.cpp (UpdaterClass) (#8671)
* Fix memory leak and undefined behavour in Updater #7984

* Update error message

Co-authored-by: Jan Procházka <90197375+P-R-O-C-H-Y@users.noreply.github.com>

* Update error message

Co-authored-by: Jan Procházka <90197375+P-R-O-C-H-Y@users.noreply.github.com>

---------

Co-authored-by: Jan Procházka <90197375+P-R-O-C-H-Y@users.noreply.github.com>
Co-authored-by: Me No Dev <me-no-dev@users.noreply.github.com>
2023-10-06 13:48:59 +03:00
Me No Dev
e2487b128d
[ETH] Implement SPI support, multiple interfaces and more (#8712) 2023-10-06 13:47:54 +03:00
Me No Dev
93a45019a8
HTTPClient - Fix case sensitiveness for header keys (#8713) 2023-10-06 13:47:35 +03:00
Jan Procházka
352af86478
Analog Continuous mode API (#8715)
* Adds Analog Continuous mode API

* fix when stopping/starting ADC data are not complete

* Added example

* fix size check

* update frequency in example

* set buffer to NULL if error occurs

* add docs

* set buffer to null on error

* fix example

* update docs

* fix example

* change return value to bool type

* updated adc modes description in docs

* Add empty line at the end of sketch
2023-10-06 13:47:08 +03:00
Me No Dev
6f7a1ca76a
ESP-IDF v5.1 (#7733)
* Initial changes to compile under ESP-IDF v5.1

* Initial import for ESP-IDF v5.1 libs

* Update toolchain

* Update esp32-hal-psram.c

* Add missing LDs

* Update platform.txt

* Stop some CI jobs, because they will always fail

* Fix examples

* Update app_httpd.cpp

* Update ResetReason.ino

* Warnings fixes

* Added the example guideline and template (#7665)

* Added the example guideline and template

* PR review changes with some typos and grammar fixes

* Changes according to the PR review

* Added ESP32-S3 link to the datasheet (#7738)

* Update HiFreq_ADC.ino

* Replace periph_ctrl.h use because of deprecation

* Replace esp_spi_flash.h use because of deprecation

* Add includes to male mDNS::enableWorkstation compile

* Fix ssl_client mbedtls_pk_parse_key callback

* Update temperature sensor driver

* Allow sketch_utils to compile with arduino-cli

* Run CI with arduino-cli

* Fix arduino-cli CI build on Windows

* Refactor platform.txt to not use components installed through the board manager when running from git

* Initial Peripheral Manager Implementation

* Update SigmaDelta driver to use the new ESP-IDF driver API

* Small improvements to peripheral manager and SigmaDelta

* Remove deleted function from SigmaDelta header

* Update DAC driver to use the new ESP-IDF driver API

* Adds softAp(String) to make it compatible with ESP8266 (#7801)

* Fix commentary (#7800)

Minor fix based on observation done in https://github.com/espressif/arduino-esp32/issues/7795#issuecomment-1416868611

* add adafruit new board feather esp32s2 reserve tft (#7794)

* bugfix: add <stdint.h> for uint8_t to avoid compilation failure (GCC 11.2.0) (#7744)

* Adding 3rd party boards for VALTRACK-V4-VTS-ESP32-C3 & VALTRACK-V4-MFW-ESP32-C3 (#7735)

* Added VALTRACK-V4-VTS-ESP32-C3 board definition

Created pins_arduino.h & made changes to boards.txt with necessary changes

* Modified the URL

* Renamed json

* renamed all auRL

* Adding VALTRACK-V4 series board definitions

Added VALTRACK-V4-VTS-ESP32C3 & VALTRACK-V4-MFW-ESP32-C3 board variants

* Adding VALTRACK-V4 series board definitions

Added VALTRACK-V4-VTS-ESP32C3 & VALTRACK-V4-MFW-ESP32-C3 board variants

* Reverted package_esp32_index.template.json

restored package_esp32_index.template.json from edits

* Reverted package_esp32_index.template.json

Added new line to package_esp32_index.template.json

* Update Platformio CI (#7725)

* WiFiClient example fix (#7711)

* Modified WiFiClient example to use thingspeak instead of non-functionig sparkfun

* Moved instructions to README

* Fixed spelling

* Added link to S3 datasheet

---------

Co-authored-by: Jan Procházka <90197375+P-R-O-C-H-Y@users.noreply.github.com>

* Mirror update from Heltec repository (#7709)

Heltec updated the I2C pins in b10f4bf85d

* Fixes BLE data printing (#7699)

* Fixes BLE data printing

BLE data has no '\0' terminator, therefore it can't be printed as a regular C string.
This fix just prints the BLE data based on its length.

* Simplify printing to a single call

* split menu options + lora_32_V3 fix (#7697)

* Change header gaurd name (#7696)

* Fix Name (#7691)

Wrong name in definitions.

* Fix error in WiFiClient.cpp where the connect function fails for timeouts below 1 second (#7686)

* Update WiFiClient.cpp

This change will allow specifying connect timeouts below 1 second. Without this change, if connect timeouts under 1 second are given, the connect defaults to 0ms and fails. 
This will also allow timeouts in fractions of seconds, e.g. 1500ms. Without this change, connect timeouts are truncated to full second increments.

* Make parameter timeout_ms clear

* Change connection timeout_ms name for clarity

---------

Co-authored-by: Rodrigo Garcia <rodrigo.garcia@espressif.com>

* fixed the function header (#7674)

* fixed the function header

* fixed function name and paramaters

---------

Co-authored-by: Jan Procházka <90197375+P-R-O-C-H-Y@users.noreply.github.com>

* Ticker fix solving #6155 (#7664)

* Wrapped Ticker functions with #pragma disabling -Wcast-function-type

* Revert "Wrapped Ticker functions with #pragma disabling -Wcast-function-type"

This reverts commit 160be7e67a.

* Fixed Ticker example

* Modified Ticker example

* Fixed LED_BUILTIN err for ESP32

---------

Co-authored-by: Jan Procházka <90197375+P-R-O-C-H-Y@users.noreply.github.com>

* setPins fix ESP32 "specified pins are not supported by this chip." (#7646)

[ESP32: SDMMCFS::begin hardcodes the usage of slot 1, only check if the pins match slot 1 pins.]

setPins() was testing pins D1, D2 and D3 all against D1 ... fine in 1 pin mode when all are -1 not so much if you're trying to get 4 pin mode working.
I now see this function doesn't really do anything on the ESP32...accept now correctly checks that you are trying to use the slot 1 pins.

Co-authored-by: Jan Procházka <90197375+P-R-O-C-H-Y@users.noreply.github.com>

* Allow passing IP as connect method parameter in WiFiClientSecure and skip unnecessary host-ip conversions (#7643)

* Add LED_BUILTIN* definitions and initialization for LEDs to stop them floating. (#7636)

Co-authored-by: Rodrigo Garcia <rodrigo.garcia@espressif.com>

* Expand path to tinuf2 image when checking existence in platformio-build.py (#7631)

* Expand path to tinuf2 image when checking existence

* More isFiles fixed

* Remove (useless) trailing semicolon from Print.cpp (#7622)

* ADD: New variant Edgebox-ESP-100 (#7771)

* ADD: New variant Edgebox-ESP-100

* FIX: Edgebox-ESP-100 Board.txt usb mode option change back to default value as ESP32S3

* Add Crabik Slot ESP32-S3 board (#7790)

* Added Crabik Slot ESP32-S3

* Adding CPU frequency settings and removing excess from partition scheme settings

* new variant LilyGO T-Display-S3 (#7763)

* new variant LilyGO T-Display-S3

https://github.com/Xinyuan-LilyGO/T-Display-S3

* Add boards.txt definition

---------

Co-authored-by: Me No Dev <me-no-dev@users.noreply.github.com>

* Update get.py to support Apple ARM64

* Update package_esp32_index.template.json

* WString Return bool (#7774)

* Add Roboheart Hercules development board to the esp32-core (#7672)

* added Roboheart Hercules pin definitions and board.txt entries

* added package_roboheat.json for prototyping

* Roboheart Hercules pins

* Updated the pins

* Delete package_roboheart.json

* Requested changes

---------

Co-authored-by: renebohne <rene.bohne@gmail.com>

* Reword "ESP-IDF as Component" (#7812)

I think "Arduino as an ESP-IDF component" or just "As ESP-IDF component" instead of  "ESP-IDF as Component" is more correct way to name the link.

1. "ESP-IDF as Component" would imply that ESP-IDF is some sort of library for Arduino, which is (IMO) misleading, because it's true the other way around.
2. It's written as "Arduino as an ESP-IDF component" on the webpage it points to as well.

- Also I removed the capitalization from "Component" as I have not found a reason why is it capitalized.

* add new board Adafruit Feather ESP32-S3 Reverse TFT (#7811)

* Multi threading examples (tasks, queues, semaphores, mutexes) (#7660)

* Moved and renamed example ESP32/FreeRTOS to MultiThreading/BasicMultiThreading

* Added dummy files

* Modified original example

* Fixed BasicMultiThreading.ino

* Added Example demonstrating use of queues

* Extended info in BasicMultiThreading

* Renamed Queues to singular Queue

* Added Mutex example

* Added Semaphore example

* Moved info from example to README

* Moved doc from Mutex to README

* Added Queue README

* Removed unecesary text

* Fixed grammar

* Increased stack size for Sempahore example

* Added headers into .ino files

* Added word Example at the end of title in README

* removed unused line

* Added forgotten README

* Modified BasicMultiThreading example

* Added missing S3 entry in README

* moved location

* Update ESP-IDF libs

* Update CMakeLists.txt

* Update esptool to v4.4

* Add function timerAttachInterruptFlag (#7809)

* Update esptool to v4.5

* ADC refactoring (#7827)

* Adc refactored + periman implementation

Peripheral manager still needs to be checked if the implementation is right.

* switched to working solution for milivolts read

* Periman detachbus fix

* coding style

* fix CI warnings

* fix FreeRTOS example

* Update ETH.cpp

* Update FunctionalInterruptStruct.ino

* Update package_esp32_index.template.json

* Update package_esp32_index.template.json

* Fixes for the latest IDF v5.1

* update esp-idf libs and toolchain

* Turn OFF auto crystal frequency for ESP32 (needed by TWAI)

* Update examples

* Switch build to mostly use flags from files

Includes can not be done this way

* Reorganize flag files

* Optimize chip build flags further

* Revert defines from file. MBEDTLS_CONFIG_FILE does not properly expand

* Add support for includes and defines from file

* Replace old sdk path references in platform.txt

* use gcc-ar (#8013)

* Makes F_CPU generic for all SoC (#8007)

Based on CONFIG_ESP_DEFAULT_CPU_FREQ_MHZ that is correctly defined in the sdkconfig file for each SoC.

* TIMER refactoring (#7904)

* refactor using GPtimer

* Updated timer HW test

* fix examples

* Add v2.0.7 in issue template (#7871)

* refactor using GPtimer

* Updated timer HW test

* fix examples

* Revert "Add v2.0.7 in issue template (#7871)"

This reverts commit fcc3b17d62.

* Update upload-artifact to v3 in HW CI

* Revert "Update upload-artifact to v3 in HW CI"

This reverts commit 1ba2280717.

* replace resolution with frequency

* remove count_down option

* countup removed from examples + header

* Refactored timer object

* code cleanup + examples and tests fixes

* TimerAlarm fix

---------

Co-authored-by: Vojtěch Bartoška <76958047+VojtechBartoska@users.noreply.github.com>

* [Docs] ADC and Timer API Update (+some docs fixes) (#7906)

* updated docs

* remove hall sensor docs

Removed Hall sensor documentation as its no longer supported in IDF-5

* Fixed ESPNow examples location in docs

* Last timer refactored API + gpio small fix

* AlarmWrite fix

* Fixes APLL/PLL with RTC Frequency (#8025)

log_d() was displaying APLL for any SoC, but S3 and C3 has not such option, causing compilation errors.

* Update IDF libs and fix OPI PSRAM on S3

* Add setMode function HardwareSerial.c to set the esp32 uart mode for use with RS485 auto RTS (#7935)

* Added setMode function to set the esp32 uart mode

Used to set the esp32 uart mode for use with RS485 Half Duplex and the auto RTS pin mode. This will set/clear the RTS pin output to control the RE/DE pin on most RS485 chips.

* Add Success (bool) return in some functions

* Add Success (bool) return code to some functions

* Add Success (bool) return to some functions

* Add Success (bool) return to some functions

* Fix uartSetRxTimeout return type

---------

Co-authored-by: Rodrigo Garcia <rodrigo.garcia@espressif.com>

* Add support for esp-elf-gdb

* WFG Crashfix (#8044)

* Update component libs

* IDF release/v5.1 (#8061)

* IDF release/v5.1 bb9200acec

* Update Esp.cpp

* IDF release/v5.1 420ebd208a

* Update esp32-hal-psram.c

* Switch SDK to be an external package

* fix path (#8096)

* Makes UART work at any APB Frequency (#8097)

Fixes HardwareSerial to work with IDF 5.1 on any CPU/APB Frequency (240MHz to 10MHZ), including user created low power modes.

* Add required callbacks for TinyUSB DFU

* Update version to 3.0.0

* Add ESP.getCoreVersion() and update ESP.getChipModel()

* Update timer hal for the latest 5.1

* Use separate RX and TX buffer sizes in HTTP client

optimizes download by allowing up to 4K packets to be received

* Rename clock tree enum name in latest 5.1

* ESP32-H4 support was removed in ESP-IDF v5.1

* IDF release/v5.1 2004bf4e11 (#8165)

* Deinit previous bus first (#8180)

* TIMER - add timer_started flag, fix timerEnd() + timer HW test (#8135)

* Add timer_started flag and stop before disable

* Fix timer HW test

* TOUCH - Peripheral manager implementation (#8129)

* Touch periman implemented

* Deinit previous bus first

* LEDC Refactoring - Peripheral manager implemented (#8126)

* LEDC periman implementation

* Fix examples

* Rework tone

* Update ledc docs

* fix missing bracket

* Update analog funtions esp32-hal.h

* Update CameraWebServer example

* Fix HiFreq_ADC example

* minor fixes - typos

* Avoid calling tone/notone when tone already runs on dif. pin

* Remove unused channels_resolution

* GPIO - Peripheral manager implementation (#8179)

* periman-implementation

* fix RGB_BUILTIN and remove space

* Enforces more consistency into Peripheral Manager (#8188)

* Avoid log_i() message the first time a bus is assigned

* Prevent operation with ESP32_BUS_TYPE_INIT

* keeps coding style

* do not print messages on INIT bus type

* [Arduino Core 3.0.0] RMT IDF5.1 Refactoring (#7994)

* RMT IDF5.1 refactoring

* Fixes initial value setting

* removed rmtRead() with user callback

* simplify/remove Read data structure

* Deep API simplification

* fixes the examples

* fix rmt.h

* adds support to APB different frequencies

* fixes CI and not defined RGB_BUILTIN

* new RMT API and examples

* fixing commentaties

* Update esp32-hal-rgb-led.c

* changes Filter API

* Fixes example with Filter API

* Update PlatformIO scripts for the upcoming 3.0 core (#8183)

* Update PlatformIO scripts for the upcoming 3.0 core

* Dynamically select proper framework-arduinoespressif32-libs package

With this change the dev-platform will be dynamically configured to
pull the latest .zip package with precompiled libraries from extracted from
package_esp32_index.template.json

* free memory on detach (#8264)

* SPI - Peripheral manager implementation  (#8255)

* spi periman implementation

* fix header file

* remove unused struct

* fix missing braces

* Update esp32-hal-rmt.c (#8216)

Optimizing Peripheral Manager Test

* I2C - Peripheral manager implementation (#8220)

* i2c-master periman initial commit

* i2c-master make detachbus static + comment remove

* i2c-slave periman implementation

* SetPinBus to INIT on i2cDeinits

* Fix slave pins deinit

* remove dbg logs

* set ret to ESP_FAIL instead of returning

* Fix warnings in hal-spi caused by pariman transition

* Update esptool.py to version 4.6

* Add platform support for ESP_SR

* Add USB Type and valid pin check to periman

* replace bus with spi->num+1 (#8279)

* Remove default pins from SPI HAL

* Add commented out handlers for esptool.js in TinyUSB CDC

For future use

* Add build defines for host os and fqbn (for debug purposes)

* Provide proper memory caps total size

* Update Esp.cpp

* SDMMC - Peripheral manager implementation (#8289)

* sdmmc periman implemented

* save pins when SOC_SDMMC_USE_IOMUX

* IDF release/v5.1 4bc762621d (#8292)

* Adds missing pinMode (#8312)

* Adds missing pinMode

The example code lacks a pinMode() to initialize the GPIO 0 (button). In Arduino Core 3.0.0, it prints an error message when trying to read a not initialized GPIO.

* Update KeyboardLogout.ino

Adds <buttonPin> to keep code standard

* Update KeyboardReprogram.ino

Adds <buttonPin> to keep code standard

* LEDC Fade implementation (#8338)

* fade API + pointer fixes

* Add fade api

* Add fade example

* update ledc docs

* remove unused variables

* fix path to example

* Adds USB to Peripheral Manager - Arduino Core 3.0.0 (#8335)

* ETHERNET - Peripheral manager implementation (#8297)

* Peripheral manager implemented

* remove unused variable

* Add all RMII pins

* fix typo

* Adds HardwareSerial to Peripheral Manager Arduino 3.0.0 (#8328)

* Do not limit ETHERNET in periman to only ESP32. SPI is also an option

* Initial support for ESP32-C6 (#8337)

* Add checks for SOC defines (#8351)

* Add checks for SOC defines

* Add SoC checks to BLE library

* fix i2c compilation error

* fix wrong placement of include

* add check to SPI library

* add check to USB library

* add checks to Wire library

* Feature/esp32h2 support (#8373)

* Initial support for ESP32H2

* Additional changes for ESP32H2

* Update libs for ESP32H2

* Fix flashing on ESP32-H2

* Fix GPIO Configs for ESP32-C6 and ESP32-H2

* Update Timer test sketch

* Fix upload flash parameters

* Use ets_write_char_uart instead of ets_printf in log_printfv

* Print full chip report when log level is sufficient (#8282)

* ESP32-C3 does not have ets_write_char_uart

* Fix BLE gap event name

* HW Testing - Pytest update (#8389)

* update tests requirements

* remove already handled components

* Update version of pytest

* Add missing ESP32-H2 to hil.yml

* Updated FreeRTOS names (#8418)

* HW Testing -  ESP32-C6 + ESP32-H2 fixes (#8404)

* add C6/H2 to tests cfg.json

* remove ,

* workflow runs-on runner by matrix

* Add need for arduino tag to select runner

* Add cryptography to requirements.txt

* Removed duplicate TX1 define for H2 (#8402)

* Fix broken examples

* Fixes RMT filter & idle timing and setup (#8359)

* Fixes Filter and Idle parameter to uint32

* Fixes Filter and Idle setup

* Fixes it to 5.1Libs branch

* fix RMT CLK source and Filter API

* fixes missing ;

* fixes missing ;

* fixes RMT example

* IDF release/v5.1 a7b62bbcaf (#8438)

* Add workflow to build executables from python scripts (#8290)

* Add workflow to build executables from python scripts

* Push binary to tools

* Enable executable signing on Windows

* Update get.py

* Push binary to tools

* Try with multiple files

* Try more actions

* Try powershell

* Restore tools so they do not get rebuilt

* Finalize scripts

* Push binary to tools

* App rollback should be after PSRAM is initialized

* Correcting RX1 to GPIO4 and TX1 to GPIO5 to be consistent with documentation. Previous pin use works but is inconsistent with C6 docs.

* Fixes Memory Leak (#8486)

* fixes preprocessor test (#8485)

* fixes preprocessor test

When using `#define USE_SOFT_AP` 
Change
`&& not USE_SOFT_AP` ==> `&& !defined(USE_SOFT_AP)`

* Adds any BLE capable device in WiFiProv.ino

Removing ESP32 restriction for BLE Provisioning.

* fix flash mode read out for C6

* Add option for custom partitions without restrictions

* SD_MMC update (#8298)

* Updated SD_MMC lib and examples

* Removed getter implementation and commented usage in examples

* squashed updates

* IDF release/v5.1 f0437b945f (#8599)

* Update package_esp32_index.template.json

* Fix printf format build error in BTAdvertisedDeviceSet.cpp

---------

Co-authored-by: Pedro Minatel <pedro.minatel@espressif.com>
Co-authored-by: Rodrigo Garcia <rodrigo.garcia@espressif.com>
Co-authored-by: Ha Thach <thach@tinyusb.org>
Co-authored-by: Martin Turski <quiret@vfemail.net>
Co-authored-by: raviypujar <raviypujar@gmail.com>
Co-authored-by: Jason2866 <24528715+Jason2866@users.noreply.github.com>
Co-authored-by: Tomáš Pilný <34927466+PilnyTomas@users.noreply.github.com>
Co-authored-by: Jan Procházka <90197375+P-R-O-C-H-Y@users.noreply.github.com>
Co-authored-by: Daniel Berlin <dberlin@dberlin.org>
Co-authored-by: Nima Askari (نیما عسکری) <nimaltd@yahoo.com>
Co-authored-by: rtpmsys <106180646+rtpmsys@users.noreply.github.com>
Co-authored-by: bytiful <55647551+bytiful@users.noreply.github.com>
Co-authored-by: tmfarrington <tmfarrington@users.noreply.github.com>
Co-authored-by: Krzysiek S <chris.streh@gmail.com>
Co-authored-by: surt <carl.olsson@gmail.com>
Co-authored-by: Max Scheffler <max.scheffler@pm.me>
Co-authored-by: Clemens Kirchgatterer <clemens@1541.org>
Co-authored-by: Peter Pan's Techland <twinkle-pirate@hotmail.com>
Co-authored-by: Roman <programmeofficemilkyway@gmail.com>
Co-authored-by: Eistee <Eistee82@users.noreply.github.com>
Co-authored-by: David McCurley <44048235+mrengineer7777@users.noreply.github.com>
Co-authored-by: Gaya3N25 <30388176+Gaya3N25@users.noreply.github.com>
Co-authored-by: renebohne <rene.bohne@gmail.com>
Co-authored-by: Olivér Remény <25034625+remenyo@users.noreply.github.com>
Co-authored-by: davidk88 <david.kotar@gmail.com>
Co-authored-by: Vojtěch Bartoška <76958047+VojtechBartoska@users.noreply.github.com>
Co-authored-by: James Armstrong <jamesarmstrong3@me.com>
Co-authored-by: Valerii Koval <valeros@users.noreply.github.com>
Co-authored-by: Peter G. Jensen <root@petergjoel.dk>
2023-10-05 14:54:25 +03:00
gvl610
a90b251e6d
Fix Mardown table format error (#8640) 2023-10-04 18:04:34 +03:00
gvl610
451bfc0198
Fix Markdown table format error (#8639) 2023-10-04 18:04:11 +03:00
Lucas Saavedra Vaz
7b4d468901
Fix BTAdvertisedDeviceSet::toString() method output (#8691) 2023-10-04 17:58:28 +03:00
Lucas Saavedra Vaz
c6646e8c1b
WiFiClient - Properly initialize and check _rxBuffer (#8699) 2023-10-04 17:56:48 +03:00
Tomáš Pilný
6bdef28532
Doc update: Troubleshooting + SD libs (#8241)
* Updated preferences.rst

* Added into FAQ info about SPIFFS failed mount

* Updated troubleshooting

* Moved SPIFFS paragraph from FAQ to troubleshooting

* Minor updates

* Updated troubleshooting

* Updated SD README files and example comments

* Updated troubleshooting with SD issue

* Added note about S3 pins

* Updated SDMMC test setPins calls + added definition for default pins

* Updated SD_MMC comments

* Added pin table to SD_MMC readme

* Updated table in SD_SPI

* Updated based on comments

* Update io_mux.rst

* Update README.md
2023-08-30 16:23:51 +03:00
vortigont
f0910e66a5
add 'NO_GLOBAL_UPDATE' define to avoid creating global UpdateClass instance (#8500)
Save 180 bytes of ram if UpdateClass instance is not required
2023-08-29 13:57:31 +03:00
Holger Lembke
42fc2fb14a
When FFat is mounted before SD, then filesystem reports wrong system sizes (#8520)
* Fixes wrong usedbytes/totalbytes results.

drive id was implemented fixed, does not work with arbitrary initialization.

See https://github.com/espressif/arduino-esp32/issues/3546

* Fixing indention/tabs
2023-08-29 13:53:42 +03:00
Me No Dev
fc438b1c07
Merge pull request #8536 from P-R-O-C-H-Y/SD-status_SPI_lock
SD lib - AcquireSPI on ff_sd_status
2023-08-29 13:50:52 +03:00
Tomas Pilny
dd091755ee Removed forgotten #ifdef 2023-08-18 15:02:20 +02:00
Tomas Pilny
4c4a6b8d37 Reimplemented flush in WiFiClient 2023-08-18 14:10:31 +02:00