Announcement

Collapse
No announcement yet.

4DPi-24-HAT: Can't get the Touch Screen bit going

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • 4DPi-24-HAT: Can't get the Touch Screen bit going

    Guys,
    Using RaspberryPi B+: I followed the little paper of spells to get this display installed without any real issues other than getting anything sensible at the touch screen calibrate point. At no point has this HAT responded to any TOUCH input from my Mark 1 finger. A thread here pointed me at installing the necessary and I can now get the "xinput_calibrator" to actually run although my language skills did fail me on the included external link.

    That was all the good news. The "xinput_calibrator" utility now runs but then barfs with "Error: No Calibratable device found". So I'm guessing there isn't one to calibrate or its broke/mal-configured/ or missing driver.

    I have tried the kernel HAT drivers described in the enclosed paperwork and the kernel bits from the 4D support pages here somewhere but either works. The HAT was purchased from CPC.FARNELL's UK outlet a few weeks back.

    From: lsb_release -a ## I get....
    No LSB modules are available.
    Distributor ID: Debian
    Description: Debian GNU/Linux 7.8 (wheezy)
    Release: 7.8
    Codename: wheezy

    Would really like the Touch Screen bit going else its a tough ride. What have I missed?

  • #2
    Hello,

    Which download link is the QSG paper copy you have, telling you to install?
    There may have been an update since, I am not 100% sure.

    Can you pop over to our website and download the latest Datasheet and see if the download link in there is the same?

    Regards
    James

    Comment


    • #3
      James,
      I started with the paper detail then found "4d-hats_4-1-10_v1.0.tar.gz" from your current on-line doc. Currently can't find the paper version but I guess I'm already ahead of it.

      Just re-ran the tar on the above file with no joy. Should I have started with a fresh kernel image? Really don't want to go that far back.

      Is there any way to purge the HAT driver bit without a total SD re-write?

      (and Thanx for the quick replies in this and my other two threads, will investigate. (guess early start your end))

      Comment


      • #4
        Hello again,

        As per the datasheet, it recommends you start with a fresh image as it cannot know what you have done to the image prior, so there is no knowing whether it will work or not.
        I would suggest you start with a new image, so you have it in a known state, image using the latest 4DPi Kernel, and you should then have a working system.

        This is really the only why to know if all things are working right, or if you have some weird combo of software going on which is preventing it from working.

        Regards
        James

        Comment


        • #5
          James, Thanks for the prod in the direction I didn't really want to go in. Yes, following your script and now running Jesse with your current down load wedged in there somewhere. Will need to work out and fetch all the now lost libraries et al.

          Supplementary Question here: Should I still use "apt-get update/upgrade" or is my new system locked in stone?

          Any plans for a (simple) drop in driver module?

          The touch screen now works but needs calibrating, its not even close.

          Followed your script section to 4.3 to calibrate and it barfs because there is no calibrate support in the current image. Your script needs to include adding this (did spot it described in another thread here, see: "Calibration for 4DPi-24-Hat). Also, reading down the script 4.3.7 refers to copying the bit in 4.3.4 into "99calibration.conf". It should read from 4.3.5 if I'm understanding what is required.

          This is as far as I've got....
          Last edited by RasPiSteve; 29 November 2015, 07:11 AM.

          Comment


          • #6
            Right... from the "Calibration for 4DPi-24-Hat" thread I get:

            wget http://adafruit-download.s3.amazonaw....5-1_armhf.deb
            sudo dpkg -i -B xinput-calibrator_0.7.5-1_armhf.deb

            So, now with the "xinput_calibrator" installed I follow your script again. A point here is a major problem with the Hat screen size. The best I get is the top left bit of the xterm once the calibrator has finished. Can I suggest you include directing the output of "xinput..." to a text file to capture all output. Then it's just a question of copying the content of the new file to your file as directed in your script. Running X via a "sudo -u pi... " gets you the calibrator tool in the menu (because I'm root). Running X as "pi" you have to open an xterm and type "xinput..." to also include " > cal_file.txt" to capture the output.

            Finally, need a smarter way of setting the X screen font size to "a lot smaller". It's near impossible using default font and through the screen's menus. Notice here that the little demo video on the display appears to show a lot smaller fonts/menus.

            Phew!

            Comment


            • #7
              Calibration stuff is downloaded by doing the following

              Code:
              sudo apt-get install libx11-dev libxext-dev libxi-dev x11proto-input-dev
              wget http://github.com/downloads/tias/xinput_calibrator/xinput_calibrator-0.7.5.tar.gz
              tar -xzvf xinput_calibrator-0.7.5.tar.gz
              cd xinput_calibrator-0.7.5/
              ./configure
              make
              sudo make install
              The HAT is 320x240 pixels, so obviously not everything is going to fit on the screen, like it would on a desktop HDMI monitor.
              Double click on the top bar of the Xterm and it should go full screen, the output should then wrap to fit better so you can see everything.

              All this stuff is open source, we didn't write xinput_calibrator etc obviously, or the process required to set the calibration. To set the font size, you do as you would do any other Raspbian/LXDE install.

              It is possible to change the DPI output of the 4DPi the same way as other LXDE based systems.
              Googling gives solutions such as:

              login as pi and open terminal
              nano .Xresources
              Add this line:
              Xft.dpi: 75
              reboot...
              This will set the DPI to be 75
              You can then change the icon sizes in the LXDE preferences, from memory which is right clicking on the desktop and going into preferences, or else it might be from the file explorer. None of this is specific to our 4DPi's though.

              I hope that helps

              Regards
              James

              Comment


              • #8
                I had and am still having the same issue - can get display and all working, just the calibration is crazy - point of detection is all over the place. This is on Jessie. On Wheezy there is no problem. I have now run through the set up twice on Wheezy with no problems and get a working, calibrated touchscreen I am entirely happy with. Starting with a clean copy of Jessie I have now done three separate installations using the 4D published solution - all result in failure to be able to detect the touched location. The screen is active as the cursor jumps about but the location of the touch detected is random. This is only an issue using the /dev/input/event0 device in a Python script, in X the cursor faithfully follows a finger and takes a tap as a click. Any suggestions welcome and maybe this is relevant to this thread?

                Comment


                • #9
                  Hello jda

                  It looks that touch support in python is broken on Jessie
                  https://bugs.debian.org/cgi-bin/bugr...cgi?bug=798160

                  Rebuilding SDL library helps regarding erroneous readings, but it only works for some time, then library blocks - touch does not work at all after some time
                  The same problems with Adafruit screens (and I guess with every touch screen): https://forums.adafruit.com/viewtopi...76169&p=404358

                  If you want to rebuild SDL library:

                  git clone https://github.com/vanfanel/SDL-1.2.15-raspberrypi.git
                  cd SDL-1.2.15-raspberrypi/
                  ./MAC_ConfigureSDL12-rpi2.sh
                  make
                  sudo make install
                  sudo reboot

                  I hope that is somewhat of a help

                  Regards
                  James

                  Comment


                  • #10
                    Hi James

                    Thanks for the confirmation. I can at least stop trying to find where my procedure is wrong.

                    I checked the link and it doesn't look good. Isn't that a bit crap in Jessie? There must be loads of applications relying on touch that have been developed for the Pi. That means Wheezy will have to remain the working version until Jessie is fixed and it does not look like that is going to happen soon.

                    Regards

                    Jonathan

                    PS Maybe this needs to be circulated more widely. I cannot be the only person who is having headaches with this problem.

                    Comment


                    • #11
                      Just to confirm - I ran through the SDL library rebuild as kindly suggested by James. Although everything ran through without apparent errors, touch is still broken in Python and so my application is useless in Jessie. So I am now stuck and do not know how to proceed.

                      Comment


                      • #12
                        Hello jda

                        Sorry there really isn't anything we can do, as we are not the authors of this SDL library.
                        I guess you will either have to go back to Wheezy or figure out a way around it somehow...
                        Sorry about that.

                        Regards
                        James

                        Comment

                        Working...
                        X