← Back to team overview

multi-touch-dev team mailing list archive

Re: libmtdev and XT2

 

Paolo,
On Fri, Apr 22, 2011 at 4:10 PM, Paolo Olivo <olivopaolo@xxxxxxxxxx> wrote:
>
> Hello everyone,
>
> I am developing a mt toolkit, which I would like to interface to
> libmtdev. I am using a Dell XT2 and a 3M M2256PW touchscreen on Ubuntu
> 10.10, kernel 2.6.35-28-generic, libmtdev1.1.0.
>
> I started capturing mtdev events, but I found something weird. I don't
> know if they are bugs or it is simply my misunderstanding.
>
> First, using function "mtdev_has_mt_event" on the XT2 and passing
> ABS_MT_SLOT and ABS_MT_TRACKING_ID, in both cases it returns 0, while
> I actually receive ABS_MT_SLOT and ABS_MT_TRACKING_ID events using
> "mtdev_get". 3M is working fine.
>
> The second issue is about the order of the received events and I found
> a weird behavior on the XT2:
>
> This is a screenshot of 3M mtdev events:
> #)  ev->type   ev->code   ev->value
>
> ....
>
> 1)  0x3   0x2f   0                         SELECT SLOT 0
> 2)  0x3   0x39   -1                       SET TRACKING_ID TO -1
> 3)  0x3   0x2f   1                         SELECT SLOT 1
> 4)  0x3   0x35   14214                 SET ABS_MT_POSITION_X
> 5)  0x3   0x36   14907                 SET ABS_MT_POSITION_Y
> 6)  0x3   0x30   1207                   SET ABS_MT_TOUCH_MAJOR
> 7)  0x3   0x0   14214                   don't know but it has the same
> value as 4)
> 8)  0x3   0x1   14907                   don't know but is has the same
> value as 5)
> 9)  0x0   0x0   0                          EV_SYN
>
> 10)  0x3   0x35   14278                SET ABS_MT_POSITION_X
> 11)  0x3   0x36   14979                SET ABS_MT_POSITION_Y
> 12)  0x3   0x30   1172                  SET ABS_MT_TOUCH_MAJOR
> 13)  0x3   0x0   14278                  don't know but it has the same
> value as 10)
> 14)  0x3   0x1   14979                  don't know but it has the same
> value as 11)
> 15)  0x0   0x0   0                         EV_SYN
>
> 16)  0x3   0x39   -1                      SET TRACKING_ID TO -1
> 17)  0x1   0x14a   0                     don't know what it is
> 18)  0x0   0x0   0                         EV_SYN
>
> This is a screenshot of XT2 mtdev events:
>
> ....
>
> 20)  0x3   0x0   6295                      don't know but it has the
> same value as 24)
> 21)  0x3   0x1   3548                      don't know but it has the
> same value as 25)
> 22)  0x3   0x2f   1                          SELECT SLOT 1
> 23)  0x3   0x31   247                      SET ABS_MT_TOUCH_MINOR
> 24)  0x3   0x35   6295                    SET ABS_MT_POSITION_X
> 25)  0x3   0x36   3548                    SET ABS_MT_POSITION_Y
> 26)  0x3   0x2f   0                          SELECT SLOT 0
> 27)  0x3   0x39   -1                        SET TRACKING_ID TO -1
> 28)  0x0   0x0   0                           EV_SYN
>
> 29)  0x3   0x0   6306                      don't know but it has the
> same value as 33) which will be for slot 1 BUT current slot is 0!
> 30)  0x3   0x1   3620                      don't know but it has the
> same value as 34) which will be for slot 1 BUT current slot is 0!
> 31)  0x3   0x2f   1                          SELECT SLOT 1
> 32)  0x3   0x34   1                         SET ABS_MT_ORIENTATION
> 33)  0x3   0x35   6306                    SET ABS_MT_POSITION_X
> 34)  0x3   0x36   3620                    SET ABS_MT_POSITION_Y
> 35)  0x0   0x0   0                           EV_SYN
>
> So on XT2 events type 0x03 with value 0x0 and 0x1 are sent first SLOT
> selection. Is it right?
> Does anybody know what are they?

0x3:0x0 and 0x03:0x1 are legacy non-MT events ABS_X and ABS_Y, respectively.
I'm not sure exactly how the driver chooses which contact to use for
generating these single touch events, but my guess from your snippet
is the lowest slot that happens to be on the surface.

-Daniel

>
> I hope this could be useful,
> thanks for consideration.
>
> Paolo
>
> _______________________________________________
> Mailing list: https://launchpad.net/~multi-touch-dev
> Post to     : multi-touch-dev@xxxxxxxxxxxxxxxxxxx
> Unsubscribe : https://launchpad.net/~multi-touch-dev
> More help   : https://help.launchpad.net/ListHelp


Follow ups

References