[sf-lug] USB devices, discovering, ... Re: USB mic not working under 14.04

Michael Paoli Michael.Paoli at cal.berkeley.edu
Thu Sep 6 12:54:56 PDT 2018


I really like my usbidiff utility.
Run it. plug in USB device, wait a few seconds or whatever,
hit <ENTER>, get a reasonably concise report of what (if anything) is
newly picked up.

See end further below:

> From: "Rick Moen" <rick at linuxmafia.com>
> Subject: Re: [sf-lug] USB mic not working under 14.04
> Date: Wed, 5 Sep 2018 20:05:00 -0700

> Quoting Christian Einfeldt (einfeldt at gmail.com):
>
>> Hi,
>>
>> I recently picked up a second-hand Macmice Miceflex [...]
>
> Correct spelling:  'MicFlex'.
>
> Lordie, Christian.  Haven't you figured out, after all these years, that
> careless typos in your diagnostic data can prevent people from helping you?
>
>
>> [...] USB desktop external microphone and have been trying to get it
>> working under Lubuntu 14.04.  It seems that my system is not seeing
>> it.  The mic is known good, because a friend gave it too me and was
>> using it with a Windows machine.
>>
>> me at mycomputer:~$ lsusb
>> Bus 002 Device 004: ID 413c:2003 Dell Computer Corp. Keyboard
>> Bus 002 Device 003: ID 046d:c00e Logitech, Inc. M-BJ58/M-BJ69 Optical Wheel
>> Mouse
>> Bus 002 Device 002: ID 8087:0024 Intel Corp. Integrated Rate Matching Hub
>> Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
>> Bus 001 Device 003: ID 0d8c:000c C-Media Electronics, Inc. Audio Adapter
>> Bus 001 Device 002: ID 8087:0024 Intel Corp. Integrated Rate Matching Hub
>> Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
>> me at mycomputer:~$
>
>
> So, I cannot help noticing that lsusb doesn't appear to list the device
> at all, not even as 'Unknown USB x.xx Device (class x)', which would be
> the default if the USB controller chip inventoried the device but then
> the kernel failed to find an entry for the probed Vendor ID:Device ID
> hexadecimal digits in /sys/kernel/debug/usb/devices .
>
> Therefore, by your account, the USB controller chip is not inventorying
> the microphone.  Which suggests to me that you have some sort of
> non-Linux problem, e.g., a hardware-level one.
>
>> I plugged the mic into a notebook running Lubuntu 18.04, and it didn't see
>> the mic either:
>>
>> me at laptop:~$ lsusb
>> Bus 002 Device 002: ID 5986:0299 Acer, Inc
>> Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
>> Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
>> Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
>> Bus 003 Device 002: ID 04ca:2007 Lite-On Technology Corp.
>> Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
>> Bus 006 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
>> Bus 005 Device 002: ID 0d8c:000c C-Media Electronics, Inc. Audio Adapter
>> Bus 005 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
>> me at laptop:~$
>
> Yeah, as I said.
>
> Given that your USB controller chip apparently isn't even seeing the
> hardware item, I'm unclear on how you think a Linux User Group mailing
> list can solve _that_ problem.
>
> As far as hardware-level USB reliabilitiy problems (which are, frankly,
> legion), start by making damned sure you plug the device directly into a
> system USB port and do _not_ try to rely on a 'USB hub'.  If lsusb
> continues to not even show the existence of an unknown USB device when
> you plug it directly into a main-system USB port, try the other
> main-system USB ports.  If that still produces not even low-level (e.g.,
> lsusb) recognition of the device's existence, I don't know what to tell
> you except that your assertion that the device is known-good is subject
> to question.
>
> Please note that your choice of Linux distribution is not particularly
> relevant to this problem.  Your _kernel_ is relevant, because that
> determines what vintage of usb.ids database it has.
>
> Here is the very latest USB IDs database release, from the middle of
> last month: http://www.linux-usb.org/usb.ids   I see nothing by the
> indicated name, but of course they may well be OEMing something made by
> a different company.  If you want to produce some useful information,
> get this device's USB ID, e.g., on the MS-Windows installation of your
> 'friend'.  Assuming, of course, the thing is still working.




#!/bin/sh
progname=$(basename $0) || exit
gotsig=
for sig in 1 2 3 15
do
     trap 'gotsig='"$sig" "$sig"
done

mytmpdir=$(mktemp -d --tmpdir "$progname".XXXXXXXXXX) || exit
trap 'rm -rf "$mytmpdir"' 0
for sig in 1 2 3 15
do
     trap 'trap - 0; rm -rf "$mytmpdir" && exit '`expr "$sig" + 128` "$sig"
done
[ x"$gotsig" = x ] || kill -"$gotsig" "$$"

lsusb -v > "$mytmpdir"/"$progname".00
echo -n "Connect USB device, then press <RETURN> when ready to continue: "
read x; unset x
lsusb -v > "$mytmpdir"/"$progname".01

diff \
"$mytmpdir"/"$progname".00 \
"$mytmpdir"/"$progname".01 |

perl -e '
     $^W=1;
     use strict;

     my $idVendor_hex=q();
     my $idVendor_name=q();
     my $idProduct_hex=q();
     my $iProduct=q();
     my $iSerial=q();
     while(<>){
         s/^> //o or next;
         chomp;
         s/[ \t]{2,}/ /go;
         s/^ +//o;
         s/ +$//o;
         if(/idVendor +0x([[:xdigit:]]{4})(?: +([^ ](?:.*[^ ])?))?$/o){
             $idVendor_hex=$1;
             $idVendor_name=$2 if defined($2);
         }elsif(/idProduct +0x([[:xdigit:]]{4})(?: +(?:[^ ](?:.*[^ ])?))?$/o){
             $idProduct_hex=$1;
         }elsif(/iProduct +\d+(?: +([^ ](?:.*[^ ])?))$/o){
             $iProduct=$1 if defined($1);
         }elsif(/iSerial +\d+(?: +([^ ]+))$/o){
             $iSerial=$1 if defined($1);
         };
     };
     print(
         join(
             "\n",
             #USB identification:
             q(USB identification:),

             #ID 05dc:a815 Lexar Media, Inc.
             q(ID ) .
             $idVendor_hex .
             q(:) .
             $idProduct_hex .
             (
                 $idVendor_name ne q()
                 ?
                     q( ) . $idVendor_name
                 :
                     q()
             ),

             #Vendor 0x05dc Lexar Media, Inc.
             q(Vendor 0x) . $idVendor_hex .
             (
                 $idVendor_name ne q()
                 ?
                     q( ) . $idVendor_name
                 :
                     q()
             ),

             #Product 0xa815 USB Flash Drive
             q(Product 0x) .
             $idProduct_hex .
             (
                 $iProduct ne q()
                 ?
                     q( ) . $iProduct
                 :
                     q()
             ),

             #Serial AA4E8BRPOSBFCDPM
             q(Serial) .
             (
                 $iSerial ne q()
                 ?
                     q( ) . $iSerial
                 :
                     q()
             ),
         ),
         "\n",
     );
'

#USB identification:
#ID 05dc:a815 Lexar Media, Inc.
#Vendor 0x05dc Lexar Media, Inc.
#Product 0xa815 USB Flash Drive
#Serial AA4E8BRPOSBFCDPM




More information about the sf-lug mailing list