Touchsupport

  • To be sure my waveshare driver is working correctly we need to analyze the hidraw data as explained here (under hidraw driver analysis).
    But first you need to download xxd tool for RPi2 or RPi.
    Before running it you need to stop some services

    Code
    systemctl stop kodi
    systemctl stop ts_uinput_touch
    chmod +x xxd*
    ./xxd-RPi2 -c 25 /dev/hidraw0


    You should see line started with aa01 or aa00. If you don't change number 25 to lower or higher.

    Instead of /dev/hidraw0 you could try /dev/hidraw1, ..

    Edited once, last by vpeter (December 9, 2016 at 6:18 PM).

  • I've downloaded xxd for RPi2 and stopped everything.
    Then I typed the following on console:

    Code
    LibreELEC:~/.kodi/temp # ./xxd-RPi2 -c 25 /dev/hidraw0
    sh: ./xxd-RPi2: Permission denied
    LibreELEC:~/.kodi/temp # chmod +x ./xxd-RPi2
    LibreELEC:~/.kodi/temp # ./xxd-RPi2 -c 25 /dev/hidraw0
    ^C
    LibreELEC:~/.kodi/temp # ./xxd-RPi2 -c 22 /dev/hidraw0


    But then happens nothing :(
    The console stands still till I ended it with Strg + C.

    I have to try it again on sunday when I have time for it.

    Thx a lot for your help :)

  • Today is still the same, nothing happens and there is no output :(

  • I've tried the Display with Rasbian Pixel and installed Drivers as I've seen in an tutorial for eGalax Display.
    Then I've run the "xinput_calibrator" and calibrated the Display. But I have to run it twice. Only then the calibration was successfull.

    After calibration I got coordinates like this:

    Code
    Section "InputClass"
            Identifier      "calibration"
            MatchProduct    "eGalax Inc. USB TouchController"
            Option  "Calibration"   "145 1884 1760 264"
    EndSection

    Maybe there is way to use this coordinates for KODI?

  • Hi, tried to compile the new 07.90.009, but i get this failure:

    Error - multiple package folders:
    /home/user/http://LibreELEC.tv/packages/addons/addon-depends/tslib
    /home/user/http://LibreELEC.tv/packages/tslib

    Makefile:12: die Regel für Ziel „image“ scheiterte
    make: *** [image] Fehler 1

    Then I tried without step 4 in post #11. Then compiling works, but after updating my raspi, the touchscreen is not working any more.

    Any idea, what i'm doing wrong?

    Thank you!

  • No need to copy extra files anymore - everything is already included

    Code
    PROJECT=... ARCH=... scripts/create_addon touchscreen

    Touchscreen addon is also build and available from LibreELEC repository and there is no need to compile it anymore. But it still needs to be manually configured as before.

    Edited once, last by vpeter (December 12, 2016 at 10:30 AM).

  • I recently made it to get my configuration work except from the "touch" part.

    RPI3 with waveshare 5inch HDMI LCD (B)

    I made it untill the point that the display is working well but the touch area is only in a very small part of the screen. It's so small I even don't
    get to the point of calibrating the thing.
    I'm figuring out which "default" values I need to set in the pointercal file so I get at least a larger touch area to get the calibration done afterwards?
    Anyone can give me a dump of that file?

  • Well, the point is with calibration I don't get the crosshair on my screen but the panel does respond only in a very small area of the touchpanel.
    If at least I would know the syntax that is in the file, I could experiment with some settings.

    Edited once, last by WimAdriaens (January 16, 2017 at 3:39 PM).

  • You can read here about how the calibration file is created.

    And if you don't get crosshairs on whole screen try to set value to TSLIB_RES_X/Y in file /storage/.kodi/addons/config/ts_env.sh file or something like that.

  • These setting are found under /storage/.kodi/addons/service.touchscreen/config on my system. Any idea if that could be an issue?

    Par of the content is:

    # change vid/pid for waveshare touchscreen device
    PRODUCT_VID=0EEF
    PRODUCT_PID=0005

    # device set directly or find automaticaly at the end of this script
    export TSLIB_TSDEVICE=""
    #export TSLIB_TSDEVICE="/dev/hidrawN"

    export TSLIB_PLUGINDIR=$ADDON_DIR/lib
    export TSLIB_CONSOLEDEVICE=none
    export TSLIB_FBDEVICE=/dev/fb0
    export TSLIB_CALIBFILE=/storage/.kodi/userdata/addon_data/service.touchscreen/pointercal
    export TSLIB_CONFFILE=/storage/.kodi/userdata/addon_data/service.touchscreen/ts.conf

    export TSLIB_RES_X=800
    export TSLIB_RES_Y=480


    When I try manual calibration, I get:

    LibreELEC (official) Version: 7.95.1
    WimPiMedia:~ # cd /storage/.kodi/addons/service.touchscreen
    WimPiMedia:~/.kodi/addons/service.touchscreen # ls
    addon.xml calibrate.py lock-screen.py service.py
    bin config resources system.d
    WimPiMedia:~/.kodi/addons/service.touchscreen # python calibrate.py
    Traceback (most recent call last):
    File "calibrate.py", line 23, in <module>
    import xbmc
    ImportError: No module named xbmc
    WimPiMedia:~

    Edited once, last by WimAdriaens (January 22, 2017 at 10:19 AM).

  • Display resolution is 800 x 480

    Indeed, I figured that out in the mean time. Thanks.

    When I run the calibration from kodi I get this error in kodi.log

    12:23:27.417 T:1772090272 WARNING: COMXImageFile::GetCodingType progressive images not supported by decoder
    12:23:27.417 T:1772090272 NOTICE: LoadJpeg: unable to load /storage/.kodi/addons/service.touchscreen/resources/media/background.jpg

    The image is there.

    Tried to change the PID to 0110 but that gave no different behaviour.

    Although I feel I'm getting close ...

  • Let's start again:
    1.) do you see background image when you try to calibrate from kodi?
    2.) does kodi itself displays over whole screen?
    3.) can you calibrate from console when run this?

    Code
    systemctl stop kodi
    ts_calibrate.sh
    systemctl start kodi


    I don't have rpi and/or waveshare display and newer had direct contact with it.

  • 1. No background image
    2. Yes, screen works well. Mousepounter with mouse is ok.
    3.ts_calibrate.sh give error:

    WimPiMedia:~ # systemctl stop kodi
    WimPiMedia:~ # ts_calibrate.sh
    PRODUCT_VID_PID: 00000EEF:00000110

    device: /sys/class/hidraw/hidraw0/device/uevent

    device: /sys/class/hidraw/hidraw1/device/uevent

    device: /sys/class/hidraw/hidraw2/device/uevent
    touchscreen device:
    Stopping Kodi and touchscreen daemon...
    Failed to stop ts_uinput_touch.service: Unit ts_uinput_touch.service not loaded.
    ts_open: No such file or directory

    When I look into ts_calibrate.sh:

    oe_setup_addon service.touchscreen

    if [ -d /usr/share/kodi/addons/service.touchscreen ]; then
    # addon included in image
    ADDON_DIR="/usr/share/kodi/addons/service.touchscreen"
    fi

    the "service.touchscreen" is not there.

    Edited once, last by WimAdriaens (January 22, 2017 at 2:17 PM).