DFPlayerMIni ( MP3-TF-16P version ): troubles with some commands, ex: 0x08 / loopGlobalTrack #57
-
Hi ! Now, reading the only doc I could find ( http://www.electronicoscaldas.com/datasheet/DFR0299-DFPlayer-Mini-Manual.pdf ), at page 2, '0x08' is used to set the playback mode (0/1/2/3) ( Repeat/folder repeat/single repeat/ random ) This being said, I tried using the said function & then getting the playback mode & got the following results: /*
mp3.tef_setPlaybackMode(3); // == loopGlobalTrack()
// nothing -> status 0 & playback mode 4
// 0 -> status 512 Com error & playback mode 4
// 1 -> status 512 [ & Com error 129 ] & playback mode 2
// 2 -> status 0 [ & Com error 131, then 129 ] & playback mode 2
// 3 -> status 512 [ & Com error 5 ] & playback mode 4
*/
//mp3.loopGlobalTrack(0); // no status , com error 5, playback mode 4
//mp3.loopGlobalTrack(1); // status 512, no com error, playback mode 2
//mp3.loopGlobalTrack(2); // status 512, no com error, playback mode 2
//mp3.loopGlobalTrack(3); // Com erro 131 then 129 then 5, playback mode 4
//mp3.loopGlobalTrack(4);
mp3.sendPacketP(0x08); // also erors :/ ..
delay(1000);
uint16_t mode = mp3.getPlaybackMode(); // retuns 4 by default
Serial.print("playback mode ");
Serial.println(mode);
This being said, the following hex's are used in your lib & not present in the doc at link above: While the following are present in the doc at link above but not in your lib ('reply', so I guess replAy, and 'keep on' ? ): Last but not least, I don't have any source for error codes, so it's a quite a quest to debug that :/ Looking forward to reading your hints on this if any, ps: my repo on the DFPLayerMini subject ( with yet another tool to accomodate for files listing order ): https://github.com/stephaneAG/DFPlayerMini |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Note that the same module has come with different generations of chips that are not 100% compatible. Further, all docs you will find (I have found two previously and you link is now a third) are not complete on the API and sometimes have errors in the translation. I hate this situation as it seems a poor chip design to change the API to the chip but provide no means to identify it from other versions. They just expect you to rewrite with every iteration of hardware and ignore back compatibility. Did you find my wiki? You will find error codes here |
Beta Was this translation helpful? Give feedback.
Note that the same module has come with different generations of chips that are not 100% compatible. Further, all docs you will find (I have found two previously and you link is now a third) are not complete on the API and sometimes have errors in the translation.
I hate this situation as it seems a poor chip design to change the API to the chip but provide no means to identify it from other versions. They just expect you to rewrite with every iteration of hardware and ignore back compatibility.
Did you find my wiki?
General API reference
https://github.com/Makuna/DFMiniMp3/wiki/API-Reference
You will find error codes here
https://github.com/Makuna/DFMiniMp3/wiki/Notification-Method