![]() |
Using udev to tell Ubuntu to use the proper device on a multiple USB device
I have a USB device that contains multiple devices, the ID on it when I plug it in by default is:
Code:
Bus 005 Device 016: ID 1f28:0021Code:
Bus 005 Device 015: ID 1f28:0020~Jeff |
Does the /var/log/messages file contain references to both?
What is this device? |
Here is the output when I plug the device in and it does not display what I want:
Code:
Apr 29 11:29:43 eeetop kernel: [ 9988.157115] usb 3-1: new full speed USB device using uhci_hcd and address 3Thanks, ~Jeff |
Quote:
The linux kernel may have advanced somewhat since I first encountered this problem with a huawei USB mobile-"phone"-dongle for mobile internet access but the utility that cracked the problem for me was usb_modeswitch - use your search engine, or see here: http://www.draisberghof.de/usb_modeswitch/ The fact that your device (probably) isn't a Huawei doesn't matter, but switching its mode from appearing as a CD-ROM to becoming a functional device does. |
Yes I found that Utility, how ever it does not currently support the Cricket A600, and I could not figure out how to register for their forums, and nor could I find the developers email thusly I am here looking for a manner of manually changing the mode :/ It does auto detect as a CD rom drive on linux/windows. I just need to figure out how to have it detect as a modem by default instead of the CD drive... I wonder if they will ever include multi-device usb into linux by default... it sounds it would save alot of people (not just me) more than a few head aches. In the mean time any idea how I can go about manually changing which part of the device Ubuntu uses?
~Jeff |
"Cricket A600"
Is a manufacturer's label. We'd be better informed if you gave us the output of lsusb (from a terminal). Like this: Code:
tred@vaio:~$ lsusbWhich (Hexadecimal codes) identify your device? We are not interested in your mouse, keyboard, or whatever, just the cricket thing. usb_modeswitch needs these hex codes to identify which exact device to switch from appearing to be a CD-ROM (we don't need that) to a functional device (we do need that). Then it can (probably) switch it to a functional mode, rather than "Hello windows, I'm a CD-ROM, install the windows drivers" (which won't work with linux, because has its own loadable or built-in modules). |
I posted those IDs right off the bat here they are again:
Quote:
Also here is the out put in the /var/log/messages when I plug in the device, then connect it to my VM, and then give it back to Ubuntu so it detects as the modem again: Code:
Apr 29 14:36:42 lintop kernel: [61750.189090] usb 5-1: new full speed USB device using uhci_hcd and address 17~Jeff |
Oh!
So NOW you tell us you are running a VM ("Virtual Machine" Yes ?) This makes a BIG difference, and, frankly I am out of here, because running VMs introduces another thick layer of complexity and obfuscation. My suggestion is to get this hardware running on a real machine, then troubleshoot for the virtual machine. One step at a time. Good luck. |
Quote:
The Cricket device needed to be activated on a Windows/OSX system before it can be used. I do not have Windows installed on any of my computers other than as a VM, so I loaded up the VM installed the Cricket software on it and registered the Modem on it - and the modem works just perfectly on the Windows VM. After I unassigned the Modem from the VM (giving control of it back to Ubuntu) it worked just fine. How ever the next time I plugged it in it did not display in my network manager as it had after being attached to the VM. So out of curiosities sake I loaded the VM back up - assigned control of the USB device to the VM for a moment and then promptly gave it back to Ubuntu - lo and behold after doing this the modem once more appeared in my network manager as a broadband modem. This little dance if fine and dandy for my G1Sn, how ever my EEE PC does not support vitalisation, so I need to figure out how to get it to display properly WITHOUT first having to attach and then un-attach the device to a Windows VM. Also if you look at the top the hexadecimal output number of the modem is different on Ubuntu before/after it has been attached to the Windows VM. Sorry if I was not very clear at first - hope you can still help me some. The device is up and working fine on Windows (VM and otherwise - tried a friend's laptop) how ever it only shows up in my Ubuntu network manager after having been attached and un-attached from a Windows VM I have running on my Ubuntu system. If I need more clarification please let me know. Thanks, ~Jeff |
Quote:
First of all I do not use VMs, so I cannot offer much help, but ..... Some hints though (you'll have to do your own research, because this is outside my experience): Some devices need firmware uploading to them at boot time, or they don't work. If you power them off you'll be back at square one. If one of your VMs (windows?) is uploading the firmware to your device, and making it work then so be it. You need to identify what it is that is being uploaded to the device to make it work. Some background: Some Realtek ethernet chipsets will not work with linux unless the user has first booted to windows, then rebooted (without powering-off) to linux. The bottom line is that something has to be uploaded to the chipset to make it work. this is the "firmware". If it is not installed to the device, it will not work. Quote:
usb_modeswitch can do this for you. But you may need something in /usr/lib/firmware for it to upload. Sorry, but I cannot help you further for now. |
Thanks for the info tredegar, any one have any idea how I can go about getting my cricket to work with usb-modeswitch or how I can manually do what ever it is modeswitch does to change the "mode" of the device? I haven't had to dual boot in almost 6 months but if I can't get this device working under Ubuntu I'm going to have to clutter my Netbook's SSD with a Windows partition bleh
~Jeff |
So I have been reading the documentation on the usb-modeswitch site and this is what I have attempted to add to my usb_modeswitch.conf:
Code:
DefaultVendor = 0x1f28Code:
jeff@lintop:~$ sudo /sbin/usb_modeswitch -c /etc/usb_modeswitch.conf~Jeff |
You may not be sending it the correct MessageContent string. Where did you get that string from?
The link I gave you in post #4 has a link to this page: http://blogger.ziesemer.com/2008/10/...do-ubuntu.html Where Mark Ziesemer explains how to use usbsnoop to grab the string which is needed. You should try that. |
That is the correct message string (I triple checked it being so long) I used USBSnoop to find that value. Any other ideas what I might be doing wrong?
~Jeff |
Quote:
To get my Huawei to cease being a "CD-ROM" and become a mobile-phone modem, I had to issue two commands: Code:
/sbin/usb_modeswitch -v 12d1 -p 1001 -d 1See here: Code:
tred@vaio:~$ usb_modeswitch -hOtherwise, can you post the output of usbsnoop as in Mark Ziesemer's page? Maybe there's something you have missed. I am not sure what this means: "Looking for active driver ... No driver found. Either detached before or never attached" Is it worth taking a peek (gulp!) at the source code to see if that gives some idea of what modeswitch is trying to do? Can you read the "CD-ROM" when it is first plugged in? Any useful information there? Do other USB devices work OK for you? Don't give up. That Huawei device nearly drove me crazy, but I cracked the problem in the end, and (upon reflection) it was a useful "learning experience" in that I had to get to grips with things I had shied away from, like writing udev rules and .... |
| All times are GMT -5. The time now is 02:44 AM. |