-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Sometimes loses network connection #2
Comments
There is a problem that the network connection is lost in ESP32. I listened to the same radio station with Mplayer in a RaspberryPi to investigate the problem of loss of network connection. As a result, i found that ESP32 reads sockets slower than RaspberryPi. Receiving the same metadata chunk is about one minute behind the Raspberry Pi. I think the server disconnects the network because the socket reading speed of ESP32 is slow. The cache size of Mplayer is 320KByte by default.
It may not be possible with the ESP-IDF standard RingBuffer mechanism. |
This was a simple reason. ESP32 cannot play for a long time at 128K bit rate due to its low CPU Power. ESP32 cannot follow the transmission speed of the server. When you start Linux mplayer with the following options, you can see when the server sends data.
If the bit rate is 64K, ESP32 can play for a long time. There is no fundamental solution. As a passive solution, if the RingBuffer is large on models with PSRAM, the RingBuffer data can be played while reconnecting to the server. For models with PSRAM, you can get up to 4M RingBuffer. Even if you are disconnected from the server, the data stored in the 4M RingBuffer will continue to play. The maximum value of RingBuffer for models without PSRAM is 160K bytes. |
I got ESP32-WROVER-B. WROVER-B has PSRAM. I can get up to 4M RingBuffer. But PSRAM's RingBuffer is too slow to play music. Writing to PSRAM RingBuffer requires twice as long as RAM RingBuffer. Furthermore, when using PSRAM, some GPIOs cannot be used. Conclusion |
I got VS1053(Red Board) It works very stably. Performance is completely different from VS1003 (Blue Board). The register setting of VS1003 may be incorrect. |
Sometimes loses network connection.
But i don't know why.
The text was updated successfully, but these errors were encountered: