starting using YX5300 module issues

Hi everyone !
I'm trying to use YX5300 module in a project with Arduino Mega and also steppers motors and relays. ideally i want the arduino to play one song on it's own after other action in the code (like activiting the steppers and relays).
So i received the module and tried to use it separately with a Uno first to understand it better.

I tried this code found on this project, but nothing happens :

//code rearranged by Javier Muñoz 10/11/2016 ask me at javimusama@hotmail.com
#include <SoftwareSerial.h>

#define ARDUINO_RX 5//should connect to TX of the Serial MP3 Player module
#define ARDUINO_TX 6//connect to RX of the module
SoftwareSerial mySerial(ARDUINO_RX, ARDUINO_TX);//init the serial protocol, tell to myserial wich pins are TX and RX

////////////////////////////////////////////////////////////////////////////////////
//all the commands needed in the datasheet(http://geekmatic.in.ua/pdf/Catalex_MP3_board.pdf)
static int8_t Send_buf[8] = {0} ;//The MP3 player undestands orders in a 8 int string
                                 //0X7E FF 06 command 00 00 00 EF;(if command =01 next song order) 
#define NEXT_SONG 0X01 
#define PREV_SONG 0X02 

#define CMD_PLAY_W_INDEX 0X03 //DATA IS REQUIRED (number of song)

#define VOLUME_UP_ONE 0X04
#define VOLUME_DOWN_ONE 0X05
#define CMD_SET_VOLUME 0X06//DATA IS REQUIRED (number of volume from 0 up to 30(0x1E))
#define SET_DAC 0X17
#define CMD_PLAY_WITHVOLUME 0X22 //data is needed  0x7E 06 22 00 xx yy EF;(xx volume)(yy number of song)

#define CMD_SEL_DEV 0X09 //SELECT STORAGE DEVICE, DATA IS REQUIRED
                #define DEV_TF 0X02 //HELLO,IM THE DATA REQUIRED
                
#define SLEEP_MODE_START 0X0A
#define SLEEP_MODE_WAKEUP 0X0B

#define CMD_RESET 0X0C//CHIP RESET
#define CMD_PLAY 0X0D //RESUME PLAYBACK
#define CMD_PAUSE 0X0E //PLAYBACK IS PAUSED

#define CMD_PLAY_WITHFOLDER 0X0F//DATA IS NEEDED, 0x7E 06 0F 00 01 02 EF;(play the song with the directory \01\002xxxxxx.mp3

#define STOP_PLAY 0X16

#define PLAY_FOLDER 0X17// data is needed 0x7E 06 17 00 01 XX EF;(play the 01 folder)(value xx we dont care)

#define SET_CYCLEPLAY 0X19//data is needed 00 start; 01 close

#define SET_DAC 0X17//data is needed 00 start DAC OUTPUT;01 DAC no output
////////////////////////////////////////////////////////////////////////////////////


void setup()
{
  Serial.begin(9600);//Start our Serial coms for serial monitor in our pc
mySerial.begin(9600);//Start our Serial coms for THE MP3
delay(500);//Wait chip initialization is complete
   sendCommand(CMD_SEL_DEV, DEV_TF);//select the TF card  
delay(200);//wait for 200ms

}
void loop()
{
sendCommand(CMD_PLAY_WITHVOLUME, 0X0F01);//play the first song with volume 15 class
delay(1000000);//the programm will send the play option each 100 seconds to the catalex chip
}

void sendCommand(int8_t command, int16_t dat)
{
 delay(20);
 Send_buf[0] = 0x7e; //starting byte
 Send_buf[1] = 0xff; //version
 Send_buf[2] = 0x06; //the number of bytes of the command without starting byte and ending byte
 Send_buf[3] = command; //
 Send_buf[4] = 0x00;//0x00 = no feedback, 0x01 = feedback
 Send_buf[5] = (int8_t)(dat >> 8);//datah
 Send_buf[6] = (int8_t)(dat); //datal
 Send_buf[7] = 0xef; //ending byte
 for(uint8_t i=0; i<8; i++)//
 {
   mySerial.write(Send_buf[i]) ;//send bit to serial mp3
   Serial.print(Send_buf[i],HEX);//send bit to serial monitor in pc
 }
 Serial.println();
}

I did exactly what was required (or at least i think). The wire are correctly connected, the sd card as a folder name 01 with a mp3 file named 001xxx.mp3.
I don't know what's missing.
Do you know anything on this issue ? It must be pretty common i think

if it helps, here's what the monitor display :

7EFFFFFF6220F1FFFFFFEF
7EFFFFFFFF69002FFFFFFEF
7EFFFFFFFF6220F1FFFFFFEF

Have a look at this library MD_YX5300 Library: Arduino Serial MP3 Player

Additionally, some of the information in this blog post YX5300 Serial MP3 Player (Catalex Module) – Arduino++ may give you clues as to why your code does not work. There are also a couple of follow up articles for more info and application of the library.

DFPlayerMini_Fast.h should also work with this chip and provides more functionality than the previously linked library

Thanks a lot guys !
Somehow it ended working.
The DFplayer library works well. I've testes it with an arduino Uno and 2 steppers and everything is fine.
But now, i want to play it on a Mega (which is also wired to 5 steppers and a relai), and it don't work again.
I tried just the example of the library with the Mega and it don't work either.

Is there known problems between the Mega and the YX5300 module ?

EDIT the Mega is in fact an Elegoo Mega. Don't know if that matters a lot...

Is there known problems between the Mega and the YX5300 module ?

No. But your code will not be comparable because the Uno uses software serial to communicate with the device. Where as when using the Mega you should use one of the three extra hardware serial ports. Not all versions of software serial work on the Mega because the timer and interrupt structure are different on the two boards.

Ok.
So as you said and from what i read on the comments of Marco C. article in the link he sent me :

"Definitely use the hardware ports instead of SoftwareSerial. The speed won’t change as it is relatively slow to the device at 9600 bps, but there is one less library to take up code space and the reliability of the hardware will be will be higher."

so i tried :

/******************************************************************************
  Simple SerialMP3Player "Hello World" example of YX5300 chip.

  Copy the "hello.mp3" file to an empty SD card
  Connect the Serial MP3 Player to the Arduino board
    GND → GND
    VCC → 5V
    TX → pin 11
    RX → pin 10

  After compile and upload the code you must hear “Hello world” over and over.


  This example code is in the public domain.

  https://github.com/salvadorrueda/ArduinoSerialMP3Player

  by Salvador Rueda
 *******************************************************************************/

#include "SerialMP3Player.h"

#define TX 15
#define RX 14

SerialMP3Player mp3(RX,TX);

void setup() {
  Serial.begin(115200);     // start serial interface
  mp3.begin(9600);        // start mp3-communication
  delay(500);             // wait for init

  mp3.sendCommand(CMD_SEL_DEV, 0, 2);   //select sd-card
  delay(500);             // wait for init
}

// the loop function runs over and over again forever
void loop() {
  mp3.play(1);     // Play "hello.mp3". You must hear "Hello World"
  delay(3000);    // wait 3 seconds
}

Works fine on the Mega.

Thanks A lot !!

The library SerialMP3Player.h uses softwareserial.h under the hood. If you're using a Mega, you shouldn't use this lib. What may seem like an code enhancement ends up tying your hands as a developer since you don't even have the option of using the hardware ports.

AND it uses "S"trings. Not a great library...

oh is it ?
ok.
Do you have some other ways ton play mp3 with YX5300 on a Mega ?