-
Notifications
You must be signed in to change notification settings - Fork 104
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
Support waveshare 9.7in display #25
Comments
I too noticed they had a 9.7" model just a couple of days ago and it does seem pretty different - mostly more awesome. Not only is it grayscale but the refresh rate appears to be pretty good. Can't say much about it yet, but I'd be interested hearing your experiences with it - especially the refresh rate. PaperTTY pretty much uses the vendor's sample code to drive the displays with mostly cosmetic modifications, so I think the 9.7" could be integrated similarly - it doesn't really matter if it differs from the other modules, as long as we can implement a method that updates the image on it. The demo code ought to give a partial refresh example too if it's supported, but I can't find any reference to that either. Perhaps you can ask Waveshare themselves about it, I've gotten quick replies from their support earlier, and even some sample code that I haven't seen elsewhere - the Wiki might not have it all yet. |
About the LUTs - I guess they're in the controller with no way to change them, as the datasheet mentions 8 programmable LUTs, but the command list seems very sparse and no mention if these can be reprogrammed (or read) easily from user code. There's a small baby tugging at my trouser leg so I don't have time to look at this further right now, but seems like an interesting display for sure if it works as advertised. |
I did, they confirmed that it supports partial refresh, but didn't provide example code so far - but I sent the last mail just yesterday, so we'll see.
Okay, thanks for the confirmation, I wasn't sure if there's really nothing about reading them in the documentation or if I am missing something - I don't have much experience with low level hardware programming. And I found it strange, that the examples all used mode 2 and the docs did not seem to mention what they other modes were. But right after posting this issue, I found a document which describes the mode, a bit hidden in the chinese wiki (thanks google translate!) http://www.waveshare.net/w/upload/c/c4/E-paper-mode-declaration.pdf |
I've got partial refresh working :) Going to look into PaperTTY support for this mode, but it might take a while as I have limited time available for this project. |
Neat! :) |
I have the Waveshare 6in model. It is quite similar to the 9.7in as it also runs on the IT8951 driver. Right now, trying to figure out how to get PaperTTY working on this device. I also want to figure out partial-refresh. |
Nice, do mention if you get it working. At some point it would be nice to add support for these since they seem to be superior to the older ones. |
I stopped using PaperTTY as a base and tried to get a local https://www.freedesktop.org/wiki/Software/kmscon/wlterm/ fork to output on my display because it's a lot faster and a fully-featured terminal emulator. Then I paused the project for personal reasons. Going to try to publish some example code during the week, sorry for the delay |
Nice, I hope you get it to work, it would be really cool for these new displays to be put to good use. I'm still a bit inclined to try implementing a "PaperVNC" viewer or similar, so that "everything" would work with it - if I ever get the time to continue with these experiments. |
Cool, got myself a waveshare 9.7' and am interested in it as well. Looking forward for some example codes! |
@phaer did you get anywhere with wlterm? |
@ekerebel @phaer: Hi I've also gotten the 6inch EPD and the IT8951 Hat after reading this thread and I "simply" want a terminal running on it ;) but in fact I have no Idea how to run papertty on it. Which driver did you use? What did you do to have partial refreshes on it? All I can do for now is compile the IT8951.c example from waveshare and show a .bmp on the display but don't know a way of getting papertty running on it. Any pointers? |
Sorry for letting you all hanging for so long. Life came in between and I shelved the project for the last month, got my code base in a backup and going to try to look into it to answer your questions in the next weeks, but it could still take a while |
I'm looking forward to seeing that 9.7" example code! Off topic, but has has anyone found the IT8951 firmware source code? |
Hi all, I implemented a Python driver for the IT8951 controller: https://github.com/GregDMeyer/IT8951 I also have been working on a fork of PaperTTY using that driver, but I haven't uploaded it yet---have to do a bit of cleanup first. Hopefully in the next few days! Hopefully people find it useful :) |
yay, thank you very much! I've been able to run your test.py successfully printing on my 6" waveshare display. But since the thing I really want is having a terminal on that display I'm eagerly awaiting your fork (or a hint on how to use your driver with the master branch of papertty. |
Thanks for the bump @mchack23 ! Here is my fork of PaperTTY for the IT8951: https://github.com/GregDMeyer/PaperTTY That being said, if folks want to use the original PaperTTY instead---it would be pretty trivial to add the IT8951 driver to the set of drivers included here, as well. I can do that and submit a pull request if people are interested. :) |
@GregDMeyer nice! If you get around to making the PRs, I'll gladly merge them. |
@GregDMeyer Wow, thanks a lot for sharing this! Running it right now and its pretty usable :) |
@GregDMeyer this is working beautifully. Thanks a lot! I had two minor issues that were solved more or less quickly (just listing them here if someone else encounters those):
Else everything works as I wished and I really am quite happy with my little eink terminal. It is a bit slow still, so I wonder if there is an option possible that would forget about greyscale etc and just try and be as fast as possible. (like the --flip argument, a --fast for fast mode ;) ... but well that's nitpicking already. It is pretty usable just as phaer commented and I'm already dreaming of getting the huge screen from waveshare and putting it in an old laptop case with a raspi :) thank you guys so much! I've been dreaming of having this since I had my first kindle (it was a 3g and had a keyboard and I had a terminal on it, but I wanted a real keyboard and a real linux terminal with ssh and tmux and everything and now I have just that :D |
so awesome to hear! I am wary to discuss too much on this thread here, but if you want to open an issue on my repo I will comment there!! :) real quick response regarding the speed---there are still some optimizations to be had in communicating with the device, that I hope to implement soon. Hopefully then it will be a bit snappier! |
Is anyone actively working on porting @GregDMeyer's changes to this version of the library? If not, I have some local changes that add IT8951 support to this version of PaperTTY that I can upload. |
@fimad sorry to not push those changes yet. I'm happy to write a quick function that calls my driver, though if you have a standalone implementation for this library that might be better so that people don't have to install a second package to get it working. |
Sounds good, I have a standalone version that doesn't add any new dependencies. I'll clean it up and send out a PR this weekend. |
I've tested this with a 6 inch display that uses the IT8951 controller board with both VNC and terminal and it seems to work well. I haven't tested with a 9 inch display but there isn't anything display specific in the driver (that I'm aware of) so it should just work. This implantation is based off the WaveShare sample code in https://github.com/waveshare/IT8951. There are some idiosyncrasies in that code that I don't understand and aren't documented but appear necessary. For example, manually controlling the CS pin instead of letting the SPI driver code handle it... Issue joukos#25
Previously the driver was using 8 bits-per-pixel for SPI transfers. This is wasteful sine the actual display only supports 16 different gray levels. This updates the code to use a packed format that uses 4 bits-per-pixel. There is the potential for further optimization when rendering text (or other pure black and white images) to use 2 bits-per-pixel. However, when I tried this the fast display mode did not properly clear pixels between blits. Issue joukos#25
Thanks to @fimad the support for IT8951 is now merged (7e405bf) - please test it with the 9.7" :) P.S. I welcome any photos with these displays that could be added to the main README. Also, I haven't found a single video online demonstrating a Linux CLI/GUI (or pretty much anything useful) with any of these displays, so I've hesitated getting one before seeing how the update speed is etc. It would be cool if someone could make a short demonstration clip :) |
It appears the 9.7" works with the latest code, great work and thanks to you all. I'll close this issue now as it's pretty long already, so if there's any problems new issues should be created. |
I read through the post and it is unclear to me if the partial refresh that some of the commenters got working was actually implemented. In the current version of paperTTY, does the 9.7 inch display refresh quick enough to be usable as an interactive terminal? (According to the manufacturer the partial refresh rate is about .3s, which appears that would be sufficient for terminal use) |
I think (all?) IT8951 driven displays support partial refreshes, but the current method of handling the SPI writes with Python is not optimal and as the larger displays typically have bigger resolutions too, in addition to the marketed 0.3s it may take several seconds to transfer the data for the update. The only IT8951 display I have is the 6" HD and sometimes it seems to update pretty fast and sometimes not, so YMMV. Whether it's usable depends on your definition of interactive, but I'd say that with the current implementation the bigger displays are better suited for things that don't update too often. That said, if you've used the internet with dial-up and didn't complain, it might be bearable, but I wouldn't expect a very responsive result with the 9.7". I haven't tried one though. It also depends which RPi you're using, the beefier the better, but in the end frame data transfer is the bottleneck. Regarding SPI, there was some work done here #36 (comment) which would be nice to incorporate into PaperTTY, but time hasn't allowed to look at that yet in detail. It sounds like that would help a lot with the refresh speeds. |
Hi,
I acquired an 9.7 inch e-ink display which, according to the waveshare, supports partial refresh. I've used their example code for full refreshes, but did not yet find out how to do a partial refresh - the displays refreshes partially, but doesn't display new text in the refreshed area - yet ;)
I'd be very interesting in working on PaperTTY support for this display, but I am new to e-ink displays in general and the 9.7in model seems to work quite differently compared to the smaller models. It uses a IT8951 controller. As far as I understand, I'd need the LUT values for PaperTTY? They seem to be stored in the hat, at least I haven't found them in the demo code yet. And information on the public internet seems sparse.
Anyone else interested in this?
More Infos on the official Wiki page: https://www.waveshare.com/wiki/9.7inch_e-Paper_HAT, the chinese version has a bit more info and code: http://www.waveshare.net/wiki/9.7inch_e-Paper_HAT
The text was updated successfully, but these errors were encountered: