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 - thebestofall007 - 2015-07-24 (2015-07-24, 19:01)ultraman Wrote: Okay, the build went well and I got the files you listed, but now how do I edit the environment variables to point to the proper directories and files (if that's what needs to be done)? I used the same setup as per post 13 and it complains about that missing "libts-1.0.so.0", yet I see it in /usr/local/lib when I run ls /usr/local/lib RE: fix tslib integration - ultraman - 2015-07-24 /usr/local/lib is not in dynamic linker search path. run configure with prefix Code: ./configure --prefix=/usr RE: fix tslib integration - thebestofall007 - 2015-07-24 (2015-07-24, 21:03)ultraman Wrote: /usr/local/lib is not in dynamic linker search path. Did that, but now when I run Code: ts_uinput_touch -d Code: Couldn't open tslib config file: no such file or directory RE: fix tslib integration - ultraman - 2015-07-25 (2015-07-24, 23:13)thebestofall007 Wrote:Because there is no environment variable TSLIB_CONFFILE set. Or it points to nonexistent file. Don't forget: ts_uinput_touch program is using tslib library. And some things must be set before calling this program. To know which config file to open. (2015-07-24, 23:13)thebestofall007 Wrote: would be great to be made into a tutorial.Sure. But I'm using special system and not general purpose distribution. Maybe you can write when you succeed RE: fix tslib integration - thebestofall007 - 2015-07-27 Slowly getting there... used the ./config --prefix=/usr option and it worked w/o errors, as well as on make and make install as well. One question: when ts_uinput_touch complains "ts_config: no such file or directory", which file is it looking for? What is the name of the file in question and what directory is it in? What directory would the tslib library be? the TSLIB_CONFFILE is set at /usr/etc/ts.conf and that file exists. RE: fix tslib integration - ultraman - 2015-07-27 Seems TSLIB_CONFFILE is not exported correctly and ts_uinput_touch doesn't see the variable. export TSLIB_CONFFILE=/etc/ts.conf # and other exports ts_uinput_touch Like I wrote ts_uinput_touch program is using tslib library and some things must be done as required. http://www.armadeus.com/wiki/index.php?title=Tslib And I think you have some mixup between my branch and tslib you installed. Because there is no error Couldn't open tslib config file: no such file or directory only Couldnt open tslib config file: no such file or directory If you would come to IRC (#openelec) it would be easier to explain. Easy solution to this would be to make one bash script with exports and calling program at the end. And then only calling this script. RE: fix tslib integration - wsnipex - 2015-07-27 (2015-07-24, 21:03)ultraman Wrote: /usr/local/lib is not in dynamic linker search path. /usr/local/lib IS in the dynamic linker search path on every sane linux distro. RE: fix tslib integration - thebestofall007 - 2015-07-31 I started over with a fresh osmc except where my touchscreen drivers were installed. I didn't install any other tslib libraries. Some findings: first: Quote:Easy solution to this would be to make one bash script with exports and calling program at the end. And then only calling this script.I did that with the following contents: Code: #!/bin/bash and the variables were all right. The first thing I had to do (and IMO the source of my grief!) was edit the /usr/local/etc/ts.conf file and uncomment the first line that says "module_raw input". Then I had to run ts_calibrate (with the above variables) to set up my /etc/pointercal second: I run the script, and it appears to work. I get this time around, which looks promising: Code: using fb device /dev/fb0 Is this what we're looking for? third: When I switch back to kodi, the touch is the same and doesn't work. That leaves me with a question: if this is to be run before kodi starts (was that why the touch didn't work?), how do I start the script in the boot sequence before kodi starts? RE: fix tslib integration - ultraman - 2015-07-31 You can read this http://openelec.tv/forum/20-development-discussion/77475-how-to-create-working-patch-files#143795 and this http://openelec.tv/forum/67-display/77594-7-egalax-touchscreen-support-with-tslib to get some clues. If you calibrated successfully with ts_calibrate then you should also run successfully ts_test program. If this program doesn't work well, then something in ts.conf file is wrong. When ts_test works also kodi should work. Script with exports and ts_uinput_touch MUST run before Kodi starts. How to do that in osmc I don't know. Look how uinput mapper is started. RE: fix tslib integration - thebestofall007 - 2015-07-31 (2015-07-31, 11:29)ultraman Wrote: You can read this Ok, gotcha on the program starting before kodi starts, and that's the next order on the docket. I was successfully able to run both ts_test and ts_calibrate (the ts_test program was actually fun, drawing and all). I think I'm going to write a tutorial on how to set your program up under osmc once I set it up. Thank you much for your guidance on this ultraman! RE: fix tslib integration - thebestofall007 - 2015-08-02 I was able to make an init.d startup script with the following contents: Code: #! /bin/sh The script executed without error on boot and the ts_uinput_touch -d command executed, however, the touch still isn't working. What went wrong? I am a noob at making init.d scripts, and is there anything I need to edit in this, or in any other file like the ts.conf? Do I have to apply any patches or have any addons to kodi as well? RE: fix tslib integration - thebestofall007 - 2015-08-07 I did dmesg | tail and it shows to have a virtual device made at /devices/virtual/input/input3, and evtest on the entry shows output when the screen is touched. Something tells me I my need to patch kodi, but I'm not sure how to go about it in osmc. RE: fix tslib integration - ultraman - 2015-08-07 (2015-08-07, 06:18)thebestofall007 Wrote: I did dmesg | tail and it shows to have a virtual device made at /devices/virtual/input/input3, and evtest on the entry shows output when the screen is touched. Something tells me I my need to patch kodiYes, when you run ts_uinput_touch daemon new virtual input device is created. And that's the main point: hide touchscreen behind it. That's why you don't need or have to patch kodi to get touch working. But you also wrote you see evtest program showing some data. And this is wrong. All input devices are handled by kodi and you can't run kodi and having evtest show something. This means that kodi didn't pick up this input device probably because it was started to early. Like I wrote first ts_uinput_touch daemon must be started and THEN Kodi. Only this way will works. You can see in kodi debug log which input devices it handles. If you restart kodi and still doesn't work then it is something wrong in /usr/local/etc/ts.conf. When you run evtest you must see coordinates around 0,0 when you are on top left part of the screen. You see max_x,0 when you are on top right and so on. I saw you were searching me at IRC but I was already afk. RE: fix tslib integration - thebestofall007 - 2015-08-07 Okay, Gotcha on the evtest. here is my ts.conf: Code: # Uncomment if you wish to use the linux input layer event interface Unfortunately I accidentally broke my lcd screen when I was on the irc, and now I have to order another one and I'll be down until I receive the new one sadly. I'll let you know when I'm back. RE: fix tslib integration - thebestofall007 - 2015-08-20 (2015-08-07, 11:13)thebestofall007 Wrote: Okay, Gotcha on the evtest. Okay, I got my screen finally. I did a little digging and found that ts_uinput_touch is started by a service script and not an init.d script. The code is included here: Code: [Unit] I am in the process of adapting it to work with osmc, as this one is for openelec. Here's what I've done so far with the code: Code: [Unit] Is there anything missing? What is the purpose for the "ts_env.sh" file? What would I have for My setup doesn't have it or it hasn't been created yet. |