IRremoteESP8266 icon indicating copy to clipboard operation
IRremoteESP8266 copied to clipboard

Esp32 Core version 3

Open BorisKofman opened this issue 1 year ago • 25 comments

Fixes #2039

BorisKofman avatar Sep 06 '24 14:09 BorisKofman

Duplicate of #2040 / #2039 ?

But please provide an explanation if this has any improvements over the other.

NiKiZe avatar Sep 06 '24 15:09 NiKiZe

Feature:

Make IRremoteESP8266 compatible with IDF 5.x ESP32 Version 3

BorisKofman avatar Sep 08 '24 14:09 BorisKofman

@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

BorisKofman avatar Sep 08 '24 14:09 BorisKofman

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.

NiKiZe avatar Sep 08 '24 15:09 NiKiZe

Thanks @NiKiZe, With #2040 I get error: timer is not enabled yet I will try to test my Code with IDF 5.x and much Boards that I can Currently tested "IDF 5.X" with S3. Tomorrow will try with C6 and esp32-dev. Then I will revert to ESP32 board version 2 to test again with S3 & DEV boards Thanks!

BorisKofman avatar Sep 08 '24 16:09 BorisKofman

#2040 is working perfectly fine.

Jason2866 avatar Sep 14 '24 15:09 Jason2866

@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

Buddy-Matt avatar Sep 16 '24 23:09 Buddy-Matt

@Jason2866 Tested with ESP32-C6 WROOM1, ESP32 WROVER and the code is working on Esp32 Core version 3. Thanks!

BorisKofman avatar Sep 17 '24 07:09 BorisKofman

@NiKiZe @Jason2866 Thank you for feedback did the required changes Thanks!

BorisKofman avatar Sep 17 '24 13:09 BorisKofman

I would suggest this: https://github.com/crankyoldgit/IRremoteESP8266/compare/master...NiKiZe:IRremoteESP8266:ForPr2144?expand=1

Or to see my suggestions on their own: https://github.com/crankyoldgit/IRremoteESP8266/commit/4ef02e5eb6a503cbc4034812d378ab2720ee9a69

I would like to improve on the #ifdef logic further and maybe rename the old HACK one as will, but maybe not in this PR.

NiKiZe avatar Sep 17 '24 15:09 NiKiZe

I have updated and pushed "reverts" of lines that don't need change. (mostly indentation and comments) Modified the corev3 define to follow the pattern of others, and also tried a rename.

@crankyoldgit if you have the time I would especially like your input of how to deal with the comments on #elif and #endif for these cases.

NiKiZe avatar Sep 23 '24 12:09 NiKiZe

Hi @NiKiZe @crankyoldgit @Jason2866, I in middle of vacation and can't update your request. Maybe someone please can finish it or I will try to finishing next weak. Thanks!

BorisKofman avatar Oct 01 '24 09:10 BorisKofman

@NiKiZe @crankyoldgit I made changes as you request not if failing on code Lint but not sure if it because of me.

BorisKofman avatar Oct 28 '24 07:10 BorisKofman

This works for me on wemos d1 mini32.

hendriksen-mark avatar Dec 10 '24 08:12 hendriksen-mark

Are there any news about the merge of this PR? Thanks

Ks89 avatar Jan 10 '25 20:01 Ks89

Are there any news about the merge of this PR? Thanks

Those of us needing current support (including a compiler from the last 7 years and any of the newer Espressif parts) may need to start looking at libraries like https://github.com/Arduino-IRremote/Arduino-IRremote which added this support many months ago. This (and the similarly needed #2040) have been in the review queue with no visible motion forward for a long time.

robertlipe avatar Jan 21 '25 12:01 robertlipe

Is this project still active? https://github.com/crankyoldgit/IRremoteESP8266/issues/2039 https://github.com/crankyoldgit/IRremoteESP8266/issues/2040 https://github.com/crankyoldgit/IRremoteESP8266/issues/2055 https://github.com/crankyoldgit/IRremoteESP8266/issues/2107 https://github.com/crankyoldgit/IRremoteESP8266/issues/2122 https://github.com/crankyoldgit/IRremoteESP8266/issues/2126 https://github.com/crankyoldgit/IRremoteESP8266/issues/2137 https://github.com/crankyoldgit/IRremoteESP8266/issues/2141 https://github.com/crankyoldgit/IRremoteESP8266/issues/2157 https://github.com/crankyoldgit/IRremoteESP8266/issues/2169 https://github.com/crankyoldgit/IRremoteESP8266/issues/2178 https://github.com/crankyoldgit/IRremoteESP8266/issues/2185 https://github.com/crankyoldgit/IRremoteESP8266/issues/2188 https://github.com/crankyoldgit/IRremoteESP8266/issues/2189 all more or less point to here, https://github.com/crankyoldgit/IRremoteESP8266/pull/2144

The maintainer(s) (Are NikiZe and crankyolddigit the same person?) are clearly getting cranky with people not finding this, but fixes for this problem seem to have been around for over a year now. Now that Pioarduino has broken the Arduino3 logjam for more devs/users, the number of affected people will only grow, further amplifying the feedback loop.

It's been confirmed to work. I haven't seen that the patches are pending further changes from authors. What will it take to get these changes in the hands of the people that need them?

Different patches have had some additional stuff around them, but the actual timer changes in ESP-IDF seem pretty mechanical. Yes, it's annoying for Espressif to break our code renaming our symbols, but we can't control that and the rest of our code was broken by similary annoying changes in Arduino3.

I searched GitHub to see if someone had just forked it with these changes applied, but they don't seem to have done so. I don't particularly want to become a project maintainer of a fork of this. (My requirements are low. I need to receive NEC; I can probably pluck the IR frames right off the RMT via ESP-IDF, I think) I don't want to patch PlatformIO and then tell our developers where to find a crossplatform version of patch to apply it.

If it "just" needs some further programmer attention, I'll block off some time and try to help. I can't help test a zillion remotes I've never heard of. Honestly, I'd rather spend two hours replacing this than an hour fixing this at this point, but not everyone has that luxury.

Please consider applying one of the above fixes for this problem for later ESP-IDF - which is also breaking Arduino/ESP32 and pushing it out as a release. That'll reduce/stop the flow of incoming duplicate reports. I'm willing to help a little, but I don't want to take over a fork of the project.

Thank you for listening. I hope we can get a delivery of this soon.

robertlipe avatar Feb 27 '25 09:02 robertlipe

Is this project still active? #2039 #2040 #2055 #2107 #2122 #2126 #2137 #2141 #2157 #2169 #2178 #2185 #2188 #2189 all more or less point to here, #2144

The maintainer(s) (Are NikiZe and crankyolddigit the same person?) are clearly getting cranky with people not finding this, but fixes for this problem seem to have been around for over a year now. Now that Pioarduino has broken the Arduino3 logjam for more devs/users, the number of affected people will only grow, further amplifying the feedback loop.

It's been confirmed to work. I haven't seen that the patches are pending further changes from authors. What will it take to get these changes in the hands of the people that need them?

Different patches have had some additional stuff around them, but the actual timer changes in ESP-IDF seem pretty mechanical. Yes, it's annoying for Espressif to break our code renaming our symbols, but we can't control that and the rest of our code was broken by similary annoying changes in Arduino3.

I searched GitHub to see if someone had just forked it with these changes applied, but they don't seem to have done so. I don't particularly want to become a project maintainer of a fork of this. (My requirements are low. I need to receive NEC; I can probably pluck the IR frames right off the RMT via ESP-IDF, I think) I don't want to patch PlatformIO and then tell our developers where to find a crossplatform version of patch to apply it.

If it "just" needs some further programmer attention, I'll block off some time and try to help. I can't help test a zillion remotes I've never heard of. Honestly, I'd rather spend two hours replacing this than an hour fixing this at this point, but not everyone has that luxury.

Please consider applying one of the above fixes for this problem for later ESP-IDF - which is also breaking Arduino/ESP32 and pushing it out as a release. That'll reduce/stop the flow of incoming duplicate reports. I'm willing to help a little, but I don't want to take over a fork of the project.

Thank you for listening. I hope we can get a delivery of this soon.

Fix the name, essentially replace the last commit here, and ensure there is no limit issues. Minimize the PR to just timer changes, nothing else. Any other changes needs their own proper descriptions and not mixed in to the rest.

NiKiZe avatar Feb 27 '25 09:02 NiKiZe

Is this ever going to get merged? If not I will have to create a PR in heatpumpir to remove IRremoteESP8266 from being automatically installed / included. This is preventing heatpumpir from being used with 3x.

swoboda1337 avatar May 13 '25 02:05 swoboda1337

Which branch should I download to use this pull request? I cannot see this patch in the history of master branch.

landall avatar Jun 20 '25 21:06 landall

oh wow, approved. when do you expect to merge and release this?

Ks89 avatar Jul 21 '25 10:07 Ks89

Big thanks to @BorisKofman who did this PR. It works! wonder why it is not merged and tagged...

ivmbusiness avatar Sep 08 '25 20:09 ivmbusiness

wonder why it is not merged and tagged...

We should have sent this PR a birthday cake two days ago.

robertlipe avatar Sep 08 '25 21:09 robertlipe

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.).


EDIT: I see that the maintainers were really quick to mark this comment as off-topic, smart move, I mean, they're absolutely right, but it also sends a strong signal that they simply do not care about the future of this library... It's time to move on folks!

JanPetterMG avatar Sep 30 '25 21:09 JanPetterMG

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) https://github.com/crankyoldgit/IRremoteESP8266/pull/2144#issuecomment-3353829297

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 https://github.com/crankyoldgit/IRremoteESP8266/pull/2144#issuecomment-3353829297, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACCSD366TUUCJUMBMK2ZUED3VLXE7AVCNFSM6AAAAABNYYEXR6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZTGNJTHAZDSMRZG4 . You are receiving this because you commented.Message ID: @.***>

robertlipe avatar Sep 30 '25 23:09 robertlipe

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!

KingingWang avatar Dec 10 '25 09:12 KingingWang

@crankyoldgit Is there a planned release that will include the core 3 features added to the master branch? thanks!!!!

sblantipodi avatar Dec 15 '25 14:12 sblantipodi

Yes

crankyoldgit avatar Dec 15 '25 20:12 crankyoldgit

@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?

sblantipodi avatar Dec 16 '25 09:12 sblantipodi

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) https://github.com/crankyoldgit/IRremoteESP8266/pull/2144#issuecomment-3659568350

@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 https://github.com/crankyoldgit/IRremoteESP8266/pull/2144#issuecomment-3659568350, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACCSD32PHG5QLMTRPP7HEET4B7FGDAVCNFSM6AAAAABNYYEXR6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZTMNJZGU3DQMZVGA . You are receiving this because you commented.Message ID: @.***>

robertlipe avatar Dec 16 '25 10:12 robertlipe