From: willowswaving@tutamail.com
To: Linux Input <linux-input@vger.kernel.org>
Cc: Jikos <jikos@kernel.org>, Bentiss <bentiss@kernel.org>
Subject: Re: [RFC] HID: uclogic: Add support for Xencelabs Pen Display (28bd:520d) and request for switch-to-vendor-mode sequence
Date: Thu, 3 Dec 2026 15:04:37 +0100 (CET) [thread overview]
Message-ID: <P7wD69H--F-9@tutamail.com> (raw)
In-Reply-To: <P7RKrQc--F-9@tutamail.com>
2026/11/27 17:30 来自 willowswaving@tutamail.com:
>
> Hello,
>
>
> I have an important update regarding this device. I sent the device back to the manufacturer and they reflashed the firmware.
>
>
>
>
> 1. The Product ID has changed from > 520d> to > 520a> .
> 2. The device no longer requires a magic-byte "switch-to-vendor-mode" command.> It now immediately exposes the pen interface and sends raw HID reports.
>
>
>
>
> The kernel currently binds > hid-generic> to it (as a Mouse/Keyboard), but the raw data from > /dev/hidraw> shows that the pen is working perfectly. I have attached a small > hexdump> sample.
>
>
> Based on my analysis of the raw data, the report format (Report ID 2, 16 bytes) seems to be:
>
>
> Byte 0: Report ID (> 02> )
>
>
> Byte 2-3: X coordinate
>
>
> Byte 4-5: Y coordinate
>
>
> Byte 8: Pressure (changed from > 00> to > ff> when pressing the pen)
>
>
> Byte 12-15: ASCII Serial Number (> G8C5> )
>
>
> Could you please help adding > 28bd:520a> to > hid-uclogic> ? Since the device sends data directly now, it might just need a standard UGEE v2 report descriptor fixup without any initialization commands.
>
>
> I can provide the full hexdump or test any patches if you wanna, belw is just the contents from line 10 to line 30 for your reference.
>
>
000002d0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|000002e0 02 a0 23 a0 c1 87 00 00 00 00 00 00 47 38 43 35 |..#.........G8C5|000002f0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|00000300 02 a0 2d a0 f0 87 00 00 00 00 00 00 47 38 43 35 |..-.........G8C5|00000310 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|00000320 02 a0 36 a0 59 88 00 00 00 00 00 00 47 38 43 35 |..6.Y.......G8C5|00000330 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|00000340 02 a0 3b a0 7b 88 00 00 00 00 00 00 47 38 43 35 |..;.{.......G8C5|00000350 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|00000360 02 a0 3f a0 a1 88 00 00 00 00 00 00 47 38 43 35 |..?.........G8C5|00000370 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|00000380 02 a0 44 a0 d0 88 00 00 00 00 00 00 47 38 43 35 |..D.........G8C5|00000390 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|000003a0 02 a0 3f a0 07 89 00 00 00 00 00 00 47 38 43 35 |..?.........G8C5|000003b0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|000003c0 02 a0 3b a0 28 89 00 00 00 00 00 00 47 38 43 35 |..;.(.......G8C5|000003d0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|000003e0 02 a0 36 a0 53 89 00 00 00 00 00 00 47 38 43 35 |..6.S.......G8C5|000003f0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|00000400 02 a0 31 a0 74 89 00 00 00 00 00 00 47 38 43 35 |..1.t.......G8C5|00000410 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|00000420 02 a0 2d a0 9f 89 00 00 00 00 00 00 47 38 43 35 |..-.........G8C5|00000430 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|00000440 02 a0 28 a0 b4 89 00 00 00 00 00 00 47 38 43 35 |..(.........G8C5|00000450 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|00000460 02 a0 23 a0 e6 89 00 00 00 00 00 00 47 38 43 35 |..#.........G8C5|
>
> Thank you!
>
> Willows
>
> 2026/11/25 16:50 来自 willowswaving@tutamail.com:
>
>> Update: The manufacturer reflashed the firmware. The device PID is now changed to>> >> 28bd:520a>> . The hardware is working and is sending raw HID reports without needing any magic-byte switching. It seems we just need to add the 520a PID to hid-uclogic and provide the correct report descriptor mapping.
>>
>> Below is the hexdump information for your reference:
>>
>> Thanks again for taking your time and energy!!
>> Regards,
>> Willows
>>
>>
>>
>>>
>>>
>>> 2026/11/7 20:03 来自 willowswaving@tutamail.com:
>>>
>>>>
>>>>
>>>>> Subject: Re: [RFC] HID: uclogic: Add support for Xencelabs Pen Display (28bd:520d) and request for switch-to-vendor-mode sequence
>>>>>
>>>>> Hello,
>>>>>
>>>>>
>>>>> I am writing to send a friendly ping regarding the support for the Xencelabs Pen Display (28bd:520d). I understand you are very busy, and I just wanted to check if there is any update or if there is any additional information I can provide to help move this forward.
>>>>>
>>>>>
>>>>> The device is still available for testing. I would be happy to try any patches or collect further USB traces if needed.
>>>>>
>>>>>
>>>>> Thank you for your time.
>>>>>
>>>>>
>>>>> Best regards,
>>>>>
>>>>> Willows
>>>>>
>>>>> 2026/10/18 17:13 来自 willowswaving@tutamail.com:
>>>>>
>>>>>>> Hello,
>>>>>>>
>>>>>>> I would like to report a missing device support in the hid-uclogic
>>>>>>> driver, and ask for guidance on how to properly add it.
>>>>>>>
>>>>>>> Device information
>>>>>>> ------------------
>>>>>>> Name: Xencelabs Pen Display
>>>>>>> Vendor ID: 0x28bd (Hanvon Ugee / XP-Pen)
>>>>>>> Product ID: 0x520d
>>>>>>> Firmware: 20250121(230322)
>>>>>>> Model: UG902_LPH2412_P10
>>>>>>>
>>>>>>> Problem
>>>>>>> -------
>>>>>>> The device is not handled by hid-uclogic. With hid-generic, the device
>>>>>>> is registered only as a mouse and no pen events (ABS_X, ABS_Y,
>>>>>>> ABS_PRESSURE, ABS_TILT) are reported to userspace.
>>>>>>>
>>>>>>> When I add the device ID to hid-uclogic-core.c, the driver binds, but
>>>>>>> the resulting interface is still a mouse. evtest shows no pen events.
>>>>>>> This suggests the device is still in "firmware mode" and never gets
>>>>>>> switched into the vendor reporting mode that exposes the pen interface.
>>>>>>>
>>>>>>> Key observations from testing
>>>>>>> -----------------------------
>>>>>>> 1. lsusb reports only one interface (bNumInterfaces = 1, interface 0,
>>>>>>> HID class, mouse). It has only two interrupt endpoints:
>>>>>>> - 0x81 (IN, 64 bytes)
>>>>>>> - 0x01 (OUT, 64 bytes)
>>>>>>> Note: There is NO endpoint 0x03, which is the endpoint used by
>>>>>>> uclogic_ugee_v2_probe_endpoint in hid-uclogic-params.c. Any attempt
>>>>>>> to send magic bytes to 0x03 fails with "Invalid endpoint address".
>>>>>>>
>>>>>>> 2. Reading the string descriptor at index 0x64 under LANGID 0x0409
>>>>>>> successfully returns a 14-byte binary blob (13 bytes of content).
>>>>>>> Raw HEX: 0e03289a78e60300ff1fd8130100
>>>>>>> (Other indexes return normal strings like the serial number and
>>>>>>> "hanvon ugee Tech"). Reading index 0x64 does NOT switch the device.
>>>>>>>
>>>>>>> 3. Sending the UGEE v2 magic bytes (02 b0 04 00 00 00 00 00 00 00)
>>>>>>> via SET_REPORT (Feature 0x02, Output 0x02, Feature 0x03) returns
>>>>>>> success, but the device never re-enumerates.
>>>>>>>
>>>>>>> 4. A vendor-specific control request (bRequest 0xb0, wValue 0x0402)
>>>>>>> times out.
>>>>>>>
>>>>>>> 5. Note: Sending unexpected control transfers to this device can cause
>>>>>>> the USB HID interface to hang. It requires a complete power cycle
>>>>>>> (unplugging USB and power) to recover.
>>>>>>>
>>>>>>> Request
>>>>>>> -------
>>>>>>> Could someone with access to the Xencelabs USB documentation, or
>>>>>>> someone who has reverse-engineered the 520d, share the correct
>>>>>>> sequence to switch this device into vendor mode?
>>>>>>>
>>>>>>> Specifically:
>>>>>>> - Is the 0x64 string descriptor read the right trigger, or is a
>>>>>>> specific control transfer required?
>>>>>>> - If a control transfer is needed, what is the correct bRequest,
>>>>>>> wValue, wIndex, and endpoint?
>>>>>>> - Are there known quirks for this device?
>>>>>>>
>>>>>>> If a capture from the Windows driver is needed, I can provide one.
>>>>>>> If you have any hints, I will be happy to prepare a proper patch
>>>>>>> with hid-uclogic-params.c changes and re-test.
>>>>>>>
>>>>>>> I am attaching the text files with:
>>>>>>> - lsusb -v output for 28bd:520d
>>>>>>> - the raw HID report descriptor (usbhid-dump)
>>>>>>> - the string descriptor enumeration (showing 0x64)
>>>>>>> - dmesg logs showing the binding behavior.
>>>>>>>
>>>>>>> Thank you very much for your time.
>>>>>>>
>>>>>>> Best regards,
>>>>>>> Willows
>>>>>>>
>>>>
>>>>
>>>
>>>
>>
>>
>
>
prev parent reply other threads:[~2026-12-03 14:04 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-17 3:02 [RFC] HID: uclogic: Add support for Xencelabs Pen Display (28bd:520d) and request for switch-to-vendor-mode sequence willowswaving
2026-10-18 9:13 ` FWD: " willowswaving
[not found] ` <P5pmaU5--J-9@tutamail.com>
2026-11-07 12:03 ` willowswaving
2026-11-25 8:44 ` willowswaving
2026-11-25 8:50 ` willowswaving
2026-11-27 9:30 ` willowswaving
2026-12-03 14:04 ` willowswaving [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=P7wD69H--F-9@tutamail.com \
--to=willowswaving@tutamail.com \
--cc=bentiss@kernel.org \
--cc=jikos@kernel.org \
--cc=linux-input@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox