-
Notifications
You must be signed in to change notification settings - Fork 7.6k
SOLUTION to stream start to falter / failed / breaks / doesn't return not false #6733
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
Comments
Possible signed/unsigned issues: |
After some time the stream still failed, when it doesn't receive the whole package or the buffer received is not complety emtry. What would it be?
When the received size is 1336 it stops sometimes but it continues. You beter should try it.... Just add this in the client.cpp fillbuffer
I know it have to be logging, but I searching to get it right. so this is what i do. It can take some time before it start to wigle. And will keep data out, but what data... Data that maybe has a pointer in that doesn't belown there... a frame that is cuttet in half. who knows... But I am sure the delay of receiving is causing this issue. It can be realy big. And you could say it is the stream, but I serrously doubd it, because on a pc it runs good and I know it has more resources but still what is the problem? The stream timout keeps coming back! If you could show me I would believe it. |
No idea, I don't see those debug statements in your example.
That is oddly specific
I have no idea what this is.
I doubt it's the internet connection. I strongly suspect there's something wrong in your code. Without an example project we really can't help you. |
I m glad you want to look in to it. Thanks for that. You need more resources than that to test the whole thing, but I m looking in to decoded to pcm and output it with the internal dac. For the moment I don't have low power spreaker to test it. Beside of that I can still see it in the data. Yes I did changed it to an int but keep looking... I will make a repo what I have for now. |
I have made a library to evaluate streams, Click the link to findout. |
Board
ESP32 devkit
Device Description
No
Hardware Configuration
No
Version
v2.0.3
IDE Name
1.8.19
Operating System
windows 10
Flash frequency
40 MHz
PSRAM enabled
no
Upload speed
115200
Description
When you do a read and when there is no RXbuffer avalaible the stream ends up in strange behavior. I have seen this behavior in many library that uses stream. And I have found the solution for this by checking if there is buffer availible before reading.
Just use this shetch it will get clear to you. I don't have the courage anymore to find the exact reason to why the stream stops. But I have still some advise to the develops to improve there code.
In the int read(uint8_t * dst, size_t len) int the WiFiClient you need to put the fillbuffer on top, because if one of the conditions in the if is completed in an OR the next one condition will not exicude with the C++11 compiler (The fillbuffer).
Than you need to do is too.
if(len <= a || ((len - a) <= (_size - _fill) && frb >= (len - a))){
Sketch
Debug Message
Other Steps to Reproduce
Use the shetch, Once you don that delete this line if (result > 2 * buffer_size) {
I have checked existing issues, online documentation and the Troubleshooting Guide
The text was updated successfully, but these errors were encountered: