From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.0 required=3.0 tests=DKIM_INVALID,DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 1E688C43331 for ; Tue, 12 Nov 2019 05:39:54 +0000 (UTC) Received: from shelob.surriel.com (shelob.surriel.com [96.67.55.147]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 9F6F92084F for ; Tue, 12 Nov 2019 05:39:52 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=kroah.com header.i=@kroah.com header.b="uX2dVGl4"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b="IFnuvvbo" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 9F6F92084F Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=kroah.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=kernelnewbies-bounces+kernelnewbies=archiver.kernel.org@kernelnewbies.org Received: from localhost ([::1] helo=shelob.surriel.com) by shelob.surriel.com with esmtp (Exim 4.92.3) (envelope-from ) id 1iUOu6-0008CB-DG for kernelnewbies@archiver.kernel.org; Tue, 12 Nov 2019 00:39:50 -0500 Received: from wout5-smtp.messagingengine.com ([64.147.123.21]) by shelob.surriel.com with esmtps (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.92.3) (envelope-from ) id 1iUOsM-00064R-7I for kernelnewbies@kernelnewbies.org; Tue, 12 Nov 2019 00:38:02 -0500 Received: from compute6.internal (compute6.nyi.internal [10.202.2.46]) by mailout.west.internal (Postfix) with ESMTP id BA8FE555; Tue, 12 Nov 2019 00:37:57 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute6.internal (MEProxy); Tue, 12 Nov 2019 00:37:57 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kroah.com; h= date:from:to:cc:subject:message-id:references:mime-version :content-type:in-reply-to; s=fm2; bh=5ejgT7WM749cskz7OYC+kla54YK g1jmxAmVJtBAIySk=; b=uX2dVGl4f4xPgpLa3bfDxLGE/+EqvspMgppRlahxpxV 5CzkvBZyHzTSTh+K8/OQ+WhKAFAD9Eaca9hxI2WR9ex14y20t3gjffvJ36leX/qL /mhC+0B9JQUuKrQUYEz0L1y1CFJYbkYcwsfFVClw4LXAckkeBaYXR0Jd2/bqfXyB ASEV8e05qN+5LiJDAkG9/6oNZF/43AwBxlEklFfW4XxHGB3SgnejOPLERRxvzCSi xwCD/Una7duzrvEN4LD9lx3ZCoep+6cPcXvAdya4DJaYilX/iQVwC73J0zR9Vu3F MyQDlDBSU252zD/vrXQDopzQUrLMFlwY0pxB8A3qI5g== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm1; bh=5ejgT7 WM749cskz7OYC+kla54YKg1jmxAmVJtBAIySk=; b=IFnuvvboNUuzqTsb3wP0Y9 mzr0L/ZOV+nP/JUpSI+0VejVFByIBb7erV2o6A3J9OeIW6ZlxLm6jjKAi/vI5n07 3kqdDwGf2feFaxm8tDBpOPZ3+wkTRVqUppgq5Dn6Ga1EXLpnYsvvOYxPVZqVzNEN LkqDDoNTSSoAt7e1edqEDuGh2CJA5bx0Jy7uOjTCxwFvwsZaNVkVx9DKVnHLb1pY uCjwmrbFthWe6bLBYsmkP+kPYlJDd0xZyfBjuKWURloMAU4L0an83sZIfVyQw3J6 FB5hTCQv3YBth7J0Rk8qBkXBG2JF6UEKQJMm4IfhGtYDrGnZhS+Vp4wyET7t+EIg == X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedufedruddvkedgfeduucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucenucfjughrpeffhffvuffkfhggtggujggfsehttd ertddtredvnecuhfhrohhmpefirhgvghcumffjuceoghhrvghgsehkrhhorghhrdgtohhm qeenucffohhmrghinhepkhgvrhhnvghlrdhorhhgnecukfhppeekfedrkeeirdekledrud dtjeenucfrrghrrghmpehmrghilhhfrhhomhepghhrvghgsehkrhhorghhrdgtohhmnecu vehluhhsthgvrhfuihiivgeptd X-ME-Proxy: Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) by mail.messagingengine.com (Postfix) with ESMTPA id A77DD80060; Tue, 12 Nov 2019 00:37:56 -0500 (EST) Date: Tue, 12 Nov 2019 06:37:54 +0100 From: Greg KH To: Jeffrey Walton Subject: Re: How to log USB modem data for a specific device? Message-ID: <20191112053754.GB1210104@kroah.com> References: <20191111163131.GB1017642@kroah.com> <20191111172442.GC1077444@kroah.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.12.2 (2019-09-21) Cc: kernelnewbies X-BeenThere: kernelnewbies@kernelnewbies.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: Learn about the Linux kernel List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: kernelnewbies-bounces+kernelnewbies=archiver.kernel.org@kernelnewbies.org On Mon, Nov 11, 2019 at 05:57:24PM -0500, Jeffrey Walton wrote: > On Mon, Nov 11, 2019 at 12:24 PM Greg KH wrote: > > > > On Mon, Nov 11, 2019 at 11:40:51AM -0500, Jeffrey Walton wrote: > > > On Mon, Nov 11, 2019 at 11:31 AM Greg KH wrote: > > > > > > > > On Mon, Nov 11, 2019 at 11:11:06AM -0500, Jeffrey Walton wrote: > > > > > Hi Everyone, > > > > > > > > > > I'm having trouble with a C application that opens a USB modem. The > > > > > application is not receiving some data from a USR modem. Conexant > > > > > modems are OK. > > > > > > > > > > I'm working through > > > > > https://www.kernel.org/doc/Documentation/usb/usbmon.txt . I found the > > > > > modem at Bus=01 Dev=24: > > > > > > > > > > T: Bus=01 Lev=03 Prnt=07 Port=00 Cnt=01 Dev#= 24 Spd=480 MxCh= 0 > > > > > D: Ver= 2.00 Cls=02(comm.) Sub=00 Prot=00 MxPS=64 #Cfgs= 1 > > > > > P: Vendor=0baf ProdID=0303 Rev= 2.00 > > > > > S: Manufacturer=U.S.Robotics > > > > > S: Product=USB Modem > > > > > > > > > > This is where my confusion lies. It is not clear to me how to > > > > > determine which socket to use for step #3 in usbmon.txt. Step #3 says: > > > > > > > > > > # cat /sys/kernel/debug/usb/usbmon/3u > /tmp/1.mon.out > > > > > > > > > > How do I determine which socket to use for Bus=01 Dev=24? > > > > > > > > From the above documentation, it says to use "3u" for all devices on the > > > > 3rd bus. You want the 1st bus, right? So did you try using "1u"? > > > > > > > > I think wireshark can intrepret usbmon output, so maybe just use that > > > > instead and point it at the USB bus you want to watch? > > > > > > Thanks Greg. > > > > > > I want Bus 1, but I want Device 24 (not all devices). > > > > That's not what usbmon will show. Look at wireshark and see if it can > > filter the output for just that one device. > > > > There's also the old-style USB device snoop interface, that works on a > > per-device level. > > Ack, thanks. > > Would you happen to know the old-style program name? I am having > trouble finding it. It's the "usbfs_snoop" module parameter for the usb core. It only works on usbfs connections, sorry, not for anything that you already have a kernel driver bound for. > Here's why I want to specify a device number: > > $ cat /sys/kernel/debug/usb/devices | grep -i -c 'Bus=01' > 13 > > It is too much information for me to sift through. I'll do it if I > have to, but I prefer the tools do the work for me (rather than me do > the work of the tools). That explains why you only want one device's data, but does not answer why you want that data at all :) thanks, greg k-h _______________________________________________ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies