This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

am335x Starter Kit, problem running tscalib "not a touchscreen"

Dear all,

we are trying to use tslib with Qt in our project.

We used the kernel and bootloader provided in the SDK but with a custom rootfs.

The touchscreen works great with xorg but if we run a Qt app, it seems really not calibrated. So when we run tscalib we get:

tslib: Selected device is not a touchscreen (must support ABS and KEY event types)

this is the trace of ts_calib

http://pastebin.com/ZqQpBAKn

any help will be very appreciated.

Thanks

Giuseppe

  • Not sure about starter kit... had a somewhat similar experience with the EVM however.

    Booted system and matrix demo application came up as normal.

    Stopped the matrix application and started up one of my own Qt applications.

    Keyboard was not responsive... no cursor was visible.

    Killed my Qt application. Ran ts_calibrate. Info output from ts_calibrate looked correct.

    Re-ran my Qt application and everything looked ok.

  • Hi Jhon,

    thanks for the hint but we are using a custom rootfs so we do not have matrix installed on it. We are working on installing it and see if we are able to create a pointercal file once for all... It could be useful if TI could provide pointercal file for the starter kit.. it is a big issue touchcscreen not working!

  • ts_calibrate creates the pointercal file... not matrix.

  • Hello,

    How are you running the Qt app? The environment variable QWS_MOUSE_PROTO=Tslib:/dev/input/touchscreen0 is used by Qt to determine which mouse driver to use. You can also reconfigure the default location of the calibration file with the env variable TSLIB_CALIBFILE. The default location is /etc/pointercal. I have included the environment variables below that are set before Qt apps run in our SDK.

    export TSLIB_TSDEVICE=/dev/input/touchscreen0

    export QWS_MOUSE_PROTO=Auto

    export QWS_MOUSE_PROTO=Tslib:/dev/input/touchscreen0

    Making sure to have these set before running the calibration utility and Qt apps should fix your issues.

    Regards,

    Dave

  • I did not set any of those.  ;)

    I took the EVM out of the box.

    Hooked it up to boot the kernel via tftp and a NFS mounted the file system.

    Moved the matrix application to matrix application.ORIGINAL, so it would not start up automatically.

    Built my own Qt application inside of the SD and put it on the EVM.

    Powered the EVM up and ran my Qt application... No cursor!

    Killed my application and ran ts_calibrate... the output looked good.

    Started my Qt application back up and it works great.

    Command for starting my application looks like this...

    MyQtApplication -qws

    That's it.

    Again, this is the EVM I am talking about, however it should be real similar to your starter kit in most respects

    that we are discussing here.

  • John,

    QWS_MOUSE_PROTO and TSLIB_DEVICE are both set automatically at login in qte.sh and tslib.sh found in /etc/profile.d at system boot from when using our SDK.

    Regards,

    Dave

  • Dear all,

    we fixed our problem modificating "by hand" ts_calibrate.c.

    For some reason ts_calibrate couldn't open

    TSLIB_DEVICE=/dev/touchscreen0

    so it picked the default device (event0). I forced it to pick touchscreen0 and everything went ok.

    It is a really mistery how it is possibile that the export don't work, maybe there is a permission problem somewhere.

    An other important thing we did is that we gave  the right permissions and owner at the device /touchscreen0.

    Regards

  • Thanks Dave... never had to worry about those... so far anyway.

    My AM335X EVM just seems to work GREAT most all of the time... perhaps I'm just really lucky I suppose?

    It sounds like they were really have a tough time although it seems to be working ok for them now.