Working with DFPlayer Mini clones and DFPlayerAnalyzer (ERROR 129)

Greetings forumites,

Disclaimer: This topic may require some knowledge about DFPlayer Mini troubleshooting. Feel free to engage, but at your own peril.

I am working with a set of known problematic DFPlayer Mini clones (the notorious MH2024K-24SS) (1). I have done some due diligence and at this point I am well aware of the issues with these clones. (For those who are not I would like to refer to these excellent reviews by Printed Droids and Garry's Blog (2,3).

I confirmed some basic function by using the trick of pulling the I/01 pin to ground, which plays sound and activates the status LED for the duration of an MP3 file's playtime.

I am using the DFPlayerAnalyzer (4) to troubleshoot and analyze how the module behaves through different setups. As expected with these clones, the response time is bad compared to the original and the wake/sleep cycle misbehaves.

My initial question for the forum is if you have encountered ERROR 129 before?

In my log, ERROR 129 appears selectively after playback/sleep operations:

  • "TestGetCurrentTrack" after playing tracks
  • GetCurrentTrackSD times out ([26071])
  • "TestWakeupAfterSleep" after waking from sleep
  • GetStatus times out repeatedly ([257802], [259415], [261027], [269968], [271581], [273193])

This error is defined in DFMiniMp3 library as a communication error caused by timing conflicts that occurs when the module sends a command and is waiting for a response. But I am suspecting that this might be an issue with the TX line not sending a strong enough signal to the Arduino RX. Has anyone troubleshooted this error before?

  1. D2(Arduino TX) ----- 1kΩ ----- RX(DFPlayer Mini)
  2. D3(Arduino RX) ---------- TX(DFPlayer Mini)
  3. 5V(YwRobot MB102) ----- (-) Diod 1N4001 (+) ----- VCC(DFPlayer Mini)
  4. VCC (DFPlayer Mini) ----- (+) 100uF/50V Electrolytic capacitor (-) ----- GND
  5. VCC (DFPlayer Mini) ----- 0.1uF Ceramic capacitor ----- GND
  6. GND(YwRobot MB102) ----- GND1/2(Arduino) ----- GND1/2(DFPlayer)

(1) https://wiki.dfrobot.com/dfr0299/
(2) https://www.printed-droid.com/kb/dfplayer-mini-guide/
(3) https://garrysblog.com/2022/06/12/mp3-dfplayer-notes-clones-noise-speakers-wrong-file-plays-and-no-library/'
(4) GitHub - ghmartin77/DFPlayerAnalyzer: Test driver to analyze different makes of DFPlayerMini and reveal specials in behavior. · GitHub

Not that I can recall. Do you have a minimal sketch that demonstrates it, which we can try?

I have seen most of the points before that you include in the bulk of your (and AI's) post. Reinforces my largely trial/error approach when working with this module!

The sketch I'm using is the current DFPlayerAnalyzer from ghmartin77. You can find it, and the library DFMiniMP3 listed in the github page below. (1) The last commited date is over seven years ago, so I'm honestly not sure it is maintained. It was recommended by users that I trust (eg. Garry's Blog and Printed Droid) for troubleshooting these modules.

I've gotten some basic functions to work on these modules using serial commands and the official DFPlayerMini library. (2)

Tested commands: using serial commands:

  1. Plays file 01/0001.mp3

  2. Plays file 01/0002.mp3

  3. Stop the file playing in the middle of a track.

  4. Pause the file playing in the middle of a track, then unpause.

  5. Activate/Deactivate repeat mode. Can be done in the middle of a track playing.

(1) https://github.com/ghmartin77/DFPlayerAnalyzer/tree/master/DFPlayerAnalyzer
(2) PlatformIO Registry

So when do you get Error 129? On which chip version? Which board?

A bit of googling and help from AI. Check out the following and see if it helps.

Error 129 = 0x81, and it arises in two distinct contexts depending on which library you’re using:

In the Makuna/DFMiniMp3 library (one of those I understand you use), error 0x81 is an RX timeout — the Arduino sent a command but no valid response packet arrived within the timeout window. This is a library-side error. It appears selectively after playback/sleep operations — for example, GetCurrentTrackSD or GetStatus timing out after waking from sleep.

From the module itself (hardware-side), 0x81 (129) is actually sent by the DFPlayer when it resets after a brownout — if the supply current is too low or volume too high (I rarely use over 20), the module goes into a noise/crash state, becomes unresponsive to serial requests for several seconds, then resets and sends the 0x81 error code.

With clone chips, calling
getTotalFolderCount()
on certain clone variants (e.g. MH2024K-16SS) will run into a communication timeout, resulting in RX error 0x81.

With certain repeat/loop commands, error 129 can appear when using loop-mode commands — for instance, loopGlobalTrack(3) produces Com errors 131 then 129 on some module variants.

So in short, error 129 signals one of three things:

•	RX timeout (no reply received in time) — most common with clones and their slow/unreliable response timing
•	Post-brownout reset — module crashed due to power supply issues and is reporting its self-reset
•	Unsupported command on a particular chip variant — some commands just don’t work on certain clones.

The IC markings on the chip are:

Model: MP3-TF-16P V3.0
MP3 Chip: 8002A XJS 25G28W
Amp Chip: MH2024K-24SS 250606

The board I am using is an official Arduino Nano.

As noted in my original post. The error code is provided in the log presented in the serial monitor by the DFPlayerAnalyzer sketch.

ERROR 129 appears selectively after playback/sleep operations:

  • "TestGetCurrentTrack" after playing tracks
  • GetCurrentTrackSD times out ([26071])
  • "TestWakeupAfterSleep" after waking from sleep
  • GetStatus times out repeatedly ([257802], [259415], [261027], [269968], [271581], [273193])

Interesting. Using an external power source (5V, max 700mA) was an important part in getting the module to initialize using the DFPlayerAnalyzer sketch.

This might just be that the library is not compatible with the specifications of the module, as I have managed to operate it with serial commands using Just Baselmans sketch and the DFRobotDFPlayerMini library (v1.0.6).

I've attached a test log as PDF if you want to have a look.

dfplayeranalyzer Successful test log 2026-06-17.pdf (89.3 KB)

I've noticed that I get much more reliable initialization after adding a 2000 ms delay in voidsetup() after softwareSerial.begin(9600), and immidietly setting the volume to mid through sendCommand(0x06, 0, 10).

This was suggested by Garry's Blog's example sketch, and I thought about it after your comment about brownout/crash.

Garry left a comment that "set volume (otherwise will be full volume)", but I cannot find this in the documentation. But if true, this may explain the troubles some users have had getting this model to initialize.

After struggling with one of these recently I feel your pain. You have tested the unit by pulling the IO pin so the DFPlayer for sure works (same thing I did) so it is down to the talking. For me it was two things.

  1. Power. When I powered it from the USB in my monitor it wouldn't work. Powering it from my PC directly was fine.
  2. Timing. I was using an ATTiny so I had to bit bang the whole thing. I had to turn down the delay to 102ms for it to work.

here is my working code in the end.

// Pin connected to the push button
// Button connects this pin to GND when pressed
#define BUTTON_PIN 0

// Pin used to send serial commands to the DFPlayer RX pin
// This is software-generated serial (bit-banged)
// P2 is used because P1 is shared with the Digispark onboard LED
#define DF_TX_PIN 2


// Number of MP3 files available on the SD card
// Files should be named:
// 0001.mp3
// 0002.mp3
// etc.
const byte NUM_TRACKS = 10;


// ------------------------------------------------------------
// Sends one byte of data to the DFPlayer
//
// The DFPlayer uses 9600 baud serial communication.
// Since the ATtiny85 does not have a normal serial port,
// we manually create the signal by turning the pin HIGH/LOW.
//
// Format:
// 1 start bit
// 8 data bits (least significant bit first)
// 1 stop bit
// ------------------------------------------------------------

void sendByte(uint8_t b)
{
  pinMode(DF_TX_PIN, OUTPUT);

  // Serial line starts HIGH when idle.
  // A LOW signal indicates the start of a byte.
  digitalWrite(DF_TX_PIN, LOW);
  delayMicroseconds(102);


  // Send each of the 8 bits
  // DFPlayer expects the least significant bit first
  for (byte i = 0; i < 8; i++)
  {
    digitalWrite(DF_TX_PIN, b & 1);

    // Timing adjusted for the Digispark ATtiny85 clock
    // 102us gives reliable 9600 baud communication
    delayMicroseconds(102);

    // Move to the next bit
    b >>= 1;
  }


  // Return line HIGH to indicate the end of transmission
  // (stop bit)
  digitalWrite(DF_TX_PIN, HIGH);
  delayMicroseconds(102);
}


// ------------------------------------------------------------
// Sends a complete DFPlayer command packet
//
// DFPlayer packets are always 10 bytes:
//
// Start       0x7E
// Version     0xFF
// Length      0x06
// Command     cmd
// Feedback    0x00
// Parameter H
// Parameter L
// Checksum H
// Checksum L
// End          0xEF
//
// ------------------------------------------------------------

void sendCommand(uint8_t cmd, uint16_t param)
{
  // Calculate DFPlayer checksum
  // The checksum is the negative sum of:
  // Version + Length + Command + Feedback + Parameter bytes
  uint16_t checksum =
      0 - (0xFF + 0x06 + cmd + 0x00 +
           (param >> 8) + (param & 0xFF));


  // Send the command packet
  sendByte(0x7E);              // Start byte
  sendByte(0xFF);              // Version
  sendByte(0x06);              // Data length
  sendByte(cmd);               // Command

  sendByte(0x00);              // No feedback requested

  sendByte(param >> 8);        // Parameter high byte
  sendByte(param & 0xFF);      // Parameter low byte

  sendByte(checksum >> 8);     // Checksum high byte
  sendByte(checksum & 0xFF);   // Checksum low byte

  sendByte(0xEF);              // End byte
}


// ------------------------------------------------------------
// Plays a track from the /mp3 folder
//
// The SD card should contain:
// /mp3/0001.mp3
// /mp3/0002.mp3
//
// DFPlayer track numbers start at 1
// ------------------------------------------------------------

void playTrack(uint16_t track)
{
  sendCommand(0x12, track);
}


// ------------------------------------------------------------
// Sets playback volume
//
// Range:
// 0 = silent
// 30 = maximum
// ------------------------------------------------------------

void setVolume(byte volume)
{
  sendCommand(0x06, volume);
}


// ------------------------------------------------------------
// Setup runs once when the Digispark powers on
// ------------------------------------------------------------

void setup()
{
  // Button uses the internal pull-up resistor
  // HIGH = not pressed
  // LOW = pressed
  pinMode(BUTTON_PIN, INPUT_PULLUP);


  // Set serial output idle state HIGH
  // This is required because UART idles HIGH
  digitalWrite(DF_TX_PIN, HIGH);
  pinMode(DF_TX_PIN, OUTPUT);


  // Allow the DFPlayer time to initialise
  // It needs time to read the SD card
  delay(1000);


  // Set playback volume
  // Maximum is 30
  setVolume(25);


  // Seed the random generator
  // Uses startup timing variation to make the selection random
  randomSeed(millis());
}


// ------------------------------------------------------------
// Main program loop
// ------------------------------------------------------------

void loop()
{
  // Check if button has been pressed
  if (digitalRead(BUTTON_PIN) == LOW)
  {
    // Small debounce delay to prevent false triggers
    delay(20);


    // Confirm button is still pressed
    if (digitalRead(BUTTON_PIN) == LOW)
    {
      // Pick a random MP3 track
      // random() excludes the upper number,
      // therefore +1 is needed to include NUM_TRACKS
      byte track = random(1, NUM_TRACKS + 1);


      // Send command to DFPlayer
      playTrack(track);


      // Wait until button is released
      // Prevents playing multiple tracks from one press
      while (digitalRead(BUTTON_PIN) == LOW)
      {
        delay(10);
      }
    }
  }
}