GNOME Bugzilla – Bug 624956
Nokia 6500s tethering works only for the first connection attempt with ModemManager
Last modified: 2014-10-16 16:19:22 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
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.)
Created attachment 166316 [details] Detailed modem-manager log
Created attachment 166317 [details] Detailed network-manager log
Did you try latest git version of ModemManager? Or NetworkManager?
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.
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!
Created attachment 166667 [details] [review] Patch to help debug premature serial port closure
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
Created attachment 166684 [details] Detailed NetworkManager log
Created attachment 166685 [details] Detailed ModemManager log
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.
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 ?
Created attachment 193102 [details] [review] Patch to set nokia port properties
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.
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.
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/