LinuxQuestions.org
Visit the LQ Articles and Editorials section
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware
User Name
Password
Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?

Notices

Reply
 
Search this Thread
Old 10-11-2011, 09:20 PM   #1
Lividium
LQ Newbie
 
Registered: Sep 2011
Posts: 8

Rep: Reputation: Disabled
USB Device recognized as a CD


First off, I hope I put this in the correct forum, it was a toss up between this one and the mobile forum.

I am running Ubuntu 11.04 and I recently purchased a ZTE MF60 mobile hot spot. When I plug the device in with the USB cable Ubuntu automatically recognizes the device as a CD drive instead of a USB Device so it won't connect as to the internet as intended. My question is, How would I go about making the Ubuntu recognize the device as a USB drive? Any help would be appreciated, Thank you in advance.
 
Old 10-11-2011, 09:25 PM   #2
MS3FGX
Guru
 
Registered: Jan 2004
Location: NJ, USA
Distribution: Slackware, Debian
Posts: 5,852

Rep: Reputation: 351Reputation: 351Reputation: 351Reputation: 351
Sounds like you will want to check out USB_ModeSwitch to start with.
 
Old 10-11-2011, 11:21 PM   #3
Lividium
LQ Newbie
 
Registered: Sep 2011
Posts: 8

Original Poster
Rep: Reputation: Disabled
This looks like exactly what I need. Thank you, MS3FGX. I will check it and let you know as soon as I get off of work.
 
Old 10-12-2011, 09:45 AM   #4
Lividium
LQ Newbie
 
Registered: Sep 2011
Posts: 8

Original Poster
Rep: Reputation: Disabled
Well, that was a bust. I already had USB_modeswitch loaded on my machine. I was reading on the Draisberghof page and found this:

Quote:
There is a problematic handling of devices with ID 19d2:2000 in kernels 2.6.26 to 2.6.28. This affects mostly ZTE devices and makes the "usb-storage" driver ignore the ID. In turn this will prevent proper initialization and may cause switching to fail. There is no other way around this than compiling your own kernel with some tiny edits. See Kernel related issues below for details.
I am currently running 2.6.38-11 but sure enough after doing a lsusb I found that the device is coming up as 19d2:2000. The Draisberghof page is also saying that:

Quote:
In some newer kernels, certain device families (some Option, some Huawei, some ZTE as mentioned above) get a special treatment in the usb-storage code to enable switching right away. You would not need USB_ModeSwitch anymore for these specific dvices; on the other hand you have no choice of accessing the "CD-ROM" part of your device. Plus, there were cases when the special treatment brought no results and furthermore prevented USB_ModeSwitch to work properly afterwards (happened with ZTE devices, error "-2").

In case of trouble, look into "unusual_devs.h" in the "drivers/usb/storage" folder of your kernel source. If your default ID (vendor and product ID of the storage part) can be found there and you get errors when running USB_ModeSwitch, try first to blacklist "usb-storage".
If that helps, you should consider rebuilding your kernel with the entry in "unusual_devs.h" deactivated. The only thing that will happen is that usb-storage works in the default way afterwards.
I am not sure where to find the source code for Ubuntu, and I have never compiled a modified kernel. If anyone has any ideas before I do something rash and go compiling all willie-nillie, they would be greatly appreciated.
 
Old 10-12-2011, 11:18 AM   #5
business_kid
Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware & Android
Posts: 6,167

Rep: Reputation: 526Reputation: 526Reputation: 526Reputation: 526Reputation: 526Reputation: 526
2.6.28 is quite old. You probably want to dodge regressions, but you should be able to upgrade somewhat. Compiling your first kernel is one of those things that makes solitary confinement seem appealing ;-).
Coming from 2.6.28, get a kernel source,

ftp.xx.kernel.org where xx is your country code if outside the US
(I would go with 2.6. 32-35 if you have nvidia and 34-37 if you have ATI. Get the source in /usr/src/linux-version

The untold trick is to turn on all peripherals, load everything and run
make oldconfig which reduces questions, and then
make localmodconfig which configures for your devices. Have fun
 
Old 10-13-2011, 05:35 AM   #6
Lividium
LQ Newbie
 
Registered: Sep 2011
Posts: 8

Original Poster
Rep: Reputation: Disabled
I am already running 2.6.38-11, when I get off of work I will have to find a "how to" on building a kernel, but I do appreciate the turn on all peripherals trick. I am almost positive that I can find something on that here. Thank you Buisness Kid.
 
Old 10-13-2011, 12:46 PM   #7
business_kid
Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware & Android
Posts: 6,167

Rep: Reputation: 526Reputation: 526Reputation: 526Reputation: 526Reputation: 526Reputation: 526
You have a kernel version problem. In addition, there was some power regression for 2.6.38.x and nvidia blobs gave trouble or are no longer supported or something.

I've done very well with 2.6.37.6. All the good stuff seems to be in. All the regressions are out.
Mind you, others _watch_ this stuff, experiment with 3.0 and generally bleed on the bleeding edge.
 
Old 10-16-2011, 10:14 PM   #8
oldscratch
LQ Newbie
 
Registered: Apr 2008
Location: South Carolina
Distribution: Red Hat, Scientific Linux, CentOS, and Ubuntu
Posts: 27

Rep: Reputation: 13
If you already have usb_modeswitch installed, try this with the modem attached (be sure to give it a minute or two to recognize the modem after you insert it):

Quote:
sudo `lsusb | sed -r "s/.*ID\ (.*).*)\ Huawei.*$/usb_modeswitch -v 0x\1 -p0x\2 -H 1/" | grep usb_modeswitch`
I have no earthly idea how to make the above line display without the danged smiley face on this forum, so I put the command here, too: http://www.allpoints.net/fixhuawei.txt

That should create a usb_modeswitch command with the right parameters. Works for me with a Huawei E270 on Scientific Linux 6.0, kernel 2.6.32-131.2.1.el6.x86_64

If you want to just see the command rather than build it and run it, drop the backtick (`) characters at the beginning and end. In my case, that gives this:

usb_modeswitch -v 0x12d1 -p0x1003 -H 1

Solved my problem immediately.

Good luck.

JP

Last edited by oldscratch; 10-18-2011 at 10:13 AM. Reason: added a link because I can't get rid of the smiley face in the command I posted
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
USB Device Not Recognized ashields124 Linux - Newbie 6 07-11-2011 10:25 PM
Not recognized USB device iiiren Linux - Hardware 1 11-08-2009 04:28 AM
Mounting a recognized USB device harisund Linux - Hardware 2 09-24-2005 08:07 AM
USB device not recognized Greek Acrobat Slackware 5 07-25-2005 11:30 AM
why is usb device recognized? kangaman Linux - Hardware 1 10-27-2004 11:05 AM


All times are GMT -5. The time now is 06:22 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration