From nobody Fri Jun 07 11:03:36 2024 X-Original-To: freebsd-usb@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Vwdby1DBgz5NJv0 for ; Fri, 07 Jun 2024 11:03:42 +0000 (UTC) (envelope-from freebsd-usb@dino.sk) Received: from cm0.netlabit.sk (mailhost.netlabit.sk [84.245.65.72]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4Vwdbw5MKNz4JKr for ; Fri, 7 Jun 2024 11:03:40 +0000 (UTC) (envelope-from freebsd-usb@dino.sk) Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=pass (mx1.freebsd.org: domain of freebsd-usb@dino.sk designates 84.245.65.72 as permitted sender) smtp.mailfrom=freebsd-usb@dino.sk Received: from zeta.dino.sk ([84.245.95.254]) (AUTH: LOGIN milan, TLS: TLSv1.3,256bits,TLS_AES_256_GCM_SHA384) by cm0.netlabit.sk with ESMTPSA id 0000000000CA115C.000000006662E909.00016DA1; Fri, 07 Jun 2024 13:03:37 +0200 Date: Fri, 7 Jun 2024 13:03:36 +0200 From: Milan Obuch To: freebsd-usb@freebsd.org Subject: USB HID touchscreen (Penmount) status? Message-ID: <20240607130336.4099aeb6@zeta.dino.sk> X-Mailer: Claws Mail 3.20.0 (GTK+ 2.24.33; amd64-portbld-freebsd13.3) List-Id: FreeBSD List-Archive: https://lists.freebsd.org/archives/freebsd-usb List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: freebsd-usb@freebsd.org Sender: owner-freebsd-usb@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Spamd-Bar: -- X-Spamd-Result: default: False [-2.09 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; SUBJECT_ENDS_QUESTION(1.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_SHORT(-0.79)[-0.792]; R_SPF_ALLOW(-0.20)[+mx]; MIME_GOOD(-0.10)[text/plain]; RCVD_VIA_SMTP_AUTH(0.00)[]; RCPT_COUNT_ONE(0.00)[1]; RCVD_COUNT_ONE(0.00)[1]; ASN(0.00)[asn:5578, ipnet:84.245.64.0/18, country:SK]; MIME_TRACE(0.00)[0:+]; RCVD_TLS_ALL(0.00)[]; R_DKIM_NA(0.00)[]; MLMMJ_DEST(0.00)[freebsd-usb@freebsd.org]; FROM_EQ_ENVFROM(0.00)[]; FROM_HAS_DN(0.00)[]; MID_RHS_MATCH_FROMTLD(0.00)[]; TO_DN_NONE(0.00)[]; DMARC_NA(0.00)[dino.sk]; TO_MATCH_ENVRCPT_ALL(0.00)[]; ARC_NA(0.00)[] X-Rspamd-Queue-Id: 4Vwdbw5MKNz4JKr Hi, I am trying to get Penmount touch screen controller into some usable shape. As I used webcamd for touchscreen before, I thought it should work. 'webcamd -l' tells me how it should be used, so trying running 'webcamd -N DIALOGUE-INC-PenMount-USB', but the result is webcamd 10832 - - Attached to ugen0.2[0] webcamd 10832 - - webcamd: Cannot find USB device so no joy this way. By the way, I found some old patch for Linux at https://patchwork.kernel.org/project/linux-input/patch/1408978083-569-1-git-send-email-christian.gmeiner@gmail.com/ and, given the date, it should be probably included in standard Linux sources, so webcamd should know it, but there is something wrong. So I tried another route, using sysutils/uhidd port. Installing it, running 'uhidd -hkmou -dDvvv /dev/ugen0.2' shows me touch events, I just see nothing in X. Starting uhidd this way outputs uhidd 10933 - - open /usr/local/etc/uhidd.conf failed: No such file or directory uhidd 10933 - - proceed without configuration file ugen0.2[0]-> HID interface ugen0.2[0]-> Report descriptor size = 76 ugen0.2[0]-> Report descriptor dump: USAGE PAGE Generic Desktop(0x1) USAGE Mouse(0x2)[Generic Desktop(0x1)] COLLECTION Application(1) USAGE Pointer(0x1)[Generic Desktop(0x1)] COLLECTION Physical(0) USAGE Undefined(0)[Generic Desktop(0x1)] LOGICAL MINIMUM 0 LOGICAL MAXIMUM 1 REPORT COUNT 6 REPORT SIZE 1 INPUT ( Const Array Absolute ) (1) USAGE PAGE Button(0x9) USAGE MINIMUM Button1(1) USAGE MAXIMUM Button3(3) LOGICAL MINIMUM 0 LOGICAL MAXIMUM 1 REPORT COUNT 2 REPORT SIZE 1 INPUT ( Data Variable Absolute ) (2) USAGE PAGE Generic Desktop(0x1) USAGE X(0x30)[Generic Desktop(0x1)] USAGE Y(0x31)[Generic Desktop(0x1)] LOGICAL MINIMUM 0 LOGICAL MAXIMUM 1023 PHYSICAL MINIMUM 128 PHYSICAL MAXIMUM 32767 REPORT SIZE 16 REPORT COUNT 2 INPUT ( Data Variable Absolute ) (2) USAGE Undefined(0)[Generic Desktop(0x1)] LOGICAL MINIMUM 0 LOGICAL MAXIMUM 255 REPORT SIZE 8 REPORT COUNT 5 FEATURE ( Data Variable Absolute ) (2) END COLLECTION END COLLECTION ugen0.2[0]-> Find IN interrupt ep: 0x81 packet_size=0x5 HID APPLICATION COLLECTION (Mouse) size(76) HID REPORT: ID 0 INPUT: POS:0 SIZE:1 COUNT:6 [CONST] POS:6 SIZE:1 COUNT:2 [VARIABLE] USAGE Button1 USAGE Button2 POS:8 SIZE:16 COUNT:2 [VARIABLE] USAGE X USAGE Y FEATURE: POS:0 SIZE:8 COUNT:5 [VARIABLE] USAGE Undefined USAGE Unknown Page USAGE Unknown Page USAGE Unknown Page USAGE Unknown Page ugen0.2[0]-> HID interface task started When I touch the screen, I get ugen0.2[0]-> received data(5): 112 120 01 -96 01 hid_appcol_recv_data: len(5) 0x70 0x78 0x01 0xa0 0x01 ugen0.2[0]-> mouse received data: dx(376) dy(416) dw(0) dt(0) btn(0x1) ugen0.2[0]-> received data(5): 112 120 01 -96 01 hid_appcol_recv_data: len(5) 0x70 0x78 0x01 0xa0 0x01 ugen0.2[0]-> mouse received data: dx(376) dy(416) dw(0) dt(0) btn(0x1) ugen0.2[0]-> received data(5): 48 120 01 -96 01 hid_appcol_recv_data: len(5) 0x30 0x78 0x01 0xa0 0x01 ugen0.2[0]-> mouse received data: dx(376) dy(416) dw(0) dt(0) btn(0) so that's great. How can I feed the event into X? I tried running uhidd with -H option to create a device, but I have no idea how could xf86-input-libinput driver accept it - device from uhidd is probably not proper input/event device, even if I request the name be like this. Any hint here? Googling did not reveal anything I could understand and use :) Regards, Milan