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=-0.4 required=3.0 tests=DKIM_ADSP_CUSTOM_MED, DKIM_INVALID,DKIM_SIGNED,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS 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 74757C43331 for ; Mon, 11 Nov 2019 22:58:10 +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 2789020659 for ; Mon, 11 Nov 2019 22:58:09 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="pMF60PTt" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 2789020659 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=kernelnewbies-bounces@kernelnewbies.org Received: from localhost ([::1] helo=shelob.surriel.com) by shelob.surriel.com with esmtp (Exim 4.92.3) (envelope-from ) id 1iUIcu-00076Z-53; Mon, 11 Nov 2019 17:57:40 -0500 Received: from mail-il1-x12c.google.com ([2607:f8b0:4864:20::12c]) by shelob.surriel.com with esmtps (TLSv1.2:ECDHE-RSA-AES128-GCM-SHA256:128) (Exim 4.92.3) (envelope-from ) id 1iUIcr-00076Q-QF for kernelnewbies@kernelnewbies.org; Mon, 11 Nov 2019 17:57:37 -0500 Received: by mail-il1-x12c.google.com with SMTP id s75so13662570ilc.3 for ; Mon, 11 Nov 2019 14:57:37 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:reply-to:from:date:message-id :subject:to:cc; bh=GZHcR0J61DCqU8BLL9jvzDXWFJpSYsN3+x08OHtbGUo=; b=pMF60PTtXEPWcfD80T2gHgJUefkAdVCiMOQg4Qg1jEVMrDMwUEJ6gQPpNQTTMWmuhJ g9aCLc7Uq/5dxqu80Yw5B8n4zSqG0C+BBVxLBLYFnQf+jf9D9Hc9JuBhFSvkTOGliz6c yKCdGiNlTf4I1x9V3cAz923t1ckamKuxtidSzv/nvOclB60J4Ir+SCOaRc+olvWsY7Lw J03/vLqqX17SOZZlYgcdugHpSTHzCbooFbPIxYKv1MCKWm7OayvE4acZRME+qrFGV79N thGVbu9Dcnt0xYcmeMhsmHcWLujiPu6HVbDiJOm3Z8mBLbNFLDbMxhNlTqXmz9WopGGP e0Rw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:reply-to :from:date:message-id:subject:to:cc; bh=GZHcR0J61DCqU8BLL9jvzDXWFJpSYsN3+x08OHtbGUo=; b=KTb7YteOMAmcIsIXNAD8bDC8X++fBdNJlS78begHV0cePIN/OfoK/ArVRCPdTApjvv WtGr3ogHP0wsrZ3h5zz/OWJcSMwBdd35y/wqfiNhIg5ZVtBUHHrUqW6ZoqpSgnSVFzmF 1X4imlZ+G9RO3KstdPj4Sq55CqN+18UGGyKk+cN+T5EmJBiIT/ZDuE+D0snMEoY+UTeD tZm9faLlC5Zi5K/6fV6eE8jwbv3JXl4mfFKmjCtNmhh7NtL7Mi2DRH2nHnTOW8aiGJEu KhRu4LIVsDyF3em/CbwG+br6KAon7V+eG43YbF7xGXv0E3/uWDrE2s4hC5eo77nTNgEA xRxw== X-Gm-Message-State: APjAAAXXAjlU9YS/H0/iR8WGJkoNg1shiMRR+26jlp8DJSNzik2CM1l8 flV7z5PQXHxc5UkwQhYqNGzaLVxvcyzRWlyzJEE= X-Google-Smtp-Source: APXvYqwHv+vfP2juJO5cb+pOUi8J5HiLD3M2aMmJqSD4sIlxcuNLMQ8N3oHGcm/ykZ8J+qZ5vqLXi5nwDzBpkPb+4zg= X-Received: by 2002:a92:6a07:: with SMTP id f7mr2416204ilc.41.1573513054973; Mon, 11 Nov 2019 14:57:34 -0800 (PST) MIME-Version: 1.0 References: <20191111163131.GB1017642@kroah.com> <20191111172442.GC1077444@kroah.com> In-Reply-To: <20191111172442.GC1077444@kroah.com> From: Jeffrey Walton Date: Mon, 11 Nov 2019 17:57:24 -0500 Message-ID: Subject: Re: How to log USB modem data for a specific device? To: Greg KH 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: , Reply-To: noloader@gmail.com Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: kernelnewbies-bounces@kernelnewbies.org 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. 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). Jeff _______________________________________________ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies