• Recent
  • Tags
  • Unsolved
  • Solved
  • MagicMirror² Repository
  • Documentation
  • 3rd-Party-Modules
  • Donate
  • Discord
  • Register
  • Login
MagicMirror Forum
  • Recent
  • Tags
  • Unsolved
  • Solved
  • MagicMirror² Repository
  • Documentation
  • 3rd-Party-Modules
  • Donate
  • Discord
  • Register
  • Login
A New Chapter for MagicMirror: The Community Takes the Lead
Read the statement by Michael Teeuw here.

Re: Matuki's MMM-IT8951 module for WaveShare e-ink displays

Scheduled Pinned Locked Moved Show your Mirror
8 Posts 2 Posters 3.2k Views 2 Watching
Loading More Posts
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Offline
    mjmvisser
    last edited by Feb 13, 2024, 6:02 PM

    Re: My e-ink frame

    Hi, has anyone had any luck using Matuki’s MMM-IT8951 module? I confirmed that my hardware is working using WaveShare’s C demo. However, running MM using the MMM-IT8951 module seems to fail to retrieve the it9851 settings (in the node-it8951 module). It unfortunately returns only zeros when querying the hardware:

    [13.02.2024 12:36.04.382] [LOG]   Puppeteer launched on http://localhost:8080/
    [13.02.2024 12:36.05.499] [LOG]   Create new calendarfetcher for url: https://ics.calendarlabs.com/76/mm3137/US_Holidays.ics - Interval: 604800000
    [13.02.2024 12:36.05.680] [LOG]   Create new newsfetcher for url: https://rss.nytimes.com/services/xml/rss/nyt/HomePage.xml - Interval: 300000
    [13.02.2024 12:36.05.687] [INFO]  updatenotification: Updater Class Loaded!
    [13.02.2024 12:36.05.688] [INFO]  updatenotification: Checking PM2 using...
    [13.02.2024 12:36.05.690] [INFO]  Checking git for module: MMM-IT8951
    [13.02.2024 12:36.06.418] [LOG]   width =  0
    [13.02.2024 12:36.06.419] [LOG]   height =  0
    [13.02.2024 12:36.06.419] [LOG]   img_addr =  0
    [13.02.2024 12:36.06.420] [LOG]   firmware =
    [13.02.2024 12:36.06.420] [LOG]   lut =
    [13.02.2024 12:36.07.424] [LOG]   VCOM =  0v
    ^C[13.02.2024 12:36.11.319] [LOG]   IT8951 initialized (0x0)
    

    thanks!

    M 1 Reply Last reply Feb 18, 2024, 7:48 AM Reply Quote 0
    • M Offline
      mjmvisser
      last edited by Feb 14, 2024, 1:44 AM

      Edit: I should also mention this is a Raspberry Pi 4, WaveShare 7.5" e-paper HAT, Ubuntu.

      1 Reply Last reply Reply Quote 0
      • M Offline
        Matuki Module Developer @mjmvisser
        last edited by Feb 18, 2024, 7:48 AM

        Hello @mjmvisser

        Can you try to run Magicmirror when logged as root?
        Calling this command before starting MagicMirror:

        sudo su
        

        I had trouble when running it with another user. I tried lots of things but as mentioned in paragraph “OS configuration related” of the readme, the only solution I found was to run npm as root :disappointed_face:

        I hope this will help you.

        If you already tried that, are you sure to have the correct pins configured (no difference between configuration of program test and the module? Can you share the config of the module?

        M 1 Reply Last reply Feb 20, 2024, 7:51 PM Reply Quote 0
        • M Offline
          mjmvisser @Matuki
          last edited by Feb 20, 2024, 7:51 PM

          @Matuki said in Re: Matuki's MMM-IT8951 module for WaveShare e-ink displays:

          Can you try to run Magicmirror when logged as root?

          Hey, thanks for the reply! Yes, I’m MagicMirror as root.

          If you already tried that, are you sure to have the correct pins configured (no difference between configuration of program test and the module? Can you share the config of the module?

          Here’s my module config:

          		{
          			module: "MMM-IT8951",
          			config: {
          				updateInterval: 60 * 1000, // 1 minute // Full refresh screen
          				bufferDelay: 1000, // 1 second // Delay before taking updated items
          				defaultTo4levels: false,
          				driverParam: { MAX_BUFFER_SIZE: 4096, PINS: {RST: 11, CS: 24, DC: 22, BUSY: 18}, BPP: 4, ALIGN4BYTES: false, SWAP_BUFFER_ENDIANESS: true }, // see https://github.com/gaweee/node-it8951#functions-calls
          				mock: false,
          			},
          		},
          

          I also checked that these are the correct pins (according to this ). I’ve also tried both 3-line SPI and 4-line SPI positions on the HAT board. The epd demo only works with the 4-line setting. I get the same result for both positions when running MM - all zeros:

          [20.02.2024 14:50.34.378] [INFO]  Checking git for module: MMM-IT8951
          [20.02.2024 14:50.34.677] [LOG]   width =  0
          [20.02.2024 14:50.34.677] [LOG]   height =  0
          [20.02.2024 14:50.34.678] [LOG]   img_addr =  0
          [20.02.2024 14:50.34.679] [LOG]   firmware =
          [20.02.2024 14:50.34.679] [LOG]   lut =
          [20.02.2024 14:50.34.784] [LOG]   VCOM =  0v
          [20.02.2024 14:50.34.788] [LOG]   IT8951 initialized (0x0)
          [20.02.2024 14:50.34.815] [LOG]   Full refresh eink
          [20.02.2024 14:50.34.862] [INFO]  Checking git for module: MagicMirror
          [20.02.2024 14:50.34.893] [ERROR] Whoops! There was an uncaught exception...
          [20.02.2024 14:50.34.902] [ERROR] Error: 'width' in 'clip' must be positive.
          

          I’ve also tried with and without the PINS and various permutations of parameters with no difference.

          Running “sudo npm run server” without the HAT attached just hangs, so it seems to be communicating with the SPI device.

          I’ve got a Pi Zero 2 W - I’m going to try with that instead of the Pi 4 in case it’s a hardware incompatibility.

          M 1 Reply Last reply Feb 21, 2024, 6:48 AM Reply Quote 0
          • M Offline
            Matuki Module Developer @mjmvisser
            last edited by Feb 21, 2024, 6:48 AM

            @mjmvisser instead of doing sudo npm run server
            Can you really try logging as root with sudo su
            Then running npm run server

            This may be the trick.

            M 1 Reply Last reply Feb 25, 2024, 4:58 PM Reply Quote 0
            • M Offline
              mjmvisser @Matuki
              last edited by Feb 25, 2024, 4:58 PM

              @Matuki

              I tried that, too. Same result. :-(

              I haven’t had a chance to try with my Pi Zero 2 W yet, will do that when I can.

              1 Reply Last reply Reply Quote 0
              • M Offline
                mjmvisser
                last edited by Feb 25, 2024, 7:40 PM

                Ha, I think I found the problem. Rev 2.3 of the Waveshare HAT adds a PWR pin. It seems that pin must be set HIGH to turn on the display: https://github.com/waveshareteam/e-Paper/commit/6ec0aacc4347d1efd7f7aad778f48591de751049

                I tried setting that pin high in node-it8951 and I finally got a response from the display when MM started up! I just need to add a delay to give the display time to start up. So progress!!

                M 1 Reply Last reply Feb 27, 2024, 6:33 PM Reply Quote 1
                • M Offline
                  mjmvisser @mjmvisser
                  last edited by Feb 27, 2024, 6:33 PM

                  Damn, it’s even worse than that. WaveShare has abandoned the idea of having a single it-8951 demo that works across all of their dislpays. Instead, they have a separate demo for each - down to differences in revision, screen size, etc… Each demo hard-codes screen size, VCOM, and various other settings. And of course, there’s no reference to documentation (they use raw hex commands with barely documented parameters).

                  The protocol for driving the e-Paper HAT has changed dramatically and the node-it8951 module basically needs to be rewritten. WaveShare seems to have diverged from the it-8951 datasheet quite a bit. e.g. they now have a DC pin for switching between Data mode and Command mode (instead of sending a 4-byte preamble).

                  Rather than try and update node-it8951 to work with all display, I’m going to fork node-it8951 as node-it8951-7in5V2 and only support the display I have. But I’ll keep it as close to the e-Paper demo as possible, so anyone else with programming skills can adapt it for another model by referencing the demo code.

                  thanks for your help, even if it was only as a rubber duck :-)

                  1 Reply Last reply Reply Quote 0
                  • 1 / 1
                  1 / 1
                  • First post
                    8/8
                    Last post
                  Enjoying MagicMirror? Please consider a donation!
                  MagicMirror created by Michael Teeuw.
                  Forum managed by Sam, technical setup by Karsten.
                  This forum is using NodeBB as its core | Contributors
                  Contact | Privacy Policy