Commit graph

901 commits

Author SHA1 Message Date
Rodrigo Garcia
224e778b8e
Makes Gamepad example able to be tested with Windows 10/11 (#8058)
* Makes sure it can be tested with Windows 10/11

Initial code had no effect with Win10/11 because BUTTON_START was not recognized.
This change makes it visible in the Windows Game Controller Testing TAB.

* Examples tests all USB gamepad APIs.

It is possible to change the selected gamepad button when pressing BOOT (long/short press).
The selected button is used as parameter to change R/L Stick and Trigger as well as the Hat.
2023-04-10 23:43:09 +03:00
Sanket Wadekar
ab7ce5a511
Add Insights in Rainmaker Switch example (#8011)
* insights: add support for custom transport

* Added insights in rainmaker switch example
2023-04-10 17:46:02 +03:00
Dirk O. Kaar
b98255d8d1
Completely inline the helper pure abstract __FlashStringHelper class (#7941)
* Remove __FlashStringHelper from ESP32, it's not needed - all the files using it are different from their ESP8266 counterparts anyway.

* Revert removal of class __FlashStringHelper forward for continued compatibility with external libs

* Improved fix, works for libs that return const __FlashStringHelper*

* Inline all wrappers using const __FlashStringHelper*.
2023-04-06 13:32:21 +03:00
Jaxon
298442d4b2
new variant Seeed XIAO_ESP32S3 (#7971)
* new variant Seeed XIAO_ESP32S3

* add pin define for camera example

* Remove excess comments and fix minor errors

---------

Co-authored-by: Jan Procházka <90197375+P-R-O-C-H-Y@users.noreply.github.com>
2023-04-04 13:45:18 +03:00
Manuel Philipp
7fd956db23
in BluetoothSerial.setTimeout also set timeout for parent class Stream. (#7924) 2023-03-31 14:56:06 +03:00
Thomas
bef8a75ead
Added HTTPUpdate request callback (#7934)
* Added HTTPUpdate request callback

* Fixed compile issue for example

---------

Co-authored-by: Me No Dev <me-no-dev@users.noreply.github.com>
2023-03-31 14:51:03 +03:00
Sanket Wadekar
c6b850b13d
Rainmaker: Added enableSystemService API (#7875)
* Rainmaker: Added enableSystemService API

* Fixed broken links in espnow docs
2023-03-31 14:46:27 +03:00
Sanket Wadekar
c0737f53f2
Fixed memory leaks in rainmaker examples (#7965)
* task: Added Rainmaker partition to esp32 wrover and
s3 box

* fix: memory leaks in rainmaker examples

* Rainmaker: Improved error log messages

* task: format Rainmaker examples
2023-03-31 13:46:48 +03:00
Me No Dev
bad5af9e1c
Add support for large uploads to HTTPClient (#8006) 2023-03-31 13:39:38 +03:00
Rohit Samineni
82de3429cb
corrected spelling mistake (#8012) 2023-03-31 13:37:55 +03:00
Tomáš Pilný
62640b3c92
Swapped enable_led() and isStreaming setup (#8017) 2023-03-31 13:36:47 +03:00
David McCurley
6d64a3b634
WiFiUDP:parsePacket() Crashfix (#7847)
* Update WiFiUdp.cpp

* Update WiFiUdp.cpp
2023-02-20 13:30:40 +02:00
Tomáš Pilný
b8ea455f45
Fix for negative temp in Eddystone TLM; solving #7618 (#7791)
* Changed data type of temperature

* Changed data type in EddystoneTLM class and example

* Revert "Changed data type in EddystoneTLM class and example"

This reverts commit 1f3a9414ee13341f80bd6d51cdbd57254aadfe97.

* Draft of Eddystone TLM example

* Adds MACROs to convert beacon temperature 

2 Macros
EDDYSTONE_TEMP_U16_TO_FLOAT(tempU16)  - takes the TLM BigEndian 8.8 fixed point representation and returns its float value 
EDDYSTONE_TEMP_FLOAT_TO_U16(tempFloat)  - takes a float (temperature) and returns its BigEndian 8.8 fixed point representation

* Fixed temp

* Changed to conform with PR comments

* Fixed comment on closing bracket

* Prints negative TEMP big endian as just 2 bytes

* Extacts correct Eddyston Service Data

* Fixes BLEEddystoneTLM::toString() negative temp

* Fixes URL field length

* Fixes Eddystone URL decoding

* Fixes MSB for iBeacon UUID

iBeacons use big endian BLE fields.

* Fix to detect iBeacon that also has Service UUID

This fix makes the BLE_iBeacon.ino to work correctly with the BLE_Beacon_Scanner.ino example

---------

Co-authored-by: Rodrigo Garcia <rodrigo.garcia@espressif.com>
2023-02-20 13:30:04 +02:00
Tomáš Pilný
23f653ad8d
General examples updates (#7727)
* Remove inline code comments for the struct description

* Renamed ESPNow examples

* Changed example from C++ class to C struct

* Updated MultiHomedServers

* Updated BT Serial examples

* Added short overview of exaples - missing Enterprise

* Added draft of Enterprise header note

* Fixed note in README

* Fixed compilation error

* Changed FunctionalInterrupt example

* Fixes

* Returned FunctionalInterrupts to original state + added modified version as new example
2023-02-15 15:54:25 +02:00
s-hadinger
024ba74068
Register Ethernet netif in WiFiGeneric to (#7632)
Co-authored-by: Me No Dev <me-no-dev@users.noreply.github.com>
2023-02-15 14:22:04 +02:00
Rodrigo Garcia
211ba18fa5
Adds onDisconnect() BLE param (#7851) 2023-02-15 13:28:17 +02:00
Tomáš Pilný
2ddce3c1f2
Added methods + example to retrive local MAC for BT (#7778)
* Added methods + example to retrive local MAC for BT

* Added .skip files in the new example folder

* Fixed typos and formatting + added doxygen comments

* changed std::string to String

* another std::string -> String

* Changed std::string to String

* chaged string type in example
2023-02-13 12:32:47 +02:00
Rodrigo Garcia
efe966d506
Avoid starting AP Mode even when the password is too short (#7832)
* Avoid starting AP Mode even when the password is too short

* Check SoftAP return code in case of failure
2023-02-13 12:28:50 +02:00
Tomáš Pilný
e881d11bdb
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
2023-02-08 17:42:19 +02:00
Krzysiek S
7818fd3363
Allow passing IP as connect method parameter in WiFiClientSecure and skip unnecessary host-ip conversions (#7643) 2023-02-06 21:11:22 +02:00
tmfarrington
1e1dd8b575
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>
2023-02-06 19:36:16 +02:00
Tomáš Pilný
7b72da608a
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 160be7e67a10d01b6e44c4bf2521c0ccd6348976.

* 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>
2023-02-06 17:25:58 +02:00
rtpmsys
e18f08ede5
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>
2023-02-06 15:09:14 +02:00
Nima Askari (نیما عسکری)
ba5318338b
Fix Name (#7691)
Wrong name in definitions.
2023-02-06 15:05:31 +02:00
Nima Askari (نیما عسکری)
7edac6d042
Change header gaurd name (#7696) 2023-02-06 15:04:19 +02:00
Rodrigo Garcia
03e9e07f1a
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
2023-02-06 14:55:41 +02:00
Tomáš Pilný
ce497194a7
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>
2023-02-06 14:54:11 +02:00
Rodrigo Garcia
a13520c966
Fix commentary (#7800)
Minor fix based on observation done in https://github.com/espressif/arduino-esp32/issues/7795#issuecomment-1416868611
2023-02-06 14:29:58 +02:00
Rodrigo Garcia
d69b888822
Adds softAp(String) to make it compatible with ESP8266 (#7801) 2023-02-06 14:29:32 +02:00
Pedro Minatel
23d715af1b
Added ESP32-S3 link to the datasheet (#7738) 2023-01-20 15:18:51 +00:00
Pedro Minatel
f1b06d2a74
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
2023-01-17 15:28:39 +01:00
TANAKA Masayuki
a95d838aab
Fix typo T0 -> T1 touch example 2023-01-12 15:19:09 -03:00
Me No Dev
d158aa6f5b
Fix BluetoothSerial compilation caused by upstream change (#7681)
Fixes: https://github.com/espressif/arduino-esp32/issues/7675

The signature of `esp_spp_cb_t` has changed in recent ESP-IDF v4.4.3, so this fix targets to accomodate that change in Arduino
2023-01-12 09:55:43 +02:00
Sanket Wadekar
7c79cdd6e3
Fixed issue where esp32 won't reconnect to WiFi AP if the AP was restarted. (#7512)
* Fixed issue where esp32 won't reconnect to WiFi AP if the AP was restarted

* Added the autoReconnect condition and removed the reconnect reason

* Chenges on the WiFi reconnection and added new example

* Added new line at the end

* Changes reverted with some minor changes. New example remained

* Changes reverted and sync

Co-authored-by: pedro.minatel <pedro.minatel@espressif.com>
2022-12-22 17:43:26 +02:00
Sanket Wadekar
161b1673d9
Draft: Esp insights library support (#7566)
* ESP Insights: Added library support

* ESP Insights: Added Examples

* ESP Insights: Added custom partitions file

* ESP Insights: Added API documentation.

* Added recipe and script to create Insights package

* Updated ESP Insights examples.

* Changed Insights Firmware package output directory

* Changed license to include SPDX license

* Fix Insights package for Windows

* Updated .exe of insights script

* Added coredump partition to all schemes

* Updated header files of Insights diagnostics

* hotfix: Added elf-sha256-offset flag in elf2bin
builder

* Update API to be more Arduino-like and partitions offsets

Co-authored-by: Me No Dev <me-no-dev@users.noreply.github.com>
2022-12-22 17:42:56 +02:00
Curry
bb8c8559b6
Fix potential CORRUPT HEAP problem on libraries/BLE/src/BLEDevice.cpp (#7597)
* Update BLEDevice.cpp

fix potential CORRUPT HEAP problem

* move mux to BLEDevice class
2022-12-21 19:59:40 +02:00
Rodrigo Garcia
5dff15ce9d
Fixes inconsistencies and adds extended HardwareSerial examples (#7412)
* adds extended HardwareSerial examples

* Adds new example with Serial RxTimeout

* adds and improves Serial onReceive expamples

* adjust includes CMake - UART example

* adjust includes CMake - UART example

* fixes CMake and CI

* adds ESP/Serial to CMakeList

* adds ESP/Serial to CMakeList

* fixes demo include

* fixes BREAK demo

* fixes onReceive demo

* Changes FIFO Full criteria

Changed the "1-by-1" Serial only when baud rate is 57600 or lower.

* example code replacement

* replaces functions in hal
2022-12-21 18:47:17 +02:00
Rotzbua
a6fefb20fe
Update WiFiScan example to show more useful data (#7378)
* Update `WiFiScan` example to show more useful data

* Add channel to output.
* Add type of encryption to output.
* Format output as table.
* Update outdated example description.
* Add `scanDelete()` as hint to free memory.

* added 32 chars SSID + readme edit

Co-authored-by: Jan Procházka <90197375+P-R-O-C-H-Y@users.noreply.github.com>
2022-12-21 18:46:33 +02:00
Bob Igo
e9c125fb22
replaced original BLE_iBeacon.ino example with a known-good one (#7470)
* replaced original iBeacon example with a known-good one

* addressed VojtechBartoska's comment

* incorporated P-R-O-C-H-Y's change

Co-authored-by: Jan Procházka <90197375+P-R-O-C-H-Y@users.noreply.github.com>
2022-12-21 16:35:56 +01:00
Robert Byrnes
947ee6fd62
refactor(toString method): Add RSSI / serviceData (#7561)
* refactor(toString method):  Add RSSI / serviceData

These are key characteristics of the BLE advertising packet. Really useful, adding to this method allows data to be easily obtained and passed over TCP/IP for processing.

* fix: remove line 565 bug
2022-12-19 15:52:35 +02:00
Jovan Frandika
d08e9005b3
chore: add err name to EEPROMClass commit method's error log (#7598) 2022-12-19 15:14:09 +02:00
aridet
1ad5406946
Fix BluetoothSerial thinking it's disconnected (#7372)
Currently, if a second connection occur in Bluetooth, this second connection is automatically disconnected (line 284).
This disconnection trigger the ESP_SPP_CLOSE_EVT, which clear the bit SPP_CONNECTED.
But the first connection remain active, and this flag shouldn't be cleared.

This fix the issue, by clearing the flag only if the last connection is closed

Co-authored-by: Rodrigo Garcia <rodrigo.garcia@espressif.com>
2022-12-19 15:02:18 +02:00
Paolo Messina
72e79f0527
Fix ETH link status, missing duplex mode, IDF version check (#7593)
Co-authored-by: Rodrigo Garcia <rodrigo.garcia@espressif.com>
2022-12-19 12:46:02 +02:00
Andreas Merkle
f487d89c9d
Performance improvements by replacing sprintf with strcpy/strcat. Additional avoid creating temporary String objects. (#7541)
Co-authored-by: Jan Procházka <90197375+P-R-O-C-H-Y@users.noreply.github.com>
2022-12-19 12:45:36 +02:00
Sanket Wadekar
8004a81260
Rainmaker Example Changes (#7591)
* Changed OTA type in Rainmaker examples

* fix: Added patch in Rainmaker examples
to prevent crashes during provisioning
2022-12-15 12:46:58 +02:00
RM-Alltrons
5d614f5238
Added onDisconnect with gatt parameters to BLUEServerCallbacks, equivalent to the existing onConnect (#7559)
Co-authored-by: Admin <admin@wlan-244060.nbw.tue.nl>
2022-12-14 17:17:20 +02:00
vortigont
27e6f35f69
DNSServer fix custom code replies (#7475)
custom code reply was sending garbage from a buffer instead of crafted DNS header
2022-12-14 17:06:44 +02:00
loRe
5bc37a701b
Fix wrong environment variable: MKSPIFFSTOOL. (#7537)
MKSPIFFSTOOL in PlatformIO has been changed to MKFSTOOL.
2022-12-14 16:55:44 +02:00
vortigont
9275dbff94
WiFiGeneric: remove deprecated tcpip_adapter calls (#7577)
replaced old tcp function call with ESP-NETIF API
2022-12-12 12:23:51 -03:00
Me No Dev
7c0934600c
Fix conflict with ESP-IDF's esp_crt_bundle (#7560) 2022-12-10 13:38:44 -03:00
Peter Hindes
e355370cbe
Avoid collision with tinyusb hid.h enums (#7463) 2022-12-08 23:33:48 -03:00
Tomáš Pilný
bf21695bac
Added example scanning maximum ledc frequencies (#7460) 2022-12-08 23:15:10 -03:00
Jan Procházka
ba68f318f4
Updated camera example (#7533) 2022-12-08 10:46:19 -03:00
Bert Melis
394f7218ba
fix set/getSocketOption inheritance (#7480) 2022-12-07 23:20:01 -03:00
Krzysiek S
05e55d8716
Fix unnecessary DNS query in hostByName and deadlock in ssl_client (#7351)
* Fix hostByName to avoid asking DNS when valid IP is passed via hostname param
* Fix hanging in send_ssl_data
2022-12-07 18:27:02 -03:00
Lucas Machado
04693c6660
Implements seekDir and getNextFileName on FS Lib to improve performance (#7229)
* Implements seekDir and getNextFileName on FS lib to improve performance
* getNextFileName return String directly
2022-12-07 17:18:29 -03:00
Darian
9006751632
TWAI: Add receive example (#7550)
This commit addes an example showing how to receive messages using the TWAI
driver interface and a CAN transceiver. Specifically, the example demonstrates:

- How to configure and install the TWAI drvier
- How to poll for TWAI events (i.e., alerts) using twai_read_alerts()
- How to handle the various events (such as TWAI_ALERT_RX_DATA)

Closes https://github.com/espressif/arduino-esp32/pull/7430

Co-authored-by: Stephan Martin <designer2k2@gmail.com>
2022-12-05 18:12:24 +02:00
Sanket Wadekar
fd72cf46ad
Changed Rainmaker WiFi/Factory reset time. (#7514) 2022-11-25 14:20:57 +02:00
Sanket Wadekar
5737016cdd
Add enableScenes API in Rainmaker (#7436)
* Added enableScenes API

* Added enableScenes API documentation

* Added enableScenes API to example

Co-authored-by: Jan Procházka <90197375+P-R-O-C-H-Y@users.noreply.github.com>
2022-11-14 14:27:20 +00:00
Jan Procházka
7a76aded54
Add touch sleep wakeup API (#7439) 2022-11-09 14:17:46 -03:00
David McCurley
bd71449988
WiFi Should Reconnect For Most Reasons (#7344)
Improves WiFi reconnection
2022-11-07 14:56:23 -03:00
John
64bbcd2678
Correct Spelling of addTemperatureParam in ESP Rainmaker (#7288)
* Update RMakerDevice.h

Changer spelling of addTemprature

* Update RMakerDevice.cpp

Cahnge Spelling of add TempratureParam

* Update README.md

Update documentation addTemperatureParam
2022-11-02 13:22:43 +02:00
Rotzbua
4ac71d2a7f
[BLE Client] Fix deadlock if connection loss ... (#7319)
... while readValue
2022-11-02 13:07:47 +02:00
Sanket Wadekar
c8da793c95
Fixes to Rainmaker OTA Issues (#7324)
* Added OTA Event Handlers

* Overrided verifyRollbackLater Method

Co-authored-by: Rodrigo Garcia <rodrigo.garcia@espressif.com>
2022-11-02 13:06:39 +02:00
YOSHIKI
e01f175dbd
Remove unused variable (#7403) 2022-11-02 12:43:31 +02:00
Juan Luis Leal Contreras
f4d8a481ad
Fixed #7406 crash on WiFi STA_DISCONNECTED event with reason 0 (#7414)
Fixed #7406 . The "reason2str" macro in WiFiGeneric.cpp tries to read memory from index "-1"  in "system_event_reasons" array when handling STA_DISCONNECTED event with reason 0. Dealing with reason 0 as a reason 1 (WIFI_REASON_UNSPECIFIED) will solve the problem (the reason for this event to arrive with reason 0 is unknown). #7406
2022-11-02 12:30:43 +02:00
WereCatf
d3ccd2a961
FreeRTOS.ino: fix usage of vTaskDelay (#7418)
The original code assumes 100Hz FreeRTOS tick rate and just supplies vTaskDelay with the assumed number of ticks required for the wanted delay. This patch simply fixes it to use portTICK_PERIOD_MS, thereby working correctly regardless of what tick rate FreeRTOS has been configured to run at.
2022-11-02 11:58:12 +02:00
RefactorFactory
ccf0d877d8
Fix race condition with USBHID semaphore (#7205)
The HID semaphore allows USBHID::SendReport() to wait for the completion of
report sending.

With a zero timeout xSemaphoreTake() after calling tud_hid_n_report(),
occasionally, the following would happening:

1. USBHID::SendReport() would send a report by calling tud_hid_n_report().
2. The send would complete and (presumably on another thread)
   tud_hid_report_complete_cb() would be called and it would xSemaphoreGive()
   the semaphore.
3. In USBHID::SendReport(), the zero timeout xSemaphoreTake(sem, 0) would
   succeed, taking the semaphore.
4. On the next line, xSemaphoreTake(sem, timeout_ms ...) would timeout
   because the semaphore was already taken by the previous line of code.

The result would be waiting timeout_ms for no reason.

The purpose of the zero timeout xSemaphoreTake() is to clear the semaphore in
case a previous SendReport() timed out waiting for the semaphore. In that case,
tud_hid_report_complete_cb() may be called after the timeout, giving the
semaphore. Then the next SendReport() would start with the semaphore given,
which isn't desired if we want to call xSemaphoreTake(sem, timeout_ms ...) on
it.

There have also been other cases where tud_hid_report_complete_cb() is called
an extra time, causing the same situation.

The fix is to move the zero timeout xSemaphoreTake() before the call to
tud_hid_n_report(). This eliminates the race between the zero timeout
xSemaphoreTake() and tud_hid_report_complete_cb() in the common case when no
timeout occurs.

There is still a possible race condition between the zero timeout
xSemaphoreTake() and tud_hid_report_complete_cb() in the case of a timeout,
but that should be rarer.
2022-09-17 08:05:25 +03:00
Sanket Wadekar
7231551f56
Fixed Rmaker OTA crash issue #5420 (#7242)
Co-authored-by: Rodrigo Garcia <rodrigo.garcia@espressif.com>
2022-09-14 11:54:55 +03:00
Rodrigo Garcia
ebc8a15e0e
Add new ULP example for ESP32 (#7221)
Co-authored-by: Jan Procházka <90197375+P-R-O-C-H-Y@users.noreply.github.com>
2022-09-14 11:44:12 +03:00
Tomáš Pilný
74964e197d
Updated warning message displayed when building as IDF component (#7220) 2022-09-14 11:42:55 +03:00
RefactorFactory
2e72894a4b
USBHIDKeyboard: Fix 200ms delay for every key (#7218)
Arduino-esp32 2.0.4 was released with a version of TinyUSB hid_device.h
that uses uint16_t for the last argument:

https://github.com/espressif/arduino-esp32/blob/2.0.4/tools/sdk/esp32s2/include/arduino_tinyusb/tinyusb/src/class/hid/hid_device.h

    TU_ATTR_WEAK void tud_hid_report_complete_cb(uint8_t instance, uint8_t const* report, uint16_t len);

But USBHID implements this callback with uint8_t:

https://github.com/espressif/arduino-esp32/blob/2.0.4/libraries/USB/src/USBHID.cpp

    void tud_hid_report_complete_cb(uint8_t instance, uint8_t const* report, uint8_t len){
        if (tinyusb_hid_device_input_sem) {
            xSemaphoreGive(tinyusb_hid_device_input_sem);
        }
    }

The result is that when USBHIDKeyboard sends a report to the host, it
times out, waiting 100 ms for the callback to be called. It does this
once for pressing the key and once for releasing the key, so
100 ms * 2 = 200 ms.

The latest version of hid_device.h reverts the last argument to uint8_t:

860b104691/tools/sdk/esp32s2/include/arduino_tinyusb/tinyusb/src/class/hid/hid_device.h

    TU_ATTR_WEAK void tud_hid_report_complete_cb(uint8_t instance, uint8_t const* report, /*uint16_t*/ uint8_t len );

But these commits suggest that the last argument will eventually be
changed to uint16_t:

556b5d5044

    change report len in hid API from uint8_t to uint16_t

    since HS interrupt endpoint can be up to 1024, 8-bit is not enough.
    affected APIs are:
    - tud_hid_n_report() / tud_hid_report()
    - tud_hid_report_complete_cb()

b495d6f8ec

    temporarily revert len back to uint8_t in tud_hid_report_complete_cb() for up coming release

To prevent this from becoming broken again, in preparation for the change
to uint16_t, make USBHID resilient to any type for the last argument for
tud_hid_report_complete_cb() by using some C++ template metaprogramming,
adapted from https://stackoverflow.com/a/22632571.

Co-authored-by: Rodrigo Garcia <rodrigo.garcia@espressif.com>
2022-09-14 11:42:19 +03:00
Tomáš Pilný
0882ea0919
Fixed the ability to change CHANNEL (#7154)
* Removed option to change CHANNEL

* Revert "Removed option to change CHANNEL"

This reverts commit b2ec27de1d2d4703a15f6397550a46896413828a.

* Fixed the ability to change CHANNEL

* WiFi scan only on selected channel
2022-09-14 11:28:42 +03:00
Sanket Wadekar
77065bffb2
Fixed espressif/esp-rainmaker#152 (#7171) 2022-08-29 12:36:51 +03:00
Rodrigo Garcia
fe1d9e00d5
Fixes Cookie Case Sensitivity (#7112)
Co-authored-by: Jan Procházka <90197375+P-R-O-C-H-Y@users.noreply.github.com>
2022-08-16 12:07:24 +02:00
Tomáš Pilný
d9ac65f291
Fixed CHANNEL in ESPNow example (#7104)
Co-authored-by: Vojtěch Bartoška <76958047+VojtechBartoska@users.noreply.github.com>
Co-authored-by: Jan Procházka <90197375+P-R-O-C-H-Y@users.noreply.github.com>
2022-08-16 09:58:22 +02:00
WebDust21
0260cd66a3
WebServer: rename & expose internal 'contentLength' variable for POST… (#7012) 2022-08-11 08:44:22 -03:00
vortigont
46478092ec
UpdateClass - speedup flash erase/writes (#7002)
- on flash writes try to use large block erase
 - skip writing empty blocks of data after erase
 - more accurate block calculations
2022-08-10 13:28:46 -03:00
20162026
cb3ffd0b44
Add full setsocketoption to WifiClient and WifiClientSecure (#7030) 2022-08-08 16:25:37 -03:00
Rodrigo Garcia
60c4eea0d4
Fixes LwIP INADDR_NONE conflict (#7059) 2022-08-01 10:15:47 -03:00
Rodrigo Garcia
852ea39ab1
Adds default Wire1 pins auto-setup (#7034) 2022-08-01 09:58:54 -03:00
Dr. Christian Kohlschütter
943216308d
WiFiClientSecure: Fix warning about missing PSK-based ciphersuites (#7020)
Make the warning actionable by pointing at the right setting in Kconfig.
2022-07-28 10:33:46 -03:00
Rodrigo Garcia
9bceb280e3
Adds Wire::setBufferSize function (#7016) 2022-07-28 10:15:31 -03:00
ZYJ
178aee8334
Update WiFiGeneric.cpp (#7044)
Changes WiFi Static TX Cache Buffer Number to 4 in order to avoid issues with sending more than 1 packet at the same time.
2022-07-28 00:13:04 -03:00
Ryan Downing
fef932c1a0
added http code param to WebServer.streamFile (#6899) (#6995) 2022-07-26 13:06:07 -03:00
Michael Ammann
e67bc02034
WifiGeneric.cpp FIX ifdef should match function call (#7004)
otherwise the compiler will complain about unused variable event

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>
2022-07-26 17:40:06 +02:00
Rodrigo Garcia
45f4bef989
Fixes Arduino Wire::begin overload (#7000)
Makes Wire::begin() fully compatible with Arduino mainstream (Master/Slave)
2022-07-26 06:53:47 -03:00
Tomáš Pilný
5f427c998a
Added #include <vector> into BLEAdvertisedDevice.h (#6990)
Co-authored-by: Rodrigo Garcia <rodrigo.garcia@espressif.com>
2022-07-20 10:51:58 -03:00
Tomáš Pilný
cc08dd3153
Added keywords.txt with RGB_BUILTIN into libraries/ESP32 (#7015)
Co-authored-by: Rodrigo Garcia <rodrigo.garcia@espressif.com>
2022-07-20 10:32:22 -03:00
santaimpersonator
05ae83a051
Improve RGB driver in pull #6808; solves #6968 (#6979)
* Improve RGB LED Driver

Replaces the use of the `LED_BUILTIN` variable by creating a new variable called `RGB_BUILTIN`. On boards with both a regular LED and RGB LED, this change provides functionality to control either LED.

The `LED_BRIGHTNESS` variable is changed to `RGB_BRIGHTNESS`, which aligns more closely with the `RGB_BUILTIN` variable name.

`BOARD_HAS_NEOPIXEL` is no longer necessary; it is replaced by `RGB_BUILTIN`.

* Update BlinkRGB example

Update example code for changes with the RGB driver:
- Replace `LED_BUILTIN` and `BOARD_HAS_NEOPIXEL` with `RGB_BUILTIN`
- Replace `LED_BRIGHTNESS` with `RGB_BRIGHTNESS`

* Update board variants

Update board variants for changes with the RGB driver:
- Remove `BOARD_HAS_NEOPIXEL`
- Define `RGB_BUILTIN` pin
- Replace `LED_BRIGHTNESS` with `RGB_BRIGHTNESS` to align with `RGB_BUILTIN` name

Co-authored-by: Rodrigo Garcia <rodrigo.garcia@espressif.com>
Co-authored-by: Vojtěch Bartoška <76958047+VojtechBartoska@users.noreply.github.com>
2022-07-18 15:34:01 +02:00
Tomáš Pilný
53a097b098
CameraWebServer example fix (#6993)
* CameraWebServer compilation fix for verbose debug level

* Added missing initializers

Co-authored-by: Rodrigo Garcia <rodrigo.garcia@espressif.com>
2022-07-18 15:07:48 +02:00
Neale Petrillo
08f26cc71a
Added dont_mount option to conf initialization (#6953)
With recent compiler update, the following warning is generated: 

packages/esp32/hardware/esp32/2.0.4/libraries/LittleFS/src/LittleFS.cpp:85:5: warning: missing initializer for member 'esp_vfs_littlefs_conf_t::dont_mount' [-Wmissing-field-initializers]

This commit adds the missing identifier.

Co-authored-by: Jan Procházka <90197375+P-R-O-C-H-Y@users.noreply.github.com>
2022-07-15 14:50:02 +02:00
sivar2311
c93bf11f1e
Rainmaker library extension (#6813)
* Added definitions for various parameters and UI types.

* Overload for `const char*` added.

* Function `addValidStrList` added.
This is needed for mode parameters (see example RMakerCustomAirCooler.ino).

* Example of a custom device that uses toggle, mode and range parameters.

* Revert: Added definitions for various parameters and UI types.

* Fixed declaration for addValidStrList

* Fixed missing gpio definition for ESP32C3 target

Co-authored-by: Me No Dev <me-no-dev@users.noreply.github.com>
2022-07-06 12:33:48 +03:00
Tomáš Pilný
1b1c36ec02
WIP; Reworked HiFreq_ADC example; Closing #6832 (#6917)
Description of Change

Original code does not work (crashing) - related issue #6832 - now fixed.
Extended description to be more helpful.
Added options to modify the setup at the top of the code via constants.
Added option do plot with Arduino Serial plotter.
Even if the crashing was solved alone the ledc PWM would not output any signal.

Tests scenarios

Tested on ESP32 with oscilloscope and signal generator.

Related links

Closing #6832
2022-07-06 12:16:59 +03:00
Anx2k
949aa27f43
Update ssl_client.cpp (#6942)
Fixed issue with ssl_client->socket being closed without being consistently set to -1.  Changed close to lwip_close to be consistent with lwip_socket, resolved issue with long term assert after 4+ days (assert failed: lock_release_generic locks.c:186).

Co-authored-by: Me No Dev <me-no-dev@users.noreply.github.com>
2022-07-06 12:15:57 +03:00
Rotzbua
cf01523ded
Doc: Add doc about minimum security for connection to AP (#6909)
* Add troubleshooting to connect to WEP/WPA APs.
* Add troubleshooting about WPA3 support.
2022-06-28 12:38:24 +03:00
Rodrigo Garcia
cb52e569ae
Fixes BLE Server descriptor update (#6919)
Description of Change

This PR fixes an issue related to BLE Server and Descriptors.

The issue:
If the BLE Server code changes its own descriptors, it is not reflected in the GATTS database.
BLE2902 CCCD also didn't reflect any changes to the GATTS database.
Because of this issue, the client could never read the real Descriptor values from the remote Server.

Tests scenarios

Tested with ESP32.

Related links

Fixes #6863
Fixes #6868
2022-06-28 12:29:49 +03:00
Rotzbua
95a45ce259
Doc: Update deprecation of setAutoConnect, etc.. (#6908)
* Doc: Update deprecation of `setAutoConnect`...

... and `getAutoConnect`

* Doc: Add doc to `setAutoReconnect`..

.. and `getAutoReconnect`
2022-06-27 14:01:00 +03:00
lbernstone
43e5e02224
Added maxOpenFiles to SDMMC (#6912) 2022-06-25 16:30:40 +03:00
Tomáš Pilný
097ff8b1f5
Implement simple RGB driver via digitalWrite; solving #6783 (#6808)
* Initial implementation of RGB driver via digitalWrite

* Moved constants to pins_arduino.h

* Changed pin definition + added example

* Wrapped BlinkRGB in #ifdef BOARD_HAS_NEOPIXEL

* Removed forgotten log from example

* Moved RGBLedWrite to new file esp32-hal-rgb-led and created pinMode in variatn.cpp

* Updated example - lowered single channel brightness to LED_BRIGHTNESS

* Changed function name from RGBLedWrite to neopixelWrite + code polishing

* Moved pinSetup portion related to RGB back to common file
2022-06-24 14:04:03 +03:00