Esp32 Core version 3 #2144
Conversation
|
Feature: Make IRremoteESP8266 compatible with IDF 5.x ESP32 Version 3 |
|
@NiKiZe code is running on ESP32 S3 With ESP32 Version 3.0.4 without any errors I will try to test with ESP32-DEV & ESP32-C6 this weak |
|
As I understand it, so is #2040, we are grateful for your PR. Just want to limit duplication if there already is a fully working implementation. |
|
#2040 is working perfectly fine. |
|
@Jason2866 - #2040 isn't working on the M5Stack NanoC6 under Arduino IDE. Have commented on the relevant PR I'm able to decode my remote using this pull request |
|
@Jason2866 Tested with ESP32-C6 WROOM1, ESP32 WROVER and the code is working on Esp32 Core version 3. |
|
@NiKiZe @Jason2866 Thank you for feedback did the required changes |
|
oh wow, approved. |
compat with the recent Arduino framework crankyoldgit#2144 Signed-off-by: hldh214 <hldh214@gmail.com>
|
Big thanks to @BorisKofman who did this PR. It works! |
We should have sent this PR a birthday cake two days ago. |
This comment was marked as off-topic.
This comment was marked as off-topic.
|
I last used the one that was in this PR:
https://github.com/BorisKofman/IRremoteESP8266/tree/Espressif-version-3
I'll admit that in my Arduino3 branch, had simply disabled IR support for
now. I really don't cae about anything beyond reading NEC and I'm pretty
sure I can find a solution hat does a lot less that better fits.
I'd looked at
https://docs.espressif.com/projects/esp-idf/en/stable/esp32/api-reference/peripherals/rmt.html
and when I looked at
https://github.com/espressif/esp-idf/blob/fcae32885b0296b32044cb99ecbdc50d98dddb83/examples/peripherals/rmt/ir_nec_transceiver/main/ir_nec_transceiver_main.c#L154
with the thought that I recall only care about IR and receive, making most
of this library just overhead to me, I figured I could probably just snip
out the few dozen lines of that path and get a big part of the way there.
But I've had other blocking issues and just haven't gotten back to it. And
that doesn't help the people that DO need all that goes into this library.
The https://github.com/Arduino-IRremote/Arduino-IRremote project does seem
to be alive, so if you send them a PR or a help request, it might actually
go somewhere.
…On Tue, Sep 30, 2025 at 4:14 PM Jan-Petter Gundersen < ***@***.***> wrote:
*JanPetterMG* left a comment (crankyoldgit/IRremoteESP8266#2144)
<#2144 (comment)>
*While waiting for this PR to get merged*, I was wondering if there are
any good alternatives worth trying.
I’ve looked through the network graph of forks, but none seem to clearly
stand out as both up-to-date and maintained. If there is one I’ve
overlooked, I’d really appreciate a pointer. 👍
In the meantime, I’ve tested a couple of different libraries:
- Arduino-IRremote/Arduino-IRremote: Probably the closest match
overall, but Arduino v3 support seems broken in the latest release. The
last version that works does so with a alarming performance cost.
- Another option I tried, a much smaller library, handled some
protocols flawlessly, but failed to detect others even though they’re
listed as supported.
My main interest is in reliable support for the common protocols (Philips,
Samsung, Sony, etc.).
—
Reply to this email directly, view it on GitHub
<#2144 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ACCSD366TUUCJUMBMK2ZUED3VLXE7AVCNFSM6AAAAABNYYEXR6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZTGNJTHAZDSMRZG4>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
|
I would like to ask whether this PR can function normally with esp-idf 5.5 and arduino3.0? Has anyone tested it? Thank you very much! |
|
@crankyoldgit Is there a planned release that will include the core 3 features added to the master branch? |
|
Yes |
|
@crankyoldgit one question if possible.
makes ESP32 to crash and reboot due to watchdog, this happens even if the RETRY_NUM is set to 1. is there a solution to this problem? |
|
Are you saying that's new after #2144 is applied? If you roll back to the
Arduino 2 layer (this code SHOULD notice this and still build) does the
crash stay or go?
The Arduino3 layer changed some things (a lot of things) but for this
project, it was almost entirely just changing function signatures on the
timers to adapt to new arguments being unused, etc. The change that made
rmtWrite() block shouldn't matter here as this code doesn't directly call
that
<https://docs.espressif.com/projects/arduino-esp32/en/latest/api/rmt.html>.
https://docs.espressif.com/projects/arduino-esp32/en/latest/migration_guides/2.x_to_3.0.html#timer
My own testing from long ago was limited to receiving.
I'd probably try some brute force experimentation with
https://github.com/crankyoldgit/IRremoteESP8266/blob/f66374d087d844184f69522ef296d3336fa052fb/src/IRsend.cpp#L114
just to see if there's a loop that's just a hair over the WDT expiration
and maybe letting it reschedule another task instead of spinwaiting will
stop it from barking.
I'm traveling and can't get to hardware to help debug this. Finding the
call stack of the hung thread is likely going to be a key. Can you get it
in a debugger and identify where it's looping?
…On Tue, Dec 16, 2025 at 3:20 AM Davide Perini ***@***.***> wrote:
*sblantipodi* left a comment (crankyoldgit/IRremoteESP8266#2144)
<#2144 (comment)>
@crankyoldgit <https://github.com/crankyoldgit> one question if possible.
acir.send(RETRY_NUM);
makes ESP32 to crash and reboot due to watchdog, this happens even if the
RETRY_NUM is set to 1.
is there a solution to this problem?
—
Reply to this email directly, view it on GitHub
<#2144 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ACCSD32PHG5QLMTRPP7HEET4B7FGDAVCNFSM6AAAAABNYYEXR6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZTMNJZGU3DQMZVGA>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
|
@robertlipe I don't think that the problem is caused by #2144, the problem is caused by Core 3 it self, not a big issue I think. this loop is what causes the ESP to trigger the watchdog when the repeat param is big enough to trigger it. in my case a repeat of 3 is enough to trigger the watchdog. Adding something like |
|
That's always been forbidden. I suppose if you were just on the edge
before, something got rearranged in the scheduler and it's now being
enforced. Long running things should be off in a thread of their own where
they're free to be put to sleep.
Code originally for 8-bit Arduinos that aren't multitasking (remember,
you're almost always running inside a FreeRTOS environment) and running
network stacks behind your back generally don't have to worry about such
things. Likewise with stack usage. That's a thing you have to care about in
ESP32-land where you can run wild on an Atmega. (Or as wild as you can get
with 2k of ram or whatever...)
As another experiment, you might try tossing a taskYIELD in that loop. That
may break any strict timing requirements you have here, but it would give
the system some breathing room to let other tasks run. Remember that the
watchdog is a symptom, not a cause; if it's barking things like network and
serial and bluetooth and ntp and other things are headed into the guard
rails, too.
…On Tue, Dec 16, 2025 at 5:35 AM Davide Perini ***@***.***> wrote:
*sblantipodi* left a comment (crankyoldgit/IRremoteESP8266#2144)
<#2144 (comment)>
@robertlipe <https://github.com/robertlipe> I don't think that the
problem is caused by #2144
<#2144>, the problem
is caused by Core 3 it self,
Arduino Core 3 does not like long functions that "block" the execution for
a long time without resetting the watchdog.
not a big issue I think.
this loop is what causes the ESP to trigger the watchdog when the repeat
param is big enough to trigger it.
void IRsend::sendSamsungAC(const uint8_t data[], const uint16_t nbytes,
const uint16_t repeat) {
if (nbytes < kSamsungAcStateLength && nbytes % kSamsungAcSectionLength)
return; // Not an appropriate number of bytes to send a proper message.
enableIROut(38);
for (uint16_t r = 0; r <= repeat; r++) {
// Header
mark(kSamsungAcHdrMark);
space(kSamsungAcHdrSpace);
// Send in 7 byte sections.
for (uint16_t offset = 0; offset < nbytes;
offset += kSamsungAcSectionLength) {
sendGeneric(kSamsungAcSectionMark, kSamsungAcSectionSpace,
kSamsungAcBitMark, kSamsungAcOneSpace, kSamsungAcBitMark,
kSamsungAcZeroSpace, kSamsungAcBitMark, kSamsungAcSectionGap,
data + offset, kSamsungAcSectionLength, // 7 bytes == 56 bits
38000, false, 0, 50); // Send in LSBF order
}
// Complete made up guess at inter-message gap.
space(kDefaultMessageGap - kSamsungAcSectionGap);
}
}
in my case a repeat of 3 is enough to trigger the watchdog.
Adding something like
esp_task_wdt_reset();
inside that kind of loop may help solving the problem.
—
Reply to this email directly, view it on GitHub
<#2144 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ACCSD3Z4LAVWRLMZ4TUBFUL4B7VANAVCNFSM6AAAAABNYYEXR6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZTMNRQGA4TAMZYGM>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
|
Have you set Normally the library (with e.g. IRremoteESP8266/src/IRsend.cpp Lines 111 to 142 in f66374d Correction: It will only do that when there is a gap of at least |
Can you provide more context here? Which protocol are you using? Code snippet? |
|
'll provide a pull request later if needed, forgot about it for now. In the meantime, I solved it by feeding the watchdog and calling yield() before: |
**[Bug Fixes]** - Bosch: Fixed the bug where the wind speed was always set to auto. (#2237) - Update IRsend sendHaierAC to include SEND_HAIER_AC160 (#2172) - Gree: Fix reporting vertical swing (#2125) - Fix `decodeYork()` parameter names & defaults. (#2121) - Fix the Coolix fan-only mode in IRac class. (#2104) - Fix missing quiet parameter of haier176 (#2102) - ESP32-C3: Fix compilation error when USB CDC on Boot is enabled (#2080) **[Features]** - Add Fahrenheit support for the BOSCH144 protocol (#2224) - Build: Add compatibility with C++20 (#2040) - Add initial detailed support for Kelon168 (Kelon/Hisense) (#1949) - Add support for the Eurom A/C protocol (#2208) - Add Fahrenheit support for Coolix (#2214) - ESP32: Esp32 Core version 3 support (#2144) - auto_analyse_raw_data: Add kXxMsbFirst to easy change MSBFirst for the full protocol (#2143) - change kAirtonMaxTemp from 25C to 31C (#2124) - Added support for Bluestar Heavy AC (#2120) - Add support of Toshiba Remote Control B (#2094) - Update haier160 & HaierYRWO2 to use quiet in the common class. (#2115) - Internationalisation: Solvakian translation (#2091) - Daikin: Support setting temperature in 0.5 C unit (#2036) - Quiet/Silent Mode for Electra_AC (#1990) **[Misc]** - Document Fischer R51L1/BGE remote support (#2231) - CI: pin python v3.13 - CI: Attempt to fix intelhex failures - IRMQTTServer: Fixes for ArduinoJson v7 to remove depreicated calls - docs: updated contributing section for clarity (by Prerna Utage) (#2221) - Fix typo in Russian language support (#2210) - Build: Update CodeQL actions plugin to use v3 as v2 will be deprecated soon - Build: Fix soon to be deprecated set-output command - Build: Update build scripts to use non-deprecated actions tooling - Fix linter issues (#2173) - pylint fix raw_to_pronto_code.py (#2150) - Document support for Comfee model (#2147) - DAIKIN: ARC443A5 Remote supported note (#2138) - library.json specifies libCompatMode strict (#2111) - Added Electrolux EACM CL/N3 series remote to TCL protocol (#2100) - Add AR-JW19 to supported devices (#2069) - Remove unused constant `kRcmmExcess` (#2033) - Panasonic AC: Document support for PV1122V remote (#2029) - Document support for Panasonic CS-E12QKEW A/C (#2028)
**[Bug Fixes]** - Bosch: Fixed the bug where the wind speed was always set to auto. (#2237) - Update IRsend sendHaierAC to include SEND_HAIER_AC160 (#2172) - Gree: Fix reporting vertical swing (#2125) - Fix `decodeYork()` parameter names & defaults. (#2121) - Fix the Coolix fan-only mode in IRac class. (#2104) - Fix missing quiet parameter of haier176 (#2102) - ESP32-C3: Fix compilation error when USB CDC on Boot is enabled (#2080) **[Features]** - Add Fahrenheit support for the BOSCH144 protocol (#2224) - Build: Add compatibility with C++20 (#2040) - Add initial detailed support for Kelon168 (Kelon/Hisense) (#1949) - Add support for the Eurom A/C protocol (#2208) - Add Fahrenheit support for Coolix (#2214) - ESP32: Esp32 Core version 3 support (#2144) - auto_analyse_raw_data: Add kXxMsbFirst to easy change MSBFirst for the full protocol (#2143) - change kAirtonMaxTemp from 25C to 31C (#2124) - Added support for Bluestar Heavy AC (#2120) - Add support of Toshiba Remote Control B (#2094) - Update haier160 & HaierYRWO2 to use quiet in the common class. (#2115) - Internationalisation: Solvakian translation (#2091) - Daikin: Support setting temperature in 0.5 C unit (#2036) - Quiet/Silent Mode for Electra_AC (#1990) **[Misc]** - Document Fischer R51L1/BGE remote support (#2231) - CI: pin python v3.13 - CI: Attempt to fix intelhex failures - IRMQTTServer: Fixes for ArduinoJson v7 to remove depreicated calls - docs: updated contributing section for clarity (by Prerna Utage) (#2221) - Fix typo in Russian language support (#2210) - Build: Update CodeQL actions plugin to use v3 as v2 will be deprecated soon - Build: Fix soon to be deprecated set-output command - Build: Update build scripts to use non-deprecated actions tooling - Fix linter issues (#2173) - pylint fix raw_to_pronto_code.py (#2150) - Document support for Comfee model (#2147) - DAIKIN: ARC443A5 Remote supported note (#2138) - library.json specifies libCompatMode strict (#2111) - Added Electrolux EACM CL/N3 series remote to TCL protocol (#2100) - Add AR-JW19 to supported devices (#2069) - Remove unused constant `kRcmmExcess` (#2033) - Panasonic AC: Document support for PV1122V remote (#2029) - Document support for Panasonic CS-E12QKEW A/C (#2028)
_v2.9.0 (20260103)_ release **[Bug Fixes]** - Bosch: Fixed the bug where the wind speed was always set to auto. (#2237) - Update IRsend sendHaierAC to include SEND_HAIER_AC160 (#2172) - Gree: Fix reporting vertical swing (#2125) - Fix `decodeYork()` parameter names & defaults. (#2121) - Fix the Coolix fan-only mode in IRac class. (#2104) - Fix missing quiet parameter of haier176 (#2102) - ESP32-C3: Fix compilation error when USB CDC on Boot is enabled (#2080) **[Features]** - Add Fahrenheit support for the BOSCH144 protocol (#2224) - Build: Add compatibility with C++20 (#2040) - Add initial detailed support for Kelon168 (Kelon/Hisense) (#1949) - Add support for the Eurom A/C protocol (#2208) - Add Fahrenheit support for Coolix (#2214) - ESP32: Esp32 Core version 3 support (#2144) - auto_analyse_raw_data: Add kXxMsbFirst to easy change MSBFirst for the full protocol (#2143) - change kAirtonMaxTemp from 25C to 31C (#2124) - Added support for Bluestar Heavy AC (#2120) - Add support of Toshiba Remote Control B (#2094) - Update haier160 & HaierYRWO2 to use quiet in the common class. (#2115) - Internationalisation: Solvakian translation (#2091) - Daikin: Support setting temperature in 0.5 C unit (#2036) - Quiet/Silent Mode for Electra_AC (#1990) **[Misc]** - Document Fischer R51L1/BGE remote support (#2231) - CI: pin python v3.13 - CI: Attempt to fix intelhex failures - IRMQTTServer: Fixes for ArduinoJson v7 to remove depreicated calls - docs: updated contributing section for clarity (by Prerna Utage) (#2221) - Fix typo in Russian language support (#2210) - Build: Update CodeQL actions plugin to use v3 as v2 will be deprecated soon - Build: Fix soon to be deprecated set-output command - Build: Update build scripts to use non-deprecated actions tooling - Fix linter issues (#2173) - pylint fix raw_to_pronto_code.py (#2150) - Document support for Comfee model (#2147) - DAIKIN: ARC443A5 Remote supported note (#2138) - library.json specifies libCompatMode strict (#2111) - Added Electrolux EACM CL/N3 series remote to TCL protocol (#2100) - Add AR-JW19 to supported devices (#2069) - Remove unused constant `kRcmmExcess` (#2033) - Panasonic AC: Document support for PV1122V remote (#2029) - Document support for Panasonic CS-E12QKEW A/C (#2028)
Fixes #2039