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

communication with device failed #18

Closed
FutureSharks opened this issue Sep 26, 2020 · 7 comments
Closed

communication with device failed #18

FutureSharks opened this issue Sep 26, 2020 · 7 comments

Comments

@FutureSharks
Copy link

This one: https://www.waveshare.com/wiki/6inch_HD_e-Paper_HAT

@SirDagen
Copy link

SirDagen commented Sep 27, 2020

Yes, it works. I had had it, but didn't like the glossy surface because of the reflections. I returned it and went for the 9.7", which has a more paperlike appearance https://www.waveshare.com/wiki/9.7inch_e-Paper_HAT

It is not well documented, but you must scan the datasheet "e-Paper Specification" (PDF) of these displays for the keywords "Antiglare hard-coated front-surface". It either has got it or it doesn't. https://www.waveshare.com/w/upload/f/ff/9.7inch_E-paper_Specification.PDF

@FutureSharks
Copy link
Author

I tried it but get the error communication with device failed:

# python3
Python 3.7.3 (default, Jul 25 2020, 13:03:44)
[GCC 8.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> from IT8951 import constants
>>> from IT8951.display import AutoEPDDisplay
>>> display = AutoEPDDisplay(vcom=-2.48)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/local/lib/python3.7/dist-packages/IT8951/display.py", line 219, in __init__
    epd = EPD(vcom=vcom, bus=bus, device=device, data_hz=spi_hz)
  File "/usr/local/lib/python3.7/dist-packages/IT8951/interface.py", line 33, in __init__
    self.update_system_info()
  File "/usr/local/lib/python3.7/dist-packages/IT8951/interface.py", line 103, in update_system_info
    raise RuntimeError("communication with device failed")
RuntimeError: communication with device failed
>>>

Any idea?

@GregDMeyer
Copy link
Owner

Hmm. Does the example code from Waveshare (e.g. here) run OK? If it doesn't, it's probably a hardware thing (did you set the switches on the board to use SPI for communication?).

If that code does work, then maybe try adjusting the SPI frequency (see the README). Perhaps the default value is too high for your device.

@GregDMeyer GregDMeyer changed the title Is the 6 inch HD display supported? communication with device failed Sep 28, 2020
@FutureSharks
Copy link
Author

I got it working but not clear how. Is it possible to leave the display in a non-working state from using ctrl-c at some point? I was also testing with another display driver and papertty also.

@GregDMeyer
Copy link
Owner

huh. yeah, I have found in the past that sometimes using it with another display driver can cause problems. in particular, if you use code that communicates with the device via the bcm2835 C library instead of using the kernel for SPI, it seems that the kernel relinquishes control of SPI. Since this library relies on kernel SPI, it will not work after that. So as you found, a reboot should get it working again :)

@FutureSharks
Copy link
Author

in particular, if you use code that communicates with the device via the bcm2835 C library instead of using the kernel for SPI

OK, I think that might have been it. Thanks for the reply.

@weow147
Copy link

weow147 commented Dec 26, 2021

I keep getting this error as well. if i turn off/on SPI it seems to recover.

sudo dtparam spi=off
sudo dtparam spi=on

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

4 participants