From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=185.205.69.213 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796306679; b=3H/Up9F45nMVQcnJ4ajwTzkNsEIruwXgEqeNEXtUKS3AjJdkTmaS9L33ozgG69SOZLFA 3Xbv6Ull4Z4uktxwDxvQKjLHDLUhoSQENDOeiTYpiV3diNHh4Z481CqhynI4VtMhNwQFB AwbkFBOi//IVaNxOjo9gjDaHIP3yBlZO3XNi0PGHMAHf7GDxeqDOheH/2/ydEAjovGG5B shfXce1hLYEdZTR/saXBwZMfulHqRbUtYk/zPCYPMUXFrM5g3sIKzGiku7qBJHgxXa5rC 2Lp3+UAA5003ufAdJ1GZyjdK2mgx3J4jYT9JrSVpAeswLLYul5/Co4Yn0EmN4Ko3c8A== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796306679; h=DMARC-Filter:Received:DKIM-Signature:Date:From:To:Cc:Message-ID: In-Reply-To:References:Subject:MIME-Version:Content-Type: Content-Transfer-Encoding:Feedback-ID; bh=B4waYLCOwLkhmtJMDHAVzBtowsCB9shnVoWxUuNTD6s=; b=xGQhcPcEkAyCUSuR5a086ijzeo/O88Z+AVaZr3r+00M6GQJujqiDQ5vJezaJQ/8Gsv2f YdEgp5Ji9c5dN3R+iHvWYpUZQ2zzmwjPxre50ikxJxZ6f4ivaSGsj3c0A8oBYDHQblkkh V9qYlVqndRcIJ4S8pbbmF+QVCWMKa+wmYj9bJAzyIfO7M9ec6jH3NIhb698mz+4rhG9m2 qu9903BSaBIi+/eruVBi+YGWeeCmVmRUs+0HMYvawCSBMyRi3dDPxkviamBWgj4ZNqs50 43dhIdrxpc6sYBt8+bp5RAxICpIUfoTRjZlXT72CVVwFuPPt8Y8tJxx9hBUqDdTZcKg== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=tutamail.com; spf=pass smtp.mailfrom=tutamail.com; dkim=pass header.d=tutamail.com header.i=@tutamail.com header.a=rsa-sha256 header.s=s1 header.b=KP3eHxDL; arc=none smtp.remote-ip=185.205.69.213 Received: from mail.w13.tutanota.de (mail.w13.tutanota.de [185.205.69.213]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 583C2606A322 for ; Thu, 3 Dec 2026 14:04:39 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 583C2606A322 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=tutamail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=tutamail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key, unprotected) header.d=tutamail.com header.i=@tutamail.com header.a=rsa-sha256 header.s=s1 header.b=KP3eHxDL Received: from tutadb.w10.tutanota.de (w10.api.tuta.com [IPv6:fd:ac::d:10]) by mail.w13.tutanota.de (Postfix) with ESMTP id 79BE71B1EDB06 for ; Thu, 3 Dec 2026 15:04:37 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; t=1796306677; s=s1; d=tutamail.com; h=From:From:To:To:Subject:Subject:Content-Description:Content-ID:Content-Type:Content-Type:Content-Transfer-Encoding:Content-Transfer-Encoding:Cc:Cc:Date:Date:In-Reply-To:In-Reply-To:MIME-Version:MIME-Version:Message-ID:Message-ID:Reply-To:References:References:Sender:Feedback-ID; bh=B4waYLCOwLkhmtJMDHAVzBtowsCB9shnVoWxUuNTD6s=; b=KP3eHxDL7dcLaiKbF24wyLGvTxqAOFlYtP/j4Fqz46RdeIDwS/3EKqETAqtM8uyq EXkonD/qKLJ3sUjy9cGqr7IJjuuyaYEUc/O7OGfDi5aMMpwSxo2eaObeqdHCOYIKyQu vdXaHI6lbZzdbsNktBh9bZ02VOPHqaMXfLtnu9EAHKliWyNbeIMtTDD15ErKCasjgsr OkwpX+pb1OcSxGCtiT0Xb/6Lw7o5DMMtmWANp9wnoV4gaIsBQBGh1M4Z2OC2I3ci2Vr gZ0LPPVvIes3B3Q0maysTsD5Yl56iyU8GMms3eKtyUfZA+oY6pXqPBgxr+0VhTj5QuU WjrWaF0UCw== Date: Thu, 3 Dec 2026 15:04:37 +0100 (CET) From: willowswaving@tutamail.com To: Linux Input Cc: Jikos , Bentiss Message-ID: In-Reply-To: References: Subject: Re: [RFC] HID: uclogic: Add support for Xencelabs Pen Display (28bd:520d) and request for switch-to-vendor-mode sequence X-Mailing-List: linux-input@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Feedback-ID: 015fe4ab774a31809b4b05b8c610ead356bcc03e5c866e6007fd3e8866c7c0a22bb5af78b76e2b2d682867fe72df3c2e2eae226386f9c0a8fc7fe2cb63b896dd32:016aa7c002e1079c86d21dd5f5413dc01403b501318cb8cc835e6fc47a47757f52c08383cc0ec4a3cd09b971e6a661fb61:tutamail 2026/11/27 17:30 =E6=9D=A5=E8=87=AA 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" com= mand.> It now immediately exposes the pen interface and sends raw HID repo= rts. > > > > > The kernel currently binds > hid-generic> to it (as a Mouse/Keyboard), b= ut the raw data from > /dev/hidraw> shows that the pen is working perfectl= y. 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 repor= t 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 0= 0 |................|00000340 02 a0 3b a0 7b 88 00 00 00 00 00 00 47 38 4= 3 35 |..;.{.......G8C5|00000350 00 00 00 00 00 00 00 00 00 00 00 00 00 0= 0 00 00 |................|00000360 02 a0 3f a0 a1 88 00 00 00 00 00 00 4= 7 38 43 35 |..?.........G8C5|00000370 00 00 00 00 00 00 00 00 00 00 00 0= 0 00 00 00 00 |................|00000380 02 a0 44 a0 d0 88 00 00 00 00 0= 0 00 47 38 43 35 |..D.........G8C5|00000390 00 00 00 00 00 00 00 00 00 0= 0 00 00 00 00 00 00 |................|000003a0 02 a0 3f a0 07 89 00 00 0= 0 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 |................|000004= 40 02 a0 28 a0 b4 89 00 00 00 00 00 00 47 38 43 35 |..(.........G8C5|000= 00450 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 |..#.........G8= C5| > > Thank you! > > Willows > > 2026/11/25 16:50 =E6=9D=A5=E8=87=AA willowswaving@tutamail.com: > >> Update: The manufacturer reflashed the firmware. The device PID is now c= hanged to>> =C2=A0>> 28bd:520a>> . The hardware is working and is sending r= aw HID reports without needing any magic-byte switching.=C2=A0 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 =E6=9D=A5=E8=87=AA willowswaving@tutamail.com: >>> >>>> >>>> >>>>> Subject: Re: [RFC] HID: uclogic: Add support for Xencelabs Pen Displa= y (28bd:520d) and request for switch-to-vendor-mode sequence >>>>> >>>>> Hello, >>>>> >>>>> >>>>> I am writing to send a friendly ping regarding the support for the Xe= ncelabs 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 infor= mation I can provide to help move this forward. >>>>> >>>>> >>>>> The device is still available for testing. I would be happy to try an= y patches or collect further USB traces if needed. >>>>> >>>>> >>>>> Thank you for your time. >>>>> >>>>> >>>>> Best regards, >>>>> >>>>> Willows >>>>> >>>>> 2026/10/18 17:13 =E6=9D=A5=E8=87=AA 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 >>>>>>> ------------------ >>>>>>> =C2=A0 Name:=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 Xencelabs Pen Disp= lay >>>>>>> =C2=A0 Vendor ID:=C2=A0 0x28bd (Hanvon Ugee / XP-Pen) >>>>>>> =C2=A0 Product ID: 0x520d >>>>>>> =C2=A0 Firmware:=C2=A0=C2=A0 20250121(230322) >>>>>>> =C2=A0 Model:=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 UG902_LPH2412_P10 >>>>>>> >>>>>>> Problem >>>>>>> ------- >>>>>>> The device is not handled by hid-uclogic. With hid-generic, the dev= ice >>>>>>> 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, b= ut >>>>>>> the resulting interface is still a mouse. evtest shows no pen event= s. >>>>>>> This suggests the device is still in "firmware mode" and never gets >>>>>>> switched into the vendor reporting mode that exposes the pen interf= ace. >>>>>>> >>>>>>> Key observations from testing >>>>>>> ----------------------------- >>>>>>> 1. lsusb reports only one interface (bNumInterfaces =3D 1, interfac= e 0, >>>>>>> =C2=A0=C2=A0 HID class, mouse). It has only two interrupt endpoints= : >>>>>>> =C2=A0=C2=A0=C2=A0=C2=A0 - 0x81 (IN, 64 bytes) >>>>>>> =C2=A0=C2=A0=C2=A0=C2=A0 - 0x01 (OUT, 64 bytes) >>>>>>> =C2=A0=C2=A0 Note: There is NO endpoint 0x03, which is the endpoint= used by >>>>>>> =C2=A0=C2=A0 uclogic_ugee_v2_probe_endpoint in hid-uclogic-params.c= . Any attempt >>>>>>> =C2=A0=C2=A0 to send magic bytes to 0x03 fails with "Invalid endpoi= nt address". >>>>>>> >>>>>>> 2. Reading the string descriptor at index 0x64 under LANGID 0x0409 >>>>>>> =C2=A0=C2=A0 successfully returns a 14-byte binary blob (13 bytes o= f content). >>>>>>> =C2=A0=C2=A0 Raw HEX: 0e03289a78e60300ff1fd8130100 >>>>>>> =C2=A0=C2=A0 (Other indexes return normal strings like the serial n= umber and >>>>>>> =C2=A0=C2=A0 "hanvon ugee Tech"). Reading index 0x64 does NOT switc= h the device. >>>>>>> >>>>>>> 3. Sending the UGEE v2 magic bytes (02 b0 04 00 00 00 00 00 00 00) >>>>>>> =C2=A0=C2=A0 via SET_REPORT (Feature 0x02, Output 0x02, Feature 0x0= 3) returns >>>>>>> =C2=A0=C2=A0 success, but the device never re-enumerates. >>>>>>> >>>>>>> 4. A vendor-specific control request (bRequest 0xb0, wValue 0x0402) >>>>>>> =C2=A0=C2=A0 times out. >>>>>>> >>>>>>> 5. Note: Sending unexpected control transfers to this device can ca= use >>>>>>> =C2=A0=C2=A0 the USB HID interface to hang. It requires a complete = power cycle >>>>>>> =C2=A0=C2=A0 (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: >>>>>>> =C2=A0 - Is the 0x64 string descriptor read the right trigger, or i= s a >>>>>>> =C2=A0=C2=A0=C2=A0 specific control transfer required? >>>>>>> =C2=A0 - If a control transfer is needed, what is the correct bRequ= est, >>>>>>> =C2=A0=C2=A0=C2=A0 wValue, wIndex, and endpoint? >>>>>>> =C2=A0 - 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: >>>>>>> =C2=A0 - lsusb -v output for 28bd:520d >>>>>>> =C2=A0 - the raw HID report descriptor (usbhid-dump) >>>>>>> =C2=A0 - the string descriptor enumeration (showing 0x64) >>>>>>> =C2=A0 - dmesg logs showing the binding behavior. >>>>>>> >>>>>>> Thank you very much for your time. >>>>>>> >>>>>>> Best regards, >>>>>>> Willows >>>>>>> >>>> >>>> >>> >>> >> >> > >