Commit graph

2321 commits

Author SHA1 Message Date
Quency-D
19630fcfd7
add heltec_wireless_tracker board (#9080)
* add heltec_wireless_tracker board

* Move the EraseFlash section to the end of the board.

* Restore readme.md document.

---------

Co-authored-by: Jan Procházka <90197375+P-R-O-C-H-Y@users.noreply.github.com>
2024-01-16 15:50:38 +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
Sebastian Romero
a114af068b
feat: Add pin aliases for RGB LED pins to ensure portability. (#9089) 2024-01-16 15:49:02 +02:00
TANAKA Masayuki
14a49c9265
fix(doc): Delete the hall sensor of ESP32 (#9115)
https://docs.espressif.com/projects/arduino-esp32/en/latest/migration_guides/2.x_to_3.0.html?highlight=Hall#hall-sensor
2024-01-16 15:35:23 +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
Pedro Minatel
5063cdd797
[Docs] Fix on the documentation preview deploy CI (#9109)
* Fix on the Docs deploy CI

* Removed the docs build badge (RTD)

* Update .github/workflows/docs_build.yml

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-01-15 16:45:22 +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
Pedro Minatel
e4d6a8abf9
Documentation migration from RTD to ESP-Docs (#9094) 2024-01-12 19:44:42 +02:00
TANAKA Masayuki
c1a4055869
change(esp32): Added clearing of queue with unTone() (#9055)
unTone() does not stop until the queue is exhausted. Therefore, we added clearing the queue.
2024-01-08 14:59:58 +02:00
Jan Procházka
8a1e4638f7
LEDC - Allow custom channel selection (#9031)
* feat(ledc): Allow custom channel selection

* fix(ledc): Fix check of maximum channel

* docs(ledc): Add ledcAttachChannel to docs

* feat(ledc): Change channel to uint8_t + add log message
2024-01-08 14:36:56 +02:00
powerfeatherdev
53aa8c8a5c
ESP32-S3 PowerFeather Fixes (#9052)
* Fix and add pin definitions

Add pins D7, D8
Correct pin numbers for ALARM and EN

* Enable CDC on boot

* Use partition schemes appropriate for flash size

Also adds another partition scheme based of off default_8MB, but fat
partition.
2024-01-08 14:35:43 +02:00
dependabot[bot]
6c5b54e085
Bump tj-actions/changed-files from 36 to 41 in /.github/workflows (#9060)
Bumps [tj-actions/changed-files](https://github.com/tj-actions/changed-files) from 36 to 41.
- [Release notes](https://github.com/tj-actions/changed-files/releases)
- [Changelog](https://github.com/tj-actions/changed-files/blob/main/HISTORY.md)
- [Commits](https://github.com/tj-actions/changed-files/compare/v36...v41)

---
updated-dependencies:
- dependency-name: tj-actions/changed-files
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-01-08 14:33:05 +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
Rodrigo Garcia
73dd8a29a3
Fixes EspClass::deepSleep(64 bits) (#9077)
* Fixes EspClass::deepSleep(64 bits)

This will change time in microseconds from 32 bits to 64 bits as defined in IDF.

* updates function declaration
2024-01-08 14:00:04 +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
a1ext
f6e12eb7e9
fix(core): fixed String::lastIndexOf bug (#9003)
Co-authored-by: Rodrigo Garcia <rodrigo.garcia@espressif.com>
Co-authored-by: Vojtěch Bartoška <76958047+VojtechBartoska@users.noreply.github.com>
2023-12-20 16:54:04 +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
Rodrigo Garcia
edf5ecffc8
Fixes ESP32-S2 CDC Debug Logging (#7284) 2023-12-20 16:25:12 +02:00
Limor "Ladyada" Fried
9d0274b3db
Pin fixes for the Camera board (#9021)
* update pins

* re-fix pinout that was reverted

* more pins

* Update esp32-hal-tinyusb.c

---------

Co-authored-by: Ha Thach <thach@tinyusb.org>
2023-12-20 16:23:55 +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
Rodrigo Garcia
e9ee9c118b
Improve Log Messages in GPIO HAL (#9011)
* Improve Log Messages

* uses pin# in log messages

* Uses IO # in messages
2023-12-19 22:12:40 +02:00
Jan Procházka
c7a109bac4
feat: add functions to enable/disable GPIOs interrupt (#9025) 2023-12-19 22:11:48 +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
Sly Gryphon
44f83b0455
Add v6 support to IPAddress to match ArduinoCore-API (#7174)
* feat(ipaddress): add support for ipv6 type, following arduinocore api

* feat(ipaddress): align with latest arduinocore api

---------

Co-authored-by: Me No Dev <me-no-dev@users.noreply.github.com>
2023-12-18 14:19:12 +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
Benjamin Karic
0aefc94470
change(senseBox MCU-S2 ESP32-S2): Remove analog bit resolution change in init (#9000) 2023-12-15 01:04:41 +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
Jan Procházka
c5297bfa3a
fix: Windows runner build skip and exit on error (#8991) 2023-12-13 13:32: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
Rodrigo Garcia
42ed9c0373
Update reset_reason.rst (#8982) 2023-12-11 13:02:35 +02:00
Vojtěch Bartoška
7cea268dee
Adding Shared GitHub DangerJS (#8983) 2023-12-11 12:51:05 +02:00
Linar Yusupov
7f5db80feb
3.0.0-alpha3 escaping fix (#8968) 2023-12-11 12:49:20 +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
Jan Procházka
8520725eb7
install arduino-cli instead Arduino IDE (#8961)
Co-authored-by: Lucas Saavedra Vaz <lucas.vaz@espressif.com>
2023-12-05 18:54:35 +02:00
Jan Procházka
c005319c0a
fix examples path (#8963) 2023-12-05 18:14:52 +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
Jan Procházka
609a9477c1
Fix Heltec boards build.board to be uppercase (#8958)
* uppercase heltec board names

* debug commit - will be reverted

* debug commit - will be reverted

* debug commit - will be reverted

* debug commit - will be reverted

* revert debug commits
2023-12-05 11:26:45 +02:00
Jan Procházka
158bcf692d
Add 120Mhz cpu frequency option to setCpuFrequencyMhz() (#8956)
* Allow setting 120MHz cpu freq

* add 120MHz to C6 frequency menu
2023-12-05 10:59:12 +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
Jan Procházka
374280ccc8
[CI] Add to Boards Test check if build.board is uppercase (#8950)
* Add check if build.board is uppercase

* echo matrix.fqbn
2023-12-05 10:37:32 +02:00
Vojtěch Bartoška
b811ea4087
PR_template_update (#8948) 2023-12-01 16:07:11 +01: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