[SOLVED] usb_modeswitch not working; lsusb indicate "unable to initialize libusb: -99"; howto?
Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Introduction to Linux - A Hands on Guide
This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.
Click Here to receive this Complete Guide absolutely free.
usb_modeswitch not working; lsusb indicate "unable to initialize libusb: -99"; howto?
by connecting a usb gsm modem on a selfbuild kernel, the usb is recognized because dmesg show messages like "New USB device found, idVendor=0af0, idProduct=7a01.." but usb_modeswitch say "No devices in default mode found.." and the modem is not modeswitched. The command lsusb gives "unable to initialize libusb: -99".
A question would be: is there any possibility to modeswitch a usb modem (a standard distro like ubuntu-kernel see a CD-ROM.. and usb_modeswitch works) which is not recognized as CDROM by the kernel? My current feeling is that I have to build a kernel which must recognize CDROM.. before I can modeswitch it. The only problem, is that it will make my kernel bigger.
Any idea/proposal is welcome.
The last status is indicated below.
There are curious messages from the kernel and lsusb still dont work.
Any new idea what should be done is welcome.
[ 8159.390616] hub 1-0:1.0: state 7 ports 2 chg 0000 evt 0002 [ 8159.390720] ppc-of-ohci f0001000.usb: GetStatus roothub.portstatus  = 0x00010101 CSC PPS CCS
[ 8159.390825] hub 1-0:1.0: port 1, status 0101, change 0001, 12 Mb/s
[ 8159.494590] hub 1-0:1.0: debounce: port 1: total 100ms stable 100ms status 0x101 [ 8159.556603] ppc-of-ohci f0001000.usb: GetStatus roothub.portstatus  = 0x00100103 PRSC PPS PES CCS
[ 8159.607668] usb 1-1: new full-speed USB device number 3 using ppc-of-ohci [ 8159.677683] ppc-of-ohci f0001000.usb: GetStatus roothub.portstatus  = 0x00100103 PRSC PPS PES CCS
[ 8159.749170] usb 1-1: default language 0x0409
[ 8159.755181] usb 1-1: udev 3, busnum 1, minor = 2
[ 8159.755233] usb 1-1: New USB device found, idVendor=0af0, idProduct=7a01
[ 8159.762348] usb 1-1: New USB device strings: Mfr=3, Product=2, SerialNumber=4
[ 8159.769830] usb 1-1: Product: Globetrotter HSUPA Modem
[ 8159.775261] usb 1-1: Manufacturer: Option N.V.
[ 8159.779977] usb 1-1: SerialNumber: Serial Number
[ 8159.786807] usb 1-1: usb_probe_device
[ 8159.786863] usb 1-1: configuration #1 chosen from 1 choice
[ 8159.791317] usb 1-1: adding 1-1:1.0 (config #1, interface 0)
[ 8159.793143] hso 1-1:1.0: usb_probe_interface
[ 8159.793220] hso 1-1:1.0: usb_probe_interface - got id
[ 8159.795153] hso 1-1:1.0: Not our interface
[ 8159.800523] usb-storage 1-1:1.0: usb_probe_interface
[ 8159.800801] usb-storage 1-1:1.0: usb_probe_interface - got id
[ 8159.802516] scsi1 : usb-storage 1-1:1.0
[ 8159.809931] hub 1-0:1.0: state 7 ports 2 chg 0000 evt 0002
[ 8160.818460] scsi 1:0:0:0: CD-ROM ZCOption HSUPA Modem PQ: 0 ANSI: 2 [ 8160.843042] ppc-of-ohci f0001000.usb: urb c7a679e0 path 1 ep1in 40120000 cc 4 --> status -32
[ 8160.853361] sr0: scsi-1 drive
[ 8160.860048] sr 1:0:0:0: Attached scsi CD-ROM sr0
[ 8160.863591] sr 1:0:0:0: Attached scsi generic sg0 type 5 [ 8160.871028] ppc-of-ohci f0001000.usb: urb c7a679e0 path 1 ep1in 40120000 cc 4 --> status -32
[root@rtux-v4 usbgsm]# export LIBUSB_DEBUG=3
[root@rtux-v4 usbgsm]# lsusb libusb: 0.000000 error [op_init] could not find usbfs
unable to initialize libusb: -99
[root@rtux-v4 usbgsm]# usb_modeswitch -c /etc/switchicon.conf Looking for target devices ...
No devices in target mode or class found
Looking for default devices ...
No devices in default mode found. Nothing to do. Bye.
Last edited by floppy_stuttgart; 06-19-2013 at 07:40 AM.
I had 2 issues:
a) a kernel without the modules recognition
b) a non working libusb (necessary for a working usb_modeswitch)
a) I made a new kernel with the required modules for recognizing the CDROM
b) I bought a HUAWEI E220 which dont need usb_modeswitch.