Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

Tslib with dirverless usb touch module



  • Hi,

    I have a 'driverless' USB capacitive touch module. On a PC I plug it in and it works under Linux and Windows. It also works on my embedded device (i.MX6) under xorg, but not under QT with -qws

    The touchscreen behaves like a mouse and I have no Idea how to fix it.



  • hi DasBasti,

    Does you configure enviroment for Tslib working correctly?
    you should check what your device(touch screen) are recognized by linux PC ? and configure for tslib can understand. By using command ls /dev/input

    In my case, that is event0.

    @export QWS_MOUSE_PROTO=tslib:/dev/input/event0
    export TSLIB_CONSOLEDEVICE=none
    export TSLIB_TSEVENTTYPE=INPUT
    export PATH=/sbin:/usr/sbin:/bin:/usr/bin
    export TSLIB_FBDEVICE=/dev/fb0
    export TSLIB_TSDEVICE=/dev/input/event0
    export TSLIB_PLUGINDIR=usr/lib/ts
    export TSLIB_CONFFILE=/etc/ts.conf
    export TSLIB_CALIBFILE=/etc/pointercal
    export LD_LIBRARY_PATH=/opt/qt-arm/lib:$LD_LIBRARY_PATH@

    Try it and give response :)
    happy coding with Qt


  • Lifetime Qt Champion

    Hi and welcome to devnet,

    What version of Qt are you using ?

    Did you setup tslib properly ?

    Do you have any error message when starting your application ?



  • hi RyderQt

    I tried to use your configuration values. ls /dev/input gave me two event inputs (0 and 1) The USB tochpanel is connected to event1.

    So I have changed QWS_MOUSE_PROTO to "tslib:/dev/input/event1 Auto" to get it back working at all.

    The behaviour si still the same. The Touchpad behaves lke a trackpad or like a mouse. I can move the Cursor back and forth but the curser moves way faster than the finger on the tocuhpad. I think there is something wrong with calibration maybe?

    when I run ts_calibrate I get the error that the device is not a touchscreen, but it does calibrate something
    @
    tslib: Selected device is not a touchscreen (must support BTN_TOUCH events)
    Took 4 samples...
    Top left : X = 358242660 Y = 358053162
    Took 4 samples...
    Top right : X = 358242660 Y = 358053162
    Took 4 samples...
    Bot right : X = 358242660 Y = 358053162
    Took 4 samples...
    Bot left : X = 358242660 Y = 358053162
    Took 4 samples...
    Center : X = 358242660 Y = 358053162
    1.093728 -0.022001 0.022014
    0.220848 -0.016542 0.016552
    Calibration constants: 71678 -1441 1442 14473 -1084 1084 65536
    @

    tslib 1.0 is installed
    qt 4.7.4 is installed
    no errors at start of "fluidlauncher -qws" for example


  • Lifetime Qt Champion

    What kernel module is loaded to handle this device ?



  • I'm not sure this is the correct information but I Hink the driver is usbhid
    @
    /: Bus 01.Port 1: Dev 1, Class=root_hub, Driver=fsl-ehci/1p, 480M
    |__ Port 1: Dev 2, If 0, Class=HID, Driver=usbhid, 12M
    |__ Port 1: Dev 2, If 1, Class=HID, Driver=usbhid, 12M
    @



  • Hi DasBasti,

    SGaist wanted to know about your linux kernel version to handle usb touch device. Not infomation you gave us.



  • ok, linux kernel vesion is 3.0.35



  • Hi DasBasti,

    I have same case with you, but i can modify driver of touch screen controller and compile it again.

    Because you said that your device is "driverless" so i think you should ask your supplier of usb touch screen.

    hope this help


Log in to reply