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 624956 - Nokia 6500s tethering works only for the first connection attempt with ModemManager
Nokia 6500s tethering works only for the first connection attempt with ModemM...
Status: RESOLVED OBSOLETE
Product: NetworkManager
Classification: Platform
Component: ModemManager
git master
Other Linux
: Normal major
: ---
Assigned To: Dan Williams
NetworkManager maintainer(s)
Depends on:
Blocks:
 
 
Reported: 2010-07-21 18:23 UTC by M. Vefa Bicakci
Modified: 2014-10-16 16:19 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
syslog messages for the first and second connection attempts (9.19 KB, text/x-log)
2010-07-21 18:23 UTC, M. Vefa Bicakci
  Details
Detailed modem-manager log (13.72 KB, text/plain)
2010-07-21 18:31 UTC, M. Vefa Bicakci
  Details
Detailed network-manager log (7.91 KB, text/plain)
2010-07-21 18:32 UTC, M. Vefa Bicakci
  Details
Patch to help debug premature serial port closure (14.01 KB, patch)
2010-07-27 21:26 UTC, Dan Williams
none Details | Review
Detailed NetworkManager log (13.49 KB, text/plain)
2010-07-28 07:06 UTC, M. Vefa Bicakci
  Details
Detailed ModemManager log (22.91 KB, text/plain)
2010-07-28 07:07 UTC, M. Vefa Bicakci
  Details
Patch to set nokia port properties (963 bytes, patch)
2011-08-02 19:55 UTC, Dan Williams
none Details | Review

Description M. Vefa Bicakci 2010-07-21 18:23:21 UTC
Created attachment 166315 [details]
syslog messages for the first and second connection attempts

Hello,

I am using an up-to-date Debian Sid laptop, and I also have a
Nokia 6500s that I like to tether to my laptop. Unfortunately,
the tethering works only for the first connection attempt with
NetworkManager/ModemManager. When I establish the first connection,
disconnect and then try to connect again, I get the following
messages in the syslog, but nothing happens:

=== 8< ===
<info> disconnect failed: (32) The serial port is not open.
=== >8 ===

However, if I use wvdial to connect to the GPRS network via my
cell phone, then I can do as many connections in sequence as
I like.

So I believe there is a problem regarding the handling of this
phone by NetworkManager or ModemManager.

I am attaching what I got in the syslog to this bug report.

Regards,

M. Vefa Bicakci
Comment 1 M. Vefa Bicakci 2010-07-21 18:24:19 UTC
Oh, and I tried the latest git version as well, and it
didn't make a difference. (This was the reason I chose
git master in the version field of the bug report.)
Comment 2 M. Vefa Bicakci 2010-07-21 18:31:46 UTC
Created attachment 166316 [details]
Detailed modem-manager log
Comment 3 M. Vefa Bicakci 2010-07-21 18:32:10 UTC
Created attachment 166317 [details]
Detailed network-manager log
Comment 4 Dan Williams 2010-07-21 20:49:53 UTC
Did you try latest git version of ModemManager?  Or NetworkManager?
Comment 5 M. Vefa Bicakci 2010-07-22 04:08:42 UTC
I am sorry. During my trials I didn't upgrade NetworkManager
(whose current version in Debian Sid is 0.8.0.999). I only
tried the git version of ModemManager thinking that it would be
relevant.

Would you like me to try the latest git version of NetworkManager
as well?

Thanks for the quick reply.
Comment 6 Dan Williams 2010-07-27 21:26:28 UTC
Here's my corresponding output from a Nokia 6650 Fold using latest git:

** (modem-manager:31914): DEBUG: <1280270690.918308> Modem /org/freedesktop/ModemManager/Modems/0: state changed (registered -> connecting)
** (modem-manager:31914): DEBUG: <1280270690.918465> (ttyACM0): --> 'ATD*99***1#<CR>'
** (modem-manager:31914): DEBUG: <1280270691.596746> (ttyACM0): <-- '<CR><LF>CONNECT<CR><LF>~\-1}#\-64!}!} } }2}#}$\-64#}!}$}%\-36}"}&} }*} } g}%~'
** (modem-manager:31914): DEBUG: <1280270691.596998> (ttyACM0): port now connected
** (modem-manager:31914): DEBUG: <1280270691.597165> Modem /org/freedesktop/ModemManager/Modems/0: state changed (connecting -> connected)
** (modem-manager:31914): DEBUG: <1280270691.597386> (ttyACM0): simple connect state 6
** (modem-manager:31914): DEBUG: (net/ppp0): could not get port's parent device
** (modem-manager:31914): DEBUG: <1280270698.918894> Modem /org/freedesktop/ModemManager/Modems/0: state changed (connected -> disconnecting)
** (modem-manager:31914): DEBUG: <1280270699.532763> (ttyACM0): <-- '<CR><LF>NO CARRIER<CR><LF>'
** (modem-manager:31914): DEBUG: Got failure code 3: No carrier
** (modem-manager:31914): DEBUG: <1280270699.920755> (ttyACM0): port now disconnected

what I'm curious about is why you don't get the "Got failure code 3: No carrier" message.

Can I give you a patch which can help debug the issue?  If so, I've attached a patch that applies to current git master which can help us debug this issue further.  Thanks!
Comment 7 Dan Williams 2010-07-27 21:26:59 UTC
Created attachment 166667 [details] [review]
Patch to help debug premature serial port closure
Comment 8 M. Vefa Bicakci 2010-07-28 07:06:06 UTC
Hello,

Thanks for helping out. I have applied the patch to the git master
version of ModemManager and produced log files from NetworkManager
and ModemManager. I will attach both of them in a moment.

Hopefully this will help us debug the problem.

Thanks again,

M. Vefa Bicakci
Comment 9 M. Vefa Bicakci 2010-07-28 07:06:35 UTC
Created attachment 166684 [details]
Detailed NetworkManager log
Comment 10 M. Vefa Bicakci 2010-07-28 07:07:05 UTC
Created attachment 166685 [details]
Detailed ModemManager log
Comment 11 Dan Williams 2010-08-03 17:59:19 UTC
Ok, so it looks like when the connection drops the modem actually hangs up and thus we break out of the data handler and close the serial port, which is why you don't get the NO CARRIER message.  I'm thinking about how to handle this.
Comment 12 Dan Williams 2011-08-02 19:54:39 UTC
If you get a chance, coudl you try the attached patch for the nokia plugin, and make sure to install the libmm-plugin-nokia.so ?
Comment 13 Dan Williams 2011-08-02 19:55:06 UTC
Created attachment 193102 [details] [review]
Patch to set nokia port properties
Comment 14 M. Vefa Bicakci 2011-08-17 17:49:06 UTC
Hello,

I still own the phone, but unfortunately I will not have access to
it until the beginning of September, which is when I will try your
patch.

Feel free to remind me if I do not report back around that time.
Comment 15 M. Vefa Bicakci 2012-03-04 06:13:39 UTC
Hello,

I have finally needed to use this phone again to connect to the Internet, and I tried your patch.

I downloaded the Debian Sid source package for Modem Manager 0.5, and after applying your patch, I recompiled the package and installed it.

After installation, I killed the Modem Manager process in order to let the newly compiled Modem Manager instance take over. I confirmed that the new version of the Modem Manager Nokia plug-in was installed by making sure that its binary contains the AT string you have included in the patch.

Unfortunately, however, the problem persists. With Network Manager/Modem Manager, only the first connection attempt works, whereas with wvdial I can connect every time I try.
Comment 16 Aleksander Morgado 2014-10-16 16:19:22 UTC
This modem-reported hungup during the disconnect:

** (modem-manager:30977): DEBUG: <1280300196.933432> (ttyACM0): <-- '~\-1}#\-64!}!} } }2}#}$\-64#}!}$}%\-36}"}&} }*} } g}%~'
** (modem-manager:30977): DEBUG: mm_serial_parser_v1_parse: parsing '~\xff}#\xc0!}!} } }2}#}$\xc0#}!}$}%\xdc}"}&} }*} } g}%~'
** (modem-manager:30977): DEBUG: (net/ppp0): could not get port's parent device

** (modem-manager:30977): WARNING **: mm-serial-port.c:605 data_available: port hangup
** (modem-manager:30977): DEBUG: <1280300210.54125> (ttyACM0) device open count is 0 (close)
** (modem-manager:30977): DEBUG: <1280300210.54125> (ttyACM0) close requested by mm-serial-port.c:606/data_available
** Message: (ttyACM0) closing serial device...
** (modem-manager:30977): DEBUG: <1280300210.54173> (ttyACM0): port now disconnected

May actually be because of the CLOCAL mixup we had if we tell MM to disconnect the port before pppd really exited. That would actually be the symptom you'd get, plus no longer able to reconnect because the HUP in the serial port detected by MM will make it think the TTY is no longer valid.

I'm tempted to say that the port re-open logic that was added to MM 1.2 would fix this issue, so I'm going to fix this bug as resolved/obsolete. Plus, there are patches to sync the pppd exit with MM, that will get to NM git master at some point.

If you still get this issue with a recent ModemManager, please open a new bug in the new ModemManager bugzilla here:
  https://bugs.freedesktop.org/enter_bug.cgi?product=ModemManager

You can get debug logs with these steps:
  http://www.freedesktop.org/wiki/Software/ModemManager/Debugging/