Add udev rules for Sony MD300 GSM modem

Bug #451787 reported by Laudeci Oliveira
48
This bug affects 6 people
Affects Status Importance Assigned to Milestone
usb-modeswitch-data (Ubuntu)
Fix Released
Medium
Didier Raboud
Nominated for Karmic by J Queiroz

Bug Description

Binary package hint: udev

The device only mount itself as storage device and not modem as showed below:

Aug 31 17:43:57 karnak kernel: [15172.628046] usb 3-1: new full speed USB device using uhci_hcd and address 9
Aug 31 17:43:58 karnak kernel: [15172.857193] usb 3-1: configuration #1 chosen from 3 choices
Aug 31 17:43:58 karnak kernel: [15172.866266] scsi8 : SCSI emulation for USB Mass Storage devices
Aug 31 17:44:03 karnak kernel: [15177.868953] scsi 8:0:0:0: Direct-Access SEMC MMC Flash Card 0 PQ: 0 ANSI: 0
Aug 31 17:44:03 karnak kernel: [15177.869428] sd 8:0:0:0: Attached scsi generic sg2 type 0
Aug 31 17:44:03 karnak kernel: [15177.875914] sd 8:0:0:0: [sdb] 348161 512-byte logical blocks: (178 MB/170 MiB)
Aug 31 17:44:03 karnak kernel: [15177.883917] sd 8:0:0:0: [sdb] Test WP failed, assume Write Enabled
Aug 31 17:44:03 karnak kernel: [15177.899906] sd 8:0:0:0: [sdb] Test WP failed, assume Write Enabled
Aug 31 17:44:03 karnak kernel: [15177.899915] sdb: sdb1
Aug 31 17:44:03 karnak kernel: [15177.907935] sdb: p1 size 348161 exceeds device capacity, limited to end of disk
Aug 31 17:44:03 karnak kernel: [15177.923542] sd 8:0:0:0: [sdb] Test WP failed, assume Write Enabled
Aug 31 17:44:03 karnak kernel: [15177.923554] sd 8:0:0:0: [sdb] Attached SCSI removable disk
Aug 31 17:44:34 karnak kernel: [15209.112063] usb 3-1: reset full speed USB device using uhci_hcd and address 9
Aug 31 17:45:05 karnak kernel: [15240.112061] usb 3-1: reset full speed USB device using uhci_hcd and address 9

Using a custom udev rule the GSM modem is mounted instead of the storage device

ACTION!="add", GOTO="3G_End"
SUBSYSTEMS=="usb", ATTRS{idVendor}=="0fce", ATTRS{idProduct}=="d0cf", RUN+="/bin/sh -c 'echo 3 > /sys/$env{DEVPATH}/bConfigurationValue'"
LABEL="3G_End"

When plugged angain:

Oct 14 21:31:28 karnak kernel: [10198.824770] usb 2-1: new full speed USB device using uhci_hcd and address 2
Oct 14 21:31:28 karnak kernel: [10199.064173] usb 2-1: configuration #1 chosen from 3 choices
Oct 14 21:31:28 karnak kernel: [10199.191085] Initializing USB Mass Storage driver...
Oct 14 21:31:28 karnak kernel: [10199.191192] usbcore: registered new interface driver usb-storage
Oct 14 21:31:28 karnak kernel: [10199.191195] USB Mass Storage support registered.
Oct 14 21:31:28 karnak kernel: [10199.194829] cdc_wdm 2-1:3.5: cdc-wdm0: USB WDM device
Oct 14 21:31:28 karnak kernel: [10199.194866] cdc_wdm 2-1:3.6: cdc-wdm1: USB WDM device
Oct 14 21:31:28 karnak kernel: [10199.194903] cdc_wdm 2-1:3.7: cdc-wdm2: USB WDM device
Oct 14 21:31:28 karnak kernel: [10199.194938] cdc_wdm 2-1:3.8: cdc-wdm3: USB WDM device
Oct 14 21:31:28 karnak kernel: [10199.194956] usbcore: registered new interface driver cdc_wdm
Oct 14 21:31:28 karnak kernel: [10199.200590] cdc_acm 2-1:3.1: ttyACM0: USB ACM device
Oct 14 21:31:28 karnak kernel: [10199.235028] cdc_acm 2-1:3.3: ttyACM1: USB ACM device
Oct 14 21:31:28 karnak kernel: [10199.238170] usbcore: registered new interface driver cdc_acm
Oct 14 21:31:28 karnak kernel: [10199.238176] cdc_acm: v0.26:USB Abstract Control Model driver for USB modems and ISDN adapters
Oct 14 21:31:28 karnak kernel: [10199.268928] usb0: register 'cdc_ether' at usb-0000:00:1d.0-1, CDC Ethernet Device, 02:80:37:05:03:00
Oct 14 21:31:28 karnak kernel: [10199.268963] usbcore: registered new interface driver cdc_ether

Futher info:

pretto@karnak:~$ lsb_release -rd
Description: Ubuntu karmic (development branch)
Release: 9.10

pretto@karnak:~$ apt-cache policy udev
udev:
  Installed: 147~-5
  Candidate: 147~-5
  Version table:
 *** 147~-5 0
        500 http://archive.ubuntu.com karmic/main Packages
        100 /var/lib/dpkg/status

Revision history for this message
Alexander Sack (asac) wrote :

i got reports from a few sides that the udev modemswitcher seems to be not working so great atm. same for bug 450237 ... though the dmesg looks different - which means it might be completely unrelated. unless martin has some idea i will probably look whats going on with our udev rules.

Changed in udev (Ubuntu):
status: New → Confirmed
Revision history for this message
Martin Pitt (pitti) wrote :

This device is already covered in 77-mm-ericsson-mbm.rules

ATTRS{idVendor}=="0fce", ATTRS{idProduct}=="d0cf", ENV{ID_MM_ERICSSON_MBM}="1"

Alex, do you know what evaluates this? Is that modem-manager? Is anything in modemmanager doing something similar to

  echo 3 > /sys/$env{DEVPATH}/bConfigurationValue

?

Revision history for this message
Laudeci Oliveira (laudeci) wrote : Re: [Bug 451787] Re: Add udev rules for Sony MD300 GSM modem

The bConfigurationValue was found inspecting the result of the command $
lsusb -v -s 003:004.

Notice that bConfigurationValue is used by the WMC Device of the modem with
values 2 and 3, both works.

I dont know the meaning of then but i found info that it is related to comm
ports here http://www.mcci.com/mcci-v5/hostside/usb_drivers_wmc.html

The observation showed that bConfigurationValue=1 always mount the sdb
device, so, trying the values 2 or 3 found on lsub worked to mount it as
modem.

Sorry about my poor knowledge, I hope that it helps.

---------------------------------------------------------------------------------------------------------------------------
Laudeci Oliveira
Official Ubuntu Member
Red Hat Certified Technician
Microsoft Certified Professional
Microsoft Certified Trainer
Tecnólogo em Sistema de Informação

2009/10/20 Martin Pitt <email address hidden>

> This device is already covered in 77-mm-ericsson-mbm.rules
>
> ATTRS{idVendor}=="0fce", ATTRS{idProduct}=="d0cf",
> ENV{ID_MM_ERICSSON_MBM}="1"
>
> Alex, do you know what evaluates this? Is that modem-manager? Is
> anything in modemmanager doing something similar to
>
> echo 3 > /sys/$env{DEVPATH}/bConfigurationValue
>
> ?
>
> --
> Add udev rules for Sony MD300 GSM modem
> https://bugs.launchpad.net/bugs/451787
> You received this bug notification because you are a direct subscriber
> of the bug.
>

Revision history for this message
Laudeci Oliveira (laudeci) wrote :

The bConfigurationValue was found inspecting the result of the command $ lsusb -v -s 003:004.

Notice that bConfigurationValue is used by the WMC Device of the modem with values 2 and 3, both works.

I dont know the meaning of then but i found info that it is related to comm ports here http://www.mcci.com/mcci-v5/hostside/usb_drivers_wmc.html

The observation showed that bConfigurationValue=1 always mount the sdb device, so, trying the values 2 or 3 found on lsub worked to mount it as modem.

Sorry about my poor knowledge, I hope that it helps.

Revision history for this message
Mauro De Lucca (pcniatic) wrote :

I did modify ENV{ID_MM_ERICSSON_MBM} value to "2" on file 77-mm-ericsson-mbm.rules and it seems to have the same effect.

Revision history for this message
Sergio Zanchetta (primes2h) wrote :

Could this issue be the same as bug #492772 (MD400)?

Changed in udev (Ubuntu):
importance: Undecided → Medium
Revision history for this message
Sergio Zanchetta (primes2h) wrote :

Thank you for taking the time to report this bug and helping to make Ubuntu better. The issue that you reported is one that should be reproducible with the live environment of the Desktop CD of the development release - Lucid Lynx. It would help us greatly if you could test with it so we can work on getting it fixed in the next release of Ubuntu. You can find out more about the development release at http://www.ubuntu.com/testing/ . Thanks again and we appreciate your help.

Martin Pitt (pitti)
affects: udev (Ubuntu) → usb-modeswitch (Ubuntu)
Revision history for this message
Didier Raboud (odyx) wrote :

Hi,

maverick's version of usb-modeswitch-data contains the switching configuration for this device. You need usb-modeswitch and usb-modeswitch-data from maverick and it should just work.

Revision history for this message
Didier Raboud (odyx) wrote :

Fixed in 20100418-1 (see Debian changelog)

Changed in usb-modeswitch (Ubuntu):
assignee: nobody → Didier Raboud (odyx)
status: Confirmed → Fix Committed
Didier Raboud (odyx)
affects: usb-modeswitch (Ubuntu) → usb-modeswitch-data (Ubuntu)
Didier Raboud (odyx)
Changed in usb-modeswitch-data (Ubuntu):
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.