Can't use USB/PL2303-attached Zyxel Omni Mini with non-root user

Bug #482971 reported by TroubleMakerDV
28
This bug affects 6 people
Affects Status Importance Assigned to Milestone
modemmanager (Ubuntu)
Expired
Undecided
Unassigned

Bug Description

Binary package hint: modemmanager

On Ubuntu 9.04 I had no problems using old (but reliable) dialup modem Zyxel Omni Mini. I connected it to USB port using Prolific PL2303 USB-to-Serial connector. It sat on /dev/ttyUSB0 and worked just perfectly with GnomePPP & WVDial.

After upgrade to 9.10 I tried to dial my ISP and got "/dev/ttyUSB0 Device or resource is busy" (or something very similar to). With SUDO I could make wvdial to dial an ISP and establish connection, but it was not a good solution.

Thorough LSOFing gave me that the device is opened by modem-manager process. Attempts to PKILL it failed: it respawned again and again. I've apt-get remove modemmanager, then pkilled it again and got non-root usable modem!

But now NM does not auto-discover GSM-phones attached to /dev/ttyACM0

Guys, you did a great job, but do not forget about dialup users, please! Would devteam do something to make modemmanager not capturing USB-modem, if it is not GSM one?

edit: forgot to mention a package: modemmanager_0.2.git.20091014t233208.16f3e00-0ubuntu1_i386.deb from Ubuntu 9.10 official install DVD.

description: updated
description: updated
Revision history for this message
Steffen H. (shulegaa) wrote :

     Ohhh ... so maybe modem-manager is what the Ubuntu 9.10 upgrade did to break my ppp dial up (and FAXing ... see https://bugs.launchpad.net/ubuntu/+bug/469881). I've been rebooting in the hopes that if I did nothing, there'd be nothing making /dev/ttyACM0 busy. No joy! But the nasty modem-manager *is* running on my Ubuntu 9.10 system. First, the Ubuntu 9.10 upgrade kills my X/GDM ... and now this!

~$ ps -ef | fgrep -i modem
root 1437 1 0 01:42 ? 00:00:00 /usr/sbin/modem-manager
1000 11962 5326 0 02:17 pts/0 00:00:00 fgrep -i modem

     It would seem as if Ubuntu isn't testing modem support (... anymore?). Ouch. It just kills me that this just works like a charm under both MS Windows Vista and 7.

     Man, I've been spoiled. For Ubuntu, Karmic Koala seems unusually ornery ;-)

==============================================================

Editing `/etc/wvdial.conf'.

Scanning your serial ports for a modem.

WvModem<*1>: Cannot set information for serial port.
ttyS0<*1>: ATQ0 V1 E1 -- failed with 2400 baud, next try: 9600 baud
ttyS0<*1>: ATQ0 V1 E1 -- failed with 9600 baud, next try: 115200 baud
ttyS0<*1>: ATQ0 V1 E1 -- and failed too at 115200, giving up.
Modem Port Scan<*1>: S1 S2 S3
ttyACM0<Info>: Device or resource busy
Modem Port Scan<*1>: ACM0

Sorry, no modem was detected! Is it in use by another program?
Did you configure it properly with setserial?

Please read the FAQ at http://open.nit.ca/wiki/?WvDial

If you still have problems, send mail to <email address hidden>.

Revision history for this message
TroubleMakerDV (grayman2000) wrote :

Steffen, I could not pkill modem-manager process without removal the entire modemmanager package.

Revision history for this message
jkohler2 (jkohler2) wrote :

Under 9.04, I could successfully use my Zoom and U.S. Robotics USB modems with the following installations:

First, Gnome-ppp (sudo apt-get install gnome-ppp)
Second, from Linuxant.com: dgcmoden 2.22 k2.6.28 generic ubuntu 386.deb.zip

After upgrade to Karmic Koala, I see the following in the terminal window:

john@john-laptop:~$ sudo gnome-ppp
[sudo] password for john:
WVCONF: /root/.wvdial.conf
GNOME PPP: Connecting...
GNOME PPP: STDERR: --> WvDial: Internet dialer version 1.60
GNOME PPP: STDERR: --> Cannot get information for serial port.
GNOME PPP: STDERR: --> Initializing modem.
GNOME PPP: STDERR: --> Sending: ATZ
GNOME PPP: STDERR: --> Sending: ATQ0
GNOME PPP: STDERR: --> Re-Sending: ATZ
GNOME PPP: STDERR: --> Modem not responding.

ProblemType: Bug
Architecture: i386
Date: Sun Nov 1 17:35:29 2009
DistroRelease: Ubuntu 9.10
Package: firefox-3.5 3.5.4+nobinonly-0ubuntu0.9.10.1
ProcEnviron:
 LANG=en_US.UTF-8
 SHELL=/bin/bash
ProcVersionSignature: Ubuntu 2.6.31-14.48-generic
SourcePackage: firefox-3.5
Uname: Linux 2.6.31-14-generic i686

I went back to Ubuntu 9.04 where I can have a working dialup usb modem to connect to
the internet. Connecting is not all about an ethernet cable or a wifi laptop adapter.

John

Revision history for this message
Steffen H. (shulegaa) wrote : Re: [Bug 482971] Re: Can't use USB/PL2303-attached Zyxel Omni Mini with non-root user
Download full text (4.7 KiB)

     I bummed to hear you've had to revert back to 9.04.  I've found that using the synaptic package manager (System --> Administration --> Synaptic Package Manager) one *can* mark the modem manager for complete removal (just search on 'modem').  Then, a reboot will eliminate the /usr/sbin/modem-manager process hogging the USB modems (like /dev/ttyACM? and/or /dev/ttyUSB?).  This makes GNOME-PPP usable again ... and wvdialconf too.  Try wvdialconf first (just to pull in some optimal modem configuration settings).

     I've done this ... and I'm getting connected.  I'm not posting the results just yet ... since I'm currently stuck at a terminal server prompt from my ISP.  When I (or gnome-ppp or wvdial) tries the 'ppp' command, I'm getting a Requested Service Not Authorized.  This is clearly a glitch on my ISP's end.  I'll talk with them tomorrow about this.  Maybe they've limited their offering to what MS Windows using (e.g. SLIP/CSLIP).  Who knows?  I'm still working through this weirdness.

     By the way, I've used 'gtkterm' to confirm precisely what is what with the 'log' (button) view of what is going on behind GNOME-PPP.  Type ATZ a couple of times to synch-up/negotiate port speed (and leave stop bits, parity, etc. as they default).  At any rate, I'm pretty sure I'm seeing 'real' results (as opposed to GUI muddle).

     I just thought you might appreciate the early partial/results.  While Ubuntu 9.10 seems unusually ornery ... it doesn't look wholesale broken.  Ultimately, this looks like a modem-manager bug (that I'll file if nobody else does).  The modem-manager leaves breadcrumbs in /var/log/syslog about *NOT* recognizing the USB USR modem as an ADSL modem (cuz it isn't).  At that point, the modem-manager really *should* let go of the device.  Instead, it sits (or squats) on a device that it knows it cannot use.  Blech.  That is a bug.

Cheers, Steffen.

--- On Sun, 11/15/09, jkohler2 <email address hidden> wrote:

From: jkohler2 <email address hidden>
Subject: [Bug 482971] Re: Can't use USB/PL2303-attached Zyxel Omni Mini with non-root user
To: <email address hidden>
Date: Sunday, November 15, 2009, 8:11 AM

Under 9.04, I could successfully use my Zoom and U.S. Robotics USB
modems with the following installations:

First, Gnome-ppp (sudo apt-get install gnome-ppp)
Second, from Linuxant.com: dgcmoden 2.22 k2.6.28 generic ubuntu 386.deb.zip

After upgrade to Karmic Koala, I see the following in the terminal
window:

john@john-laptop:~$ sudo gnome-ppp
[sudo] password for john:
WVCONF: /root/.wvdial.conf
GNOME PPP: Connecting...
GNOME PPP: STDERR: --> WvDial: Internet dialer version 1.60
GNOME PPP: STDERR: --> Cannot get information for serial port.
GNOME PPP: STDERR: --> Initializing modem.
GNOME PPP: STDERR: --> Sending: ATZ
GNOME PPP: STDERR: --> Sending: ATQ0
GNOME PPP: STDERR: --> Re-Sending: ATZ
GNOME PPP: STDERR: --> Modem not responding.

ProblemType: Bug
Architecture: i386
Date: Sun Nov 1 17:35:29 2009
DistroRelease: Ubuntu 9.10
Package: firefox-3.5 3.5.4+nobinonly-0ubuntu0.9.10.1
ProcEnviron:
 LANG=en_US.UTF-8
 SHELL=/bin/bash
ProcVersionSignature: Ubuntu 2.6.31-14.48-generic
SourcePackage: firefox-3.5
Uname: Linux 2.6.3...

Read more...

Revision history for this message
Steffen H. (shulegaa) wrote :

     Not only is the (Ubuntu supplied) modem-manager package inappropriately 'squatting' on device (i.e. /dev/ttyACM0) that it does *not* recognize as ADSL modems (cuz they often are just ordinary modems - like my USR Model 5367 or your modem), but, in addition, both GNOME-PPP (GUI) and wvdial (backend to GNOME-PPP) can *confuse* 'pppd' (i.e. the point-to-point protocol daemon - whether it does or not depends on your ISP).

     The following SAMBA FAQ revealed this second bug (see http://ppp.samba.org/ppp/FAQ.html). This second bug can be worked around by using the 'pon' and 'poff' commands (rather than the wvdial command). Yes, the good old command line seems like the only thing that works. Unbuntu's dial-in ISP/modem support seems pretty broken ... but the underlying software seems to still be in good shape ;-)

------------------------------

     Q: When I try to establish a connection, I get an error message saying "Serial link is not 8-bit clean". Why?

     A: The most common cause is that your connection script hasn't successfully dialled out to the remote system and invoked ppp service there. Instead, pppd is talking to something (a shell or login process on the remote machine, or maybe just the modem) which is only outputting 7-bit characters.

This can also arise with a modem which uses an AT command set if the dial command is issued before pppd is invoked, rather than within a connect script started by pppd. If the serial port is set to 7 bits/character plus parity when the last AT command is issued, the modem serial port will be set to the same setting.

Note that pppd *always* sets the local serial port to 8 bits per character, with no parity and 1 stop bit. So you shouldn't need to issue an stty command before invoking pppd.

----------------------------

     For my part, I am able to begin PPP negotiations with my dial-up ISP (here in the U.S., named bay area internet solutions) by invoking pppd either directly (via 'pppd call <foo>') or via the handy 'pon' and 'poff' commands. 'poff -a' (or 'poff <foo>') seems quite adept at getting pppd shutdown properly. I'd recommend using that. Unfortunately, I'm still not getting agreement on my static IP address ... so I cannot yet report 100% success. Oh well ...

Revision history for this message
Steffen H. (shulegaa) wrote :

     Oh ... and more breakage on permissions for /usr/sbin/pppd. That is root user or dip group only. So you'll surely want your user account in the dip group. I think I pulled this off using System --> Users & Groups and then ticking off the 'Connect to Internet using a modem' (and Send & Receive Faxes). Then reboot.

     Be sure that Network Manager and/or GNOME PPP have not put a line saying 'auto ppp0' (or some such) into /etc/network/interfaces. Comment out any such line (since you may *really* need to use the 'pon' command manually).

     If you're modem was configured via 'wvdialconf', the directory you were in when you ran wvdialconf has a hidden file whose name is '.wvdial.conf'. That needs to be manually installed as (or integrated into) /etc/wvdial.conf.

     Then there's ANOTHER permission problem on /etc/ppp/pap-secrets and /etc/ppp/chap-secrets. Those files are owned by root and associated with the 'root' group (rather than the dip group). Obviously, these are security sensitive files ... but if you are going to run 'pon' to get pppd going ... you'll need access to these files ... and doing everything as root seems like it's own worry (and many systems/situations) ... but maybe 'sudo pon' and 'sudo poff' will be enough. For me, I've made these file 'dip' group readable.

Revision history for this message
jkohler2 (jkohler2) wrote :

I removed modem manager:

sudo apt-get remove modemmanager.

After re-start both my USB dialup modems work perfectly, just like it was 9.04

Thanks.

John

Revision history for this message
Bernd Schubert (aakef) wrote :

On Wednesday 06 January 2010, jkohler2 wrote:
> I removed modem manager:
>
> sudo apt-get remove modemmanager.
>
> After re-start both my USB dialup modems work perfectly, just like it
> was 9.04

This is also not an option, since this prevent UMTS sticks to work. Not all
people go online all the time using an analog modem, or some people only need
analog modems to send/receive fax messages.

Regards,
Bernd

Revision history for this message
TroubleMakerDV (grayman2000) wrote :

07.01.2010 2:19, Bernd Schubert пишет:
> On Wednesday 06 January 2010, jkohler2 wrote:
>
>> sudo apt-get remove modemmanager.
>>
> This is also not an option, since this prevent UMTS sticks to work. Not all
> people go online all the time using an analog modem, or some people only need
> analog modems to send/receive fax messages.
>
It IS an option! You always can make UMTS-stick ("GPRS-modem", huh?)
working, referring it in gnome-ppp as "/dev/ttyUSBx".
On my notebook's desktop there are 2 shortcuts: one calls "regular"
gnome-ppp for using analog modem, and second calls the wvdial with
additional config file, which is set up for using the cellular phone
attached.
My wife is not computer pro, but these are enough for her to connect and
use both connections on her will.

Revision history for this message
Marc Deslauriers (mdeslaur) wrote :
Revision history for this message
Mathieu Trudel-Lapierre (cyphermox) 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 - Precise Pangolin. 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.

Changed in modemmanager (Ubuntu):
status: New → Incomplete
Revision history for this message
TroubleMakerDV (grayman2000) wrote :

Mathieu, it is difficult to reproduce this bug because 10.04 have no these problems.
Now I have different prob: no any of my bluetooth adaptors works under 11.10 :-)

Revision history for this message
Launchpad Janitor (janitor) wrote :

[Expired for modemmanager (Ubuntu) because there has been no activity for 60 days.]

Changed in modemmanager (Ubuntu):
status: Incomplete → Expired
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.