Re: ttyACM0, ttyUSB0, usb0 ???
- From: Dan Williams <dcbw redhat com>
- To: José Queiroz <zekkerj gmail com>
- Cc: networkmanager-list gnome org
- Subject: Re: ttyACM0, ttyUSB0, usb0 ???
- Date: Mon, 08 Feb 2010 14:59:04 -0800
On Sun, 2010-02-07 at 14:59 -0200, José Queiroz wrote:
> Good news: I finally got NM working with my Onda MSA405HS modem.
>
> When you told about modem-manager, I thought on trying to trace it. I
> started it with "--debug" option, and it said:
>
> (...)
> ** Message: (ttyUSB2) opening serial device...
> ** Message: Modem /org/freedesktop/ModemManager/Modems/0: state
> changed (disabled -> enabling)
> ** (modem-manager:24805): DEBUG: (ttyUSB2): --> 'ATE0 V1<CR>'
> ** (modem-manager:24805): DEBUG: (ttyUSB2): <-- '<CR><LF>OK<CR><LF>'
> ** (modem-manager:24805): DEBUG: (ttyUSB2): --> 'AT+CPIN?<CR>'
> ** (modem-manager:24805): DEBUG: (ttyUSB2): <-- '<CR><LF>+CPIN:
> READY<CR><LF><CR><LF>OK<CR><LF>'
> ** (modem-manager:24805): DEBUG: (ttyUSB2): --> 'ATZ E0 V1 X4 &C1
> +CMEE=1;+CFUN=1;<CR>'
> ** (modem-manager:24805): DEBUG: (ttyUSB2): <-- '<CR><LF>OK<CR><LF>'
> ** Message: Modem /org/freedesktop/ModemManager/Modems/0: state
> changed (enabling -> enabled)
> ** (modem-manager:24805): DEBUG: (ttyUSB2): --> 'AT+CPIN?<CR>'
> ** (modem-manager:24805): DEBUG: (ttyUSB2): <-- '<CR><LF>+CPIN:
> READY<CR><LF><CR><LF>OK<CR><LF>'
> ** (modem-manager:24805): DEBUG: (ttyUSB2): --> 'AT+COPS=0,,<CR>'
> ** (modem-manager:24805): DEBUG: (ttyUSB2): <-- '<CR><LF>OK<CR><LF>'
> ** (modem-manager:24805): DEBUG: (ttyUSB2): --> 'AT+CREG?<CR>'
> ** (modem-manager:24805): DEBUG: (ttyUSB2): <-- '<CR><LF>+CREG:
> 0,1<CR><LF><CR><LF>OK<CR><LF>'
> ** (modem-manager:24805): DEBUG: Registration state changed: 1
> ** Message: Modem /org/freedesktop/ModemManager/Modems/0: state
> changed (enabled -> registered)
> ** (modem-manager:24805): DEBUG: (ttyUSB2): -->
> 'AT+COPS=3,2;+COPS?<CR>'
> ** (modem-manager:24805): DEBUG: (ttyUSB2): <-- '<CR><LF>+COPS:
> 0,2,"72402",0<CR><LF><CR><LF>OK<CR><LF>'
> ** (modem-manager:24805): DEBUG: (ttyUSB2): -->
> 'AT+COPS=3,0;+COPS?<CR>'
> ** (modem-manager:24805): DEBUG: (ttyUSB2): <-- '<CR><LF>+COPS:
> 0,0,"TIM BRASIL",0<CR><LF><CR><LF>OK<CR><LF>'
> ** (modem-manager:24805): DEBUG: (ttyUSB2): --> 'AT+CSQ<CR>'
> ** (modem-manager:24805): DEBUG: (ttyUSB2): <-- '<CR><LF>+CSQ:
> 15,99<CR><LF><CR><LF>OK<CR><LF>'
> ** (modem-manager:24805): DEBUG: (ttyUSB2): --> 'AT+CGDCONT?<CR>'
> ** (modem-manager:24805): DEBUG: (ttyUSB2): <-- '<CR><LF>+CGDCONT:
> 1,"IP","www.tim.com.br","0.0.0.0",0,0<CR><LF>+CGDCONT:
> 2,"IP","www.tim.com.br","0.0.0.0",0,0<CR><LF>+CGDCONT:
> 3,"IP","bandalarga.claro.com.br","0.0.0.0",0,0<CR><LF><CR><LF>OK<CR><LF>'
> ** Message: Modem /org/freedesktop/ModemManager/Modems/0: state
> changed (registered -> connecting)
> ** (modem-manager:24805): DEBUG: (ttyUSB2): --> 'ATD*99***1***1#<CR>'
> ** (modem-manager:24805): DEBUG: (ttyUSB2): <--
> '<CR><LF>ERROR<CR><LF>'
> ** (modem-manager:24805): DEBUG: Got failure code 100: Unknown error
> ** (modem-manager:24805): DEBUG: (ttyUSB2): --> 'AT+CEER<CR>'
> ** (modem-manager:24805): DEBUG: (ttyUSB2): <-- '<CR><LF>+CEER: No
> cause information available<CR><LF><CR><LF>OK<CR><LF>'
> ** Message: Modem /org/freedesktop/ModemManager/Modems/0: state
> changed (connecting -> registered)
> (...)
>
> That's when I saw that NM was dialing "*99***1***1#", instead of
> "*99***1#", as I configured the connection.
Yeah, you can almost always leave the dialing # alone; by default it'll
work for almost all modems.
> So I had the idea of changing the dial number to "*99#", as I saw in
> some documentations (despite the fact that I use "*99***1#" in
> wvdial), and it worked.
That sort of works, except it circumvents the ModemManager APN setting
that gets done in ModemManager. So now you're using connection profile
#1, which may or may not be the APN you think it is :)
> Wow!
>
> Now, only two questions arise:
>
> 1) Why was NM addind "**1" to the dial number? It didn't done that on
> the other connection, using the Sony MD300 modem.
That '1' corresponds to the PDP context that gets created based on the
APN you specify. The modem can store multiple PDP contexts. MM is
smart enough to match the APN you give it to an existing PDP context, or
if none exists in the modem, create a new one, and connect using that
context's ID.
Here's MM asking for the installed profiles:
** (modem-manager:24805): DEBUG: (ttyUSB2): --> 'AT+CGDCONT?<CR>'
** (modem-manager:24805): DEBUG: (ttyUSB2): <-- '<CR><LF>+CGDCONT:
1,"IP","www.tim.com.br","0.0.0.0",0,0<CR><LF>+CGDCONT:
2,"IP","www.tim.com.br","0.0.0.0",0,0<CR><LF>+CGDCONT:
3,"IP","bandalarga.claro.com.br","0.0.0.0",0,0<CR><LF><CR><LF>OK<CR><LF>'
Your modem has 3 contexts stored. To use context #3, you'd use '3' at
the end of the dial string instead of '1'.
If the PDP conext that MM creates does *not* work, I'd like to debug
that with you and figure out why.
> 2) I had to use my chipmunk brain a little more than usual, to
> activate the debug mode of modem-manager, because just stopping it
> whilst NetworkManager was active was of no use --- NM restarted it
> immediately. So I had to first stop NM, then stop modem-manager.
>
> Maybe there should be a way to do that directly from NM. And if there
> is such a way, knetworkmanager should implement it...
I think you can actually send SIGUSR1 to ModemManager and it'll turn
debugging on. NOt sure that's documented anywhere.
Dan
- References:
- ttyACM0, ttyUSB0, usb0 ???
- From: =?ISO-8859-1?Q?Jos=E9_Queiroz?=
- Re: ttyACM0, ttyUSB0, usb0 ???
- Re: ttyACM0, ttyUSB0, usb0 ???
- From: =?ISO-8859-1?Q?Jos=E9_Queiroz?=
- Re: ttyACM0, ttyUSB0, usb0 ???
- Re: ttyACM0, ttyUSB0, usb0 ???
- From: =?ISO-8859-1?Q?Jos=E9_Queiroz?=
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]