After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 608668 - nm uses ttyUSB1 instead of ttyUSB2 with 3g modem 1c9e:9000
nm uses ttyUSB1 instead of ttyUSB2 with 3g modem 1c9e:9000
Status: RESOLVED FIXED
Product: NetworkManager
Classification: Platform
Component: ModemManager
unspecified
Other Linux
: Normal normal
: ---
Assigned To: Dan Williams
Depends on:
Blocks:
 
 
Reported: 2010-02-01 10:49 UTC by dav2dev
Modified: 2010-02-25 18:31 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description dav2dev 2010-02-01 10:49:55 UTC
3g modem Alcatel One touch X020 (aka OT-X020, aka "MBD-100HU", aka "Nuton 3.5G", aka "Emobile D11LC") uses /dev/ttyUSB2 to connect to Internet, but nm tries to use /dev/ttyUSB1 instead, failing to connect. 


I can indeed connect using wvdial with the option "Modem = /dev/ttyUSB2":
Feb  1 11:10:19 bloom pppd[6426]: pppd 2.4.5 started by dav2dev, uid 1003
Feb  1 11:10:19 bloom pppd[6426]: speed 920600 not supported
Feb  1 11:10:19 bloom NetworkManager:    SCPlugin-Ifupdown: devices added (path: /sys/devices/virtual/net/ppp0, iface: ppp0)
Feb  1 11:10:19 bloom NetworkManager:    SCPlugin-Ifupdown: device added (path: /sys/devices/virtual/net/ppp0, iface: ppp0): no ifupdown configuration found.
Feb  1 11:10:19 bloom pppd[6426]: Using interface ppp0
Feb  1 11:10:19 bloom pppd[6426]: Connect: ppp0 <--> /dev/ttyUSB2
Feb  1 11:10:19 bloom pppd[6426]: PAP authentication succeeded
Feb  1 11:10:21 bloom pppd[6426]: Could not determine remote IP address: defaulting to 10.64.64.64
Feb  1 11:10:21 bloom pppd[6426]: Cannot determine ethernet address for proxy ARP
Feb  1 11:10:21 bloom pppd[6426]: local  IP address 151.81.9.8
Feb  1 11:10:21 bloom pppd[6426]: remote IP address 10.64.64.64
Feb  1 11:10:21 bloom pppd[6426]: primary   DNS address 193.70.152.25
Feb  1 11:10:21 bloom pppd[6426]: secondary DNS address 193.70.192.25



 
nm log :
Feb  1 11:07:06 bloom modem-manager: (ttyUSB1) opening serial device...
Feb  1 11:07:06 bloom modem-manager: (ttyUSB1): probe requested by plugin 'Longcheer'
Feb  1 11:07:06 bloom modem-manager: (ttyUSB2) opening serial device...
Feb  1 11:07:06 bloom modem-manager: (ttyUSB2): probe requested by plugin 'Longcheer'
Feb  1 11:07:08 bloom modem-manager: (ttyUSB1) closing serial device...
Feb  1 11:07:08 bloom modem-manager: (Longcheer): GSM modem /sys/devices/pci0000:00/0000:00:1d.7/usb1/1-8 claimed port ttyUSB1
Feb  1 11:07:08 bloom modem-manager: Added modem /sys/devices/pci0000:00/0000:00:1d.7/usb1/1-8
Feb  1 11:07:08 bloom modem-manager: Exported modem /sys/devices/pci0000:00/0000:00:1d.7/usb1/1-8 as /org/freedesktop/ModemManager/Modems/1
Feb  1 11:07:08 bloom modem-manager: (ttyUSB2) closing serial device...
Feb  1 11:07:08 bloom modem-manager: (Longcheer): GSM modem /sys/devices/pci0000:00/0000:00:1d.7/usb1/1-8 claimed port ttyUSB2
Feb  1 11:07:08 bloom NetworkManager: <info>  (ttyUSB1): new GSM device (driver: 'generic')
Feb  1 11:07:08 bloom NetworkManager: <info>  (ttyUSB1): exported as /org/freedesktop/NetworkManager/Devices/3
Feb  1 11:07:08 bloom NetworkManager: <info>  (ttyUSB1): now managed
Feb  1 11:07:08 bloom NetworkManager: <info>  (ttyUSB1): device state change: 1 -> 2 (reason 2)
Feb  1 11:07:08 bloom NetworkManager: <info>  (ttyUSB1): deactivating device (reason: 2).
Feb  1 11:07:08 bloom NetworkManager: <info>  (ttyUSB1): device state change: 2 -> 3 (reason 0)
Feb  1 11:08:06 bloom NetworkManager: user_connection_updated_cb: assertion `old_connection != NULL' failed
Feb  1 11:08:06 bloom NetworkManager: <info>  Activation (ttyUSB1) starting connection 'Wind Non-business'
Feb  1 11:08:06 bloom NetworkManager: <info>  (ttyUSB1): device state change: 3 -> 4 (reason 0)
Feb  1 11:08:06 bloom NetworkManager: <info>  Activation (ttyUSB1) Stage 1 of 5 (Device Prepare) scheduled...
Feb  1 11:08:06 bloom NetworkManager: <info>  Activation (ttyUSB1) Stage 1 of 5 (Device Prepare) started...
Feb  1 11:08:06 bloom NetworkManager: <info>  (ttyUSB1): device state change: 4 -> 6 (reason 0)
Feb  1 11:08:06 bloom NetworkManager: <info>  Activation (ttyUSB1) Stage 1 of 5 (Device Prepare) complete.
Feb  1 11:08:07 bloom NetworkManager: <info>  Activation (ttyUSB1) Stage 1 of 5 (Device Prepare) scheduled...
Feb  1 11:08:07 bloom NetworkManager: <info>  Activation (ttyUSB1) Stage 1 of 5 (Device Prepare) started...
Feb  1 11:08:07 bloom NetworkManager: <info>  (ttyUSB1): device state change: 6 -> 4 (reason 0)
Feb  1 11:08:07 bloom NetworkManager: <info>  Activation (ttyUSB1) Stage 1 of 5 (Device Prepare) complete.
Feb  1 11:08:07 bloom modem-manager: (ttyUSB1) opening serial device...
Feb  1 11:08:07 bloom modem-manager: Modem /org/freedesktop/ModemManager/Modems/1: state changed (disabled -> enabling)
Feb  1 11:08:07 bloom modem-manager: Modem /org/freedesktop/ModemManager/Modems/1: state changed (enabling -> enabled)
Feb  1 11:08:07 bloom modem-manager: Registration state changed: 1
Feb  1 11:08:07 bloom modem-manager: Modem /org/freedesktop/ModemManager/Modems/1: state changed (enabled -> registered)
Feb  1 11:08:07 bloom modem-manager: Modem /org/freedesktop/ModemManager/Modems/1: state changed (registered -> connecting)
Feb  1 11:08:07 bloom modem-manager: Modem /org/freedesktop/ModemManager/Modems/1: state changed (connecting -> connected)
Feb  1 11:08:07 bloom NetworkManager: <info>  Activation (ttyUSB1) Stage 2 of 5 (Device Configure) scheduled...
Feb  1 11:08:07 bloom NetworkManager: <info>  Activation (ttyUSB1) Stage 2 of 5 (Device Configure) starting...
Feb  1 11:08:07 bloom NetworkManager: <info>  (ttyUSB1): device state change: 4 -> 5 (reason 0)
Feb  1 11:08:07 bloom NetworkManager: <info>  Activation (ttyUSB1) Stage 2 of 5 (Device Configure) successful.
Feb  1 11:08:07 bloom NetworkManager: <info>  Activation (ttyUSB1) Stage 3 of 5 (IP Configure Start) scheduled.
Feb  1 11:08:07 bloom NetworkManager: <info>  Activation (ttyUSB1) Stage 2 of 5 (Device Configure) complete.
Feb  1 11:08:07 bloom NetworkManager: <info>  Activation (ttyUSB1) Stage 3 of 5 (IP Configure Start) started...
Feb  1 11:08:07 bloom NetworkManager: <info>  (ttyUSB1): device state change: 5 -> 7 (reason 0)
Feb  1 11:08:07 bloom NetworkManager: <info>  Starting pppd connection
Feb  1 11:08:07 bloom NetworkManager: <debug> [1265018887.680376] nm_ppp_manager_start(): Command line: /usr/sbin/pppd nodetach lock nodefaultroute user Wind ttyUSB1 noipdefault noauth usepeerdns lcp-echo-failure 0 lcp-echo-interval 0 ipparam /org/freedesktop/NetworkManager/PPP/0 plugin /usr/lib/pppd/2.4.4/nm-pppd-plugin.so
Feb  1 11:08:07 bloom NetworkManager: <debug> [1265018887.684234] nm_ppp_manager_start(): ppp started with pid 6321
Feb  1 11:08:07 bloom NetworkManager: <info>  Activation (ttyUSB1) Stage 4 of 5 (IP6 Configure Get) scheduled...
Feb  1 11:08:07 bloom NetworkManager: <info>  Activation (ttyUSB1) Stage 3 of 5 (IP Configure Start) complete.
Feb  1 11:08:07 bloom NetworkManager: <info>  Activation (ttyUSB1) Stage 4 of 5 (IP6 Configure Get) started...
Feb  1 11:08:07 bloom NetworkManager: <info>  Activation (ttyUSB1) Stage 4 of 5 (IP6 Configure Get) complete.
Feb  1 11:08:07 bloom pppd[6321]: Plugin /usr/lib/pppd/2.4.4/nm-pppd-plugin.so loaded.
Feb  1 11:08:07 bloom pppd[6321]: pppd 2.4.5 started by root, uid 0
Feb  1 11:08:07 bloom NetworkManager:    SCPlugin-Ifupdown: devices added (path: /sys/devices/virtual/net/ppp0, iface: ppp0)
Feb  1 11:08:07 bloom NetworkManager:    SCPlugin-Ifupdown: device added (path: /sys/devices/virtual/net/ppp0, iface: ppp0): no ifupdown configuration found.
Feb  1 11:08:07 bloom pppd[6321]: Using interface ppp0
Feb  1 11:08:07 bloom pppd[6321]: Connect: ppp0 <--> /dev/ttyUSB1
Feb  1 11:08:28 bloom NetworkManager: <WARN>  pppd_timed_out(): Looks like pppd didn't initialize our dbus module
Feb  1 11:08:28 bloom NetworkManager: <info>  (ttyUSB1): device state change: 7 -> 9 (reason 14)
Feb  1 11:08:28 bloom NetworkManager: <info>  Marking connection 'Wind Non-business' invalid.
Feb  1 11:08:28 bloom NetworkManager: <info>  Activation (ttyUSB1) failed.
Feb  1 11:08:28 bloom pppd[6321]: Terminating on signal 15
Feb  1 11:08:28 bloom modem-manager: Modem /org/freedesktop/ModemManager/Modems/1: state changed (connected -> disconnecting)
Feb  1 11:08:28 bloom NetworkManager: <info>  (ttyUSB1): device state change: 9 -> 3 (reason 0)
Feb  1 11:08:28 bloom NetworkManager: <info>  (ttyUSB1): deactivating device (reason: 0).
Feb  1 11:08:29 bloom modem-manager: Modem /org/freedesktop/ModemManager/Modems/1: state changed (disconnecting -> registered)
Feb  1 11:08:30 bloom NetworkManager: <debug> [1265018910.001781] ensure_killed(): waiting for ppp pid 6321 to exit
Feb  1 11:08:30 bloom NetworkManager: <debug> [1265018910.255652] ensure_killed(): ppp pid 6321 cleaned up
Comment 1 Dan Williams 2010-02-01 19:24:40 UTC
Is there any chance you can email me the driver install program (mouse over my name in the comments to see my email address) that's on the device's fake CD when you first plug it in?  I'd like to confirm the port settings for which I need the Windows .inf files of the driver.  There's already some support for 'longcheer' devices (which yours is) in ModemManager via the longcheer plugin, but we need to add the right port types.
Comment 2 Dan Williams 2010-02-01 19:37:32 UTC
Also if after modeswitching you could do the following for me:

cd -P /sys/class/tty/ttyUSB1
pwd
cd -P /sys/class/tty/ttyUSB2
pwd
Comment 3 dav2dev 2010-02-03 19:24:29 UTC
today the situation changed, and the modem now works, but i don't know why, maybe that "failure code 100: unknown error" has to do with it?:
Feb  3 19:53:14 bloom modem-manager: (ttyUSB2) opening serial device...
Feb  3 19:53:14 bloom modem-manager: (ttyUSB2): probe requested by plugin 'Longcheer'
Feb  3 19:53:14 bloom modem-manager: (ttyUSB0) opening serial device...
Feb  3 19:53:14 bloom modem-manager: (ttyUSB0): probe requested by plugin 'Longcheer'
Feb  3 19:53:14 bloom modem-manager: (ttyUSB1) opening serial device...
Feb  3 19:53:14 bloom modem-manager: (ttyUSB1): probe requested by plugin 'Longcheer'
Feb  3 19:53:15 bloom modem-manager: Got failure code 100: Unknown error
Feb  3 19:53:21 bloom modem-manager: last message repeated 5 times
Feb  3 19:53:21 bloom modem-manager: (ttyUSB2) closing serial device...
Feb  3 19:53:21 bloom modem-manager: (Longcheer): GSM modem /sys/devices/pci0000:00/0000:00:1d.7/usb1/1-8 claimed port ttyUSB2
Feb  3 19:53:21 bloom modem-manager: Added modem /sys/devices/pci0000:00/0000:00:1d.7/usb1/1-8
Feb  3 19:53:21 bloom modem-manager: Exported modem /sys/devices/pci0000:00/0000:00:1d.7/usb1/1-8 as /org/freedesktop/ModemManager/Modems/0
Feb  3 19:53:21 bloom modem-manager: (ttyUSB1) closing serial device...
Feb  3 19:53:21 bloom modem-manager: (Longcheer): GSM modem /sys/devices/pci0000:00/0000:00:1d.7/usb1/1-8 claimed port ttyUSB1
Feb  3 19:53:21 bloom NetworkManager: <info>  (ttyUSB2): new GSM device (driver: 'generic')
Feb  3 19:53:21 bloom NetworkManager: <info>  (ttyUSB2): exported as /org/freedesktop/NetworkManager/Devices/2
Feb  3 19:53:21 bloom NetworkManager: <info>  (ttyUSB2): now managed
Feb  3 19:53:21 bloom NetworkManager: <info>  (ttyUSB2): device state change: 1 -> 2 (reason 2)
Feb  3 19:53:21 bloom NetworkManager: <info>  (ttyUSB2): deactivating device (reason: 2).
Feb  3 19:53:21 bloom NetworkManager: <info>  (ttyUSB2): device state change: 2 -> 3 (reason 0)
Feb  3 19:53:28 bloom modem-manager: (ttyUSB0) closing serial device...

kernel 2.6.32-11 (ubuntu)
nm 0.8~rc2-0ubuntu2~nmt4~karmic (ppa nm-daily-trunk-builds)

dav2dev@bloom:~$ cd -P /sys/class/tty/ttyUSB1
dav2dev@bloom:/sys/devices/pci0000:00/0000:00:1d.7/usb1/1-8/1-8:1.1/ttyUSB1/tty/ttyUSB1$ pwd
/sys/devices/pci0000:00/0000:00:1d.7/usb1/1-8/1-8:1.1/ttyUSB1/tty/ttyUSB1
dav2dev@bloom:/sys/devices/pci0000:00/0000:00:1d.7/usb1/1-8/1-8:1.1/ttyUSB1/tty/ttyUSB1$ cd -P /sys/class/tty/ttyUSB2
dav2dev@bloom:/sys/devices/pci0000:00/0000:00:1d.7/usb1/1-8/1-8:1.3/ttyUSB2/tty/ttyUSB2$ pwd
/sys/devices/pci0000:00/0000:00:1d.7/usb1/1-8/1-8:1.3/ttyUSB2/tty/ttyUSB2
dav2dev@bloom:/sys/devices/pci0000:00/0000:00:1d.7/usb1/1-8/1-8:1.3/ttyUSB2/tty/ttyUSB2$
Comment 4 Dan Williams 2010-02-03 23:20:58 UTC
8e3406bf740144ac657d13c69bff0f3407311b14

thanks!
Comment 5 Dan Williams 2010-02-03 23:22:14 UTC
To figure out why it says "Got failure code 100: Unknown error", you can:

1) unplug the modem
2) stop NetworkManager
3) killall -TERM modem-manager
4) modem-manager --debug
5) start NetworkManager
6) plug your modem in and try to reproduce the problem

then we can look at the modem-manager log and find out what the problem is, or what command the device doesn't like.
Comment 6 Dan Williams 2010-02-03 23:22:47 UTC
But if you're interested in fixing that one, would you mind filing another bug since it's a different issue than the port mixup?  Thanks!
Comment 7 dav2dev 2010-02-06 09:07:54 UTC
sure, but the modem is not mine, so I'll probably open the new bug within  a  few weeks...
and thank you for the fix!!
Comment 8 dav2dev 2010-02-25 11:42:14 UTC
actually, lucid (plus nm 0.8-0ubuntu4~nmt4 and mm 0.3-2~nmt1 from nm-daily-trunk ppa) still uses ttyUSB1 instead of ttyUSB2, with usbserial module...also, i have to load the kernel module by myself, otherwise ubuntu doesn't see the key, but perhaps this is not the right place to discuss that.
Comment 9 Dan Williams 2010-02-25 18:13:55 UTC
(In reply to comment #8)
> actually, lucid (plus nm 0.8-0ubuntu4~nmt4 and mm 0.3-2~nmt1 from
> nm-daily-trunk ppa) still uses ttyUSB1 instead of ttyUSB2, with usbserial
> module...also, i have to load the kernel module by myself, otherwise ubuntu
> doesn't see the key, but perhaps this is not the right place to discuss that.

Please attach your /lib/udev/rules.d/77-mm-longcheer-port-types.rules file, or at least make sure that in that file, you have the following lines:

# ChinaBird PL68
ATTRS{idProduct}=="9000", ENV{.MM_USBIFNUM}=="03", ENV{ID_MM_LONGCHEER_PORT_TYPE_MODEM}="1"
ATTRS{idProduct}=="9000", ENV{.MM_USBIFNUM}=="01", ENV{ID_MM_LONGCHEER_PORT_TYPE_AUX}="1"
ATTRS{idProduct}=="9000", ENV{ID_MM_LONGCHEER_TAGGED}="1"

If you do not have the following lines, then you need to get Ubuntu to update the version of ModemManager they they are shipping.
Comment 10 dav2dev 2010-02-25 18:31:19 UTC
you're right, neither 0.3-0ubuntu2 nor 0.3-2~nmt1(ppa) have those lines, and i can confirm those lines solve the problem. I'm going to file a bug in launchpad. Thank you