PoiNtEr->: Reset USB Modem on Ubuntu without ejecting it!!

                             Difference between a dream and an aim. A dream requires soundless sleep, whereas an aim requires sleepless efforts.

Search This Blog

Sunday, April 24, 2011

Reset USB Modem on Ubuntu without ejecting it!!



$ lsusb
This will print out all USB devices connected system bus:

Bus 005 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub                                                 
Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub                                                 
Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub                                                 
Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub                                                 
Bus 001 Device 007: ID 19d2:1010 ONDA Communication S.p.A.                                                     
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
In my case the line:
Bus 001 Device 007: ID 19d2:1010 ONDA Communication S.p.A.  
is my Vodafone USB mobile broadband device, where 19d2 is vendor ID and 1010 is product ID. Now that we have this information we can attempt to reset it with usb_modeswitch. Switch to root and execute the following command with the information you retrieved previously:
# usb_modeswitch -R -v 19d2 -p 1010
Output:
Looking for default devices ...                                                                                
 Found devices in default mode or class (1)                                                                    
Accessing device 007 on bus 001 ...                                                                            
Using endpoints 0x01 (out) and 0x81 (in)                                                                       
Using endpoints 0x01 (out) and 0x81 (in)                                                                       
Not a storage device, skipping SCSI inquiry                                                                    
                                                                                                               
USB description data (for identification)                                                                      
-------------------------                                                                                      
Manufacturer: Vodafone (ZTE)                                                                                   
     Product: Vodafone Mobile Broadband K3571-Z                                                                
  Serial No.: P680A8VDFD000000                                                                                 
-------------------------                                                                                      
Warning: no switching method given.                                                                            
Resetting usb device .                                                                                         
 OK, device was reset                                                                                          
-> Run lsusb to note any changes. Bye

No comments:

Post a Comment