All of lore.kernel.org
 help / color / mirror / Atom feed
From: Greg KH <greg@kroah.com>
To: Jeffrey Walton <noloader@gmail.com>
Cc: kernelnewbies <kernelnewbies@kernelnewbies.org>
Subject: Re: How to log USB modem data for a specific device?
Date: Tue, 12 Nov 2019 06:37:54 +0100	[thread overview]
Message-ID: <20191112053754.GB1210104@kroah.com> (raw)
In-Reply-To: <CAH8yC8nc1htrRyZH9gzizO3EuOgcA7LsgtK=YDsMozM3FpZbjg@mail.gmail.com>

On Mon, Nov 11, 2019 at 05:57:24PM -0500, Jeffrey Walton wrote:
> On Mon, Nov 11, 2019 at 12:24 PM Greg KH <greg@kroah.com> 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 <greg@kroah.com> 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

  reply	other threads:[~2019-11-12  5:39 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-11-11 16:11 How to log USB modem data for a specific device? Jeffrey Walton
2019-11-11 16:31 ` Greg KH
2019-11-11 16:40   ` Jeffrey Walton
2019-11-11 17:24     ` Greg KH
2019-11-11 22:57       ` Jeffrey Walton
2019-11-12  5:37         ` Greg KH [this message]
2019-11-12  6:20           ` Jeffrey Walton
2019-11-12 18:15             ` Jeffrey Walton

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20191112053754.GB1210104@kroah.com \
    --to=greg@kroah.com \
    --cc=kernelnewbies@kernelnewbies.org \
    --cc=noloader@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.