Linux fix tslib integration - Printable Version +- Kodi Community Forum (https://forum.kodi.tv) +-- Forum: Development (https://forum.kodi.tv/forumdisplay.php?fid=32) +--- Forum: Kodi Application (https://forum.kodi.tv/forumdisplay.php?fid=93) +--- Thread: Linux fix tslib integration (/showthread.php?tid=162608) |
RE: fix tslib integration - ultraman - 2015-12-12 Don't use -d because I want to see the output when you touch the screen (4 points top/left, top/right, bottom/right, bottom/left). RE: fix tslib integration - Copprhead - 2015-12-13 Ok. I didn't realize there would be output... Here we go. I touched the four corners (top left, top right, bottom right, bottom left): Code: root@raspberrypi:~# ts_uinput_touch RE: fix tslib integration - Copprhead - 2015-12-13 Since those values didn't look too good, I changed ts.conf back to using module_raw input instead of module_raw galax grab_events=1. Here's the output: Code: root@raspberrypi:~# ts_uinput_touch To me, this looks good. Then when I run kodi (with daemon running), the touch screen is not calibrated (even tough I successfully ran ts_calibrate beforehand). When I run the calibration plugin and try to touch the crosshairs, the pointer appears (offset), but the touch is not detected by the calibration software. RE: fix tslib integration - ultraman - 2015-12-13 Ok, the second output is good. Stop kodi and start ts_uinput_touch as before in one console. Then start kodi in another console. Start calibration addon and show me the output from ts_uinput_touch. RE: fix tslib integration - Copprhead - 2015-12-13 Code: root@raspberrypi:/home/pi# ts_uinput_touch the output stops at "getting sample for: Top Left". Then I touch, but nothing happens. I exit the plugin and get the rest of the output. RE: fix tslib integration - ultraman - 2015-12-14 Then I don't know what could be wrong. Are you using grab_events=1 with module_raw input? If not try with this. RE: fix tslib integration - Copprhead - 2015-12-15 grab_events=1 did the trick! Thank you! Now the touchscreen works, and the calibration plugin, too. RE: fix tslib integration - ultraman - 2015-12-15 Excellent! So this is confirmation that this small piece of sw can be used on generic distro as well. Well done! RE: fix tslib integration - bim_overbohm - 2016-06-14 Hi all. I'm trying to get Kodi touch functionality working here on a recent Raspbian with a RPi zero and a 5" 800x480 HDMI touch screen. Is there now official support in Kodi for touch screens? I am running version 15.2. Can I simple use a PPA or do I still need to do the ts_uinput_touch workaround? If I need the workaround: - Is there a way to compile ts_uinput_touch WITHOUT compiling the whole forked tslib? Couldn't ts_uinput_touch be included into the official repo btw? - Where is ts.conf read from? /etc/ts.conf (that's where I find it with the default tslib) or /usr/local/share/ts.conf? - What would be the proper way to start ts_uintput_touch BEFORE Kodi? I start kodi by editing /etc/default/kodi and setting Enabled=1... Any info appreciated. RE: fix tslib integration - ultraman - 2016-06-15 Kodi Jarvis (v17) has touchscreen support. To calibrate screen (if required) you need to wrote one config file. 1) You need to compile something. ts_uinput_touch is a daemon which needs tslib library. And what is wrong with a fork? To include changes in official repo you must ask original tslib maintainer. I ask and there was no response. So I assume there is no interest to do that. 2) From TSLIB_CONFFILE environment variable if set. If not from /etc/ts.conf. 3) Depends on your distro. No idea about Raspbian (don't have rpi). Maybe with some service which is started before kodi. RE: fix tslib integration - bim_overbohm - 2016-06-15 Thanks for your info. (2016-06-15, 12:11)ultraman Wrote: Kodi Jarvis (v17) has touchscreen support. To calibrate screen (if required) you need to wrote one config file.So with Kodi v17+ I need to do NOTHING else than adding those settings to advancedsettings.xml? If so I guess I'll wait for v17 to come out... (2016-06-15, 12:11)ultraman Wrote: 1) You need to compile something. ts_uinput_touch is a daemon which needs tslib library. And what is wrong with a fork? To include changes in official repo you must ask original tslib maintainer. I ask and there was no response. So I assume there is no interest to do that.No offense to you and thanks for your work, but I don't like to use a forked library when I can use the official ones. It simply very often brakes other stuff or makes problem when upgrading... Sad that the maintainer isn't respondig! :/ Is it enough to compile ts_uinput_touch standalone with my currently installed tslib (as in "g++ ts_uinput_touch") or does it rely on any special functionality you built into your tslib fork? (2016-06-15, 12:11)ultraman Wrote: 2) From TSLIB_CONFFILE environment variable if set. If not from /etc/ts.conf.Thanks. (2016-06-15, 12:11)ultraman Wrote: 3) Depends on your distro. No idea about Raspbian (don't have rpi). Maybe with some service which is started before kodi.Raspbian Jessie is essentially Debian Jessie if that helps... RE: fix tslib integration - ultraman - 2016-06-15 (2016-06-15, 18:36)bim_overbohm Wrote: So with Kodi v17+ I need to do NOTHING else than adding those settings to advancedsettings.xml? If so I guess I'll wait for v17 to come out...This is how I understand. Didn't check because seems there is no calibration addon for this and also no way of getting current touch coordinates to write addon myself. (2016-06-15, 18:36)bim_overbohm Wrote: No offense to you and thanks for your work, but I don't like to use a forked library when I can use the official ones. It simply very often brakes other stuff or makes problem when upgrading... Sad that the maintainer isn't respondig! :/No offense taken. I did this daemon for myself and also I'm sharing it. If someone see it usable it can use it. You can compile tslib as static without any shared library. Which means ts_uinput_touch can be static binary without interfering with system installed one. (2016-06-15, 18:36)bim_overbohm Wrote: Raspbian Jessie is essentially Debian Jessie if that helps...Sadly I don't use any other distro than LibreELEC. RE: fix tslib integration - bim_overbohm - 2016-06-15 Quote:No offense taken. I did this daemon for myself and also I'm sharing it. If someone see it usable it can use it.Good idea! Will try that when I find time. RE: fix tslib integration - bim_overbohm - 2016-06-17 I have now tried OSMC with Kodi 17 (HOW-TO) and the touchscreen works with advancedsettings.xml. There's a write-up of the process here. I still have a slight problem though. Tapping / "Clicking" works well with a stylus, but not with a finger. Is there any way to tune some values to make it work? Also Kodi seems to need a double-click to activate buttons. This makes not much sense with a touchscreen. Is there an option for that somewhere? This can be done by editing mouse.xml. I updated the blog entry accordingly. RE: fix tslib integration - Michael31gt - 2017-02-19 I am sitting 2 days a 10 hours on the Raspberry with Rasbian and Kodi to get working the Touche function for Saint Smart 9" with eGalax USB Touch controller. On the X Server the Touche works correct and i can calibrate it ( i did it, before it was also not working / the position of the finger with the cursor never matched) I did all like on the first side here and the result is always this: pi@rasp:~ $ sudo su root@rasp:/home/pi# export LD_LIBRARY_PATH=/usr/local/lib root@rasp:/home/pi# export TSLIB_TSDEVICE=/dev/by-id/usb-eGalax_Inc._USB_TouchController-ev$ root@rasp:/home/pi# export TSLIB_PLUGINDIR=/usr/lib/ts root@rasp:/home/pi# export TSLIB_CONSOLEDEVICE=none root@rasp:/home/pi# export TSLIB_FBDEVICE=/dev/fb0 root@rasp:/home/pi# export TSLIB_CALIBFILE=/etc/ts/pointercal root@rasp:/home/pi# export TSLIB_CONFFILE=/etc/ts.conf root@rasp:/home/pi# ts_uinput_touch -d ts_uinput_touch environment variables: TSLIB_TSDEVICE: '/dev/by-id/usb-eGalax_Inc._USB_TouchController-event-if00' TSLIB_PLUGINDIR: '/usr/lib/ts' TSLIB_CONSOLEDEVICE: 'none' TSLIB_FBDEVICE: '/dev/fb0' TSLIB_CALIBFILE: '/etc/ts/pointercal' TSLIB_CONFFILE: '/etc/ts.conf' TSLIB_RES_X: '(null)' TSLIB_RES_Y: '(null)' TSLIB_TOUCH_HOME_TIME: '(null)' using fb device: /dev/fb0 resolution: 1280x720 using touch device: /dev/by-id/usb-eGalax_Inc._USB_TouchController-event-if00 ts_open: No such file or directory root@rasp:/home/pi# When i change the TSLIB_TSDEVICE: '/dev/by-id/usb-eGalax_Inc._USB_TouchController-event-if00' to TSLIB_TSDEVICE: '/dev/input/event3 then the result on the raspbian 3 is this: pi@rasp:~ $ sudo su root@rasp:/home/pi# export LD_LIBRARY_PATH=/usr/local/lib root@rasp:/home/pi# export TSLIB_TSDEVICE=/dev/by-id/usb-eGalax_Inc._USB_TouchController-ev$ root@rasp:/home/pi# export TSLIB_PLUGINDIR=/usr/lib/ts root@rasp:/home/pi# export TSLIB_CONSOLEDEVICE=none root@rasp:/home/pi# export TSLIB_FBDEVICE=/dev/fb0 root@rasp:/home/pi# export TSLIB_CALIBFILE=/etc/ts/pointercal root@rasp:/home/pi# export TSLIB_CONFFILE=/etc/ts.conf root@rasp:/home/pi# ts_uinput_touch -d ts_uinput_touch environment variables: TSLIB_TSDEVICE: '/dev/by-id/usb-eGalax_Inc._USB_TouchController-event-if00' TSLIB_PLUGINDIR: '/usr/lib/ts' TSLIB_CONSOLEDEVICE: 'none' TSLIB_FBDEVICE: '/dev/fb0' TSLIB_CALIBFILE: '/etc/ts/pointercal' TSLIB_CONFFILE: '/etc/ts.conf' TSLIB_RES_X: '(null)' TSLIB_RES_Y: '(null)' TSLIB_TOUCH_HOME_TIME: '(null)' using fb device: /dev/fb0 resolution: 1280x720 using touch device: /dev/by-id/usb-eGalax_Inc._USB_TouchController-event-if00 ts_open: No such file or directory root@rasp:/home/pi# By myselfe i will for sure not find the mistake. I hope somebody can help me please. evtest shows that the touche is found and working. But i dont become Kodi with the touch to work correctly. Is tehre an other solution maybe ?? The little calibration tool in Kodi dont work when i press Enter... |