Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Mobile and Embedded
  4. Can't calibrate capacitive touchscreen with Qt5 and EGLFS

Can't calibrate capacitive touchscreen with Qt5 and EGLFS

Scheduled Pinned Locked Moved Unsolved Mobile and Embedded
2 Posts 2 Posters 1.9k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • R Offline
    R Offline
    RazZziel
    wrote on last edited by RazZziel
    #1

    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:

    /dev/input/event0
    /dev/input/mouse0
    /dev/input/by-path/platform-3f980000.usb-usb-0:1.2:1.0-event
    /dev/input/by-id/usb-Zytronic_Displays_Limited_Zytronic_Touchscreen_Controller-event-if00
    

    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: https://clbin.com/dGBLI. 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?
    1 Reply Last reply
    0
    • Z Offline
      Z Offline
      Zola
      wrote on last edited by
      #2

      Take a look here.

      1 Reply Last reply
      0

      • Login

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • Users
      • Groups
      • Search
      • Get Qt Extensions
      • Unsolved