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

Partial refresh error! #39

Open
go2srinidhi opened this issue Jan 27, 2016 · 10 comments
Open

Partial refresh error! #39

go2srinidhi opened this issue Jan 27, 2016 · 10 comments
Assignees

Comments

@go2srinidhi
Copy link

Using 1.44" V231_G2 display.
Am interested to know how i would achieve partial updates as demonstrated on your Youtube video.
Trying to use the python examples like "DrawDemo.py" or "PartialDemo.py" or "CounterDemo.py" but i get errors as shown below:

root@beaglebone:/home/debian/gratis/PlatformWithOS# python demo/PartialDemo.py 3 20
panel = EPD 1.44 128 x 96 version=4 COG=2 FILM=231
Traceback (most recent call last):
File "demo/PartialDemo.py", line 89, in
main(sys.argv[1:])
File "demo/PartialDemo.py", line 52, in main
demo(epd, objects, frames)
File "demo/PartialDemo.py", line 82, in demo
epd.display(image)
File "/home/debian/gratis/PlatformWithOS/demo/EPD.py", line 139, in display
f.write(image.tobytes())
File "/usr/lib/python2.7/dist-packages/PIL/Image.py", line 512, in getattr
raise AttributeError(name)
AttributeError: tobytes

I would like to achieve similar output as shown in the video.
https://www.youtube.com/watch?v=enzUbiSWenQ

@hxw
Copy link
Collaborator

hxw commented Jan 28, 2016

It looks like you are using an older version of Python currently the code runs on 2.7.11.
If you can please update ad you should be ok, if you cannot update and need to continue with older Python version then you will need to change one line in the demo/EPD.py file

Modify line 194 which reads: f.write(image.tobytes()) to be: f.write(image.tostring())

@go2srinidhi
Copy link
Author

Thanks,
I did modify as u suggested. No changes on display. :( But the code isn't throwing any errors.

@hxw
Copy link
Collaborator

hxw commented Feb 1, 2016

I am having problems with BBB, I updated and it no longer boots, I will recover an older image and try that

@hxw
Copy link
Collaborator

hxw commented Feb 1, 2016

I put the old image at:
https://drive.google.com/file/d/0ByAJ8vCbYBDgTTNLcUVjZVlJcnc/view?usp=sharing

dowload and name it as bbb-1.44.img.xz then extract to an SD card:

$ xz -d < bbb-1.44.img.xz | dd bs=64M of=/dev/sdX

replace /dev/sdX with the right drive to access the USB card writer (be careful!)

The image is 2GB so the card need to be at least this size.

Note: SHA256 of image and its compressed version:

fae9e587a9b51092d05613479aab7a5337b5ab097975851c0f5b13151336362d  bbb-1.44.img
4593775fb20ddd7466c1e33edc709600b7f63c93a726b2036be0b2c20c1bad0c  bbb-1.44.img.xz

There are just root/root and repaper/repaper accounts in the image. repaper will run a tmux session.

@hxw
Copy link
Collaborator

hxw commented Feb 1, 2016

I have a problem on first start, the epd-fuse fails when counter demo is started but restarting it once seems to be enough, maybe I have it starting too ealy in the boot sequence.

$ python2 CounterDemo.py 1234
# failure here
$ sudo systemctl restart epd-fuse
$ python2 CounterDemo.py 1234

@hxw
Copy link
Collaborator

hxw commented Feb 1, 2016

Please try if possible it will determine if your hardware is working.

I have tried to update this image, but the latest kernel hangs, even though I removed the device tree file before updating.

@go2srinidhi
Copy link
Author

Thanks for the suggestion.
I shall try these things and post the update asap. And also in the near future, i would like to port it to kernel 4.1.13 as my target hardware runs this version. Any suggestions on workarounds to port?

@hxw
Copy link
Collaborator

hxw commented Feb 2, 2016

Maybe will need to update the device tree file for newer kernel, I used cape universal in this old image and the file is: /lib/firmware/cape-universal-00A0.dtbo

@go2srinidhi
Copy link
Author

Thanks,
Am taking care of the device tree stuffs. Anything else in specific to look into?

@hxw
Copy link
Collaborator

hxw commented Feb 5, 2016

The only thing seems to be that epd-fuse is crashing on first use, not sure why possible systemd service starts it at the wrong time (too early?). Also need to set the service file to restart it on failure. I am using Arch so not sure if this applies to your system (perhaps you use sysvinit or upstart)

@hxw hxw self-assigned this Feb 21, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants