Skip to content
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

Corrupted Image on Eink Display #17

Open
KianYeo opened this issue Jan 18, 2021 · 3 comments
Open

Corrupted Image on Eink Display #17

KianYeo opened this issue Jan 18, 2021 · 3 comments
Labels
bug Something isn't working client Relating to client-side code

Comments

@KianYeo
Copy link

KianYeo commented Jan 18, 2021

Has one encountered problems with corrupted images on the eink display? Its seems like I am getting corrupted images quite often. I don't think its a hardware problem since I am able to have a standalone program that consistently displays an image on the eink from the ESP32 memory.

I am suspecting its the HTTP get request that receives corrupted bytes from the sever, but I don't know how to verify that. Any advice on this?

Thanks in advance!

@maxbbraun
Copy link
Owner

Hi! Do you have a picture of the issue?

@KianYeo
Copy link
Author

KianYeo commented Jan 19, 2021

Here are some example images of the issue.

https://ibb.co/KwYJVr2
https://ibb.co/9GSNtNR
https://ibb.co/HXHNZxZ

@KianYeo
Copy link
Author

KianYeo commented Jan 20, 2021

The client is supposed to download 61440 bytes in total from the server. What I noticed is that it always show 61440 bytes read in total even though the eink image is corrupted. This is with the default RootCA in the original client codes.

However, when I changed the RootCA to another one from Google (https://pki.goog/repository/), I noticed that sometimes it downloads less than 61440 bytes gives the 'download complete' message, and this is when the image gets corrupted.

As a quick fix, I just added an extra few lines of code to check if the downloaded bytes is equals to 61440, if not, it will attempt to reconnect to the server and download again.

@maxbbraun maxbbraun added client Relating to client-side code bug Something isn't working labels Jun 1, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working client Relating to client-side code
Projects
None yet
Development

No branches or pull requests

2 participants