Well:
- Made a 16MB FAT filesystem in linux, copied some MP3 files.
dd if=/dev/zero of=fs.bin bs=1M count=16
sudo mkfs.vfat fs.bin
mkdir fs
sudo mount fs.bin fs
sudo cp /some_folder/*.mp3 fs/
sync
sudo umount fs
- Wrote fs.bin into a 25Q128.
- Connected as shown in the pictures, even simpler, SDO+SDI connected together without resistor.
- Sent Play command: "7Eh FFh 06h 0Dh 00h 00h 00h FEh EEh EFh"
- Audio started playing. SPI activity, 12MHz clock, transfers every 25ms.
- Queried number of files in flash: "7Eh FFh 06h 49h 00h 00h 00h FEh B2h EFh"
Response: "7Eh FFh 06h 49h 00h 00h
0Ah FEh A8h EFh", 0xA=10 files (Correct)
Attached some commands, layout for
YAT.
Actually it seems there're fakes:
https://forum.arduino.cc/t/dfplayer-play-file/468612/11Edit:
I remembered the checksum examples to be wrong in the datasheet, so I will save you the struggle.
(Well, that's not a even a datasheet, just some loose information packed together.)
For custom commands checksum calculation is as follows.
For example, Play cmd:
Start[0] Ver[1] Len[2] Cmd[3] Ack[4] DH[5] DL[6] sumH[7] sumL[8] Stop[9]
7E FF 06 0D 00 00 00 FE EE EF
Checksum = 0x0000 - (1+2+3+4+5+6)
Checksum = 0x0000 - (0xFF + 0x06 + 0x0D + 0x00 + 0x00 + 0x00) = 0xFEEE
sumH = 0xFE, sumL = 0xEE