Touchsupport


  • Sorry TVPL but I don't know what kind of display is this.
    But because RPi is using sd card for libreelec it very easy to test ;)

    Sorry I don't understand ... HU on my CRV 2015 based on Android OS, pls explain me how to test case ?
    Many thank !

  • Hello,

    yesterday I received my Lilliput FA1011 and wanna try the Touch. On Libreelec 7.90.009 it's found under Peripherals as "eGalx USB Touch Screen".
    So far, so good, but I couldn't calibrate it :(

    I've installed Touchscreen Addon from "Install from Repository -> Services". But everytime I wanna run Addon, nothing happens till cycling for wait process.
    Even if I make an clean install oder install stable Version of Libreelec and Update to the newest one. The Addon doesn't work :(

    This message I got in KODI.log:

    Code
    20:51:51.680 T:1610236832 WARNING: COMXImageFile::GetCodingType progressive images not supported by decoder
    20:51:51.680 T:1610236832  NOTICE: LoadJpeg: unable to load /storage/.kodi/addons/service.touchscreen/resources/media/background.jpg


    But Image is still on that Location.

    In config.txt I set:

    Code
    hdmi_group=2
    hdmi_mode=87
    hdmi_cvt=1024 600 60 3 0 0 0


    And in Kodi I set Resolution to 1024x600p. After that I have to calibrate the Video Settings.

    Touch still works but only in upper right Corner. And when I slide up, the Cursor wents right and when I slide down, it wents left. Sliding right = Cursor up and sliding left = Cursor down.

    Can someone help me getting Touchscreen work properly?

    Thx forward :)

  • This addon doesn't work magically when it is installed - it must be manually configured as written multiple times.

    In folder /storage/.kodi/userdata/addon_data/service.touchscreen there are few files. You need to copy ts.conf and ts_env.sh based on samples there. I don't know what kind of display is this. If it is real egalax then use files ts.conf-generic and ts_env.sh-sample. If this is waveshare type then use waveshare files. After reboot calibration should work.

  • Thx, I will try later, when I'm at home :)

    Quote


    it must be manually configured as written multiple times.


    Well I've searched for Touch by Addons and find it. There was no tip about configuring anything. And this thread I found today ;)
    Maybe this should be written as Tip on Addon-Screen.

    Edited once, last by Allodo (December 8, 2016 at 1:37 PM).

  • Now I've renamed file ts-conf.generic to ts.conf and ts_env.sh-sample to ts_env.sh and rebooted, but the same behaviour as before :(
    Then I tried it with the waveshare-Files. Result is the same.

    Here what evtest shows:

    And here KODI.log:

    Code
    16:06:32.971 T:1565520800 WARNING: COMXImageFile::GetCodingType progressive images not supported by decoder
    16:06:32.971 T:1565520800  NOTICE: LoadJpeg: unable to load /storage/.kodi/addons/service.touchscreen/resources/media/background.jpg
    16:08:46.358 T:1962102784   ERROR: GetDirectory - Error getting plugin://service.touchscreen/
    16:08:46.358 T:1962102784   ERROR: CGUIMediaWindow::GetDirectory(plugin://service.touchscreen/) failed
    16:09:21.391 T:1780478880   ERROR: CPythonInvoker(3, /storage/.kodi/addons/service.touchscreen/calibrate.py): script didn't stop in 5 seconds - let's kill it

    Is there anything I have to change in ts.conf and ts_envh.sh or only rename files?

  • Code
    Input device ID: bus 0x3 vendor 0xeef product 0x1 version 0x210
    Input device name: "eGalax Inc. USB TouchController"


    Seems to me this is waveshare thing.
    In ts_env.sh change PRODUCT_PID to 0210.
    But this was only tested with display which had PRODUCT_PID=0005 and I don't know if your display will work too. Because this is hidraw device there is another entry in ts.conf named

    Code
    module_raw waveshare len=22


    len=22 indicates how much data it sends on one touch. You can read more here and if didn't work try len=25. If you can't figure out then you would need to use xxd tool to analyze the hidraw data (not included in addon).

    Also if using non-waveshare display then in file ts_env.sh TOUCHSCREEN_NAME variable must be set.

    Edited once, last by vpeter (December 8, 2016 at 5:36 PM).

  • vpeter
    Thx for your help :)

    This is what lsusb shows:

    Code
    Bus 001 Device 004: ID 0eef:0001 D-WAV Scientific Co., Ltd eGalax TouchScreen

    I took the waveshare-files and renamed them. I changed the PRODUCT_PID as you've written to 210. But still the same behaviour. The Addon will not start. The only thing I see is the rotate circle :(

    Here is KODI-Log:

  • I was wrong: pid is 0001. That's why use PRODUCT_PID=0001.
    And kodi log is not important - you should see ts_uinput_touch process running.
    You can also check why touchscreen service is not started with command

    Code
    systemctl status service.touchscreen -l
  • Code
    PRODUCT_PID=0001.


    That was the magic ;)
    Now Touchscreen addon works.

    But when I try to press crosshair, nothing happens. I will try a little bit with settings in config.txt, maybe this should work.

  • Good. I assume you need to adjust len parameter in ts.conf.
    Sadly tool xxd is not included by addon. Which RPi image version you are using and I will compile it for you.

  • Main Problem is that I only have touch (appr. 5cm x 5xm) on the right Corner with inverted touch controls. Means, when I slide up, the Cursor will move left and vice versa, and when I slide left, Cursor will move up.

    It would be great if you would compile it. I'm using latest libreelec 7.90.009 for my Rpi3.

    I'm using this Version only for testing because there is Touch Control integrated.
    What I need is an stable Version of libreelec with KODI v17 because this would be the client for my wife's TV in Kitchen ;)

  • If your cursor movement is good then it is just a matter of calibration the screen I think.
    Regarding inverted screen: in file ts.conf add swap_xy=1 to line with module linear like it is done in ts.conf-generic.

  • Well Cursor movement isn't really good, because there is only an area about 5x5cm in the right Corner where the Touch is working.
    The Rest of Display is Touchless area. And I couldn't reach all Areas of Display with Cursor. I've played with Settings in "Peripherals -> eGalax USB Touchscreen" but this wont help.

    Edited once, last by Allodo (December 9, 2016 at 9:39 AM).

  • Of course ;)

    Well I've also read about modifying the advancesettings.xml for KODI v17 Krypton.

    Code
    <touchscreen>
                        <x_offset>0</x_offset> <!-- set pixel x offset to align it to the used display-->
                        <y_offset>0</y_offset> <!-- set pixel y offset to align it to the used display-->
                        <x_stretch_factor>1.0</x_stretch_factor> <!-- stretch/compress the touch x axis-->
                        <y_stretch_factor>1.0</y_stretch_factor> <!-- stretch/compress the touch y axis-->
            </Touchscreen>

    But where I can get the Offset Parameters?

    Edited once, last by vpeter (December 9, 2016 at 10:20 AM).