LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Hardware (https://www.linuxquestions.org/questions/linux-hardware-18/)
-   -   Using udev to tell Ubuntu to use the proper device on a multiple USB device (https://www.linuxquestions.org/questions/linux-hardware-18/using-udev-to-tell-ubuntu-to-use-the-proper-device-on-a-multiple-usb-device-722469/)

Jeff91 04-30-2009 02:08 PM

Yea I am hoping to get this resolved eventually... here a full dump of USBSnoop 2.0 on a separate XP system. Its rather lengthy so I pasted it here Maybe I am just reading the info wrong. When USB Snoop detects the cricket devices it sees it as a whole pile of entries not just one or two: http://i44.tinypic.com/ixgpyt.jpg

Should I be tracking all of them?

~Jeff

Jeff91 04-30-2009 10:18 PM

I'm making progress...

So I did some testing myself and I got it to switch the product ID value properly switch to 0x0020 how ever it is still not displaying as a modem in my Network Manager like it should. Here are the settings I have set in my usb_modeswitch.conf:
Code:

DefaultVendor = 0x1f28
DefaultProduct = 0x0021

#TargetVendor = 0x1f28
#TargetProduct = 0x0020

TargetClass = 2

#DetachStorageOnly = 1

MessageEndpoint = 0x08
MessageContent = "55534243b82e238c24000000800108df200000000000000000000000000000"

Any idea what I am still doing wrong? Also as a side note here in addition to displaying the correct # in lsusb output it is lighting up on the physical modem with single strength like it should - it is just still not showing up in network manager.

~Jeff

Jeff91 05-01-2009 07:45 PM

I am so close to getting this to work... Here is where I am at now.

Ok I've figured out what the VM Attachment is doing differently that modeswitch is not and thusly ending up not getting detected my network manager.

Here are the dmesg out puts from each different method:

Using modeswitch:
Quote:

Originally Posted by modeswitch
[ 2090.297149] usb 5-1: USB disconnect, address 7
[ 2095.381087] usb 5-1: new full speed USB device using uhci_hcd and address 8
[ 2095.542716] usb 5-1: configuration #1 chosen from 1 choice
[ 2095.561887] cdc_acm 5-1:1.0: ttyACM0: USB ACM device
[ 2095.584503] scsi14 : SCSI emulation for USB Mass Storage devices
[ 2095.593182] usb-storage: device found at 8
[ 2095.593189] usb-storage: waiting for device to settle before scanning
[ 2100.595227] usb-storage: device scan complete
[ 2100.598272] scsi 14:0:0:0: Direct-Access Cricket T-Flash Disk 2.31 PQ: 0 ANSI: 2
[ 2100.612027] sd 14:0:0:0: [sdb] Attached SCSI removable disk
[ 2100.612266] sd 14:0:0:0: Attached scsi generic sg2 type 0

When attaching it to the VM it is the same for the first few lines but there are a few additional pieces of information added to the end:
Quote:

Originally Posted by VM
[ 2222.481109] usb 5-1: USB disconnect, address 9
[ 2227.644444] usb 5-1: new full speed USB device using uhci_hcd and address 10
[ 2227.808783] usb 5-1: configuration #1 chosen from 1 choice
[ 2227.821393] cdc_acm 5-1:1.0: ttyACM0: USB ACM device
[ 2227.842551] scsi16 : SCSI emulation for USB Mass Storage devices
[ 2227.856703] usb-storage: device found at 10
[ 2227.856713] usb-storage: waiting for device to settle before scanning
[ 2232.861221] usb-storage: device scan complete
[ 2232.864160] scsi 16:0:0:0: Direct-Access Cricket T-Flash Disk 2.31 PQ: 0 ANSI: 2
[ 2232.878730] sd 16:0:0:0: [sdb] Attached SCSI removable disk
[ 2232.879350] sd 16:0:0:0: Attached scsi generic sg2 type 0
[ 2326.952077] usb 5-1: reset full speed USB device using uhci_hcd and address 10
[ 2327.162365] scsi17 : SCSI emulation for USB Mass Storage devices
[ 2327.166525] cdc_acm 5-1:1.0: ttyACM0: USB ACM device
[ 2327.166552] usb-storage: device found at 10
[ 2327.166557] usb-storage: waiting for device to settle before scanning

Excluding a few ID numbers (from the device getting added/removed from different tests) the are identical outputs up until after "type 0" Is there a way I can get modeswitch to force those extra few commands the VM does should I be looking for a different program to perform this task?

~Jeff Hoogland

Jeff91 05-02-2009 09:00 AM

For anyone else that might be having this same issue I was able to solve it and posted a quick how to here: http://ubuntuforums.org/showthread.p...40#post7197740

~Jeff

The Don 08-20-2009 02:39 AM

Problem with Hauwei ec168c modem
 
I have the same problem in that modeswitch want to load a driver but none found. Please, what is wrong?

Thanx
The Don

tredegar 08-20-2009 12:10 PM

@Jeff91
Sorry for my lack of follow-ups to your problem but I had some problems with the LQ new post notification system (now resolved by Jeremy) and therefore missed some follow-up posts.
Glad you got it working and thanks for posting the link to your solution over on the ubuntu forums.

@The DON
We need more information please.

See Jeff91's earlier posts in this thread for the information needed (your hardware, distro, the output of lsusb etc.)

Did you read jeff91's post linked above in #19 ? There's a long discussion over there, which covers pretty much everything.

Edit:
I just noticed the title of this thread is "Using udev to tell Ubuntu to use the proper device on a multiple USB device"

I solved that like this for my Huawei:

Code:

tred@vaio:~$ cat /etc/udev/rules.d/99-sc-huawei-e169g.rules
SUBSYSTEM=="usb" SYSFS{idProduct}=="1001", SYSFS{idVendor}=="12d1", RUN+="/usr/sbin/e169g-switch"


tred@vaio:~$ cat /usr/sbin/e169g-switch
#!/bin/bash
# Switch off the CD rom, start modem-mode
/sbin/usb_modeswitch -v 12d1 -p 1001 -d 1
/sbin/usb_modeswitch -v 12d1 -p 1001 -H 1
echo Huawei-E169G switched to Modem Mode >> /var/log/messages
exit 0
tred@vaio:~$

Obviously, you'll need to change Vendor and Product ID's to suit your device if you are not using a Huawei E169G. You'll see these listed in the output of lsusb when you have plugged your device in.
/Edit


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