nopnop2002 / esp-idf-DFPlayerMini

DFPlayer - A Mini MP3 Player For ESP-IDF
MIT License
13 stars 2 forks source link

DFPlayerError:Get Wrong Stack #2

Open srn271 opened 6 months ago

srn271 commented 6 months ago

Hi,

first of all, thank you very much for the effort of translating the library!

Unfortunately, I get the following error messages when i run your GetStarted example:

...
I (278) main_task: Calling app_main()
I (278) uart_rx_task: Start
I (288) uart_tx_task: Start

sending:7e ff 6 c 0 0 0 fe ef ef
received:7e ff 6 40 0 0 3 fe b8 ef 
I (608) MAIN: DF_begin=1
I (608) MAIN: DFPlayer Mini online.
I (608) MAIN: Play first track on 01 folder.

sending:7e ff 6 6 0 0 1e fe d7 ef

sending:7e ff 6 3 0 0 1 fe f7 ef
received:7e ff 6 40 0 0 3 fe b8 ef 
DFPlayerError:Get Wrong Stack
received:7e ff 6 40 0 0 3 fe b8 ef 
DFPlayerError:Get Wrong Stack

The DFPlayer works in Arduino Studio if I use the original library (in v1.0.6). Do you have any idea why this could be?

Hardware: ESP32-C3: https://wiki.seeedstudio.com/XIAO_ESP32C3_Getting_Started MP3-Player: MP3-TF-16P V3.0 (DFPlayer Mini)

Thanks in advance!

Regards

nopnop2002 commented 6 months ago

DFPlayerError:Get Wrong Stack

This error is reported by DFPlayer itself. The application is not involved in this error. There is no information about this error in the datasheet either.

You should contact the DFPlayer manufacturer for more information about this error.

The power current supplied by ESP32 to DFPlayer may be low.

This is my logging using ESP32C3.

sending:7e ff 6 c 0 0 0 fe ef ef
received:ff received:7e ff 6 3f 0 0 2 fe ba ef
I (1198) MAIN: DF_begin=1
I (1198) MAIN: DFPlayer Mini online.
I (1198) MAIN: Play first track on 01 folder.

sending:7e ff 6 6 0 0 1e fe d7 ef

sending:7e ff 6 3 0 0 1 fe f7 ef
received:7e ff 6 3d 0 0 1 fe bd ef
Number:1 Play Finished!
received:7e ff 6 3d 0 0 1 fe bd ef
Number:1 Play Finished!

The status reported by DFPlayer itself is different from yours.

received:7e ff 6 40 0 0 3 fe b8 ef

srn271 commented 6 months ago

Thank you for your response!

sending:7e ff 6 c 0 0 0 fe ef ef received:ff received:7e ff 6 3f 0 0 2 fe ba ef

Did you receive a single 0xff byte after reset?

I get this error for every command. But when i use the original (C++) library in Arduino studio, everything is working. It is the same setup, power supply, wiring :(

The only difference i could see is, that the original library makes use of the ack mode. I tried to enable it (you commented it out), but it did not work either.

nopnop2002 commented 6 months ago

Did you receive a single 0xff byte after reset?

no. This is all the logging.

sending:7e ff 6 c 0 0 0 fe ef ef
received:ff received:7e ff 6 3f 0 0 2 fe ba ef
I (1198) MAIN: DF_begin=1
I (1198) MAIN: DFPlayer Mini online.
I (1198) MAIN: Play first track on 01 folder.

sending:7e ff 6 6 0 0 1e fe d7 ef

sending:7e ff 6 3 0 0 1 fe f7 ef
received:7e ff 6 3d 0 0 1 fe bd ef
Number:1 Play Finished!
received:7e ff 6 3d 0 0 1 fe bd ef
Number:1 Play Finished!

The Arduino's 5V output can supply 800 mA. The ESP32's 3.3V output depends on the regulator installed.

How many amperes can Seeed Studio XIAO ESP32C3 deliver?

srn271 commented 6 months ago

received:ff received:7e ff 6 3f 0 0 2 fe ba ef

This is your second line (2x received). That is why i was asking. Maybe a copy&paste issue.

I didn't use an Arduino. I just used the Arduino Studio IDE. Always with ESP32C3. The 3.3V output can deliver 700mA. But i am using the 5V Output.

Thank you for your help πŸ™πŸΌ

nopnop2002 commented 6 months ago

Maybe a copy&paste issue.

Yes. You are right.

nopnop2002 commented 6 months ago

What happens if the speaker is not connected?

srn271 commented 6 months ago

What happens if the speaker is not connected?

No difference. Same output.

nopnop2002 commented 6 months ago

Thank you.

I don't know the cause. In my environment, no matter how many times I reset it, I get the same result.

sending:7e ff 6 c 0 0 0 fe ef ef
received:ff received:7e ff 6 3f 0 0 2 fe ba ef
I (1198) MAIN: DF_begin=1
I (1198) MAIN: DFPlayer Mini online.
I (1198) MAIN: Play first track on 01 folder.

sending:7e ff 6 6 0 0 1e fe d7 ef

sending:7e ff 6 3 0 0 1 fe f7 ef
received:7e ff 6 3d 0 0 1 fe bd ef
Number:1 Play Finished!
received:7e ff 6 3d 0 0 1 fe bd ef
Number:1 Play Finished!
srn271 commented 6 months ago

Hmm :( alright. But many thanks for your help.

I will keep trying. I let you know, if i could find the issue.

nopnop2002 commented 6 months ago

Please tell me one last thing.

Is the sound source (MP3 file) you are using the one provided by me?

srn271 commented 6 months ago

I tried yours and my mp3 files. There is no difference. I just found a description to the error:

7E FF 06 40 00 00 03 xx xx EF - Serial receiving error(a frame has not been received completely yet)

Maybe it's the missing ACK mode. I assume that you have a different revision of DFPlayer. That's why it will work for you.

nopnop2002 commented 6 months ago

Maybe it's the missing ACK mode.

What is missing?

_sending[Stack_ACK]

This is the 4th byte of the command sent by the host. This indicates whether the host is waiting for a response from the DF Player.


There are many variations of the MP3 IC installed in DF Player.

I own three DF Players, two are JC AA18 and one is YX5200. YX5200 give me this error sometime:

sending:7e ff 6 6 0 0 1e fe d7 ef

sending:7e ff 6 3 0 0 1 fe f7 ef
received:7e ff 6 40 0 0 4 fe b7 ef
DFPlayerError:Check Sum Not Match

JC AA18 is very stable.

IMG_5414

In addition to this, there are YM5200, YM5300, MH2024K, GD3200B, etc. There is an article about WrongStack here. https://github.com/arendst/Tasmota/discussions/11737

There are also articles like this. https://forum.arduino.cc/t/df-player-warning/952842 https://discourse.voss.earth/t/probleme-mit-dem-dfplayer-mini/12203

srn271 commented 6 months ago

I own three DF Players, all of them are MH2024K-24SS (narrow chip). Thank you for your findings.

I will try disabling the checksums, like mentioned in the first article. But I won't get round to it until this evening (german time).

nopnop2002 commented 6 months ago

I purchased DF Player about 6 years ago.

There were no such problems at that time.

Perhaps compatible chip products have only recently emerged.


german time

Is this article for you? https://discourse.voss.earth/t/probleme-mit-dem-dfplayer-mini/12203

srn271 commented 6 months ago

german time

Is this article for you? https://discourse.voss.earth/t/probleme-mit-dem-dfplayer-mini/12203

They are talking about other issues.

But the first link you gave me is a try worth (https://github.com/arendst/Tasmota/discussions/11737).

nopnop2002 commented 5 months ago

I got the MP3-TF-16P. Many suppliers sell MP3-TF-16P as DFPlayerMini. But it is a completely different product and is not compatible. This repository does not support MP3-TF-16P. The two on the top are MP3-TF-16P.

MP3-TF-16P-1

MP3-TF-16P-2

srn271 commented 5 months ago

I tried ordering your variant. Let's see if I get it too.

What still surprises me, however, is that my variant with the DFPlayerMini library in Arduino Studio and the same setup works. I have debugged further, but have not yet been able to identify the problem. I think that the serial connection works differently.

However, I would like to get it to work with ESP-IDF in VSCode.

nopnop2002 commented 5 months ago

What still surprises me, however, is that my variant with the DFPlayerMini library in Arduino Studio

Please tell me the ArduinoLibrary repository you are using.

I will also try it with Arduino + ATmega328.

srn271 commented 5 months ago

I didn't use an Arduino. I used the same ESP32-C3 and MP3-TF-16P.

I used the official library: image https://github.com/DFRobot/DFRobotDFPlayerMini

And i used this example code:

#include "Arduino.h"
#include <HardwareSerial.h>
#include "DFRobotDFPlayerMini.h"

HardwareSerial MySerial0(0);
DFRobotDFPlayerMini myDFPlayer;

void printDetail(uint8_t type, int value);

void setup() {
  MySerial0.begin(9600, SERIAL_8N1, 20, 21);
  Serial.begin(115200);

  Serial.println();
  Serial.println(F("DFRobot DFPlayer Mini Demo"));
  Serial.println(F("Initializing DFPlayer ... (May take 3~5 seconds)"));

  if (!myDFPlayer.begin(MySerial0)) {
    Serial.println(F("Unable to begin:"));
    Serial.println(F("1.Please recheck the connection!"));
    Serial.println(F("2.Please insert the SD card!"));
    while (true);
  }
  Serial.println(F("DFPlayer Mini online."));

  myDFPlayer.volume(6);
  myDFPlayer.play(1);
}

void loop() {
  static unsigned long timer = millis();

  if (millis() - timer > 3000) {
    timer = millis();
    myDFPlayer.next();
  }

  if (myDFPlayer.available()) {
    printDetail(myDFPlayer.readType(), myDFPlayer.read());
  }
}

void printDetail(uint8_t type, int value) {
  switch (type) {
    case TimeOut:
      Serial.println(F("Time Out!"));
      break;
    case WrongStack:
      Serial.println(F("Stack Wrong!"));
      break;
    case DFPlayerCardInserted:
      Serial.println(F("Card Inserted!"));
      break;
    case DFPlayerCardRemoved:
      Serial.println(F("Card Removed!"));
      break;
    case DFPlayerCardOnline:
      Serial.println(F("Card Online!"));
      break;
    case DFPlayerPlayFinished:
      Serial.print(F("Number:"));
      Serial.print(value);
      Serial.println(F(" Play Finished!"));
      break;
    case DFPlayerError:
      Serial.print(F("DFPlayerError:"));
      switch (value) {
        case Busy:
          Serial.println(F("Card not found"));
          break;
        case Sleeping:
          Serial.println(F("Sleeping"));
          break;
        case SerialWrongStack:
          Serial.println(F("Get Wrong Stack"));
          break;
        case CheckSumNotMatch:
          Serial.println(F("Check Sum Not Match"));
          break;
        case FileIndexOut:
          Serial.println(F("File Index Out of Bound"));
          break;
        case FileMismatch:
          Serial.println(F("Cannot Find File"));
          break;
        case Advertise:
          Serial.println(F("In Advertise"));
          break;
        default:
          break;
      }
      break;
    default:
      break;
  }
}

This combination is working for the MP3-TF-16P.

nopnop2002 commented 5 months ago

Thank you for information.


I didn't use an Arduino.

Sorry for confusing you.

Arduino is used in two ways.

One indicates a hardware series such as Ardunino Uno.

The other one shows the Arduino development environment.

Your code is entirely Arduino development environment code.

I will also try it with Arduino development environment + ATmega328.

srn271 commented 5 months ago

Hi @nopnop2002

i received the new copies of the DFPlayerMini today. As you say, it works correctly. I was sent the DFPlayer Mini HW-247A model (GD3200B).

Thank you for your help 😊

However, I will debug again to see why it works with the Arduino library on the other module. If I find out, I will submit a merge request.

nopnop2002 commented 5 months ago

Now works with MP3-TF-16P.

I developed it based on V1.0.3, but the code has changed since then.

I will publish it after testing it for a while.

nopnop2002 commented 5 months ago

I updated the repository. Please try the latest version. Thank you for your cooperation.

srn271 commented 5 months ago

Sorry for the late answer. Unfortunately, it still doesn't work.

I (24) boot: ESP-IDF v5.2.2 2nd stage bootloader
I (24) boot: compile time Jun  9 2024 12:40:56
I (25) boot: chip revision: v0.4
I (27) boot.esp32c3: SPI Speed      : 80MHz
I (32) boot.esp32c3: SPI Mode       : DIO
I (37) boot.esp32c3: SPI Flash Size : 2MB
I (42) boot: Enabling RNG early entropy source...
I (47) boot: Partition Table:
I (51) boot: ## Label            Usage          Type ST Offset   Length
I (58) boot:  0 nvs              WiFi data        01 02 00009000 00006000
I (65) boot:  1 phy_init         RF data          01 01 0000f000 00001000
I (73) boot:  2 factory          factory app      00 00 00010000 00100000
I (80) boot: End of partition table
I (84) esp_image: segment 0: paddr=00010020 vaddr=3c020020 size=09e68h ( 40552) map
I (99) esp_image: segment 1: paddr=00019e90 vaddr=3fc8c200 size=01254h (  4692) load
I (102) esp_image: segment 2: paddr=0001b0ec vaddr=40380000 size=04f2ch ( 20268) load
I (113) esp_image: segment 3: paddr=00020020 vaddr=42000020 size=19148h (102728) map
I (134) esp_image: segment 4: paddr=00039170 vaddr=40384f2c size=072bch ( 29372) load
I (144) boot: Loaded app from partition at offset 0x10000
I (144) boot: Disabling RNG early entropy source...
I (155) cpu_start: Unicore app
I (164) cpu_start: Pro cpu start user code
I (164) cpu_start: cpu freq: 160000000 Hz
I (164) cpu_start: Application information:
I (167) cpu_start: Project name:     DFPlayerMini
I (173) cpu_start: App version:      d95fcb1-dirty
I (178) cpu_start: Compile time:     Jun  9 2024 12:40:37
I (184) cpu_start: ELF file SHA256:  4175f4cadc4fbdba...
I (190) cpu_start: ESP-IDF:          v5.2.2
I (195) cpu_start: Min chip rev:     v0.3
I (200) cpu_start: Max chip rev:     v1.99
I (204) cpu_start: Chip rev:         v0.4
I (209) heap_init: Initializing. RAM available for dynamic allocation:
I (216) heap_init: At 3FC8EB60 len 000314A0 (197 KiB): RAM
I (223) heap_init: At 3FCC0000 len 0001C710 (113 KiB): Retention RAM
I (230) heap_init: At 3FCDC710 len 00002950 (10 KiB): Retention RAM
I (237) heap_init: At 50000010 len 00001FD8 (7 KiB): RTCRAM
I (244) spi_flash: detected chip: generic
I (247) spi_flash: flash io: dio
W (251) spi_flash: Detected size(4096k) larger than the size in the binary image header(2048k). Using the size in the binary image header.
I (265) sleep: Configure to isolate all GPIO pins in sleep state
I (271) sleep: Enable automatic switching of GPIO sleep configuration
I (279) main_task: Started on CPU0
I (279) main_task: Calling app_main()
I (279) uart_rx_task: Start
I (289) uart_tx_task: Start

sending:7e ff 6 c 1 0 0 fe ee ef
received:7e ff 6 40 0 0 3 fe b8 ef
I (609) MAIN: DF_begin=0
E (609) MAIN: DFPlayer Mini not online.

But the DFPlayerMini that I recently received are still working.

nopnop2002 commented 5 months ago
DFPlayer Mini not online.

This message is caused by the SD card.

Please try changing the SD card.


This is my log when I turn on debug mode on menuconfig.

config-app


I (327) uart_rx_task: Start
I (327) uart_tx_task: Start

sending:7e ff 6 c 1 0 0 fe ee ef
I (507) uart_rx_task: Read 10 bytes
I (507) uart_rx_task: data[0]=0x7e
I (507) uart_rx_task: data[1]=0xff
I (507) uart_rx_task: data[2]=0x6
I (507) uart_rx_task: data[3]=0x41
I (507) uart_rx_task: data[4]=0x0
I (517) uart_rx_task: data[5]=0x0
I (517) uart_rx_task: data[6]=0x0
I (527) uart_rx_task: data[7]=0xfe
I (527) uart_rx_task: data[8]=0xba
I (527) uart_rx_task: data[9]=0xef
received:7e ff 6 41 0 0 0 fe ba ef
I (687) uart_rx_task: Read 1 bytes
I (687) uart_rx_task: data[0]=0xff
received:ff I (1257) uart_rx_task: Read 10 bytes
I (1257) uart_rx_task: data[0]=0x7e
I (1257) uart_rx_task: data[1]=0xff
I (1257) uart_rx_task: data[2]=0x6
I (1257) uart_rx_task: data[3]=0x3f
I (1267) uart_rx_task: data[4]=0x0
I (1267) uart_rx_task: data[5]=0x0
I (1267) uart_rx_task: data[6]=0x2
I (1277) uart_rx_task: data[7]=0xfe
I (1277) uart_rx_task: data[8]=0xba
I (1287) uart_rx_task: data[9]=0xef
received:7e ff 6 3f 0 0 2 fe ba ef
I (1487) MAIN: DF_begin=1
I (1487) MAIN: DFPlayer Mini online.
I (1487) MAIN: Play first track on 01 folder.

sending:7e ff 6 6 1 0 1e fe d6 ef
I (1637) uart_rx_task: Read 10 bytes
I (1637) uart_rx_task: data[0]=0x7e
I (1637) uart_rx_task: data[1]=0xff
I (1637) uart_rx_task: data[2]=0x6
I (1637) uart_rx_task: data[3]=0x41
I (1637) uart_rx_task: data[4]=0x0
I (1647) uart_rx_task: data[5]=0x0
I (1647) uart_rx_task: data[6]=0x0
I (1657) uart_rx_task: data[7]=0xfe
I (1657) uart_rx_task: data[8]=0xba
I (1667) uart_rx_task: data[9]=0xef
received:7e ff 6 41 0 0 0 fe ba ef

sending:7e ff 6 3 1 0 1 fe f6 ef
I (1817) uart_rx_task: Read 10 bytes
I (1817) uart_rx_task: data[0]=0x7e
I (1817) uart_rx_task: data[1]=0xff
I (1817) uart_rx_task: data[2]=0x6
I (1817) uart_rx_task: data[3]=0x41
I (1817) uart_rx_task: data[4]=0x0
I (1827) uart_rx_task: data[5]=0x0
I (1827) uart_rx_task: data[6]=0x0
I (1837) uart_rx_task: data[7]=0xfe
I (1837) uart_rx_task: data[8]=0xba
I (1847) uart_rx_task: data[9]=0xef
received:7e ff 6 41 0 0 0 fe ba ef
I (29387) uart_rx_task: Read 10 bytes
I (29387) uart_rx_task: data[0]=0x7e
I (29387) uart_rx_task: data[1]=0xff
I (29387) uart_rx_task: data[2]=0x6
I (29387) uart_rx_task: data[3]=0x3d
I (29397) uart_rx_task: data[4]=0x0
I (29397) uart_rx_task: data[5]=0x0
I (29397) uart_rx_task: data[6]=0x1
I (29407) uart_rx_task: data[7]=0xfe
I (29407) uart_rx_task: data[8]=0xbd
I (29417) uart_rx_task: data[9]=0xef
received:7e ff 6 3d 0 0 1 fe bd ef
Number:1 Play Finished!
srn271 commented 5 months ago

I get the following output with debug mode. I don't think it is the SD card, because the SD card works in Arduino IDE. But i can buy one tomorrow (cannot find any other now). I tested another SD card. Nothing changed.

I could imagine it's a timing problem or different Serial communication. Did you test it with an ESP32?

I (279) main_task: Started on CPU0
I (279) main_task: Calling app_main()
I (279) uart_rx_task: Start
I (289) uart_tx_task: Start

sending:7e ff 6 c 1 0 0 fe ee ef
I (409) uart_rx_task: Read 10 bytes
I (409) uart_rx_task: data[0]=0x7e
I (409) uart_rx_task: data[1]=0xff
I (409) uart_rx_task: data[2]=0x6
I (409) uart_rx_task: data[3]=0x40
I (409) uart_rx_task: data[4]=0x0
I (419) uart_rx_task: data[5]=0x0
I (419) uart_rx_task: data[6]=0x3
I (429) uart_rx_task: data[7]=0xfe
I (429) uart_rx_task: data[8]=0xb8
I (429) uart_rx_task: data[9]=0xef
received:7e ff 6 40 0 0 3 fe b8 ef
I (529) uart_rx_task: Read 10 bytes
I (529) uart_rx_task: data[0]=0x7e
I (529) uart_rx_task: data[1]=0xff
I (529) uart_rx_task: data[2]=0x6
I (529) uart_rx_task: data[3]=0x40
I (529) uart_rx_task: data[4]=0x0
I (539) uart_rx_task: data[5]=0x0
I (539) uart_rx_task: data[6]=0x3
I (549) uart_rx_task: data[7]=0xfe
I (549) uart_rx_task: data[8]=0xb8
I (549) uart_rx_task: data[9]=0xef
I (639) MAIN: DF_begin=0
E (639) MAIN: DFPlayer Mini not online.
nopnop2002 commented 5 months ago

Did you test it with an ESP32?

Yes. I'm using vanila esp-idf. I don't use VS-Code esp-idf. But that doesn't matter.

I could imagine it's a timing problem or different Serial communication.

No. UART communication is working correctly. MP3-TF-16P behaves differently.

Your logging:

sending:7e ff 6 c 1 0 0 fe ee ef
received:7e ff 6 40 0 0 3 fe b8 ef --> Returns an error, request retransmission

My logging:

sending:7e ff 6 c 1 0 0 fe ee ef
received:7e ff 6 41 0 0 0 fe ba ef --> Reply 

My MP3-TF-16P has MH2024K-24SS chip on back.


If you enable debugging of the Arduino library, we might discover something new.

https://github.com/DFRobot/DFRobotDFPlayerMini/blob/master/DFRobotDFPlayerMini.h#L36

srn271 commented 5 months ago

Hi, here is my Output with debugging enabled in Arduino IDE:

08:19:15.844 -> 
08:19:15.844 -> DFRobot DFPlayer Mini Demo
08:19:15.844 -> Initializing DFPlayer ... (May take 3~5 seconds)
08:19:15.844 -> 
08:19:15.844 -> sending:7E FF 6 C 1 0 0 FE EE EF 
08:19:15.844 -> received:FF received:7E FF 6 3F 0 0 2 FE BA EF 
08:19:16.058 -> DFPlayer Mini online.
08:19:16.593 -> 
08:19:16.593 -> sending:7E FF 6 6 1 0 6 FE EE EF 
08:19:16.659 -> received:7E FF 6 41 0 0 0 FE BA EF 
08:19:16.691 -> 
08:19:16.691 -> sending:7E FF 6 3 1 0 1 FE F6 EF 
08:19:16.691 -> Time Out!
08:19:16.803 -> received:7E FF 6 41 0 0 0 FE BA EF 
08:19:19.681 -> 
08:19:19.681 -> sending:7E FF 6 1 1 0 0 FE F9 EF 
08:19:19.760 -> received:7E FF 6 41 0 0 0 FE BA EF 
08:19:22.701 -> 
08:19:22.701 -> sending:7E FF 6 1 1 0 0 FE F9 EF 
08:19:22.733 -> received:7E FF 6 41 0 0 0 FE BA EF 

This block is repeated infinitely (due loop()):

08:19:22.701 -> 
08:19:22.701 -> sending:7E FF 6 1 1 0 0 FE F9 EF 
08:19:22.733 -> received:7E FF 6 41 0 0 0 FE BA EF 

I tried a new SD card too. No difference. I got the same chip on the back site (MH2024K-24SS). That drives me crazy! πŸ™ˆ

Did you test it with an ESP32? Yes.

Can you tell me what type of ESP32 you used? I'll test an ESP32-S3 this evening. But now, i am in a rush πŸ˜…

Thanks for your help, i really appreciate it!

nopnop2002 commented 5 months ago

ESP-IDF-Environment:

sending:7e ff 6 c 1 0 0 fe ee ef
received:7e ff 6 40 0 0 3 fe b8 ef --> Returns an error, request retransmission

Arduino-Environment:

08:19:15.844 -> sending:7E FF 6 C 1 0 0 FE EE EF 
08:19:15.844 -> received:FF received:7E FF 6 3F 0 0 2 FE BA EF ---> Send initialization parameters

!!!!

08:19:16.593 -> sending:7E FF 6 6 1 0 6 FE EE EF ---> Specify volume
08:19:16.659 -> received:7E FF 6 41 0 0 0 FE BA EF  ---> Replay
08:19:16.691 -> 
08:19:16.691 -> sending:7E FF 6 3 1 0 1 FE F6 EF ---> Specify tracking(NUM)
08:19:16.691 -> Time Out!
08:19:16.803 -> received:7E FF 6 41 0 0 0 FE BA EF  ---> Replay
08:19:19.681 -> 
08:19:19.681 -> sending:7E FF 6 1 1 0 0 FE F9 EF  ---> Play Next
08:19:19.760 -> received:7E FF 6 41 0 0 0 FE BA EF  ---> Replay
08:19:22.701 -> 
08:19:22.701 -> sending:7E FF 6 1 1 0 0 FE F9 EF ---> Play Next
08:19:22.733 -> received:7E FF 6 41 0 0 0 FE BA EF ---> Replay

That drives me crazy!

I'm too.

Can you tell me what type of ESP32 you used?

Normal ESP32. Neither ESP32S2 nor ESP32S3.

srn271 commented 5 months ago

I have some interesting news to share..

Normal ESP32. Neither ESP32S2 nor ESP32S3.

I've now also got a β€œnormal” ESP32.

And hurray! πŸ₯³πŸŽ‰ It worked straight away with this one.

With this success, I tested the same configuration again on all other ESP32s. I was also able to get it to work on the ESP32-C6 πŸ™ŒπŸ» (don't know what i did wrong last time)

However, it still does not work on the ESP-C3 and ESP-S3. Something must be different in the variants.

Assuming I have done everything correctly, these variants are not supported and the information should be included in the README.

Thank you for your support! β™₯️

(I think the ticket can be closed with this. Unless you want to investigate the problem with the C3/S3 further.)

nopnop2002 commented 5 months ago

However, it still does not work on the ESP-C3 and ESP-S3.

Thank you for the report.

This project uses GPIO5 as UART RX by default.

Isn't the onboard LED connected to GPIO5 of your ESP32S3/C3/C6?

If some other device is connected to GPIO5, it may not be possible to communicate properly.

Please try changing the RX GPIO in menuconfig.

srn271 commented 5 months ago

If some other device is connected to GPIO5, it may not be possible to communicate properly.

Changing the UART interface has been successful with the ESP32-C3. πŸ₯³πŸŽ‰ I actually thought that I had already tried this... (β•―Β°β–‘Β°οΌ‰β•―οΈ΅ ┻━┻ With the GPIO pins 9 (RX) and 10 (TX) this now also works.

Unfortunately, I can't find a working combination for the ESP32-S3. I first tried all default pins of all 3 UART interfaces and then any others (since PIN multiplexing is supported).

Summary: Β΅C RX TX Note
ESP32 4 5 -
ESP32-C3 9 10 -
ESP32-C6 4 5 -
ESP32-S3 - - Not working

I may be missing something. I'll do some more research.

nopnop2002 commented 5 months ago

Unfortunately, I can't find a working combination for the ESP32-S3.

Unlike the Arduino environment, ESP-IDF has no restrictions on the pins used for UART.

You can use any pin you like with UART.

Just change the RX pin as shown below. config

srn271 commented 5 months ago

Thats exactly what i tried with numerous RX/TX PIN combinations, without success πŸ˜