Makuna / DFMiniMp3

Arduino library for the DFPlayer Mini Mp3 module. Please refer to the Wiki for more details. Please use the GitHub Discussions ask questions as the GitHub Issues feature is used for bug tracking.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

getFolderTrackCount(index) prints file count of 1st folder regardless of index

thre3eye opened this issue · comments

Thanks very much for this library - it's the most reliable one for me so far.
I am using it with an ESP32 C3 and a dfplayer HW-247 clone (GD3200B chip) and it's the only library that correctly prints file/folder count, volume, etc.

Except getFolderTrackCount only returns the number of` files in the 1st folder:

  uint16_t folderCount = dfmp3.getTotalFolderCount();
  Serial.printf("Total Folder #  :   %d \n", folderCount);
  for (uint16_t i = 0; i < folderCount; i++) {
    Serial.printf("Folder %d Track #:   %d \n", i, dfmp3.getFolderTrackCount(i));
  }

16:16:19.099 -> Total Folder # : 5
16:16:19.145 -> Folder 0 Track #: 3
16:16:19.224 -> Folder 1 Track #: 3
16:16:19.271 -> Folder 2 Track #: 3
16:16:19.318 -> Folder 3 Track #: 3
16:16:19.395 -> Folder 4 Track #: 3

Any idea? Thanks!

Put the following in your sketch before you include the library and rerun your test again. The debug output should include low level packet dumps which will give me more information.

#define DfMiniMp3Debug 1

What are the names of your folders? Some devices require the name to start with two digit folder number that is zero padded (it can end with anything) and some will just return the nth enumerated folder.

00Anything
01Nothing
02OneThing