From owner-freebsd-usb@freebsd.org Sun Jul 23 16:32:39 2017 Return-Path: Delivered-To: freebsd-usb@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2372BDA50C6 for ; Sun, 23 Jul 2017 16:32:39 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2001:1900:2254:206a::16:76]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0A25A66E0F for ; Sun, 23 Jul 2017 16:32:39 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from bugs.freebsd.org ([127.0.1.118]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id v6NGWcl1061811 for ; Sun, 23 Jul 2017 16:32:38 GMT (envelope-from bugzilla-noreply@freebsd.org) From: bugzilla-noreply@freebsd.org To: freebsd-usb@FreeBSD.org Subject: [Bug 220949] When the only USB soundcard is disconnected, defunct /dev/dsp0 is left, kernel warnings, programs hang Date: Sun, 23 Jul 2017 16:32:39 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: usb X-Bugzilla-Version: 11.0-STABLE X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Only Me X-Bugzilla-Who: yuri@rawbw.com X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: freebsd-usb@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version rep_platform op_sys bug_status bug_severity priority component assigned_to reporter Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 23 Jul 2017 16:32:39 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D220949 Bug ID: 220949 Summary: When the only USB soundcard is disconnected, defunct /dev/dsp0 is left, kernel warnings, programs hang Product: Base System Version: 11.0-STABLE Hardware: Any OS: Any Status: New Severity: Affects Only Me Priority: --- Component: usb Assignee: freebsd-usb@FreeBSD.org Reporter: yuri@rawbw.com I have a USB webcam that is also a soundcard with only a microphone, and no speaker. When there are no other audio devices, disconnecting this USB webc= am causes system dysfunction. There are a lot of repeating messages in log: > Jul 23 09:14:21 yv kernel: pcm0: unregister: mixer busy > Jul 23 09:14:21 yv kernel: pcm0: Waiting for sound application to exit! > Jul 23 09:14:23 yv kernel: pcm0: unregister: mixer busy > Jul 23 09:14:23 yv kernel: pcm0: Waiting for sound application to exit! Programs that have this device open hanged and became unkillable with kill = -9. 'kldunload snd_uaudio.ko' also hangs in unkillable state. USB is hot-pluggable. Device is supposed to disappear and reappear without = any long-term effects. IMO, /dev/dspN should disappear when device is removed. Programs that have = it opened should behave gracefully. They should only get errors from it and not hang. USB webcam: HD Pro Webcam C920 (vendor 0x046d, product 0x6860) --=20 You are receiving this mail because: You are the assignee for the bug.= From owner-freebsd-usb@freebsd.org Sun Jul 23 19:38:25 2017 Return-Path: Delivered-To: freebsd-usb@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0CC71DAB854 for ; Sun, 23 Jul 2017 19:38:25 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2001:1900:2254:206a::16:76]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id EEBC36C565 for ; Sun, 23 Jul 2017 19:38:24 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from bugs.freebsd.org ([127.0.1.118]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id v6NJcObg097252 for ; Sun, 23 Jul 2017 19:38:24 GMT (envelope-from bugzilla-noreply@freebsd.org) From: bugzilla-noreply@freebsd.org To: freebsd-usb@FreeBSD.org Subject: [Bug 220949] When the only USB soundcard is disconnected, defunct /dev/dsp0 is left, kernel warnings, programs hang Date: Sun, 23 Jul 2017 19:38:25 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: usb X-Bugzilla-Version: 11.0-STABLE X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Only Me X-Bugzilla-Who: hselasky@FreeBSD.org X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: freebsd-usb@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: cc Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 23 Jul 2017 19:38:25 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D220949 Hans Petter Selasky changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |hselasky@FreeBSD.org --- Comment #1 from Hans Petter Selasky --- This is a known issue. The solution is not just straight forward, due to mm= ap() use. See also. https://reviews.freebsd.org/D11140 --HPS --=20 You are receiving this mail because: You are the assignee for the bug.= From owner-freebsd-usb@freebsd.org Sun Jul 23 21:00:32 2017 Return-Path: Delivered-To: freebsd-usb@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 70D7ADAD3F1 for ; Sun, 23 Jul 2017 21:00:32 +0000 (UTC) (envelope-from bugzilla-noreply@FreeBSD.org) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2001:1900:2254:206a::16:76]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 41F526F677 for ; Sun, 23 Jul 2017 21:00:32 +0000 (UTC) (envelope-from bugzilla-noreply@FreeBSD.org) Received: from bugs.freebsd.org ([127.0.1.118]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id v6NL01cK095987 for ; Sun, 23 Jul 2017 21:00:32 GMT (envelope-from bugzilla-noreply@FreeBSD.org) Message-Id: <201707232100.v6NL01cK095987@kenobi.freebsd.org> From: bugzilla-noreply@FreeBSD.org To: freebsd-usb@FreeBSD.org Subject: Problem reports for freebsd-usb@FreeBSD.org that need special attention Date: Sun, 23 Jul 2017 21:00:32 +0000 X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 23 Jul 2017 21:00:32 -0000 To view an individual PR, use: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=(Bug Id). The following is a listing of current problems submitted by FreeBSD users, which need special attention. These represent problem reports covering all versions including experimental development code and obsolete releases. Status | Bug Id | Description ------------+-----------+--------------------------------------------------- Open | 213877 | xhci reset causes panic on SuperMicro A1SRi-2758F 1 problems total for which you should take action. From owner-freebsd-usb@freebsd.org Mon Jul 24 09:25:56 2017 Return-Path: Delivered-To: freebsd-usb@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id BC937C78D7D for ; Mon, 24 Jul 2017 09:25:56 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2001:1900:2254:206a::16:76]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id AB1BD2648 for ; Mon, 24 Jul 2017 09:25:56 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from bugs.freebsd.org ([127.0.1.118]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id v6O9PuNJ099659 for ; Mon, 24 Jul 2017 09:25:56 GMT (envelope-from bugzilla-noreply@freebsd.org) From: bugzilla-noreply@freebsd.org To: freebsd-usb@FreeBSD.org Subject: [Bug 220852] [cdce] [usb] raspberry pi or anything that can emulate Ethernet gadget over usb mac id not read Date: Mon, 24 Jul 2017 09:25:56 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: usb X-Bugzilla-Version: 11.0-RELEASE X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Many People X-Bugzilla-Who: bipin@xbipin.com X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: freebsd-usb@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 24 Jul 2017 09:25:56 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D220852 --- Comment #9 from Bipin Chandra --- tried the patch but the behavior is still same --=20 You are receiving this mail because: You are the assignee for the bug.= From owner-freebsd-usb@freebsd.org Mon Jul 24 12:56:12 2017 Return-Path: Delivered-To: freebsd-usb@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 082DBC7D9FB for ; Mon, 24 Jul 2017 12:56:12 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2001:1900:2254:206a::16:76]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E76E8677A7 for ; Mon, 24 Jul 2017 12:56:11 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from bugs.freebsd.org ([127.0.1.118]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id v6OCuBKU034022 for ; Mon, 24 Jul 2017 12:56:11 GMT (envelope-from bugzilla-noreply@freebsd.org) From: bugzilla-noreply@freebsd.org To: freebsd-usb@FreeBSD.org Subject: [Bug 220852] [cdce] [usb] raspberry pi or anything that can emulate Ethernet gadget over usb mac id not read Date: Mon, 24 Jul 2017 12:56:11 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: usb X-Bugzilla-Version: 11.0-RELEASE X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Many People X-Bugzilla-Who: bipin@xbipin.com X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: freebsd-usb@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 24 Jul 2017 12:56:12 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D220852 --- Comment #10 from Bipin Chandra --- as per one of the members at pfsense i was told the below: "It still concerns me that the device created is cdce0 and not urndis0. It looks to me as though it's not even using the urndis driver" --=20 You are receiving this mail because: You are the assignee for the bug.= From owner-freebsd-usb@freebsd.org Mon Jul 24 19:31:24 2017 Return-Path: Delivered-To: freebsd-usb@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1B15ED7E576 for ; Mon, 24 Jul 2017 19:31:24 +0000 (UTC) (envelope-from Scoobi_doo@yahoo.com) Received: from nm29-vm1.bullet.mail.bf1.yahoo.com (nm29-vm1.bullet.mail.bf1.yahoo.com [98.139.213.144]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C8D1975BBD for ; Mon, 24 Jul 2017 19:31:23 +0000 (UTC) (envelope-from Scoobi_doo@yahoo.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1500924505; bh=mPScOS8tG+3nmpR4OgG9xqpUu+31WZyMyrxxD2YiTl0=; h=From:Subject:To:Date:From:Subject; b=YYO3Bakx9591qooyAYWY3qcnhEfITT7+R+SJpQ1zzeSYhUQ2lOdPk1AzNYqbUzdVZKLKj/JT+iwoHYfQbdWmokq+thtOtbjGoROq4xVK4ejz5IPlP2Yyp/meor58W8/cOsGe+sYZxGOXLOCEKv1Ek1XCxGCXr3ti+pYotqZvs3jwHsOpzmYRG1iXPpBQdQblPjkejwp8BY+bCGOviOfHuq8z2Jb7w/HQ74qUuZOrAxip2Vg1N8jl4KS2qzmbTgkHDkR2AAwcFZCp+4bye0NegmAnZ85q3PNFPzUOVo9VsIDqPDcWh3DMHnz5CV1HJ0y2bziMngJ1aR7AIsoUROx30A== Received: from [66.196.81.170] by nm29.bullet.mail.bf1.yahoo.com with NNFMP; 24 Jul 2017 19:28:25 -0000 Received: from [68.142.230.71] by tm16.bullet.mail.bf1.yahoo.com with NNFMP; 24 Jul 2017 19:28:25 -0000 Received: from [127.0.0.1] by smtp228.mail.bf1.yahoo.com with NNFMP; 24 Jul 2017 19:28:25 -0000 X-Yahoo-Newman-Id: 904378.93356.bm@smtp228.mail.bf1.yahoo.com X-Yahoo-Newman-Property: ymail-3 X-YMail-OSG: ZB5v2dUVM1n.KaEx3oeTUEW2lq6OWX5EosOCZk2aEN4W44c jLpWL8DSA6vbHrEyzgkttAh.3hPyGK1pBuXZBIuXWcWgDsV75xd52z5HI3JY zfSeNBxY9WXZl.X0mVPAd5hAhU2IZdQlhDTJEZl0fPFGoFOt1anXJ3oZDgUt zVXZqrzHaeEiKSGu1Gr1TmM7h8u57DmL1nq0a7nY9ZXBo6E7xBJnB3IwedOy RWH_dcsxO5MYwIsgD3PEcHl_Jo5N8d5t7cGewxVQ1_bLD1qj.jnbauMVq_15 QRU9AD_pHwT7iTHJ5Fx7205V9uKe55a5VJpyJLmBM28SHEBl5GQG9QxS9wfg SOBWYH0jO.qsaB1EC3BFnl4xkG_yVgnyY_edm9Hcn4zRcJpvCE4YRhNrbGJM BfDtfu1hxI18VJTqn03cqX1WAVE.lVKjR0_u6szKPZQCrT.drSb.4ulE_b74 ve83aQSq85JDu0_W5sdgKi31Bwfdgqpg_QQbsrrjjR0Zu0txAJMbX9N4IXvX nJOkw3V6y2vZcGi2ObIyzufG52HK8.3JfcAbXL7BxFqBlD8.Dwq3j5ipe38e QK8UhkSjbgioCCxUBeWOxQuQLSy4cN9DT_NQmUpAvfZkfCZAqWD0_6c9iL22 v68bHstk2fThL_FJn7yDpEIHolALFLw-- X-Yahoo-SMTP: 9sPoSQ2swBBlERuQ.0vs8XLc_MeClW0- From: Anthony Jenkins Subject: PATCH: uep(4) support for (my) eGalax touchscreen To: freebsd-usb@freebsd.org Message-ID: <9be27e1a-aada-f53a-879f-24d7da4f42be@yahoo.com> Date: Mon, 24 Jul 2017 15:28:24 -0400 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:52.0) Gecko/20100101 Thunderbird/52.0 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Content-Language: en-US X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 24 Jul 2017 19:31:24 -0000 I'm trying to add support for uep(4) to detect and properly emit touch events to x11-drivers/xf86-input-egalax. What I have works, but has some issues, particularly: - close(2)ing the device node causes a USB_ST_ERROR in the uep_intr_callback(); it's probably from my attempt to port an initialization control message from Linux - I massage the touch events from my device into the legacy uep(4) event structure since my multitouch-supporting touchscreen has 12-bits of resolution per axis, but legacy uep(4) only had 11 - For some reason my Y-axis is inverted; I had to subtract its coordinate from the max Y value. I'll probably add an ioctl(2) to set axis inversion behavior dynamically rather than hardcode it. - I capture all the multitouch info from the USB packets, but I don't know (yet) if xf86-input-egalax can do anything with it - x11-drivers/xf86-input-egalax's default min/max ranges are "silly" (500/1500), but I didn't add the trivial patch to it. I'd like to add an ioctl(2) that lets xf86-input-egalax query uep(4) for axis ranges, but as I've written my patch, uep(4) doesn't know its ranges until it gets a touch packet. - I started adding support for evdev(4) reporting (added header files and device struct members), but it's nowhere near finished. - I have no idea how common this eGalax protocol is or how to determine what protocol to use from the driver. Right now I assume a byte 0 of 0x06 means "multitouch event". - My x11-servers/xorg-server is patched to associate /dev/uep0 with the xf86-input-egalax driver; I guess I'll have to make that available too. My config/devd.c is substantially different from stock. Logging is sort of noisy at the moment when touching the screen, but it "Just Works (TM)" with my touchscreen, my slightly-patched xf86-input-egalax driver and KDE4. uep(4) patch: https://github.com/ScoobiFreeBSD/freebsd/commit/62c11d484d5fb61749240b439612f852c5148222 x11-servers/xorg-server patch: https://github.com/ScoobiFreeBSD/freebsd-ports/commit/9465237f83ab8fb27249abfe803f94b6b8c3b945 Suggestions/comments welcome. Currently looking for help with the USB_ST_ERROR issue, although I think I may know what's wrong (this is my 1st attempt at USB stack programming). Anthony Jenkins From owner-freebsd-usb@freebsd.org Mon Jul 24 20:10:56 2017 Return-Path: Delivered-To: freebsd-usb@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8137ED7EF37 for ; Mon, 24 Jul 2017 20:10:56 +0000 (UTC) (envelope-from Scoobi_doo@yahoo.com) Received: from nm22-vm1.bullet.mail.bf1.yahoo.com (nm22-vm1.bullet.mail.bf1.yahoo.com [98.139.212.127]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3E85976C71 for ; Mon, 24 Jul 2017 20:10:55 +0000 (UTC) (envelope-from Scoobi_doo@yahoo.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1500927049; bh=sO2lJB3vT153sovLUyH7I0eKAy6lCpPGTEWvzVauC2A=; h=Subject:To:References:From:Date:In-Reply-To:From:Subject; b=rzS+DehXAQYYouEivybgDIsFWwcK9xnWM6i0eTRxnJ2JvI47TxhjJ5da6gSctDGa3jAdRQZYudMHx1L9M5N2NHbJjqS7coVAaReqcfQt9JKq64f/faTY7pOfqELfx63av+Kt0gA/77jtxBhsiaVP0a1Lvi7/02XBoazw9TwO4gffXZP/QZu63k68d2R8lCB9CeKNPq8vviBsVoxnZRyKIvxcy4GPbjT3VmVPSrwRHwmg4H84m1LlcYm8CMB1X7njvsI/tqdxLz1m5DtSr1+jdD78MDwtfW1OqZRTQI9mScVSKRT+m3GwCG3ROze8WbelYwzCdUjbFPbaudqzFLhVpA== Received: from [98.139.170.179] by nm22.bullet.mail.bf1.yahoo.com with NNFMP; 24 Jul 2017 20:10:49 -0000 Received: from [68.142.230.70] by tm22.bullet.mail.bf1.yahoo.com with NNFMP; 24 Jul 2017 20:10:49 -0000 Received: from [127.0.0.1] by smtp227.mail.bf1.yahoo.com with NNFMP; 24 Jul 2017 20:10:49 -0000 X-Yahoo-Newman-Id: 703210.81363.bm@smtp227.mail.bf1.yahoo.com X-Yahoo-Newman-Property: ymail-3 X-YMail-OSG: FUnTsQMVM1lQ5qjYWhn5k6IIJDVBJA1oWhnQcMCYt6FZ.k3 PwLKhc4S0RjfKaXCdNEHH8aeqnCtfb.OIPUL2.jvvSeI8_ByUtKTtRBP_Hzt mStbrCzKuMV2mBIpOKNp79za8RvV92IHEQvVOWdtG0ktqG13gi8RUFGqSkWD 6zwp63uz7Y.kkYf0TxUiPOcXYKA875yjfQNWQtRlRK5bAW_MdpvGeJTujHMq ak9F0nZllWVi4MfWjfPWv1UejY21nWM7piEnbTW0M_CFDOvYAXyxe48E8v.h .YfcDg1JX4kpBTOIcBIsFko0hDfmzbue8z3dpwEe6_ZEyyvEzjt.PW_Zga05 K2pCbelTPeg8zLwvaIicHwqrinMtQ40ZAqsHqlOAdP8ahhDFbX5LQa2EAP0g JPvuxE2UZWDfluU6DA60S8cpeJUyWifH94FFsDpDue_NPrxr5jU97aAzr9dz ybTi2YVSV5imI9rldqt.z.xvAWwUzzcOM0mCOrgA4sK1Zb0uJfgqE52.y91W DW46hbi40_jUp0npRBUdI712J21tVDrQzLj4k8d6BRc35 X-Yahoo-SMTP: 9sPoSQ2swBBlERuQ.0vs8XLc_MeClW0- Subject: Re: PATCH: uep(4) support for (my) eGalax touchscreen To: freebsd-usb@freebsd.org References: <9be27e1a-aada-f53a-879f-24d7da4f42be@yahoo.com> From: Anthony Jenkins Message-ID: <743ccf34-cbf6-17a8-fa2c-d174ff56abee@yahoo.com> Date: Mon, 24 Jul 2017 16:10:47 -0400 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.2.1 MIME-Version: 1.0 In-Reply-To: <9be27e1a-aada-f53a-879f-24d7da4f42be@yahoo.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Content-Language: en-US X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 24 Jul 2017 20:10:56 -0000 On 07/24/2017 03:28 PM, Anthony Jenkins via freebsd-usb wrote: > I'm trying to add support for uep(4) to detect and properly emit touch > events to x11-drivers/xf86-input-egalax. What I have works, but has som= e > issues, particularly: > > - close(2)ing the device node causes a USB_ST_ERROR in the > uep_intr_callback(); it's probably from my attempt to port an > initialization control message from Linux > - I massage the touch events from my device into the legacy uep(4) > event structure since my multitouch-supporting touchscreen has 12-bits > of resolution per axis, but legacy uep(4) only had 11 > - For some reason my Y-axis is inverted; I had to subtract its > coordinate from the max Y value. I'll probably add an ioctl(2) to set > axis inversion behavior dynamically rather than hardcode it. > - I capture all the multitouch info from the USB packets, but I don't > know (yet) if xf86-input-egalax can do anything with it > - x11-drivers/xf86-input-egalax's default min/max ranges are "silly" > (500/1500), but I didn't add the trivial patch to it. I'd like to add > an ioctl(2) that lets xf86-input-egalax query uep(4) for axis ranges, > but as I've written my patch, uep(4) doesn't know its ranges until it > gets a touch packet. > - I started adding support for evdev(4) reporting (added header files > and device struct members), but it's nowhere near finished. > - I have no idea how common this eGalax protocol is or how to determin= e > what protocol to use from the driver. Right now I assume a byte 0 of > 0x06 means "multitouch event". > - My x11-servers/xorg-server is patched to associate /dev/uep0 with th= e > xf86-input-egalax driver; I guess I'll have to make that available too.= =20 > My config/devd.c is substantially different from stock. The main problem with uep(4) was either xorg-server or xf86-input-egalax started doing asynchronous I/O on the device node using fcntl(F_SETOWN); the original uep(4) expected userland to open(2)/read(2) the device node. I had to add the FIOSETOWN support, but I don't know if there's a way to remove a process as owner (call fcntl(F_SETOWN, NULL)?). If so, I'll need to handle that case. I can stick this up in the FreeBSD code review site if desired. Anthony > Logging is sort of noisy at the moment when touching the screen, but it= > "Just Works (TM)" with my touchscreen, my slightly-patched > xf86-input-egalax driver and KDE4. > > uep(4) patch: > https://github.com/ScoobiFreeBSD/freebsd/commit/62c11d484d5fb61749240b4= 39612f852c5148222 > x11-servers/xorg-server patch: > https://github.com/ScoobiFreeBSD/freebsd-ports/commit/9465237f83ab8fb27= 249abfe803f94b6b8c3b945 > > Suggestions/comments welcome. Currently looking for help with the > USB_ST_ERROR issue, although I think I may know what's wrong (this is m= y > 1st attempt at USB stack programming). > > Anthony Jenkins > > _______________________________________________ > freebsd-usb@freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/freebsd-usb > To unsubscribe, send any mail to "freebsd-usb-unsubscribe@freebsd.org" --=20 Anthony Jenkins From owner-freebsd-usb@freebsd.org Mon Jul 24 20:21:01 2017 Return-Path: Delivered-To: freebsd-usb@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 63872D7F3F3 for ; Mon, 24 Jul 2017 20:21:01 +0000 (UTC) (envelope-from hps@selasky.org) Received: from mail.turbocat.net (turbocat.net [88.99.82.50]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 15DF57735D for ; Mon, 24 Jul 2017 20:21:00 +0000 (UTC) (envelope-from hps@selasky.org) Received: from hps2016.home.selasky.org (unknown [62.141.129.119]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.turbocat.net (Postfix) with ESMTPSA id 04A0B2600E4; Mon, 24 Jul 2017 22:20:51 +0200 (CEST) Subject: Re: PATCH: uep(4) support for (my) eGalax touchscreen To: Anthony Jenkins , freebsd-usb@freebsd.org References: <9be27e1a-aada-f53a-879f-24d7da4f42be@yahoo.com> <743ccf34-cbf6-17a8-fa2c-d174ff56abee@yahoo.com> From: Hans Petter Selasky Message-ID: Date: Mon, 24 Jul 2017 22:18:42 +0200 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:52.0) Gecko/20100101 Thunderbird/52.2.0 MIME-Version: 1.0 In-Reply-To: <743ccf34-cbf6-17a8-fa2c-d174ff56abee@yahoo.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 24 Jul 2017 20:21:01 -0000 On 07/24/17 22:10, Anthony Jenkins via freebsd-usb wrote: > > On 07/24/2017 03:28 PM, Anthony Jenkins via freebsd-usb wrote: >> I'm trying to add support for uep(4) to detect and properly emit touch >> events to x11-drivers/xf86-input-egalax. What I have works, but has some >> issues, particularly: >> >> - close(2)ing the device node causes a USB_ST_ERROR in the >> uep_intr_callback(); it's probably from my attempt to port an >> initialization control message from Linux >> - I massage the touch events from my device into the legacy uep(4) >> event structure since my multitouch-supporting touchscreen has 12-bits >> of resolution per axis, but legacy uep(4) only had 11 >> - For some reason my Y-axis is inverted; I had to subtract its >> coordinate from the max Y value. I'll probably add an ioctl(2) to set >> axis inversion behavior dynamically rather than hardcode it. >> - I capture all the multitouch info from the USB packets, but I don't >> know (yet) if xf86-input-egalax can do anything with it >> - x11-drivers/xf86-input-egalax's default min/max ranges are "silly" >> (500/1500), but I didn't add the trivial patch to it. I'd like to add >> an ioctl(2) that lets xf86-input-egalax query uep(4) for axis ranges, >> but as I've written my patch, uep(4) doesn't know its ranges until it >> gets a touch packet. >> - I started adding support for evdev(4) reporting (added header files >> and device struct members), but it's nowhere near finished. >> - I have no idea how common this eGalax protocol is or how to determine >> what protocol to use from the driver. Right now I assume a byte 0 of >> 0x06 means "multitouch event". >> - My x11-servers/xorg-server is patched to associate /dev/uep0 with the >> xf86-input-egalax driver; I guess I'll have to make that available too. >> My config/devd.c is substantially different from stock. > > The main problem with uep(4) was either xorg-server or xf86-input-egalax > started doing asynchronous I/O on the device node using fcntl(F_SETOWN); > the original uep(4) expected userland to open(2)/read(2) the device > node. I had to add the FIOSETOWN support, but I don't know if there's a > way to remove a process as owner (call fcntl(F_SETOWN, NULL)?). If so, > I'll need to handle that case. > > I can stick this up in the FreeBSD code review site if desired. > > Anthony > >> Logging is sort of noisy at the moment when touching the screen, but it >> "Just Works (TM)" with my touchscreen, my slightly-patched >> xf86-input-egalax driver and KDE4. >> >> uep(4) patch: >> https://github.com/ScoobiFreeBSD/freebsd/commit/62c11d484d5fb61749240b439612f852c5148222 >> x11-servers/xorg-server patch: >> https://github.com/ScoobiFreeBSD/freebsd-ports/commit/9465237f83ab8fb27249abfe803f94b6b8c3b945 >> >> Suggestions/comments welcome. Currently looking for help with the >> USB_ST_ERROR issue, although I think I may know what's wrong (this is my >> 1st attempt at USB stack programming). >> >> Anthony Jenkins >> Just a dumb question: Have you tried to use webcamd with your device? --HPS From owner-freebsd-usb@freebsd.org Tue Jul 25 02:37:03 2017 Return-Path: Delivered-To: freebsd-usb@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B0274DB1C26 for ; Tue, 25 Jul 2017 02:37:03 +0000 (UTC) (envelope-from jerrywossion@gmail.com) Received: from mail-it0-x234.google.com (mail-it0-x234.google.com [IPv6:2607:f8b0:4001:c0b::234]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 7A769632EE for ; Tue, 25 Jul 2017 02:37:03 +0000 (UTC) (envelope-from jerrywossion@gmail.com) Received: by mail-it0-x234.google.com with SMTP id v127so44628529itd.0 for ; Mon, 24 Jul 2017 19:37:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:from:date:message-id:subject:to:cc; bh=Z4eK+X1qlXGBF7rQO1JiP33rNHsxF/dBgiQEozfh89w=; b=lE9NXmyQENl6jAwZqDqcltM++cozAiYvJdFU5MzTLMICitM0rU6QK2VPrC/e1w1+Qd wzwBbH2t1b8bTLOX1Ha6rsEqHbbXXQ1FhPkjajSnomyrQ4s9BzC6ad6IsfNjpjKouqNa e7qhqZ5m64cT6obdWL8uKq9kkCGC8jq4pMOuwpcCQnwaEMs+6tZgB56eruKEtYQLewUn semQx6hi/23dU8vxEbVRqydinqUR/TA43SkY9yjWRqXYs8ybv5NMcLKItRLBAvzSV6se ZNL1P1816E0RGYMRYDYJ9ohS1oFmadmN7uXngvmhWN7DbR35Fl2Du1mWtJZHlSBYYXRn x/BA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to:cc; bh=Z4eK+X1qlXGBF7rQO1JiP33rNHsxF/dBgiQEozfh89w=; b=Q0zT/ZKqFtGQ2IKN2D/nZqkqkz6a5jozQoFHfAGd32boWkESmi0AHq2vRHtRhdCayw aoSlPOkKPu1hFRDsGwfehuiLnEzQmHstKLiz/g5nzkOkFlQjWPvq97GSbef15u1totpj 1KCOBeYWM/oyx5THxst4VMguf03v1IokzGcG3DRk8oF5W7fMZOzfGjONRS4C/f6Lwp8c mMZ+DZy9uiWC4g0pRgyIWHcExd8anwc0WDD6tILnNsjtLg4udrVokFiESkMluaNXjgKi GkUtnF5DYtbZju/+QGE/sRJVLhtP2dG6fYt43Uz8bWzOtNKSWEEGQWC0215fnqA5y/3M HcNQ== X-Gm-Message-State: AIVw1113X3FfM8pjsXNuOoCpd1jJvStK+omSKy48mDtfaxOAqE8tuhm5 vxos5ME8RdCiTj8G1712L2wRcO4F3moA X-Received: by 10.36.184.196 with SMTP id m187mr9400758ite.18.1500950222682; Mon, 24 Jul 2017 19:37:02 -0700 (PDT) MIME-Version: 1.0 Received: by 10.107.8.164 with HTTP; Mon, 24 Jul 2017 19:36:40 -0700 (PDT) From: Jie Weng Date: Tue, 25 Jul 2017 10:36:40 +0800 Message-ID: Subject: GSoC Week 6-8, add usbdump file-format to Wireshark To: freebsd-usb@freebsd.org Cc: Hans Petter Selasky Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.23 X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 25 Jul 2017 02:37:03 -0000 Hi everyone, I'm really sorry for the late status updates. In the first week I fixed several crashes when opening files in which the length of some packets is a little longer. It was caused by a wrongly explicit cast, the cast shorten the proper length it should be. Besides, I was diving into learning the Epan lib of Wireshark to make ready for dissection phase. In the second week I register the usbdump file format to FreeBSD USB encapsulation of Wireshark. The built-in dissectors can dissect the urb part for each packet, but it does nothing about the frames and payloads. Last week I was mainly focus on dissecting usbdump packets. I reused a lot of built-in dissectors. These dissectors cannot be called directly since the built-in FreeBSD USB dissector didn't offer enough information, so I added many content to the built-in dissectors to collect necessary information, the information is also needed for identifying the kind of each packet and constructing important data structures. Currently I finished the control transfers dissection, but it's still not 100% functional. I think this is due to that I'm not classifying each packet properly. This faultiness also infects the other dissection phases. The code is at https://github.com/jerrywossion/wireshark/tree/usbdump_dissector. I make a new branch for current work, and I will clean the code and merge it when dissection phase is completed. Thanks, Jie Weng From owner-freebsd-usb@freebsd.org Tue Jul 25 06:16:36 2017 Return-Path: Delivered-To: freebsd-usb@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 629A6DB7655 for ; Tue, 25 Jul 2017 06:16:36 +0000 (UTC) (envelope-from hselasky@gmail.com) Received: from mail-lf0-x231.google.com (mail-lf0-x231.google.com [IPv6:2a00:1450:4010:c07::231]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id EB94A69DFD for ; Tue, 25 Jul 2017 06:16:35 +0000 (UTC) (envelope-from hselasky@gmail.com) Received: by mail-lf0-x231.google.com with SMTP id g25so48520691lfh.1 for ; Mon, 24 Jul 2017 23:16:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:references:from:message-id:date:user-agent:mime-version :in-reply-to:content-language:content-transfer-encoding; bh=fb6pfh72K30Utd3fBVoKU44zL6PEnRvPhv8/IRRy144=; b=s858Ao1PV4FnNLBYLpELetHNkZ4Z4BRBJcVbeOgTebE3szON6rahqXC+HCGMBfH7b5 gRA42O4NMwXT7EYtjI5uV9A5dN+LVqiJvIDFPYdLQ4g2WWbo56FCyAs6NGU6NLyctyqP Wn8uUqW9VqAjyhyuvfXcU1cG1+jI/ZLBkrMx9P/g58M5GY26jb7VeFGZlNhxTjwXYOAs qlLcUGzAA/NMFpLbdY37BZfuycSu/mGHCwje8l3w7/i4CWZKA5NTWl15k4L3Hd2iP3B+ YzLaXs8ZO3HxMHhyMBbWS2ektaY9EQ4zVo43WUB2DH99B7KTuJmZ6rfmGLzMISEiIS27 OSjA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=fb6pfh72K30Utd3fBVoKU44zL6PEnRvPhv8/IRRy144=; b=fFqAjM+AhHJJWIyv8D/s7qyc4M/aZqfbpPzhZZRxDrCQFWEzOe3CqCS4RteBkeoszd oDX/QYGCmC96QdHww9KxkmWa6lDhFqPewuRb2Dh4wnrxKbh3eoKzLehIbY2f+lO1e6/k Czol97fIlrhXUwpk8KnrrOK0KrIQrYZTCtGA9Orw2asl0eoQOEBONCrhillbA7XwQPkM kq/wWe4Gjnwq4CivH0FOxAy4jt0UGt2a7jZTtjjK+XKQYPa6MDQyzd8pkIbnkc5/zILT 5tPahxLJsTiFpK2NxYwnWIQ2RUzSuirBM332NF9k+NuGZPI16zYYmFZbZG1iCb8fVVUN 0zRA== X-Gm-Message-State: AIVw1106sggiPfAY9lYfGX1LUeHpnxIAdHcaLVf6OnxGS0b9/vqxQjUl xa5i2b0JOdU+NVUK X-Received: by 10.25.193.21 with SMTP id r21mr4044079lff.107.1500963392822; Mon, 24 Jul 2017 23:16:32 -0700 (PDT) Received: from hps2016.home.selasky.org ([62.141.129.119]) by smtp.googlemail.com with ESMTPSA id y17sm1349453lja.25.2017.07.24.23.16.31 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 24 Jul 2017 23:16:32 -0700 (PDT) Subject: Re: GSoC Week 6-8, add usbdump file-format to Wireshark To: Jie Weng , freebsd-usb@freebsd.org References: From: Hans Petter Selasky Message-ID: <5d00793a-6a19-2287-2078-d52abd0b7fe2@gmail.com> Date: Tue, 25 Jul 2017 08:14:22 +0200 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:52.0) Gecko/20100101 Thunderbird/52.2.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 25 Jul 2017 06:16:36 -0000 On 07/25/17 04:36, Jie Weng wrote: > Hi everyone, > > I'm really sorry for the late status updates. > > In the first week I fixed several crashes when opening files in which the > length of some packets is a little longer. It was caused by a wrongly > explicit cast, the cast shorten the proper length it should be. Besides, I > was diving into learning the Epan lib of Wireshark to make ready for > dissection phase. > > In the second week I register the usbdump file format to FreeBSD USB > encapsulation of Wireshark. The built-in dissectors can dissect the urb > part for each packet, but it does nothing about the frames and payloads. > > Last week I was mainly focus on dissecting usbdump packets. I reused a lot > of built-in dissectors. These dissectors cannot be called directly since > the built-in FreeBSD USB dissector didn't offer enough information, so I > added many content to the built-in dissectors to collect necessary > information, the information is also needed for identifying the kind of > each packet and constructing important data structures. Currently I > finished the control transfers dissection, but it's still not 100% > functional. I think this is due to that I'm not classifying each packet > properly. This faultiness also infects the other dissection phases. > > The code is at > https://github.com/jerrywossion/wireshark/tree/usbdump_dissector. I make a > new branch for current work, and I will clean the code and merge it when > dissection phase is completed. > Hi, Thank you for the work you are doing. I hope this project will help diagnose USB problems under FreeBSD more easily. --HPS From owner-freebsd-usb@freebsd.org Tue Jul 25 15:56:17 2017 Return-Path: Delivered-To: freebsd-usb@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C1A30C7F615 for ; Tue, 25 Jul 2017 15:56:17 +0000 (UTC) (envelope-from Scoobi_doo@yahoo.com) Received: from nm34-vm3.bullet.mail.bf1.yahoo.com (nm34-vm3.bullet.mail.bf1.yahoo.com [72.30.239.75]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 873D680A31 for ; Tue, 25 Jul 2017 15:56:16 +0000 (UTC) (envelope-from Scoobi_doo@yahoo.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1500998170; bh=VL16JIQUw3Tmkg25rV0Y3N19XRelZRbSzEoY5YGwhDU=; h=Subject:To:References:From:Date:In-Reply-To:From:Subject; b=iszPLtVb8kXSx6XMdiKWD4TPisJMSTQIIfXFv6QSxzdn2olxbYIBb9xsI1UhuVpMq8LAI2+wUhHaC7exzVkgJinzBCEzxLOem5GavJOn63KNFZNYPVTeKjrW68it/Nm6xpVMgBvXcPW+DCaQ2xEQwukf6pqOmD+4ferceuAVSaMB5uoiCYH56YthT2jHHLzCACiSr3ghOeixOZVVll1ReWQXd3BxkLLc4CSsYEURa680Bp4GyseahQJeZW9eaKd7GVjfDJg9ALIAZFpg6+TTFsPR/Ilaxe8ZGWYX3r69jgE16RK/xwd/irZyI2GrqfbnqmKOuSps7K7tix2ykA0i8Q== Received: from [66.196.81.170] by nm34.bullet.mail.bf1.yahoo.com with NNFMP; 25 Jul 2017 15:56:10 -0000 Received: from [98.139.213.13] by tm16.bullet.mail.bf1.yahoo.com with NNFMP; 25 Jul 2017 15:56:10 -0000 Received: from [127.0.0.1] by smtp113.mail.bf1.yahoo.com with NNFMP; 25 Jul 2017 15:56:10 -0000 X-Yahoo-Newman-Id: 296240.50795.bm@smtp113.mail.bf1.yahoo.com X-Yahoo-Newman-Property: ymail-3 X-YMail-OSG: bHujysAVM1kgzx5ST1q50_Siqxts5Z8JXEdMBelbe.yCK5m bcYvTKMEzTP5uxUROqirLFGum8woU0EgBfC_pCgcNt2lAdM1gRLoBUgxl1.j Kj3Ho9vQzvt35Xzv53YQL2DnqZSwPQ9lQCAVnmx1DrbE9uFeSYlmH1Gp6dVu 30_dyC0pTv9tBstD4dxNmge1qaSdGyU5v.DziqyOe1SGdmq17rAUtklxO3sR CnBRIqoTWi8sfr5i.gbpPDuBUVpOO_yN3yut0G2aZgJi_qiEQ59jDpuNOO.W EUtgS9h5Q0PAqKQ1cV9npfWDpaLyE_CXt7EswQzFOXJtfUB5JMkbeDnFrHB7 Otyr6FM6UgfVajBdyQdXKOJ7VxeJ54hCHNSjoFi0jDrV2HEmUblpRkkXaXbW 6LPSbxItuhIVYxaCFHkCWVZl_DmH96sEJXuhCZEKYFr2rDDwW.2k0bcNShxs O5Q48mplmpuX80x7jID3SnYeXQ_ZX.myj2zZihNngDAfD57kLrJnwWrJecfs ZJn5bdCZkL_rOmjctpy7NYUeQsVsz3AI.BIXjN73i54hSZ3IGk6qG3kHEiGl .otg1SmVmX3vRCZCTZASFiEVHROMgZLcFqQKflMOiK8_SBgluUMJohsKQPtU o1u38MlqvzJDAuT1NXBvBVEspOTZcOQ-- X-Yahoo-SMTP: 9sPoSQ2swBBlERuQ.0vs8XLc_MeClW0- Subject: Re: PATCH: uep(4) support for (my) eGalax touchscreen To: Hans Petter Selasky , freebsd-usb@freebsd.org References: <9be27e1a-aada-f53a-879f-24d7da4f42be@yahoo.com> <743ccf34-cbf6-17a8-fa2c-d174ff56abee@yahoo.com> From: Anthony Jenkins Message-ID: <57bc8301-5dae-3d1d-f057-8c42509be4bb@yahoo.com> Date: Tue, 25 Jul 2017 11:56:09 -0400 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.2.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Content-Language: en-US X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 25 Jul 2017 15:56:17 -0000 On 07/24/2017 04:18 PM, Hans Petter Selasky wrote: > On 07/24/17 22:10, Anthony Jenkins via freebsd-usb wrote: >> >> On 07/24/2017 03:28 PM, Anthony Jenkins via freebsd-usb wrote: >>> I'm trying to add support for uep(4) to detect and properly emit touc= h >>> events to x11-drivers/xf86-input-egalax. What I have works, but has >>> some >>> issues, particularly: >>> >>> - close(2)ing the device node causes a USB_ST_ERROR in the >>> uep_intr_callback(); it's probably from my attempt to port an >>> initialization control message from Linux >>> - I massage the touch events from my device into the legacy uep(4) >>> event structure since my multitouch-supporting touchscreen has 12-bit= s >>> of resolution per axis, but legacy uep(4) only had 11 >>> - For some reason my Y-axis is inverted; I had to subtract its >>> coordinate from the max Y value. I'll probably add an ioctl(2) to se= t >>> axis inversion behavior dynamically rather than hardcode it. >>> - I capture all the multitouch info from the USB packets, but I don= 't >>> know (yet) if xf86-input-egalax can do anything with it >>> - x11-drivers/xf86-input-egalax's default min/max ranges are "silly= " >>> (500/1500), but I didn't add the trivial patch to it. I'd like to ad= d >>> an ioctl(2) that lets xf86-input-egalax query uep(4) for axis ranges,= >>> but as I've written my patch, uep(4) doesn't know its ranges until it= >>> gets a touch packet. >>> - I started adding support for evdev(4) reporting (added header fil= es >>> and device struct members), but it's nowhere near finished. >>> - I have no idea how common this eGalax protocol is or how to >>> determine >>> what protocol to use from the driver. Right now I assume a byte 0 of= >>> 0x06 means "multitouch event". >>> - My x11-servers/xorg-server is patched to associate /dev/uep0 >>> with the >>> xf86-input-egalax driver; I guess I'll have to make that available to= o. >>> My config/devd.c is substantially different from stock. >> >> The main problem with uep(4) was either xorg-server or xf86-input-egal= ax >> started doing asynchronous I/O on the device node using fcntl(F_SETOWN= ); >> the original uep(4) expected userland to open(2)/read(2) the device >> node. I had to add the FIOSETOWN support, but I don't know if there's= a >> way to remove a process as owner (call fcntl(F_SETOWN, NULL)?). If so= , >> I'll need to handle that case. >> >> I can stick this up in the FreeBSD code review site if desired. >> >> Anthony >> >>> Logging is sort of noisy at the moment when touching the screen, but = it >>> "Just Works (TM)" with my touchscreen, my slightly-patched >>> xf86-input-egalax driver and KDE4. >>> >>> uep(4) patch: >>> https://github.com/ScoobiFreeBSD/freebsd/commit/62c11d484d5fb61749240= b439612f852c5148222 >>> >>> x11-servers/xorg-server patch: >>> https://github.com/ScoobiFreeBSD/freebsd-ports/commit/9465237f83ab8fb= 27249abfe803f94b6b8c3b945 >>> >>> >>> Suggestions/comments welcome. Currently looking for help with the >>> USB_ST_ERROR issue, although I think I may know what's wrong (this >>> is my >>> 1st attempt at USB stack programming). >>> >>> Anthony Jenkins >>> > > Just a dumb question: Have you tried to use webcamd with your device? > It's been a while, and multimedia/webcamd + xf86-input-evdev /had/ worked, but it's been months since I'd gotten it to work, and it would always drop the first touch event. I can try again to get that configuration to work, but I like the native (stub) driver architecture (except for the maintenance needed). Linux' drivers/input/touchscreen/usbtouchscreen.c driver pretty much does the same thing Anthony > --HPS > --=20 Anthony Jenkins