Important: Please read the Qt Code of Conduct -

Can't calibrate capacitive touchscreen with Qt5 and EGLFS

  • I'm trying to make the following Zytronic BTC_ZXY100-U-OFF-32-A USB touchscreen with Qt5/EGLFS on a Raspberry Pi 2 with Raspian and libts-0.0-0:armhf 1.0-12:

    Bus 001 Device 035: ID 14c8:0005 Zytronic 
    Device Descriptor:
      bLength                18
      bDescriptorType         1
      bcdUSB               2.00
      bDeviceClass            0 (Defined at Interface level)
      bDeviceSubClass         0 
      bDeviceProtocol         0 
      bMaxPacketSize0        64
      idVendor           0x14c8 Zytronic
      idProduct          0x0005 
      bcdDevice            1.00
      iManufacturer           1 Zytronic Displays Limited
      iProduct                2 Zytronic Touchscreen Controller
      iSerial                 0 
      bNumConfigurations      1
      Configuration Descriptor:
        bLength                 9
        bDescriptorType         2
        wTotalLength           34
        bNumInterfaces          1
        bConfigurationValue     1
        iConfiguration          0 
        bmAttributes         0xa0
          (Bus Powered)
          Remote Wakeup
        MaxPower              100mA
        Interface Descriptor:
          bLength                 9
          bDescriptorType         4
          bInterfaceNumber        0
          bAlternateSetting       0
          bNumEndpoints           1
          bInterfaceClass         3 Human Interface Device
          bInterfaceSubClass      0 No Subclass
          bInterfaceProtocol      0 None
          iInterface              0 
            HID Device Descriptor:
              bLength                 9
              bDescriptorType        33
              bcdHID               1.01
              bCountryCode            0 Not supported
              bNumDescriptors         1
              bDescriptorType        34 Report
              wDescriptorLength     219
             Report Descriptors: 
               ** UNAVAILABLE **
          Endpoint Descriptor:
            bLength                 7
            bDescriptorType         5
            bEndpointAddress     0x81  EP 1 IN
            bmAttributes            3
              Transfer Type            Interrupt
              Synch Type               None
              Usage Type               Data
            wMaxPacketSize     0x0040  1x 64 bytes
            bInterval               8
    Device Status:     0x0002
      (Bus Powered)
      Remote Wakeup Enabled

    which is detected as:


    When I run my application, the mouse is detected and works almost perfectly: it's miscalibrated, and I don't know how to calibrate it.

    I forced QT_QPA_EGLFS_TSLIB=1 (with TSLIB_TSDEVICE=/dev/input/event0) to use the tslib input plugin instead of evdev, in an attempt to calibrate with ts_calibrate but the app now doesn't recognize touchs at all. Indeed, ts_calibrate doesn't recognice touchs at all, and neither does ts_print. When I use module_raw ucb1x00 instead of module_raw input, ts_print starts recognizing activity when I slide my finger on the touchscreen, but ts_calibrate still refuses to work.

    If it helps, this is the output of evtest when touching, sliding and raising my finger: It looks pretty standard to me:

    • type 1 (EV_KEY), code 330 (BTN_TOUCH), value 1
    • type 3 (EV_ABS), code 53 (ABS_MT_POSITION_X), value 3623
    • type 3 (EV_ABS), code 54 (ABS_MT_POSITION_Y), value 1298
    • type 1 (EV_KEY), code 330 (BTN_TOUCH), value 0

    My questions:

    • How do I calibrate a touchscreen works almost perfectly with Qt5's evdev plugin?
    • How do I make this touchscreen work with tslib?

  • Take a look here.

Log in to reply