Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

If IR emitter has WiFi chip enabled, IRrecvDumpV2 receives many broken packets #1922

Open
Ks89 opened this issue Nov 24, 2022 · 12 comments
Open

Comments

@Ks89
Copy link

Ks89 commented Nov 24, 2022

Version/revision of the library used

version 2.8.4

Describe the bug

I'm using the COOLIX protocol to control a Beko Air conditioner (with remote RG52A9/BGEF).
My setup is a ESP32S2 Devkit-C sender with a Grove IR emitter and a ESP32S2 Devkit-C with IRrecvDumpV2.
Everything works as expected and I can read packets and control my AC successfully.

However, when I enable the WiFi chip of the sender device, the receiver reads many broken packets.
So, it works perfectly without WiFi, but when I connect to my WiFi network, the receiver starts to read many broken packets.

To Reproduce

Check this example https://github.com/Ks89/ir-esp32-example
It contains two projects:

  • sender: is the project connected to the IR Emitter
  • receiver: is the official IRrecvDumpV2 example

If you comment lines from 37 to 41 (https://github.com/Ks89/ir-esp32-example/blob/9559e02876779aa2ece39f40b3204452f6ffca6b/sender/sender.ino#L37) in this way:

//WiFi.begin(ssid, password);
//while (WiFi.status() != WL_CONNECTED) {
//    delay(500);
//    Serial.print(".");
//}

it works as expected with no broken packages, otherwise not.

Example code used

https://github.com/Ks89/ir-esp32-example

Expected behaviour

If a send a signal from the sender to the receiver I should be able to read valid packets also with WiFI enabled, instead of many broken data:

21:31:51.036 -> Timestamp : 000043.765
21:31:51.036 -> Library   : v2.8.4
21:31:51.036 -> 
21:31:51.036 -> Protocol  : COOLIX
21:31:51.036 -> Code      : 0xB2BF2C (24 Bits)
21:31:51.036 -> Mesg Desc.: Power: On, Mode: 3 (Heat), Fan: 5 (Auto), Temp: 20C, Zone Follow: Off, Sensor Temp: Off
21:31:51.036 -> uint16_t rawData[199] = {4700, 4500,  556, 1640,  556, 552,  562, 1650,  566, 1646,  560, 548,  564, 542,  560, 1652,  564, 550,  564, 544,  556, 1654,  562, 546,  558, 552,  562, 1650,  566, 1648,  568, 542,  562, 1662,  564, 1648,  558, 548,  564, 1654,  564, 1652,  564, 1646,  558, 1654,  562, 1650,  566, 1646,  560, 548,  564, 1648,  556, 552,  562, 546,  566, 544,  560, 550,  564, 544,  558, 562,  570, 542,  560, 548,  566, 1646,  560, 550,  562, 1650,  568, 1642,  564, 544,  556, 552,  560, 1652,  564, 1648,  558, 550,  562, 1654,  562, 544,  558, 550,  562, 1650,  566, 1668,  558, 5244,  4716, 4418,  568, 1652,  564, 542,  560, 1654,  562, 1682,  554, 532,  560, 546,  566, 1646,  562, 554,  558, 550,  562, 1648,  558, 552,  560, 546,  556, 1654,  562, 1650,  566, 542,  560, 1712,  564, 1646,  560, 550,  562, 1648,  568, 1650,  566, 1650,  566, 1644,  562, 1648,  558, 1656,  560, 548,  564, 1646,  560, 552,  560, 544,  560, 550,  562, 546,  558, 550,  562, 558,  566, 540,  572, 540,  564, 1652,  564, 544,  558, 1656,  560, 1650,  566, 546,  568, 540,  560, 1652,  564, 1648,  558, 550,  562, 1650,  556, 550,  562, 546,  558, 1660,  566, 1656,  560};  // COOLIX B2BF2C
21:31:51.132 -> uint64_t data = 0xB2BF2C;
21:31:51.132 -> 
21:31:51.132 -> 
21:31:52.319 -> Timestamp : 000045.061
21:31:52.319 -> Library   : v2.8.4
21:31:52.319 -> 
21:31:52.319 -> Protocol  : UNKNOWN
21:31:52.319 -> Code      : 0xC13D9FAE (99 Bits)
21:31:52.319 -> uint16_t rawData[197] = {4692, 4434,  560, 1656,  560, 546,  568, 1646,  560, 1654,  564, 544,  556, 552,  560, 1652,  564, 548,  564, 544,  558, 1654,  562, 546,  566, 544,  558, 1652,  564, 1648,  568, 542,  560, 1662,  564, 1648,  558, 552,  560, 1656,  570, 1638,  568, 2158,  366, 2070,  564, 1646,  560, 1658,  558, 550,  564, 1648,  568, 546,  556, 554,  560, 546,  566, 542,  560, 548,  566, 604,  560, 548,  564, 544,  558, 1652,  564, 544,  558, 1654,  562, 1656,  560, 544,  568, 540,  562, 1650,  566, 1646,  560, 548,  564, 1648,  558, 550,  562, 544,  558, 1654,  562, 1664,  562, 5246,  4694, 4444,  562, 1652,  566, 544,  558, 1654,  562, 1652,  564, 544,  558, 550,  564, 1650,  566, 542,  562, 546,  566, 1646,  560, 548,  556, 550,  562, 1650,  566, 1644,  560, 546,  578, 1654,  562, 1652,  554, 552,  562, 1650,  566, 1646,  560, 1652,  564, 1656,  560, 1648,  558, 2942,  560, 1654,  564, 544,  568, 546,  558, 554,  560, 546,  566, 544,  560, 614,  560, 548,  564, 542,  560, 1654,  562, 546,  558, 1656,  560, 1652,  564, 546,  558, 550,  562, 1650,  568, 1648,  568, 544,  558, 1654,  562, 546,  558, 550,  562, 1650,  566, 1658,  558};  // UNKNOWN C13D9FAE
21:31:52.449 -> 
21:31:52.449 -> 
21:31:53.629 -> Timestamp : 000046.353
21:31:53.629 -> Library   : v2.8.4
21:31:53.629 -> 
21:31:53.629 -> Protocol  : UNKNOWN
21:31:53.629 -> Code      : 0x9909D176 (99 Bits)
21:31:53.629 -> uint16_t rawData[197] = {4692, 4438,  566, 1646,  560, 548,  564, 1648,  558, 1654,  562, 548,  564, 542,  560, 1656,  560, 552,  562, 546,  566, 1646,  560, 548,  564, 544,  558, 1654,  562, 1652,  566, 542,  558, 1666,  562, 1650,  566, 544,  558, 1654,  562, 1652,  564, 1650,  558, 1654,  562, 1650,  566, 1648,  568, 542,  560, 1654,  564, 544,  556, 550,  562, 546,  558, 552,  560, 552,  570, 550,  564, 544,  558, 548,  566, 1650,  566, 542,  560, 1654,  562, 1656,  560, 544,  560, 550,  562, 1648,  558, 1652,  562, 546,  566, 1654,  562, 540,  562, 548,  564, 3998,  558, 5244,  4714, 4432,  562, 1650,  566, 540,  562, 1650,  556, 1656,  560, 548,  564, 542,  560, 1652,  566, 544,  566, 542,  560, 1654,  562, 546,  556, 552,  560, 1652,  566, 1646,  560, 546,  556, 1668,  560, 1654,  562, 546,  556, 1654,  562, 1654,  562, 1652,  564, 1644,  562, 1650,  566, 1648,  568, 542,  562, 1650,  566, 544,  558, 548,  566, 544,  558, 550,  562, 544,  558, 560,  562, 548,  566, 544,  568, 1644,  562, 546,  566, 1646,  560, 1652,  562, 546,  568, 540,  562, 1652,  564, 1646,  560, 546,  568, 1646,  560, 548,  564, 544,  558, 1652,  564, 1678,  558};  // UNKNOWN 9909D176
21:31:53.726 -> 
21:31:53.726 -> 
21:31:54.910 -> Timestamp : 000047.645
21:31:54.910 -> Library   : v2.8.4
21:31:54.910 -> 
21:31:54.910 -> Protocol  : COOLIX
21:31:54.910 -> Code      : 0xB2BF2C (24 Bits)
21:31:54.910 -> Mesg Desc.: Power: On, Mode: 3 (Heat), Fan: 5 (Auto), Temp: 20C, Zone Follow: Off, Sensor Temp: Off
21:31:54.943 -> uint16_t rawData[199] = {4696, 4430,  562, 1652,  564, 544,  558, 1654,  480, 1730,  558, 552,  560, 548,  564, 1678,  558, 536,  568, 544,  558, 1654,  562, 546,  556, 550,  562, 1650,  566, 1646,  570, 544,  558, 1712,  566, 1646,  560, 550,  564, 1650,  568, 1646,  558, 1654,  562, 1648,  566, 1646,  560, 1652,  564, 548,  564, 1648,  558, 548,  564, 546,  556, 550,  562, 544,  568, 544,  570, 550,  564, 544,  558, 550,  564, 1648,  556, 552,  560, 1652,  564, 1648,  558, 548,  564, 550,  562, 1646,  560, 1652,  564, 544,  558, 1654,  564, 544,  558, 548,  564, 1646,  560, 1664,  562, 5240,  4718, 4414,  560, 1650,  566, 544,  558, 1654,  562, 1652,  564, 542,  560, 550,  562, 1650,  566, 542,  558, 550,  564, 1648,  558, 550,  564, 544,  262, 2320,  570, 1644,  562, 544,  558, 1720,  558, 1654,  562, 546,  566, 1644,  560, 1654,  562, 1648,  558, 1654,  562, 1650,  566, 1648,  558, 550,  562, 1650,  556, 552,  560, 548,  566, 542,  560, 550,  562, 544,  568, 554,  558, 550,  562, 546,  556, 1654,  562, 546,  556, 1656,  560, 1654,  562, 544,  560, 550,  562, 1650,  566, 1646,  558, 554,  560, 1654,  562, 544,  558, 550,  562, 1648,  558, 1664,  562};  // COOLIX B2BF2C
21:31:55.040 -> uint64_t data = 0xB2BF2C;
21:31:55.040 -> 
21:31:55.040 -> 
21:31:56.218 -> Timestamp : 000048.940
21:31:56.218 -> Library   : v2.8.4
21:31:56.218 -> 
21:31:56.218 -> Protocol  : COOLIX48
21:31:56.218 -> Code      : 0xB24DBF412CD3 (48 Bits)
21:31:56.218 -> uint16_t rawData[199] = {4690, 4454,  562, 1648,  558, 552,  562, 1648,  558, 1656,  560, 548,  566, 542,  560, 1654,  564, 548,  564, 548,  566, 1644,  562, 546,  564, 542,  560, 1654,  564, 1650,  566, 546,  564, 1658,  558, 1654,  562, 546,  558, 1656,  570, 1642,  562, 1650,  566, 1646,  560, 1654,  562, 1652,  564, 546,  566, 1646,  562, 554,  558, 544,  560, 548,  564, 544,  558, 552,  530, 1220,  558, 548,  564, 544,  558, 1654,  562, 544,  558, 1652,  564, 1648,  558, 550,  562, 546,  558, 1654,  562, 1654,  562, 546,  556, 1654,  562, 546,  556, 552,  562, 1652,  564, 1662,  562, 5238,  4712, 4424,  560, 1652,  564, 544,  560, 1652,  562, 1650,  568, 542,  558, 546,  566, 1646,  560, 550,  562, 546,  558, 1654,  562, 546,  556, 548,  564, 1650,  566, 1648,  560, 548,  564, 1660,  556, 1654,  560, 546,  566, 1648,  556, 1656,  562, 1650,  566, 1648,  558, 1654,  562, 1650,  566, 544,  558, 1654,  562, 546,  558, 552,  560, 546,  566, 544,  558, 552,  560, 556,  558, 552,  560, 548,  564, 1648,  558, 550,  562, 1802,  536, 1654,  562, 546,  556, 556,  556, 1656,  560, 1652,  562, 544,  560, 1650,  566, 542,  560, 548,  564, 1646,  560, 1706,  480};  // COOLIX48 B24DBF412CD3
21:31:56.317 -> uint64_t data = 0xB24DBF412CD3;
21:31:56.317 -> 
21:31:56.317 -> 
21:31:57.493 -> Timestamp : 000050.230
21:31:57.493 -> Library   : v2.8.4
21:31:57.493 -> 
21:31:57.493 -> Protocol  : COOLIX
21:31:57.493 -> Code      : 0xB2BF2C (24 Bits)
21:31:57.493 -> Mesg Desc.: Power: On, Mode: 3 (Heat), Fan: 5 (Auto), Temp: 20C, Zone Follow: Off, Sensor Temp: Off
21:31:57.526 -> uint16_t rawData[201] = {4694, 4428,  556, 1656,  560, 548,  564, 1646,  560, 1652,  562, 548,  566, 544,  558, 1654,  562, 548,  566, 542,  560, 1652,  564, 544,  558, 550,  564, 1646,  558, 1654,  562, 546,  558, 1666,  558, 1658,  558, 548,  564, 1646,  558, 1650,  566, 1648,  558, 1654,  562, 1654,  562, 1648,  558, 552,  560, 1654,  562, 546,  558, 550,  562, 548,  566, 544,  558, 554,  560, 560,  562, 546,  558, 552,  560, 1652,  564, 544,  568, 1646,  560, 1650,  564, 544,  560, 550,  562, 1648,  558, 1658,  568, 542,  562, 1652,  564, 546,  558, 550,  562, 1650,  566, 1656,  560, 5248,  2874, 626,  1200, 4490,  566, 1646,  560, 548,  566, 1646,  558, 1656,  560, 548,  566, 542,  560, 1654,  562, 550,  564, 542,  560, 1652,  564, 546,  566, 540,  572, 1642,  564, 1646,  560, 550,  562, 1670,  566, 1646,  560, 548,  564, 1646,  570, 1644,  562, 1648,  558, 1656,  560, 1652,  564, 1648,  558, 550,  562, 1650,  566, 542,  560, 546,  566, 542,  560, 548,  564, 546,  568, 556,  558, 552,  558, 546,  568, 1646,  560, 548,  564, 1646,  560, 1652,  564, 542,  560, 550,  564, 1654,  562, 1648,  558, 554,  558, 1656,  560, 546,  556, 550,  562, 1650,  564, 1664,  564};  // COOLIX B2BF2C
21:31:57.625 -> uint64_t data = 0xB2BF2C;
21:31:57.625 -> 
21:31:57.625 -> 
21:31:58.801 -> Timestamp : 000051.520
21:31:58.801 -> Library   : v2.8.4
21:31:58.801 -> 
21:31:58.801 -> Protocol  : COOLIX
21:31:58.801 -> Code      : 0xB2BF2C (24 Bits)
21:31:58.801 -> Mesg Desc.: Power: On, Mode: 3 (Heat), Fan: 5 (Auto), Temp: 20C, Zone Follow: Off, Sensor Temp: Off
21:31:58.801 -> uint16_t rawData[199] = {4698, 4430,  564, 1650,  566, 542,  558, 1656,  560, 1650,  566, 542,  558, 550,  564, 1650,  566, 546,  556, 550,  562, 1650,  566, 544,  558, 550,  564, 1648,  570, 1648,  556, 548,  564, 1668,  558, 1686,  552, 534,  558, 1654,  562, 1650,  556, 1656,  560, 1652,  564, 1648,  558, 1660,  566, 544,  560, 1652,  564, 542,  560, 550,  562, 546,  558, 550,  564, 542,  558, 610,  556, 550,  562, 546,  566, 1644,  562, 546,  566, 1646,  560, 1654,  562, 546,  568, 544,  568, 1640,  564, 1648,  558, 548,  564, 1650,  566, 544,  558, 550,  564, 1650,  566, 1656,  560, 5240,  4720, 4418,  556, 1656,  560, 550,  564, 1648,  560, 1652,  564, 544,  558, 548,  566, 1648,  558, 552,  562, 546,  566, 1646,  560, 546,  566, 544,  560, 1652,  564, 1648,  568, 542,  570, 1656,  560, 1652,  564, 548,  566, 1642,  562, 1650,  566, 1684,  532, 1650,  566, 1650,  556, 1660,  566, 542,  560, 1650,  566, 548,  564, 542,  560, 546,  568, 542,  560, 550,  564, 606,  558, 548,  564, 544,  558, 1662,  564, 538,  564, 1646,  560, 1654,  564, 546,  566, 542,  560, 1654,  562, 1652,  564, 544,  558, 1654,  562, 548,  566, 544,  568, 1644,  562, 1674,  562};  // COOLIX B2BF2C
21:31:58.898 -> uint64_t data = 0xB2BF2C;
21:31:58.898 -> 
21:31:58.898 -> 
21:32:00.074 -> Timestamp : 000052.813
21:32:00.074 -> Library   : v2.8.4
21:32:00.074 -> 
21:32:00.074 -> Protocol  : COOLIX
21:32:00.074 -> Code      : 0xB2BF2C (24 Bits)
21:32:00.074 -> Mesg Desc.: Power: On, Mode: 3 (Heat), Fan: 5 (Auto), Temp: 20C, Zone Follow: Off, Sensor Temp: Off
21:32:00.106 -> uint16_t rawData[199] = {4696, 4434,  560, 1656,  560, 548,  564, 1650,  566, 1642,  564, 544,  558, 552,  560, 1650,  556, 552,  560, 550,  562, 1650,  566, 540,  562, 546,  556, 1656,  560, 1652,  564, 544,  558, 1682,  564, 1646,  560, 546,  566, 1646,  560, 1652,  564, 1646,  560, 1652,  564, 1648,  556, 1656,  560, 552,  560, 1650,  566, 544,  558, 550,  564, 544,  558, 550,  562, 548,  566, 554,  558, 550,  552, 558,  566, 1646,  558, 550,  562, 1662,  564, 1644,  562, 548,  564, 674,  562, 1630,  564, 1650,  556, 552,  560, 1652,  564, 542,  560, 548,  564, 1646,  560, 1704,  564, 5238,  4722, 4424,  560, 1652,  562, 548,  556, 1654,  562, 1648,  568, 542,  560, 544,  560, 1654,  562, 546,  556, 550,  562, 1648,  558, 552,  560, 546,  566, 1646,  560, 1652,  564, 546,  566, 1660,  566, 1644,  562, 546,  566, 1648,  568, 1648,  558, 1658,  558, 1650,  566, 1646,  560, 1740,  556, 548,  566, 1648,  558, 552,  560, 546,  556, 550,  562, 548,  564, 542,  560, 564,  558, 548,  564, 544,  558, 1654,  562, 546,  556, 1654,  562, 1650,  566, 544,  568, 540,  562, 1656,  560, 1650,  558, 548,  564, 1680,  536, 552,  560, 546,  566, 1652,  564, 1696,  560};  // COOLIX B2BF2C
21:32:00.204 -> uint64_t data = 0xB2BF2C;
21:32:00.204 -> 
21:32:00.204 -> 
21:32:01.385 -> Timestamp : 000054.102
21:32:01.385 -> Library   : v2.8.4
21:32:01.385 -> 
21:32:01.385 -> Protocol  : UNKNOWN
21:32:01.385 -> Code      : 0xC8B01E85 (100 Bits)
21:32:01.385 -> uint16_t rawData[199] = {4694, 4444,  560, 1652,  566, 544,  364, 2266,  564, 1650,  566, 542,  560, 548,  564, 1648,  558, 554,  558, 550,  564, 1650,  566, 544,  560, 548,  564, 1648,  556, 1656,  562, 546,  566, 1706,  560, 1652,  564, 544,  560, 1652,  562, 1648,  568, 1646,  560, 1654,  562, 1652,  564, 1648,  558, 550,  562, 1650,  566, 544,  568, 540,  562, 548,  564, 542,  562, 548,  564, 556,  558, 550,  562, 542,  560, 1654,  562, 546,  566, 1648,  558, 1652,  564, 544,  558, 552,  562, 1650,  566, 1648,  558, 550,  564, 1650,  566, 542,  560, 548,  564, 1648,  558, 1664,  562, 5238,  4702, 4432,  562, 1650,  566, 542,  560, 1656,  560, 1648,  560, 550,  562, 546,  566, 1680,  558, 536,  556, 552,  562, 1650,  566, 544,  558, 550,  564, 1648,  558, 1658,  558, 546,  564, 1708,  560, 1652,  564, 544,  558, 1656,  560, 1658,  558, 1650,  564, 1644,  562, 1652,  564, 1652,  564, 540,  562, 1650,  566, 542,  560, 546,  566, 546,  566, 544,  570, 540,  562, 564,  560, 548,  564, 544,  558, 1654,  562, 546,  566, 1646,  560, 1660,  556, 546,  566, 544,  558, 1652,  564, 1650,  566, 542,  560, 1654,  562, 544,  558, 550,  564, 1648,  556, 1664,  562};  // UNKNOWN C8B01E85
21:32:01.483 -> 
21:32:01.483 -> 
21:32:02.668 -> Timestamp : 000055.399
21:32:02.668 -> Library   : v2.8.4
21:32:02.668 -> 
21:32:02.668 -> Protocol  : COOLIX
21:32:02.668 -> Code      : 0xB2BF2C (24 Bits)
21:32:02.668 -> Mesg Desc.: Power: On, Mode: 3 (Heat), Fan: 5 (Auto), Temp: 20C, Zone Follow: Off, Sensor Temp: Off
21:32:02.700 -> uint16_t rawData[201] = {4694, 4434,  558, 1658,  556, 552,  560, 1654,  562, 1646,  560, 548,  564, 546,  558, 1652,  564, 548,  564, 544,  558, 1654,  562, 546,  556, 550,  562, 1650,  556, 1656,  560, 548,  564, 1660,  556, 1656,  560, 548,  566, 1644,  562, 1654,  572, 1642,  564, 1650,  564, 1678,  558, 1642,  564, 544,  560, 1656,  560, 548,  566, 544,  558, 548,  564, 544,  558, 550,  562, 608,  556, 552,  562, 544,  556, 1656,  560, 546,  568, 1646,  558, 1652,  564, 548,  566, 546,  558, 1654,  562, 1650,  564, 544,  558, 1652,  562, 546,  566, 546,  568, 1644,  562, 1660,  566, 5234,  4694, 4438,  556, 1656,  560, 550,  562, 1652,  564, 1650,  566, 540,  562, 544,  558, 1654,  562, 546,  566, 542,  560, 1654,  560, 548,  564, 544,  312, 88,  198, 1614,  562, 1652,  566, 540,  562, 1668,  558, 1656,  560, 548,  564, 1648,  558, 1654,  564, 1650,  564, 1646,  558, 1652,  564, 1658,  558, 550,  562, 1652,  564, 1052,  560, 526,  566, 542,  558, 550,  564, 544,  568, 608,  556, 550,  562, 546,  558, 1654,  562, 546,  566, 1648,  568, 1644,  562, 548,  566, 542,  558, 1654,  562, 1652,  564, 544,  568, 1646,  560, 546,  566, 542,  560, 1652,  564, 1660,  556};  // COOLIX B2BF2C
21:32:02.798 -> uint64_t data = 0xB2BF2C;
21:32:02.798 -> 

The expected packet should be always 0xB2BF2C.
Commenting out the WiFi connection logic, the result is:

22:11:30.539 -> Timestamp : 000019.980
22:11:30.539 -> Library   : v2.8.4
22:11:30.539 -> 
22:11:30.539 -> Protocol  : COOLIX
22:11:30.539 -> Code      : 0xB2BF2C (24 Bits)
22:11:30.539 -> Mesg Desc.: Power: On, Mode: 3 (Heat), Fan: 5 (Auto), Temp: 20C, Zone Follow: Off, Sensor Temp: Off
22:11:30.539 -> uint16_t rawData[199] = {4742, 4388,  584, 1628,  588, 518,  594, 1618,  588, 1626,  590, 520,  562, 546,  558, 1656,  590, 518,  594, 514,  598, 1614,  590, 516,  586, 522,  560, 1654,  562, 1650,  586, 520,  562, 1660,  554, 1656,  560, 548,  596, 1618,  558, 1656,  590, 1626,  558, 1650,  564, 1648,  558, 1652,  562, 546,  566, 1650,  588, 520,  592, 518,  586, 520,  592, 516,  596, 514,  558, 562,  592, 514,  588, 522,  558, 1654,  594, 516,  564, 1648,  588, 1624,  592, 518,  594, 514,  568, 1644,  592, 1620,  586, 522,  590, 1624,  562, 550,  592, 518,  566, 1648,  556, 1666,  560, 5240,  4698, 4434,  560, 1652,  594, 514,  558, 1654,  562, 1652,  594, 512,  590, 518,  564, 1648,  558, 552,  592, 516,  566, 1646,  588, 520,  564, 550,  560, 1648,  588, 1626,  590, 518,  584, 1640,  588, 1626,  558, 552,  560, 1652,  594, 1616,  590, 1622,  564, 1652,  564, 1648,  558, 1654,  562, 544,  558, 1654,  590, 518,  584, 522,  590, 522,  590, 514,  558, 550,  564, 556,  566, 544,  590, 518,  564, 1654,  594, 512,  570, 1648,  588, 1622,  564, 544,  590, 520,  594, 1618,  588, 1626,  590, 516,  564, 1650,  558, 550,  560, 548,  586, 1626,  590, 1636,  590};  // COOLIX B2BF2C
22:11:30.669 -> uint64_t data = 0xB2BF2C;
22:11:30.669 -> 
22:11:30.669 -> 
22:11:31.821 -> Timestamp : 000021.269
22:11:31.821 -> Library   : v2.8.4
22:11:31.821 -> 
22:11:31.821 -> Protocol  : COOLIX
22:11:31.821 -> Code      : 0xB2BF2C (24 Bits)
22:11:31.821 -> Mesg Desc.: Power: On, Mode: 3 (Heat), Fan: 5 (Auto), Temp: 20C, Zone Follow: Off, Sensor Temp: Off
22:11:31.854 -> uint16_t rawData[199] = {4744, 4384,  590, 1624,  562, 546,  588, 1626,  558, 1652,  594, 514,  588, 522,  592, 1620,  584, 520,  592, 516,  596, 1616,  558, 550,  562, 546,  586, 1626,  590, 1624,  592, 518,  564, 1658,  588, 1626,  590, 520,  562, 1650,  556, 1654,  562, 1654,  592, 1618,  586, 1626,  590, 1624,  592, 518,  556, 1658,  558, 554,  588, 514,  558, 552,  592, 516,  586, 524,  558, 562,  560, 548,  596, 510,  590, 1624,  594, 514,  586, 1624,  562, 1650,  564, 542,  592, 516,  556, 1654,  592, 1620,  586, 522,  590, 1622,  564, 548,  594, 516,  596, 1618,  558, 1664,  562, 5240,  4738, 4394,  560, 1652,  594, 514,  588, 1624,  592, 1622,  594, 518,  564, 542,  590, 1622,  594, 514,  590, 518,  564, 1652,  594, 514,  588, 520,  562, 1652,  584, 1628,  588, 520,  592, 1630,  596, 1620,  586, 522,  560, 1650,  586, 1624,  590, 1622,  564, 1650,  566, 1646,  590, 1622,  594, 512,  558, 1654,  592, 514,  588, 520,  592, 520,  592, 510,  560, 548,  586, 534,  558, 550,  562, 548,  566, 1650,  584, 522,  560, 1656,  592, 1618,  586, 522,  592, 516,  566, 1648,  588, 1624,  562, 546,  556, 1656,  590, 518,  564, 546,  588, 1624,  592, 1634,  560};  // COOLIX B2BF2C
22:11:31.951 -> uint64_t data = 0xB2BF2C;
22:11:31.951 -> 
22:11:31.951 -> 
22:11:33.126 -> Timestamp : 000022.563
22:11:33.126 -> Library   : v2.8.4
22:11:33.126 -> 
22:11:33.126 -> Protocol  : COOLIX
22:11:33.126 -> Code      : 0xB2BF2C (24 Bits)
22:11:33.126 -> Mesg Desc.: Power: On, Mode: 3 (Heat), Fan: 5 (Auto), Temp: 20C, Zone Follow: Off, Sensor Temp: Off
22:11:33.126 -> uint16_t rawData[199] = {4738, 4392,  592, 1620,  566, 542,  560, 1652,  594, 1618,  586, 522,  592, 516,  586, 1626,  592, 518,  594, 514,  558, 1656,  590, 516,  596, 512,  558, 1654,  592, 1618,  558, 550,  592, 1632,  594, 1618,  588, 520,  562, 1650,  566, 1652,  584, 1628,  566, 1648,  588, 1622,  594, 1618,  588, 520,  590, 1622,  564, 544,  558, 550,  594, 512,  560, 550,  562, 544,  558, 562,  592, 516,  596, 516,  596, 1614,  594, 514,  588, 1626,  590, 1620,  584, 522,  560, 546,  586, 1626,  558, 1652,  564, 544,  588, 1626,  590, 518,  564, 544,  568, 1646,  560, 1662,  564, 5236,  4734, 4398,  596, 1618,  558, 548,  594, 1616,  588, 1622,  594, 514,  558, 552,  590, 1622,  594, 514,  588, 520,  592, 1620,  586, 522,  590, 516,  566, 1646,  590, 1622,  592, 516,  566, 1656,  600, 1614,  562, 546,  588, 1622,  594, 1618,  586, 1628,  588, 1624,  592, 1620,  566, 1646,  560, 550,  560, 1652,  586, 520,  590, 518,  564, 548,  584, 524,  590, 518,  562, 558,  556, 552,  560, 550,  594, 1618,  588, 518,  564, 1646,  590, 1624,  592, 516,  566, 542,  560, 1652,  564, 1652,  586, 520,  562, 1650,  586, 520,  592, 516,  586, 1626,  590, 1634,  594};  // COOLIX B2BF2C
22:11:33.222 -> uint64_t data = 0xB2BF2C;
22:11:33.222 -> 
22:11:33.222 -> 
22:11:34.396 -> Timestamp : 000023.852
22:11:34.396 -> Library   : v2.8.4
22:11:34.396 -> 
22:11:34.396 -> Protocol  : COOLIX
22:11:34.396 -> Code      : 0xB2BF2C (24 Bits)
22:11:34.428 -> Mesg Desc.: Power: On, Mode: 3 (Heat), Fan: 5 (Auto), Temp: 20C, Zone Follow: Off, Sensor Temp: Off
22:11:34.428 -> uint16_t rawData[199] = {4696, 4434,  590, 1624,  592, 516,  566, 1648,  588, 1624,  562, 546,  586, 522,  590, 1622,  584, 524,  558, 550,  592, 1624,  592, 514,  590, 516,  586, 1628,  588, 1624,  592, 516,  588, 1638,  588, 1628,  588, 520,  592, 1620,  566, 1650,  586, 1628,  588, 1624,  592, 1620,  596, 1618,  588, 518,  562, 1648,  558, 552,  592, 516,  586, 522,  560, 548,  596, 514,  588, 530,  592, 516,  596, 512,  590, 1624,  592, 516,  564, 1648,  588, 1622,  562, 550,  564, 546,  566, 1650,  586, 1624,  562, 546,  586, 1626,  588, 520,  562, 546,  596, 1618,  558, 1664,  592, 5208,  4698, 4432,  594, 1618,  588, 520,  592, 1618,  568, 1648,  588, 518,  594, 516,  588, 1626,  590, 518,  594, 512,  560, 1654,  592, 518,  596, 512,  590, 1622,  594, 1618,  558, 550,  562, 1660,  596, 1618,  566, 540,  592, 1618,  566, 1646,  590, 1622,  594, 1622,  592, 1616,  590, 1622,  594, 512,  590, 1622,  562, 546,  586, 522,  560, 548,  564, 544,  558, 548,  594, 524,  588, 522,  592, 518,  594, 1618,  558, 550,  562, 1654,  562, 1652,  564, 544,  590, 520,  592, 1618,  586, 1626,  558, 554,  590, 1620,  566, 540,  592, 516,  586, 1626,  588, 1634,  594};  // COOLIX B2BF2C
22:11:34.525 -> uint64_t data = 0xB2BF2C;
22:11:34.525 -> 
22:11:35.700 -> Timestamp : 000025.146
22:11:35.700 -> Library   : v2.8.4
22:11:35.700 -> 
22:11:35.700 -> Protocol  : COOLIX
22:11:35.700 -> Code      : 0xB2BF2C (24 Bits)
22:11:35.700 -> Mesg Desc.: Power: On, Mode: 3 (Heat), Fan: 5 (Auto), Temp: 20C, Zone Follow: Off, Sensor Temp: Off
22:11:35.732 -> uint16_t rawData[199] = {4740, 4392,  592, 1620,  566, 542,  560, 1652,  584, 1628,  588, 522,  560, 548,  594, 1616,  588, 520,  594, 516,  594, 1618,  558, 548,  596, 514,  556, 1656,  560, 1652,  564, 544,  588, 1638,  588, 1624,  592, 516,  586, 1626,  558, 1652,  594, 1618,  558, 1656,  590, 1622,  594, 1618,  558, 550,  594, 1618,  556, 552,  560, 546,  568, 540,  560, 548,  586, 520,  560, 560,  594, 514,  590, 522,  590, 1622,  594, 512,  592, 1620,  596, 1618,  586, 520,  562, 548,  566, 1650,  586, 1626,  590, 518,  594, 1618,  588, 522,  592, 516,  584, 1632,  596, 1626,  590, 5214,  4734, 4396,  588, 1624,  592, 514,  588, 1624,  560, 1654,  594, 516,  586, 524,  588, 1624,  592, 516,  588, 520,  560, 1654,  562, 546,  556, 552,  592, 1622,  564, 1648,  588, 520,  562, 1662,  562, 1650,  586, 520,  562, 1650,  556, 1654,  592, 1622,  562, 1648,  588, 1624,  592, 1620,  596, 514,  588, 1622,  562, 544,  588, 520,  592, 518,  594, 516,  588, 522,  590, 530,  594, 514,  556, 552,  560, 1652,  594, 516,  568, 1644,  562, 1650,  564, 544,  560, 548,  594, 1618,  556, 1654,  604, 506,  586, 1626,  590, 520,  594, 514,  588, 1624,  562, 1662,  584};  // COOLIX B2BF2C
22:11:35.831 -> uint64_t data = 0xB2BF2C;
22:11:35.832 -> 
22:11:35.832 -> 
22:11:37.003 -> Timestamp : 000026.435
22:11:37.003 -> Library   : v2.8.4
22:11:37.003 -> 
22:11:37.003 -> Protocol  : COOLIX
22:11:37.003 -> Code      : 0xB2BF2C (24 Bits)
22:11:37.003 -> Mesg Desc.: Power: On, Mode: 3 (Heat), Fan: 5 (Auto), Temp: 20C, Zone Follow: Off, Sensor Temp: Off
22:11:37.003 -> uint16_t rawData[199] = {4738, 4390,  592, 1620,  566, 544,  560, 1654,  562, 1652,  584, 522,  590, 520,  594, 1616,  558, 548,  564, 546,  588, 1626,  560, 548,  564, 546,  556, 1654,  592, 1622,  594, 516,  566, 1656,  590, 1624,  592, 518,  564, 1648,  588, 1622,  562, 1654,  594, 1618,  588, 1626,  558, 1654,  592, 514,  588, 1626,  590, 520,  592, 514,  588, 520,  594, 514,  588, 522,  560, 560,  564, 546,  596, 512,  590, 1622,  564, 544,  558, 1656,  560, 1652,  594, 514,  588, 520,  562, 1654,  562, 1648,  558, 552,  562, 1650,  564, 546,  556, 552,  560, 1650,  586, 1638,  588, 5212,  4746, 4386,  588, 1626,  590, 518,  594, 1618,  558, 1656,  560, 552,  590, 514,  558, 1654,  594, 516,  586, 522,  558, 1658,  558, 548,  596, 512,  590, 1624,  592, 1622,  564, 544,  590, 1636,  590, 1622,  594, 516,  586, 1622,  594, 1618,  588, 1624,  590, 1622,  594, 1618,  588, 1626,  590, 518,  564, 1650,  566, 542,  560, 546,  568, 546,  588, 520,  592, 516,  586, 534,  590, 520,  592, 514,  588, 1626,  590, 516,  556, 1660,  566, 1644,  592, 516,  566, 544,  590, 1624,  592, 1618,  558, 546,  596, 1618,  588, 520,  592, 516,  566, 1646,  562, 1666,  560};  // COOLIX B2BF2C
22:11:37.100 -> uint64_t data = 0xB2BF2C;
22:11:37.100 -> 
22:11:37.100 -> 
22:11:38.285 -> Timestamp : 000027.729
22:11:38.285 -> Library   : v2.8.4
22:11:38.285 -> 
22:11:38.285 -> Protocol  : COOLIX
22:11:38.285 -> Code      : 0xB2BF2C (24 Bits)
22:11:38.285 -> Mesg Desc.: Power: On, Mode: 3 (Heat), Fan: 5 (Auto), Temp: 20C, Zone Follow: Off, Sensor Temp: Off
22:11:38.285 -> uint16_t rawData[199] = {4746, 4386,  588, 1624,  562, 546,  566, 1644,  592, 1622,  594, 516,  588, 520,  592, 1620,  564, 546,  588, 520,  562, 1654,  592, 516,  586, 520,  592, 1620,  586, 1626,  568, 540,  562, 1666,  560, 1652,  594, 514,  588, 1624,  560, 1650,  596, 1618,  586, 1626,  590, 1622,  594, 1620,  586, 520,  562, 1654,  562, 548,  586, 520,  592, 516,  586, 522,  592, 518,  584, 534,  568, 542,  590, 518,  594, 1618,  588, 520,  594, 1618,  588, 1624,  592, 516,  586, 522,  590, 1622,  584, 1628,  588, 520,  594, 1618,  566, 546,  588, 520,  592, 1616,  588, 1634,  590, 5214,  4724, 4404,  560, 1654,  562, 548,  564, 1646,  590, 1624,  560, 548,  564, 542,  590, 1622,  594, 514,  588, 520,  592, 1620,  596, 514,  566, 548,  586, 1624,  592, 1620,  594, 514,  590, 1634,  592, 1624,  560, 548,  596, 1614,  590, 1622,  594, 1620,  566, 1648,  560, 1652,  562, 1650,  586, 520,  592, 1620,  566, 542,  560, 548,  596, 516,  586, 518,  564, 544,  588, 532,  590, 520,  592, 514,  558, 1660,  586, 518,  564, 1652,  592, 1618,  558, 550,  562, 546,  586, 1626,  590, 1622,  564, 544,  588, 1624,  560, 548,  586, 522,  590, 1620,  596, 1632,  562};  // COOLIX B2BF2C
22:11:38.417 -> uint64_t data = 0xB2BF2C;
22:11:38.417 -> 
22:11:38.417 -> 
22:11:39.567 -> Timestamp : 000029.018
22:11:39.567 -> Library   : v2.8.4
22:11:39.567 -> 
22:11:39.567 -> Protocol  : COOLIX
22:11:39.567 -> Code      : 0xB2BF2C (24 Bits)
22:11:39.567 -> Mesg Desc.: Power: On, Mode: 3 (Heat), Fan: 5 (Auto), Temp: 20C, Zone Follow: Off, Sensor Temp: Off
22:11:39.599 -> uint16_t rawData[199] = {4704, 4428,  586, 1628,  588, 520,  592, 1620,  586, 1628,  588, 518,  594, 516,  588, 1624,  590, 520,  562, 544,  558, 1656,  590, 516,  586, 522,  560, 1652,  594, 1618,  566, 542,  592, 1632,  584, 1628,  588, 520,  592, 1622,  564, 1646,  590, 1624,  592, 1618,  586, 1626,  560, 1648,  556, 550,  562, 1652,  594, 514,  590, 518,  594, 514,  588, 520,  594, 514,  588, 532,  590, 518,  564, 544,  558, 1654,  562, 546,  588, 1624,  560, 1654,  592, 518,  594, 514,  568, 1644,  592, 1620,  586, 524,  558, 1654,  562, 550,  562, 546,  596, 1618,  588, 1632,  594, 5208,  4730, 4402,  592, 1622,  594, 514,  590, 1624,  560, 1650,  586, 522,  560, 550,  562, 1650,  586, 522,  590, 516,  586, 1628,  588, 520,  594, 514,  588, 1626,  560, 1652,  594, 512,  558, 1666,  590, 1626,  590, 514,  586, 1624,  592, 1618,  586, 1626,  590, 1620,  586, 1628,  558, 1654,  592, 516,  586, 1626,  590, 518,  554, 554,  588, 522,  560, 548,  596, 514,  588, 532,  590, 518,  596, 514,  558, 1656,  560, 548,  596, 1616,  588, 1622,  592, 516,  556, 552,  592, 1620,  556, 1656,  590, 518,  594, 1620,  586, 522,  590, 516,  586, 1626,  590, 1634,  562};  // COOLIX B2BF2C
22:11:39.697 -> uint64_t data = 0xB2BF2C;
22:11:39.697 -> 
22:11:39.697 -> 
22:11:40.880 -> Timestamp : 000030.312
22:11:40.880 -> Library   : v2.8.4
22:11:40.880 -> 
22:11:40.880 -> Protocol  : COOLIX
22:11:40.880 -> Code      : 0xB2BF2C (24 Bits)
22:11:40.880 -> Mesg Desc.: Power: On, Mode: 3 (Heat), Fan: 5 (Auto), Temp: 20C, Zone Follow: Off, Sensor Temp: Off
22:11:40.880 -> uint16_t rawData[199] = {4736, 4394,  590, 1624,  592, 514,  588, 1622,  592, 1620,  596, 514,  588, 520,  592, 1620,  596, 514,  568, 542,  592, 1620,  586, 522,  560, 548,  566, 1648,  566, 1646,  560, 548,  594, 1632,  594, 1618,  588, 522,  560, 1650,  586, 1626,  590, 1622,  594, 1620,  566, 1644,  590, 1622,  594, 514,  588, 1624,  592, 514,  556, 552,  562, 546,  568, 540,  560, 546,  566, 554,  590, 518,  564, 548,  594, 1616,  590, 518,  594, 1616,  590, 1624,  592, 514,  588, 522,  560, 1656,  560, 1652,  594, 514,  588, 1624,  592, 518,  594, 514,  590, 1626,  590, 1632,  594, 5210,  4730, 4402,  594, 1618,  586, 520,  592, 1620,  596, 1618,  588, 520,  592, 516,  586, 1626,  592, 518,  596, 512,  590, 1626,  590, 518,  596, 512,  590, 1622,  596, 1616,  588, 520,  592, 1632,  594, 1620,  566, 542,  590, 1622,  594, 1618,  588, 1628,  558, 1652,  594, 1618,  588, 1626,  590, 518,  594, 1616,  558, 548,  594, 514,  588, 522,  560, 548,  596, 516,  586, 534,  590, 518,  594, 514,  558, 1656,  560, 548,  564, 1648,  558, 1654,  562, 544,  556, 552,  592, 1620,  564, 1646,  592, 516,  566, 1646,  558, 550,  564, 544,  558, 1654,  562, 1662,  596};  // COOLIX B2BF2C
22:11:40.977 -> uint64_t data = 0xB2BF2C;

The sender code is very easy, because I send in a loop the same command:

// init
ac.begin();
ac.on();
ac.setTemp(20);
ac.setFan(FAN_AUTO);
ac.setMode(HEAT_MODE);

// call send in a loop every second
ac.send();

What brand/model IR demodulator are you using?

Emitter: https://www.seeedstudio.com/Grove-Infrared-Emitter.html

Receiver: https://www.seeedstudio.com/Grove-Infrared-Receiver.html?queryID=1622147f7b209c34a6cebe9444abb08e&objectID=2247&indexName=bazaar_retailer_products

Circuit diagram and hardware used (if applicable)

Sender:
ESP32S2 DevKit-C with Grove Infrared Emitter connected to GPIO 4

Receiver:
ESP32S2 DevKit-C with Grove Infrared Receiver connected to GPIO 14

Other useful information

Feel free to ask. I can reproduce this problem again and again.

@crankyoldgit
Copy link
Owner

Something is screwing around with the timing system. i.e. The pulses produced are not as they should be.
This is probably due to the Wifi operating in the background while sending. In theory, it shouldn't interrupt it or cause a problem.

As I don't think I have an ESP32-S2 unit handy I'm going to have to get you to test a few things.
First. Let's start with adding a ac.calibrate(); in your init() clause. The default timings for an ESP should be the same, but I never tested it on an S2 variant.

I doub't that will fix it but. I'll get back to you with some more ideas in a bit.

@crankyoldgit
Copy link
Owner

Looking into this more, it seems the S2 being a single processor is more susceptable to causing delays in bit-banging (which is what we are doing to generate a PWM signal on the ESP chips). So it looks like this won't be properly fixed till we implement sending via the RMT hardware. I guess I'll need to find some time and up the priority on that.

@Ks89
Copy link
Author

Ks89 commented Nov 25, 2022

Hi @crankyoldgit thanks for the info.
I tried to add ac.calibrate(); in setup() before ac.begin() but it still not working. The same, also with ac.calibrate(); after ac.begin().

Looking into this more, it seems the S2 being a single processor is more susceptable to causing delays in bit-banging (which is what we are doing to generate a PWM signal on the ESP chips). So it looks like this won't be properly fixed till we implement sending via the RMT hardware. I guess I'll need to find some time and up the priority on that.

Ok, yes this is a big problem, because ESP32 S2 is very common today (S3 is still quite rare, but it's already available on the market). I have many of them in my home.
Is the first ESP32 DevkitC supported?
If you want to work on this issue with high priority I can help you to do some tests on different ESP devices.
I have the first Esp32 devkitc (Az-delivery), ESP32S2 (official by Espressif) and I can find an ESPS3 DevkitC if required.

@Ks89
Copy link
Author

Ks89 commented Nov 26, 2022

Tested on all 3 versions of ESP32 DevKits and these are the results:

  • ESP32 DevKit-C (the first version with ESP32-WROOM-32): OK
  • ESP32 S2 DevKit-C (ESP32-S2-SOLO): not working as described above
  • ESP32 S3 DevKit-C (ESP32-S3-WROOM-1): OK

@Onepamopa
Copy link

Is ESP-32S affected?

@Ks89
Copy link
Author

Ks89 commented Dec 15, 2022

No idea. Is it a sort of mid version between ESP32 and ESP32S2?

@Onepamopa
Copy link

Who knows.... here's it:

esp-32s

@crankyoldgit
Copy link
Owner

If it is dual core (2 CPUs) then you'll probably be fine

@Onepamopa
Copy link

aren't all esp32's dual core ?

@crankyoldgit
Copy link
Owner

crankyoldgit commented Dec 16, 2022

aren't all esp32's dual core ?

No. e.g. The ESP32-S2 is a single core, hence why we are have an issue on that platform when the CPU needs to multi-task.

@Onepamopa
Copy link

aren't all esp32's dual core ?

No. e.g. The ESP32-S2 is a single core, hence why we are have an issue on that platform when the CPU needs to multi-task.

Isn't ESP8266 also a single-core board? Why doesn't it have an issue?

@NiKiZe
Copy link
Collaborator

NiKiZe commented Jun 1, 2023

Is there any chance that this maybe is something similar as #1995 where "the pin used was the issue"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants