-
Notifications
You must be signed in to change notification settings - Fork 181
Description
This tablet is similar in appearance to the white version has same size and buttons, however, USB ID is different.
Black tablet ID is 28bd:0913
White tablet ID is 28bd:0075
When I insert the tablet, following messages appear:
usb 6-3: new full-speed USB device number 37 using ohci-pci
usb 6-3: New USB device found, idVendor=28bd, idProduct=0913, bcdDevice= 0.00
usb 6-3: New USB device strings: Mfr=1, Product=2, SerialNumber=3
usb 6-3: Product: 4 inch PenTablet
usb 6-3: Manufacturer: UGTABLET
usb 6-3: SerialNumber: 000000
input: UGTABLET 4 inch PenTablet Mouse as /devices/pci0000:00/0000:00:16.0/usb6/6-3/6-3:1.0/0003:28BD:0913.0085/input/input151
input: UGTABLET 4 inch PenTablet Keyboard as /devices/pci0000:00/0000:00:16.0/usb6/6-3/6-3:1.0/0003:28BD:0913.0085/input/input152
hid-generic 0003:28BD:0913.0085: input,hidraw0: USB HID v1.00 Mouse [UGTABLET 4 inch PenTablet] on usb-0000:00:16.0-3/input0
input: UGTABLET 4 inch PenTablet as /devices/pci0000:00/0000:00:16.0/usb6/6-3/6-3:1.1/0003:28BD:0913.0086/input/input153
hid-generic 0003:28BD:0913.0086: input,hidraw1: USB HID v1.00 Device [UGTABLET 4 inch PenTablet] on usb-0000:00:16.0-3/input1
hid-generic 0003:28BD:0913.0087: hiddev96,hidraw2: USB HID v1.00 Device [UGTABLET 4 inch PenTablet] on usb-0000:00:16.0-3/input2
The tablet works with generic drivers, pressure sensitivity is available in GIMP, however, buttons on the pen do not work as expected: the button next to the tip works as MMB (middle mouse button), while the button further from the tip doesn't work at all. Expected behavior is: close button: RMB, far button: MMB
The far button works in principle, since this command usbhid-dump -m 28bd:0913 -e stream shows lines like 006:036:001:STREAM 1588586846.485230 07 A0 E0 3B 0C 22 00 00 00 00 when no buttons are pressed, but
A0 changes to A1 with tip touch, to A2 with close-to-tip button and A4 with far button. If I both touch the tablet and hold far button, I get A5, as expected (1+4), so we can conclude that the second byte encodes buttons, similar to G430S white, which works with DIGImend.
I have tried to change this line to
#define USB_DEVICE_ID_UGEE_XPPEN_TABLET_G540 0x0913
But it wasn't enough. Likely it happens because of different HID packet length, I have seen a bug report with similar problem on Windows drivers: hawku/TabletDriver#520
Playing with the monitor shows that, I get this numbers when I bring the pen to a tablet corner slowly and then pull away, without touching:
07 A0 00 00 00 00 00 00 00 00 || top left corner
07 A0 00 00 FF 7F 00 00 00 00 || bottom left corner
07 A0 FF 7F 00 00 00 00 00 00 || top right corner
07 A0 FF 7F FF 7F 00 00 00 00 || bottom right corner
A0 changes to C0 when I remove the pen from the tablet.
I have noticed that white tablet output is like this:
013:002:001:STREAM 1588592013.478316
07 A0 58 4F B1 39 00 00
So the HID packet length is indeed different.
I guess you will also need this information. I was able to decode it with hidrd-convert -i hex -o spec so I can see it contains data which is probably needed to support the tablet.
# usbhid-dump -m 28bd:0913 -e descriptor
006:038:002:DESCRIPTOR 1588592369.505781
06 0A FF 09 01 A1 01 85 02 09 02 75 08 95 0B 15
00 26 FF 00 81 02 09 03 75 08 95 0B 15 00 26 FF
00 91 02 C0
006:038:001:DESCRIPTOR 1588592369.507730
05 0D 09 02 A1 01 85 07 09 20 A1 00 09 42 09 44
09 45 09 3C 15 00 25 01 75 01 95 04 81 02 95 01
81 03 09 32 95 01 81 02 95 02 81 03 75 10 95 01
35 00 A4 05 01 09 30 65 13 55 0D 46 A0 0F 26 FF
7F 81 02 09 31 46 B8 0B 26 FF 7F 81 02 B4 09 30
45 00 26 FF 1F 81 42 09 3D 15 81 25 7F 75 08 95
01 81 02 09 3E 15 81 25 7F 81 02 C0 C0
006:038:000:DESCRIPTOR 1588592369.510773
05 01 09 02 A1 01 85 09 09 01 A1 00 05 09 19 01
29 03 15 00 25 01 95 03 75 01 81 02 95 05 81 01
05 01 09 30 09 31 26 FF 7F 95 02 75 10 81 02 05
0D 09 30 26 FF 07 95 01 75 10 81 02 C0 C0 05 01
09 02 A1 01 09 01 A1 00 85 01 05 09 19 01 29 05
95 05 75 01 15 00 25 01 81 02 95 03 81 01 05 01
09 30 09 31 95 02 75 10 16 00 80 26 FF 7F 81 06
09 38 15 81 25 7F 95 01 75 08 81 06 05 0C 0A 38
02 95 01 75 08 81 06 C0 C0 05 01 09 06 A1 01 85
06 05 07 19 E0 29 E7 15 00 25 01 75 01 95 08 81
02 05 07 19 00 29 FF 26 FF 00 75 08 95 06 81 00
C0