none
[MS-RDPEI-Preview] Issue sending touch event RRS feed

  • Question

  • I'm trying to modify freerdp to have touchscreen support. I can get the server to acknowledge touch (UI elements such as the keyboard icon in the start menu demonstrate that, the virtual channel opens properly), but I can't seem to send a touch event.

    I've been trying to send a down|in range|in contact event followed by an up event, as signified by the chart on page 19 (On another note, a clean flowchart with straight lines and color coding may be easier to read).

    Here is the data I am trying to send:

    03:00:10:00:00:00:02:01:00:00:00:64:40:64:40:19

    03:00 << EventID (uint16)

    0E:00:00:00 << Length (uint32)

    01 << One touch frame (Two-byte unsigned int structure)

    01 << One contact (Two-byte unsigned int structure)

    00 << Time of 0 (Four-byte unsigned int structure)

    00 << ContactID (uint8)

    00 << No extra fields (Two-byte unsigned int structure)

    32 << X - 50 (Four-byte signed int structure)

    32 << Y - 50 (Four-byte signed int structure)

    19 << Contact Flags - CONTACT_FLAG_DOWN | CONTACT_FLAG_INRANGE | CONTACT_FLAG_INCONTACT (Four-byte unsigned int structure)

    This is followed by another packet with the identical data, except for the Contact Flags being set to CONTACT_FLAG_UP being sent 250ms later.

    And to to reply to the server query I am sending:

    02:00 < EventID (uint16)

    08:00:00:00 < Length (uint32)

    FF:FF < Maximum number of contacts (Set to 0xFFFF simply for testing purposes)

    I'm not sure if I'm missing something, or if something has been omitted from the documentation, but I can't seem to get any sort of acknowledgement from the server at all. Any help or pointers would be greatly appreciated. A decoded packet dump of client->server traffic during a touch event would be even better.

    Also, I apologize if this is in the wrong area, I looked but I couldn't find a preview-specific subforum.

    Thanks.


    Edit: If it makes anything easier for anybody, here's a link to the PDF document for the spec: http://download.microsoft.com/download/C/6/C/C6C3C6F1-E84A-44EF-82A9-49BD3AAD8F58/%5BMS-RDPEI%5D.pdf
    • Edited by Netham Monday, March 5, 2012 11:20 AM Added link
    Monday, March 5, 2012 11:14 AM

Answers

  • Netham,

    Thank you for your patience.  I didn’t see an e-mail sent to “dochelp (at) microsoft (dot) com”.  However, I set up a test [MS-RDPEI] environment using the Windows 8 Consumer Preview (build 8250) machines and a touch screen capable of two touch points.  I identified several key frames and decoded them below.

    Of particular interest is your [MS-RDPEI] 2.2.3.2 RDPINPUT_CS_READY_PDU frame.  Missing from the preview specification is a Flags field between the PDU length and maxTouchContacts (see frame 417 below).  If you e-mail me at the Dochelp alias, I will be happy to send you the trace that I captured.

    I also note “FF:FF < Maximum number of contacts (Set to 0xFFFF simply for testing purposes)” from your post.  At present, the maximum contact count is 256.  If we receive a number larger than that, we’ll set it to 256 as a ceiling.

    Please keep in mind that these are preview specifications and that the protocol may change between build 8250 and the eventual Windows 8 release.

    Frame 409: Open VC; Using Channel 0x10

    Frame 416: [MS-RDPEI] 2.2.3.1 RDPINPUT_SC_READY_PDU

        RAW:

            01 00 06 00 00 00

        DECODED:

            00 01 -- EVENTID_SC_READY (0x0001)
            06 00 00 00 -- PDU Length (0x00000006)

    Frame 417: [MS-RDPEI] 2.2.3.2 RDPINPUT_CS_READY_PDU

        RAW:

            02 00 0C 00 00 00 00 00 00 00 02 00


        DECODED:

            02 00 -- EVENTID_CS_READY (0x0002)
            0C 00 00 00 -- PDU Length (0x0000000c = 12)
            00 00 00 00 -- Flags
            02 00 -- maxTouchContacts = 0x0002


    Frame 464: [MS-RDPEI] 2.2.3.3 RDPINPUT_TOUCH_EVENT_PDU

        RAW:

            03 00 10 00 00 00 01 01 00 00 00 41 1A 41 2B 19


        DECODED:

            03 00 -- EVENTID_TOUCH (0x0003)
            10 00 00 00 -- PDU Length (0x00000010 = 16)
            01 -- frameCount (variable) TWO_BYTE_UNSIGNED_INTEGER c=0; val1=1: 0x0001

            Frames:

                01 -- contactCount (variable) TWO_BYTE_UNSIGNED_INTEGER c=0; val1=1: 0x0001
                00 -- time (variable) FOUR_BYTE_UNSIGNED_INTEGER c=0; val1=0: 0x00000000

                Contacts:

                    00 -- contactId
                    00 -- fieldsPresent (variable) TWO_BYTE_UNSIGNED_INTEGER c=0; val1=0: 0x0000
                    41 1A -- x (variable) FOUR_BYTE_SIGNED_INTEGER c=01; val1=1; val2=0x1a: 0x0000011a (282)
                    41 2B -- y (variable) FOUR_BYTE_SIGNED_INTEGER c=01; val1=1; val2=0x2b: 0x0000012b (299)
                    19 -- contactFlags (variable) FOUR_BYTE_UNSIGNED_INTEGER c=0; val1=0x19: 0x00000019:
                        CONTACT_FLAG_DOWN (0x0001) | CONTACT_FLAG_INRANGE (0x0008) | CONTACT_FLAG_INCONTACT (0x0010)

    Frame 650: [MS-RDPEI] 2.2.3.3 RDPINPUT_TOUCH_EVENT_PDU

        RAW:

            03 00 18 00 00 00 01 02 40 58 00 00 42 1A 41 2D 1A 01 00 41 17 41 4C 19


        DECODED:

            03 00 -- EVENTID_TOUCH (0x0003)
            18 00 00 00 -- PDU Length (0x00000018 = 24)
            01 -- frameCount (variable) TWO_BYTE_UNSIGNED_INTEGER c=0; val1=1: 0x0001

            Frames:

                02 -- contactCount (variable) TWO_BYTE_UNSIGNED_INTEGER c=0; val1=2: 0x0002
                40 58 -- time (variable) FOUR_BYTE_UNSIGNED_INTEGER c=01; val1=0; val2=0x58: 0x00000058


                Contacts:

                    00 -- contactId
                    00 -- fieldsPresent (variable) TWO_BYTE_UNSIGNED_INTEGER c=0; val1=0: 0x0000
                    42 1A -- x (variable) FOUR_BYTE_SIGNED_INTEGER c=01; val1=2; val2=0x1a: 0x0000021a (538)
                    41 2D -- y (variable) FOUR_BYTE_SIGNED_INTEGER c=01; val1=1; val2=0x2d: 0x0000012d (301)
                    1A -- contactFlags (variable) FOUR_BYTE_UNSIGNED_INTEGER c=0; val1=0x1a: 0x0000001a:
                        CONTACT_FLAG_UPDATE (0x0002) | CONTACT_FLAG_INRANGE (0x0008) | CONTACT_FLAG_INCONTACT (0x0010)

                    01 -- contactId
                    00 -- fieldsPresent (variable) TWO_BYTE_UNSIGNED_INTEGER c=0; val1=0: 0x0000
                    41 17 -- x (variable) FOUR_BYTE_SIGNED_INTEGER c=01; val1=1; val2=0x17: 0x00000117 (279)
                    41 4C -- y (variable) FOUR_BYTE_SIGNED_INTEGER c=01; val1=1; val2=0x4c: 0x0000014c (332)
                    19 -- contactFlags (variable) FOUR_BYTE_UNSIGNED_INTEGER c=1; val1=9: 0x00000009:
                        CONTACT_FLAG_DOWN (0x0001) | CONTACT_FLAG_INRANGE (0x0008)


     


    Bryan S. Burgin Senior Escalation Engineer Microsoft Protocol Open Specifications Team


    Tuesday, March 13, 2012 10:21 PM
    Moderator

All replies

  • Hi Netham:

    I have alerted The Open Specification team regarding your inquiry. A member of the team will be in touch soon.


    Regards, Obaid Farooqi

    Monday, March 5, 2012 5:17 PM
    Owner
  • Hi Netham,

    I am researching this issue for you.  Can you e-mail me via "dochelp (at) microsoft (dot) com" so we can debug this offline?


    Bryan S. Burgin Senior Escalation Engineer Microsoft Protocol Open Specifications Team

    Wednesday, March 7, 2012 6:41 AM
    Moderator
  • Netham,

    Thank you for your patience.  I didn’t see an e-mail sent to “dochelp (at) microsoft (dot) com”.  However, I set up a test [MS-RDPEI] environment using the Windows 8 Consumer Preview (build 8250) machines and a touch screen capable of two touch points.  I identified several key frames and decoded them below.

    Of particular interest is your [MS-RDPEI] 2.2.3.2 RDPINPUT_CS_READY_PDU frame.  Missing from the preview specification is a Flags field between the PDU length and maxTouchContacts (see frame 417 below).  If you e-mail me at the Dochelp alias, I will be happy to send you the trace that I captured.

    I also note “FF:FF < Maximum number of contacts (Set to 0xFFFF simply for testing purposes)” from your post.  At present, the maximum contact count is 256.  If we receive a number larger than that, we’ll set it to 256 as a ceiling.

    Please keep in mind that these are preview specifications and that the protocol may change between build 8250 and the eventual Windows 8 release.

    Frame 409: Open VC; Using Channel 0x10

    Frame 416: [MS-RDPEI] 2.2.3.1 RDPINPUT_SC_READY_PDU

        RAW:

            01 00 06 00 00 00

        DECODED:

            00 01 -- EVENTID_SC_READY (0x0001)
            06 00 00 00 -- PDU Length (0x00000006)

    Frame 417: [MS-RDPEI] 2.2.3.2 RDPINPUT_CS_READY_PDU

        RAW:

            02 00 0C 00 00 00 00 00 00 00 02 00


        DECODED:

            02 00 -- EVENTID_CS_READY (0x0002)
            0C 00 00 00 -- PDU Length (0x0000000c = 12)
            00 00 00 00 -- Flags
            02 00 -- maxTouchContacts = 0x0002


    Frame 464: [MS-RDPEI] 2.2.3.3 RDPINPUT_TOUCH_EVENT_PDU

        RAW:

            03 00 10 00 00 00 01 01 00 00 00 41 1A 41 2B 19


        DECODED:

            03 00 -- EVENTID_TOUCH (0x0003)
            10 00 00 00 -- PDU Length (0x00000010 = 16)
            01 -- frameCount (variable) TWO_BYTE_UNSIGNED_INTEGER c=0; val1=1: 0x0001

            Frames:

                01 -- contactCount (variable) TWO_BYTE_UNSIGNED_INTEGER c=0; val1=1: 0x0001
                00 -- time (variable) FOUR_BYTE_UNSIGNED_INTEGER c=0; val1=0: 0x00000000

                Contacts:

                    00 -- contactId
                    00 -- fieldsPresent (variable) TWO_BYTE_UNSIGNED_INTEGER c=0; val1=0: 0x0000
                    41 1A -- x (variable) FOUR_BYTE_SIGNED_INTEGER c=01; val1=1; val2=0x1a: 0x0000011a (282)
                    41 2B -- y (variable) FOUR_BYTE_SIGNED_INTEGER c=01; val1=1; val2=0x2b: 0x0000012b (299)
                    19 -- contactFlags (variable) FOUR_BYTE_UNSIGNED_INTEGER c=0; val1=0x19: 0x00000019:
                        CONTACT_FLAG_DOWN (0x0001) | CONTACT_FLAG_INRANGE (0x0008) | CONTACT_FLAG_INCONTACT (0x0010)

    Frame 650: [MS-RDPEI] 2.2.3.3 RDPINPUT_TOUCH_EVENT_PDU

        RAW:

            03 00 18 00 00 00 01 02 40 58 00 00 42 1A 41 2D 1A 01 00 41 17 41 4C 19


        DECODED:

            03 00 -- EVENTID_TOUCH (0x0003)
            18 00 00 00 -- PDU Length (0x00000018 = 24)
            01 -- frameCount (variable) TWO_BYTE_UNSIGNED_INTEGER c=0; val1=1: 0x0001

            Frames:

                02 -- contactCount (variable) TWO_BYTE_UNSIGNED_INTEGER c=0; val1=2: 0x0002
                40 58 -- time (variable) FOUR_BYTE_UNSIGNED_INTEGER c=01; val1=0; val2=0x58: 0x00000058


                Contacts:

                    00 -- contactId
                    00 -- fieldsPresent (variable) TWO_BYTE_UNSIGNED_INTEGER c=0; val1=0: 0x0000
                    42 1A -- x (variable) FOUR_BYTE_SIGNED_INTEGER c=01; val1=2; val2=0x1a: 0x0000021a (538)
                    41 2D -- y (variable) FOUR_BYTE_SIGNED_INTEGER c=01; val1=1; val2=0x2d: 0x0000012d (301)
                    1A -- contactFlags (variable) FOUR_BYTE_UNSIGNED_INTEGER c=0; val1=0x1a: 0x0000001a:
                        CONTACT_FLAG_UPDATE (0x0002) | CONTACT_FLAG_INRANGE (0x0008) | CONTACT_FLAG_INCONTACT (0x0010)

                    01 -- contactId
                    00 -- fieldsPresent (variable) TWO_BYTE_UNSIGNED_INTEGER c=0; val1=0: 0x0000
                    41 17 -- x (variable) FOUR_BYTE_SIGNED_INTEGER c=01; val1=1; val2=0x17: 0x00000117 (279)
                    41 4C -- y (variable) FOUR_BYTE_SIGNED_INTEGER c=01; val1=1; val2=0x4c: 0x0000014c (332)
                    19 -- contactFlags (variable) FOUR_BYTE_UNSIGNED_INTEGER c=1; val1=9: 0x00000009:
                        CONTACT_FLAG_DOWN (0x0001) | CONTACT_FLAG_INRANGE (0x0008)


     


    Bryan S. Burgin Senior Escalation Engineer Microsoft Protocol Open Specifications Team


    Tuesday, March 13, 2012 10:21 PM
    Moderator