Home of the Squeezebox™ & Transporter® network music players.
Page 1 of 2 12 LastLast
Results 1 to 10 of 14
  1. #1
    Senior Member mooblie's Avatar
    Join Date
    Feb 2008
    Location
    The Scottish Highlands
    Posts
    186

    piCorePlayer 6.0.0 and Waveshare Touchscreens

    Hi
    I appreciate that PCP/Jivelite works out of the box with the Pi's own 7in touchscreen, and the commercial reasons for doing that.

    However, I am trying (as are others) to get PCP to work with the range of Waveshare 5 & 7 inch touchscreens. They are HDMI-attached for video/audio and USB-attached for power and touch. This is good for PCP of course, as it leaves the GPIO free for your favourite audio HAT of course (although I use HDMI-audio, which seems pretty good to me).

    Drivers etc., that work fine on Raspbian are all here:
    https://github.com/goodtft/LCD-show

    These screens work well with PCP/Jivelite for HDMI video and HDMI audio. However, although touch is working, it's so uncalibrated (touch position not= cursor position) it's unusable.

    When trying to run this calibration command over SSH:
    Code:
    sudo TSLIB_FBDEVICE=/dev/fb0 TSLIB_TSDEVICE=/dev/input/event6 /usr/local/bin/ts_calibrate
    ...PCP enters the calibration process OK, but no longer responds to touch at all during the calibration procedure, and just sits here:

    ...hence you can only crash out of the calibration process with ctrl-C from SSH.

    I have tried re-installing the Waveshare drivers from github (by adding "git" command to TinyCoreLinux) but I'm getting out of my depth and not achieving any progress. Any ideas?
    Martin

  2. #2
    Senior Member Greg Erskine's Avatar
    Join Date
    Sep 2006
    Location
    Sydney, Australia
    Posts
    1,796
    Quote Originally Posted by mooblie View Post
    I have tried re-installing the Waveshare drivers from github (by adding "git" command to TinyCoreLinux) but I'm getting out of my depth and not achieving any progress. Any ideas?
    Hi mooblie,

    The scripts from Waveshare (and the various OEM versions) assume you are using a full linux, running a GUI and are using bash shell. They also just overwrite setup files.

    From memory (dangerous) they also use x windows tools to setup the touch screen rather than the CLI versions of the command.

    Hopefully someone has done this before and can advise you.

    regards
    Greg

  3. #3
    Senior Member paul-'s Avatar
    Join Date
    Jan 2013
    Posts
    3,045
    What touch driver is it using?
    piCorePlayer a small player for the Raspberry Pi in RAM.
    Homepage: https://www.picoreplayer.org

    Please donate if you like the piCorePlayer

  4. #4
    Senior Member mooblie's Avatar
    Join Date
    Feb 2008
    Location
    The Scottish Highlands
    Posts
    186
    Thanks for the replies, Greg and Paul.

    I installed "git" into pcp's TinyCoreLinux with
    Code:
    tce-load -iw git
    then used
    Code:
    sudo rm -rf LCD-show
    git clone https://github.com/goodtft/LCD-show.git
    chmod -R 755 LCD-show
    cd LCD-show/
    sudo ./LCD7C-show
    - but it says
    Code:
    sudo: unable to execute ./LCD7C-show: No such file or directory
    even though "LCD7C-show" appears as executable in the correct directory??

    Running
    Code:
    sudo TSLIB_FBDEVICE=/dev/fb0 TSLIB_TSDEVICE=/dev/input/event7 /usr/local/bin/ts_calibrate
    runs, and gets me to the screen in the photo in my post above, but touching the screen does nothing. ^C needed to get out, whereupon it says:
    Code:
    xres = 800, yres = 480
    ^Csignal 2 caught
    The 7in screen is actually native 1024x600 pixels.

    I've waded out beyond my Linux depth now. Can you tell!? Thanks in advance for any help or suggestions.
    Martin

  5. #5
    Senior Member Greg Erskine's Avatar
    Join Date
    Sep 2006
    Location
    Sydney, Australia
    Posts
    1,796
    You missed my warning about those scripts.

    We don't install bash.

  6. #6
    Senior Member
    Join Date
    Apr 2005
    Location
    UK/London
    Posts
    2,438
    In your first example you used
    /dev/input/event6
    and in your second you used
    /dev/input/event7

    I see that pCP on the official RPi touchscreen uses
    /dev/input/event2

    So - I think one thing to resolve is which is the right event number to use for this device.
    I do not know how to work this out but perhaps
    dmesg | grep -i usb
    will help to find more about their USB input device
    Paul Webster
    http://dabdig.blogspot.com
    Author of "Now Playing" plugins covering Radio France (FIP etc), KCRW, Supla Finland, ABC Australia, CBC/Radio-Canada and RTE Ireland

  7. #7
    Senior Member mooblie's Avatar
    Join Date
    Feb 2008
    Location
    The Scottish Highlands
    Posts
    186
    Thanks, Greg. You did indeed warn me - and that's when I started worrying that, by installing such things, I was doing things not allowed and beyond my pay grade!


    Thanks too, Paul. It is true, I did use different event numbers, as I had installed a power-off switch between the two episodes. I found the correct/latest event number for the screen using
    Code:
    cat /proc/bus/input/devices
    which gave me
    Code:
    I: Bus=0000 Vendor=0000 Product=0000 Version=0000
    N: Name="ADS7846 Touchscreen"
    P: Phys=spi0.1/input0
    S: Sysfs=/devices/platform/soc/3f204000.spi/spi_master/spi0/spi0.1/input/input6
    U: Uniq=
    H: Handlers=mouse2 event7 
    B: PROP=0
    B: EV=b
    B: KEY=400 0 0 0 0 0 0 0 0 0 0
    B: ABS=1000003
    Any thoughts?
    Martin

  8. #8
    Senior Member paul-'s Avatar
    Join Date
    Jan 2013
    Posts
    3,045
    ads7846 drivers are included with the pCP touchscreen extension

    You need to read the contents of LCD-7CShow and then perform some of those things manually. You can not run the script automatically. But all of the stuff that goes into config.txt is required.

    The input number will change every boot, so you will need to script it to find it. If you read all of the jivelite/waveshare threads, you will find some scripts.
    piCorePlayer a small player for the Raspberry Pi in RAM.
    Homepage: https://www.picoreplayer.org

    Please donate if you like the piCorePlayer

  9. #9
    Senior Member mooblie's Avatar
    Join Date
    Feb 2008
    Location
    The Scottish Highlands
    Posts
    186
    OK, thanks again Paul. I'll take a look and see if I can do that.... ()
    ----
    Edit: OK, I added the stuff in LCD-7Cshow to config.txt.

    Good news:
    - display looks better now (I can choose a hi-res skin "Touch Skin (1024x600)"* and the display fills the screen with hi-res images)
    - touch is now only slightly off - about 1-2cm, whereas it was about 4-6cm off before

    (* This is the correct native pixel-size of this 7in display.)

    Bad news:
    - running
    Code:
    sudo TSLIB_FBDEVICE=/dev/fb0 TSLIB_TSDEVICE=/dev/input/event7 /usr/local/bin/ts_calibrate
    still doesn't work - i.e. enters calibration routine; shows crosshairs, etc, but doesn't respond to any touch. Have to ^C out of it.


    Still: it's getting better each day! Thanks again guys. Still searching jivelite/waveshare history and looking at that event number....
    Last edited by mooblie; 2020-05-24 at 10:08.
    Martin

  10. #10
    Senior Member ralphy's Avatar
    Join Date
    Jan 2006
    Location
    Canada
    Posts
    2,468
    It's likely that /usr/local/etc/ts.conf needs to be modified for your screen. The defaults are for the rpi 7" screen.
    Ralphy

    1-Touch, 5-Classics, 3-Booms, 1-UE Radio
    Squeezebox client builds donations always appreciated.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •