Re: Modem Manager gets into a funny state with CDMA modems

2010-03-17 Thread Jason Glasgow
Dan,
I added the printk you suggested below, and also a printk to __init() to be
sure I was running the new modules.  The printk in __init was invoked, but
not the printk above tty_hangup().  So it appears that the hangup is
happening somewhere else.

-Jason


On Wed, Mar 17, 2010 at 9:15 PM, Dan Williams  wrote:

> On Wed, 2010-03-17 at 20:34 -0400, Jason Glasgow wrote:
> > Dan, No problem.  I'm happy to rebuild the kernel module and I'm
> > familiar with the process.)  I'm using a 2.6.31 kernel.
> >
> >
> > Do you suggest that I just try removing the code below?
>
> Nah, just put something like:
>
>if (tty && !C_CLOCAL(tty)) {
> +   printk(KERN_INFO "%s: about to call tty_hangup!", __func__);
>tty_hangup(tty);
>}
>
> in that if statement and lets see if that gets printed in 'dmesg' when
> the problem occurs.  If not, then it's something else in the stack
> that's sending the SIGHUP I think.
>
> Dan
>
> >
> >
> >  if (old_dcd_state && !portdata->dcd_state) {
> > struct tty_struct *tty =
> >
> >  tty_port_tty_get(&port->port);
> > if (tty && !C_CLOCAL(tty))
> > tty_hangup(tty);
> > tty_kref_put(tty);
> > }
> >
> >
> > -Jason
> >
> >
> > On Wed, Mar 17, 2010 at 8:04 PM, Dan Williams  wrote:
> > On Wed, 2010-03-17 at 17:48 -0400, Jason Glasgow wrote:
> > > Dan,
> > > I tried the patch below, but it had no effect.
> >
> >
> > Are you comfortable with rebuilding a single kernel driver
> > (don't need
> > to do the whole kernel)?  If so, we could put some code into
> > the
> > 'option' driver to see if the tty_hangup() call in
> > option_instat_callback() is causing your problem or not.  It's
> > actually
> > pretty easy, if you have the option.c file and kernel headers
> > from your
> > kernel version.  If you're not familiar with the process I can
> > give you
> > some tips.
> >
> >
> > Dan
> >
> > > -Jason
> > >
> > >
> > >
> > >
> > > diff --git a/src/mm-serial-port.c b/src/mm-serial-port.c
> > >
> > >
> > > index 07010e1..0ed57f9 100644
> > >
> > >
> > > --- a/src/mm-serial-port.c
> > >
> > >
> > > +++ b/src/mm-serial-port.c
> > >
> > >
> > > @@ -358,7 +358,7 @@ config_fd (MMSerialPort *self, GError
> > **error)
> > >
> > >
> > >  stbuf.c_cc[VEOF] = 1;
> > >
> > >
> > >
> > >
> > >
> > >  stbuf.c_cflag &= ~(CBAUD | CSIZE | CSTOPB | CLOCAL |
> > PARENB);
> > >
> > >
> > > -stbuf.c_cflag |= (speed | bits | CREAD | 0 | parity |
> > stopbits);
> > >
> > >
> > > +stbuf.c_cflag |= (speed | bits | CREAD | 0 | parity |
> > stopbits |
> > > CLOCAL);
> > >
> > >
> > >
> > >
> > >  if (ioctl (priv->fd, TCSETA, &stbuf) < 0) {
> > >
> > >
> > >  g_set_error (error,
> > >
> > >
> > >
> > >
> > > jglas...@visitor-1950-269a-x600:modemmanager$
> > >
> > >
> > >
> > > On Mon, Mar 15, 2010 at 8:22 PM, Jason Glasgow
> > 
> > > wrote:
> > > Sure, I'll give that a try and let you know what
> > happens.
> > >  Thanks, -Jason
> > >
> > >
> > >
> > > On Mon, Mar 15, 2010 at 7:13 PM, Dan Williams
> > >  wrote:
> > > On Fri, 2010-03-12 at 12:50 -0500, Jason
> > Glasgow
> > > wrote:
> > > > Dan,
> > > >
> > > >
> > > > Novatel U760.  The modem appears to be
> > fine (not
> > > sure what you mean
> > > > drop off the bus.  If I reopen the device
> > all is
> > > fine).  I hacked up
> > > > my version of the code (mm-generic-cdma.c)
> > to always
> > > call
> > > > mm_serial_port_open() before using the
> > file
> > > descriptor, and it works
> > > > great.  But I don't think this is a good
> > solution.
> > >
> > >
> > > It looks like this device actually cares
> > about DCD
> > > state, or at least
> > > it's sending messages that make 'option'
> > think it
> > >  

RE: networkmanager control issue

2010-03-17 Thread Edward_Doong
Dear Dan:
Thanks for your reply.
1. I had look over this spec. in few days.
  Now, I can check my system network state. (
org.freedesktop.NetworkManager )
  And I will try to get AP list from D-Bus. ( when I click icon that
will scan AP. Not always scan )
2. Yes, I will register another D-Bus that communication with UI.
  So, my D-Bus will communication between UI & NetworkManager.
  Because I want that UI just only have AP & PW for type. 
  Other networksecret, etc... don't choice by UI.
  And is it "Feasible"?
  BTW, I will change python language to C language. ( That let me
"crazy" )

Thanks
Edward

On Tue, 2010-03-16 at 10:52 +0800, 
> Dear,
>I study network-manager 0.8 first time by myself.
> And I meet some issue. Now I use python & gtk+ language.
> I want to control all network interfaces in my window.
> What do I add D-bus script in my language,
> Like this : 
> First window I can scan AP & choice.

NetworkManager periodically scans for you, though we're looking into
making a scan request call via D-Bus if you want updated AP lists more
often than every 2 minutes, which I suspect you'd be interested in.

You can get the list of all APs the devices sees via D-Bus; see the NM
D-Bus API spec here:

http://projects.gnome.org/NetworkManager/developers/spec-08.html

This allows you to ask NetworkManager for the AP list for a specific
wifi device and get each AP's details like signal strength and
encryption type.

> Second window I can type password.

NetworkManager doesn't quite operate like that; instead you have "saved
connections" (representing all the parameters needed to connect to a
specific network) that the user-interface applet provides to
NetworkManager via D-Bus.  NM will only connect to APs that are
specified by these "saved connections".  How you store that saved
connection is up to your applet; the GNOME nm-applet saves them in
GConf, the KDE networkmanager applet saves them in other ways.  The
programs that provide this connection data to NM are called "settings
services".

So when you want to connect, your applet does the following:

1) do I have a saved connection that matches up with this access point?
If so, tell NM to connect to the AP using this saved connection.

2) If not, create a saved connection, tell NetworkManager that you've
created a new saved connection via D-Bus (see the system settings
interface documentation [1]), then tell NM that you want to connect to
the AP using that saved connection.

3) When the D-Bus ActivateConnection() call returns, it'll send an
"ActiveConnection" object back to you, which you can use to track the
status of the in-progress connection to the access point, and you can
show that progress in the UI.

If you want any other help or clarification, let me know.

Dan

[1]
http://projects.gnome.org/NetworkManager/developers/spec-08.html#org.fre
edesktop.NetworkManagerSettings


___
NetworkManager-list mailing list
NetworkManager-list@gnome.org
http://mail.gnome.org/mailman/listinfo/networkmanager-list


Re: Network-Manager Trunk and Fedora 12

2010-03-17 Thread Darren Albers
On Wed, Mar 17, 2010 at 9:18 PM, Dan Williams  wrote:
> On Mon, 2010-03-15 at 22:59 -0400, Darren Albers wrote:
>> On Mon, Mar 15, 2010 at 7:22 PM, Dan Williams  wrote:
>> > On Thu, 2010-03-11 at 20:10 -0500, Darren Albers wrote:
>> >> On Thu, Mar 11, 2010 at 6:56 PM, Dan Williams  wrote:
>> >> > On Wed, 2010-03-10 at 15:45 -0500, Darren Albers wrote:
>> >> >> Are there any testing packages I can install to enable Bluetooth DUN
>> >> >> support on Fedora 12?
>> >> >
>> >> > The latest builds in koji should work; I've been doing some heavy
>> >> > ModemManager work the past week or two and thus there aren't any builds
>> >> > in a suitable state for F12 testing quite yet.
>> >> >
>> >> > http://koji.fedoraproject.org/koji/buildinfo?buildID=157530
>> >> >
>> >> > Dan
>> >> >
>> >> >
>> >> >
>> >>
>> >> Sorry one further question, is it safe to use these builds with an
>> >> older version of ModemManager?   Safe obviously being a relatively
>> >> term considering it isn't even in testing yet but enough for someone
>> >> to play with?
>> >
>> > Yes, they should be pretty safe for versions of NM from 2010 or very
>> > late 2009.
>> >
>> > Dan
>> >
>> >
>> >
>>
>> Thanks Dan!  I actually tested it on Fedora 13 but ModemManager
>> doesn't seem to like how the Blackberry responds.   I filed a bug
>> report on it but as usual for Blackberry's they seem to respond a
>> little differently that what you expect.  In this case it responds
>> with:
>> ** Message: (rfcomm0) opening serial device...
>> ** (modem-manager:2729): DEBUG: (rfcomm0): probe requested by plugin 
>> 'Generic'
>> ** (modem-manager:2729): DEBUG: (rfcomm0): --> 'AT+GCAP'
>> ** (modem-manager:2729): DEBUG: (rfcomm0): <--
>> '+GCAP:OK'
>> ** (modem-manager:2729): DEBUG: (rfcomm0): --> 'AT+GCAP'
>> ** (modem-manager:2729): DEBUG: (rfcomm0): <--
>> '+GCAP:OK'
>> ** (modem-manager:2729): DEBUG: (rfcomm0): --> 'AT+GCAP'
>> ** (modem-manager:2729): DEBUG: (rfcomm0): <--
>> '+GCAP:OK'
>> ** (modem-manager:2729): DEBUG: (rfcomm0): --> 'ATI'
>> ** (modem-manager:2729): DEBUG: (rfcomm0): <-- 'Research In Motion BlackBerry
>> IP ModemOK'
>> ** (modem-manager:2729): DEBUG: (rfcomm0): --> 'AT+CPIN?'
>> ** (modem-manager:2729): DEBUG: (rfcomm0): <-- '+CPIN:
>> READYOK'
>> ** (modem-manager:2729): DEBUG: (rfcomm0): --> 'AT+CGMM'
>> ** (modem-manager:2729): DEBUG: (rfcomm0): <-- 'RIM BlackBerry Device
>> 4001507OK'
>> ** Message: (rfcomm0) closing serial device...
>>
>> I guess when it does this ModemManager doesn't recognize the response
>> from CGMM (Model Query?) so it doesn't go any further?  CPIN seems to
>> match what is expected in mm-generic-gsm.c but I can't seem to follow
>> what it expects from CGMM and where that is checked.
>
> It's not responding to GCAP so we don't actually know whether it's a
> CDMA or a GSM device.  What kind is yours?
>
> If yours is a GSM device, then that's great since it responds to AT+CPIN
> correctly and we'll know it's a GSM device with recent ModemManager
> versions.
>
> If yours is a CDMA device and it responds to AT+CPIN, then I hate the
> world and we'll have to figure something else out :)
>
> Dan
>
>
>

You can save your hate for more important things like bad wireless
cards then since it is a GSM device!   I can get a CDMA device to test
if you want to know how that kind of device responds.  So if a more
recent version of ModemManager is used it may recognize it as a Modem?
___
NetworkManager-list mailing list
NetworkManager-list@gnome.org
http://mail.gnome.org/mailman/listinfo/networkmanager-list


Re: networkmanager control issue

2010-03-17 Thread Dan Williams
On Tue, 2010-03-16 at 10:52 +0800, edward_do...@wistron.com wrote:
> Dear,
> 
>I study network-manager 0.8 first time by myself.
> 
> And I meet some issue. Now I use python & gtk+ language.
> 
> I want to control all network interfaces in my window.
> 
> What do I add D-bus script in my language,
> 
> Like this : 
> 
> First window I can scan AP & choice.

NetworkManager periodically scans for you, though we're looking into
making a scan request call via D-Bus if you want updated AP lists more
often than every 2 minutes, which I suspect you'd be interested in.

You can get the list of all APs the devices sees via D-Bus; see the NM
D-Bus API spec here:

http://projects.gnome.org/NetworkManager/developers/spec-08.html

This allows you to ask NetworkManager for the AP list for a specific
wifi device and get each AP's details like signal strength and
encryption type.

> Second window I can type password.

NetworkManager doesn't quite operate like that; instead you have "saved
connections" (representing all the parameters needed to connect to a
specific network) that the user-interface applet provides to
NetworkManager via D-Bus.  NM will only connect to APs that are
specified by these "saved connections".  How you store that saved
connection is up to your applet; the GNOME nm-applet saves them in
GConf, the KDE networkmanager applet saves them in other ways.  The
programs that provide this connection data to NM are called "settings
services".

So when you want to connect, your applet does the following:

1) do I have a saved connection that matches up with this access point?
If so, tell NM to connect to the AP using this saved connection.

2) If not, create a saved connection, tell NetworkManager that you've
created a new saved connection via D-Bus (see the system settings
interface documentation [1]), then tell NM that you want to connect to
the AP using that saved connection.

3) When the D-Bus ActivateConnection() call returns, it'll send an
"ActiveConnection" object back to you, which you can use to track the
status of the in-progress connection to the access point, and you can
show that progress in the UI.

If you want any other help or clarification, let me know.

Dan

[1] 
http://projects.gnome.org/NetworkManager/developers/spec-08.html#org.freedesktop.NetworkManagerSettings


___
NetworkManager-list mailing list
NetworkManager-list@gnome.org
http://mail.gnome.org/mailman/listinfo/networkmanager-list


RE: Newbie learn how to use NetworkManager lib

2010-03-17 Thread Dan Williams
On Wed, 2010-03-17 at 20:29 -0700, Nguyen Canh Toan wrote:
> Dear Mark,
> 
>  
> 
> Thank you for your reply, 
> 
>  
> 
> First, sorry because of providing lack of information. Let me tell you
> a little about what I am doing now: I am developing an application on
> Ubuntun, with C programming language, which behave very similar to
> nm-applet, it manage all settings & connection state of an HSPA USB
> Data Device (it means only manage wwan connection type, you know). So,
> I decided to hack nm-applet source code.
> 
>  
> 
> I have experienced with programming C & C++ on windows platforms, and
> I feel quickly familiar with programming C on linux. My problem is: I
> found few documentation of NetworkManager lib (libnm…) and don’t know
> where to find API specifications also signals specifications. I did
> modify nm-applet GUI and now I need to continually get connection
> state (status, speed, description, …) to update my GUI forms

If you don't mind contributing the patches back for the functionality
you're adding that would be great!  I keep trying to get people to work
on the data usage and thresholds stuff but nobody is so far... :)

I've just spent the last two weeks adding a bunch of stuff to nm-applet
and ModemManager that you'd be interested in, including the 3G device's
registration state and current access technology, operator names, signal
strength, etc.  That's done talking directly to ModemManager, the D-Bus
interface for which is here:

http://bigw.org/~dan/mm-spec.html

If you look in current applet git here:

http://git.gnome.org/browse/network-manager-applet/log/

and specifically the patches here:

http://git.gnome.org/browse/network-manager-applet/commit/?id=a441f3a9aee5c63d6307e61eae090210c139fcf7
http://git.gnome.org/browse/network-manager-applet/commit/?id=9d6e78a28e109157752c911307e874872d7f976e

you can get an idea of how to talk directly to ModemManager to get the
device's current status, signal strength, etc.  NetworkManager provides
the actual IP connection and network connection functionality, but it
was pointless to duplicate the ModemManager D-Bus API in NetworkManager
just to provide stuff like signal strength/etc that is already
sufficiently exposed by ModemManager.

There's documentation of libnm-glib built with libnm-glib, which should
give you some indication of how things work.  I've just posted the
generated HTML documentation for libnm-glib and libnm-util here:

http://projects.gnome.org/NetworkManager/developers/libnm-glib/08/index.html
http://projects.gnome.org/NetworkManager/developers/libnm-util/08/index.html

The docs aren't entirely complete, but they should give you a much
better idea about what the functions are that nm-applet is using.  Any
suggestions if something seems unclear would help us improve the
documentation too.

Dan


>  
> 
>  
> 
> ToanNC.
> 
>  
> 
>  
> 
>
> __
> From: Mark Renouf [mailto:mark.ren...@gmail.com] 
> Sent: Tuesday, March 16, 2010 4:39 AM
> To: Nguyen Canh Toan
> Cc: networkmanager-list@gnome.org
> Subject: Re: Newbie learn how to use NetworkManager lib
> 
> 
>  
> 
> Having just done such a thing I think I can help point you in the
> right direction. 
> 
> Of course, the exact methods and effort required depend heavily on
> your choice of language. If you are writing C, then I would recommend
> libnm-glib and libnm-util. You can monitor device state via gobject
> signal handlers. 
> 
> Anyone familiar with Glib can help you with that. Ping me off-list and
> I could share some code snippets.
> 
> > On Mar 16, 2010 4:12 AM, "Nguyen Canh Toan" 
> > wrote:
> > 
> > Dear all,
> > 
> >  
> > 
> > I am newbie to NetworkManager. Currently, I have to build an
> > application which monitor networking state (connection state,
> > current download & upload speed …) I don’t know how to start. Please
> > help L
> > 
> >  
> > 
> > Thanks,
> > 
> > ToanNC
> > 
> > 
> > 
> > ___
> > NetworkManager-list mailing list
> > NetworkManager-list@gnome.org
> > http://mail.gnome.org/mailman/listinfo/networkmanager-list
> > 
> ___
> NetworkManager-list mailing list
> NetworkManager-list@gnome.org
> http://mail.gnome.org/mailman/listinfo/networkmanager-list


___
NetworkManager-list mailing list
NetworkManager-list@gnome.org
http://mail.gnome.org/mailman/listinfo/networkmanager-list


RE: Received Bytes, transmited bytes and connection speed

2010-03-17 Thread Nguyen Canh Toan
Dear Dan,

I only want to get an approximate connection speed but not a actual
connection speed. 
As you mention, with 3G devices, I only get a general access technology, but
I don't care what is this. All things I interest in the speed and/or total
bytes transmitted and received. How can I get it?

Toannc.

-Original Message-
From: Dan Williams [mailto:d...@redhat.com] 
Sent: Wednesday, March 17, 2010 5:29 PM
To: Nguyen Canh Toan
Cc: networkmanager-list@gnome.org
Subject: Re: Received Bytes, transmited bytes and connection speed

On Thu, 2010-03-18 at 03:40 -0700, Nguyen Canh Toan wrote:
> Dear all,
> 
>  
> 
> I am wondering how to get current connection speed. Or, alternatively,
> how to get total bytes received and transmited (so current speed ~
> RX[n]-RX[n-1]).

Using bytes received and transmitted won't really get you a connection
speed, since devices are usually not transmitting at full capacity all
the time.  It'll give you a "current DL/UL rate", but certainly not the
actual connection speed of the device.

Current connection speed is tricky, and depends on the specific device
and the technology that the device is using.

For Ethernet, you have the 'Speed' property in the D-Bus interface,
which reports the current network device speed (10Mb, 100Mb, 1000Mb,
etc) in Mb/s.

For Wifi, there's the 'Bitrate' property in the D-Bus interface, which
while the device is associated to an access point, reports the device's
current rate in Kb/s (since wifi devices can transmit in odd rates, we
can't just use Mb/s).

For 3G, you can only get the general access technology that the device
is using, not a raw bitrate.  ModemManager reports current access
technology for devices that support it via the AccessTechnology property
of the device for GSM devices, which we'll also probably use for CDMA
when that support gets folded in.

For Bluetooth, it'll be the same as either Ethernet or 3G depending on
how you're using the bluetooth device.

Dan



___
NetworkManager-list mailing list
NetworkManager-list@gnome.org
http://mail.gnome.org/mailman/listinfo/networkmanager-list


Re: Network-Manager Trunk and Fedora 12

2010-03-17 Thread Dan Williams
On Mon, 2010-03-15 at 22:59 -0400, Darren Albers wrote:
> On Mon, Mar 15, 2010 at 7:22 PM, Dan Williams  wrote:
> > On Thu, 2010-03-11 at 20:10 -0500, Darren Albers wrote:
> >> On Thu, Mar 11, 2010 at 6:56 PM, Dan Williams  wrote:
> >> > On Wed, 2010-03-10 at 15:45 -0500, Darren Albers wrote:
> >> >> Are there any testing packages I can install to enable Bluetooth DUN
> >> >> support on Fedora 12?
> >> >
> >> > The latest builds in koji should work; I've been doing some heavy
> >> > ModemManager work the past week or two and thus there aren't any builds
> >> > in a suitable state for F12 testing quite yet.
> >> >
> >> > http://koji.fedoraproject.org/koji/buildinfo?buildID=157530
> >> >
> >> > Dan
> >> >
> >> >
> >> >
> >>
> >> Sorry one further question, is it safe to use these builds with an
> >> older version of ModemManager?   Safe obviously being a relatively
> >> term considering it isn't even in testing yet but enough for someone
> >> to play with?
> >
> > Yes, they should be pretty safe for versions of NM from 2010 or very
> > late 2009.
> >
> > Dan
> >
> >
> >
> 
> Thanks Dan!  I actually tested it on Fedora 13 but ModemManager
> doesn't seem to like how the Blackberry responds.   I filed a bug
> report on it but as usual for Blackberry's they seem to respond a
> little differently that what you expect.  In this case it responds
> with:
> ** Message: (rfcomm0) opening serial device...
> ** (modem-manager:2729): DEBUG: (rfcomm0): probe requested by plugin 'Generic'
> ** (modem-manager:2729): DEBUG: (rfcomm0): --> 'AT+GCAP'
> ** (modem-manager:2729): DEBUG: (rfcomm0): <--
> '+GCAP:OK'
> ** (modem-manager:2729): DEBUG: (rfcomm0): --> 'AT+GCAP'
> ** (modem-manager:2729): DEBUG: (rfcomm0): <--
> '+GCAP:OK'
> ** (modem-manager:2729): DEBUG: (rfcomm0): --> 'AT+GCAP'
> ** (modem-manager:2729): DEBUG: (rfcomm0): <--
> '+GCAP:OK'
> ** (modem-manager:2729): DEBUG: (rfcomm0): --> 'ATI'
> ** (modem-manager:2729): DEBUG: (rfcomm0): <-- 'Research In Motion BlackBerry
> IP ModemOK'
> ** (modem-manager:2729): DEBUG: (rfcomm0): --> 'AT+CPIN?'
> ** (modem-manager:2729): DEBUG: (rfcomm0): <-- '+CPIN:
> READYOK'
> ** (modem-manager:2729): DEBUG: (rfcomm0): --> 'AT+CGMM'
> ** (modem-manager:2729): DEBUG: (rfcomm0): <-- 'RIM BlackBerry Device
> 4001507OK'
> ** Message: (rfcomm0) closing serial device...
> 
> I guess when it does this ModemManager doesn't recognize the response
> from CGMM (Model Query?) so it doesn't go any further?  CPIN seems to
> match what is expected in mm-generic-gsm.c but I can't seem to follow
> what it expects from CGMM and where that is checked.

It's not responding to GCAP so we don't actually know whether it's a
CDMA or a GSM device.  What kind is yours?

If yours is a GSM device, then that's great since it responds to AT+CPIN
correctly and we'll know it's a GSM device with recent ModemManager
versions.

If yours is a CDMA device and it responds to AT+CPIN, then I hate the
world and we'll have to figure something else out :)

Dan


___
NetworkManager-list mailing list
NetworkManager-list@gnome.org
http://mail.gnome.org/mailman/listinfo/networkmanager-list


Re: Modem Manager gets into a funny state with CDMA modems

2010-03-17 Thread Dan Williams
On Wed, 2010-03-17 at 20:34 -0400, Jason Glasgow wrote:
> Dan, No problem.  I'm happy to rebuild the kernel module and I'm
> familiar with the process.)  I'm using a 2.6.31 kernel.
> 
> 
> Do you suggest that I just try removing the code below?

Nah, just put something like:

if (tty && !C_CLOCAL(tty)) {
+   printk(KERN_INFO "%s: about to call tty_hangup!", __func__);
tty_hangup(tty);
}

in that if statement and lets see if that gets printed in 'dmesg' when
the problem occurs.  If not, then it's something else in the stack
that's sending the SIGHUP I think.

Dan

> 
> 
>  if (old_dcd_state && !portdata->dcd_state) {
> struct tty_struct *tty =
> 
>  tty_port_tty_get(&port->port);
> if (tty && !C_CLOCAL(tty))
> tty_hangup(tty);
> tty_kref_put(tty);
> }
> 
> 
> -Jason
> 
> 
> On Wed, Mar 17, 2010 at 8:04 PM, Dan Williams  wrote:
> On Wed, 2010-03-17 at 17:48 -0400, Jason Glasgow wrote:
> > Dan,
> > I tried the patch below, but it had no effect.
> 
> 
> Are you comfortable with rebuilding a single kernel driver
> (don't need
> to do the whole kernel)?  If so, we could put some code into
> the
> 'option' driver to see if the tty_hangup() call in
> option_instat_callback() is causing your problem or not.  It's
> actually
> pretty easy, if you have the option.c file and kernel headers
> from your
> kernel version.  If you're not familiar with the process I can
> give you
> some tips.
> 
> 
> Dan
> 
> > -Jason
> >
> >
> >
> >
> > diff --git a/src/mm-serial-port.c b/src/mm-serial-port.c
> >
> >
> > index 07010e1..0ed57f9 100644
> >
> >
> > --- a/src/mm-serial-port.c
> >
> >
> > +++ b/src/mm-serial-port.c
> >
> >
> > @@ -358,7 +358,7 @@ config_fd (MMSerialPort *self, GError
> **error)
> >
> >
> >  stbuf.c_cc[VEOF] = 1;
> >
> >
> >
> >
> >
> >  stbuf.c_cflag &= ~(CBAUD | CSIZE | CSTOPB | CLOCAL |
> PARENB);
> >
> >
> > -stbuf.c_cflag |= (speed | bits | CREAD | 0 | parity |
> stopbits);
> >
> >
> > +stbuf.c_cflag |= (speed | bits | CREAD | 0 | parity |
> stopbits |
> > CLOCAL);
> >
> >
> >
> >
> >  if (ioctl (priv->fd, TCSETA, &stbuf) < 0) {
> >
> >
> >  g_set_error (error,
> >
> >
> >
> >
> > jglas...@visitor-1950-269a-x600:modemmanager$
> >
> >
> >
> > On Mon, Mar 15, 2010 at 8:22 PM, Jason Glasgow
> 
> > wrote:
> > Sure, I'll give that a try and let you know what
> happens.
> >  Thanks, -Jason
> >
> >
> >
> > On Mon, Mar 15, 2010 at 7:13 PM, Dan Williams
> >  wrote:
> > On Fri, 2010-03-12 at 12:50 -0500, Jason
> Glasgow
> > wrote:
> > > Dan,
> > >
> > >
> > > Novatel U760.  The modem appears to be
> fine (not
> > sure what you mean
> > > drop off the bus.  If I reopen the device
> all is
> > fine).  I hacked up
> > > my version of the code (mm-generic-cdma.c)
> to always
> > call
> > > mm_serial_port_open() before using the
> file
> > descriptor, and it works
> > > great.  But I don't think this is a good
> solution.
> >
> >
> > It looks like this device actually cares
> about DCD
> > state, or at least
> > it's sending messages that make 'option'
> think it
> > does.  Can you try
> > adding CLOCAL to the c_cflags in
> mm-serial-port.c's
> > config_fd()
> > function?  Just logical OR it together with
> the rest
> > of the flags there
> > and let us know if that helps things.
> >
> > I've been meaning to add CLOCAL for a while,
> since for
> > most 3G modems
> > the control lines 

Re: The logic behind user/system settings

2010-03-17 Thread Dan Williams
On Tue, 2010-03-16 at 07:04 +0300, Andrey Borzenkov wrote:
> On Tuesday 16 of March 2010 02:10:25 Dan Williams wrote:
> > On Sat, 2010-03-13 at 08:17 +0300, Andrey Borzenkov wrote:
> > > On Friday 12 of March 2010 02:51:33 Dan Williams wrote:
> > > > On Wed, 2010-03-10 at 07:04 +0300, Andrey Borzenkov wrote:
> > > > > On Wednesday 10 of March 2010 04:12:19 Dan Williams wrote:
> > > > > > As you've discovered, there are user-specific settings (which
> > > > > > are only available when that user is logged in) and
> > > > > > system-wide settings (which are available to all users *and*
> > > > > > before any user has logged in).  The problem you're hitting
> > > > > > is when there aren't any settings at all, like right after
> > > > > > an install.
> > > > > > 
> > > > > > So NetworkManager creates an internal "Auto " connection
> > > > > > that at least allows your system to get online if there are
> > > > > > any DHCP-configured ethernet devices on the system.  This is
> > > > > > a "system-wide" connection and should be available at boot
> > > > > > and before login.
> > > > > 
> > > > > Are they created by NM service or
> > > > > nm-connection-editor/nm-applet? Should they be present even if
> > > > > other, explicitly defined connections exist?
> > > > 
> > > > It is created by NM itself.  It's present only if no other
> > > > /system/ connections are defined that apply to that device.
> > > 
> > > How NM decides that /system/ connection applies to device? I always
> > > see two auto connections for wlan interface - "Auto Wireless" and
> > > "Auto $CURRENT_SSID" even though there are system connections with
> > > $CURRENT_SSID defined.
> > 
> > A connection can be applied to a device if it's compatible with that
> > device; that means that the connection isn't MAC-locked to a
> > different device, or the connection doesn't require encryption
> > capabilities that the device doesn't support (ie a WPA2/AES
> > connection cannot be used with an old Prism card that only does
> > TKIP), etc.
> > 
> > Is the "Auto Wireless" a system connection? 
> 
> Actually, now. "Available for all users" is unchecked and greyed out. I 
> also do not see these connections using cnetworkmanager. They appear to 
> be created by nm-connection-editor itself for *some* APs in

Ok, the fact that the box is grayed out means that either (1) PolicyKit
and/or ConsoleKit aren't correctly installed (unlikely), or (2) you
don't have a system-settings plugin installed which is capable of saving
connections.  Check your /etc/NetworkManager/nm-system-settings.conf
file to see what system settings plugins you have enabled.

If you have 'keyfile' enabled, look
in /etc/NetworkManager/system-connections/.

If you  have 'ifupdown' enabled, look in /etc/network/interfaces.

If you have 'ifcfg-rh' enabled, look for files
in /etc/sysconfig/network-scripts that start with "ifcfg-".

> ./src/applet-device-wifi.c:wireless_new_auto_connection()

Yes, the only two places new user connections are created are in the
applet, when you click on a scanned network for which there isn't an
existing connection, or in the connection editor when you click "New".

> I do not understand how APs are selected - n-c-e always shows exactly 
> two of them. One is my home AP; another has literal name 'Wireless', but 
> I do not see it in scan result.

The connection editor only shows connections that *soemthing* has
defined.  So it's either provided by some system settings plugin, or
it's been created in the applet.  The name "Wireless" seems to indicate
that it's a system connection, since the applet always names things
"Auto ".  It could also have been created by a user manually through
the connection editor, but by default the connection editor names new
connections like "Wireless connection 1" and "Wireless connection 2".
So my guess is that this connection is a system connection provided by
one of your plugins.

Dan


___
NetworkManager-list mailing list
NetworkManager-list@gnome.org
http://mail.gnome.org/mailman/listinfo/networkmanager-list


Re: v0.7.998: doesn't see ra0

2010-03-17 Thread Dan Williams
On Tue, 2010-03-16 at 06:49 +0300, Andrey Borzenkov wrote:
> On Tuesday 16 of March 2010 02:05:27 Dan Williams wrote:
> > On Sun, 2010-03-14 at 15:59 -0700, Colin Brace wrote:
> > > Hi all,
> > > 
> > > First, I'd like to report that NM works really well with my mobile
> > > broadband USB stick (a Huawei, from Vodafone).
> > > 
> > > Second, I have Fedora 12 installed on an Asus Eee PC 1101HA, with
> > > the Ralink RT3090 wireless chipset.
> > > 
> > > A driver for this chipset isn't in the kernel yet, so I downloaded
> > > the source from Ralink, compiled and installed it under kernel
> > > 2.6.32.9-70. It loads on boot time, works fine from the command
> > > line (ifconfig ra0... iwconfig... dhclient...).
> > > 
> > > However, I can't get NM to see it.
> > 
> > This is usually because the driver you've got has bugs or isn't
> > correctly implemented. 
> 
> Last time I had to use driver taken directly from Ralink site was about 
> 5 years ago, but IIRC it did not implement WEXT at all - full WPA was 
> done by driver internally and PSK had to be set using iwpriv. Of course 
> things could have changed in the mean time.

Yeah, they have; it's certainly not as good as an actual upstream driver
(though rt2x00 doesn't fully support these devices yet) but they at
least added some WEXT support for WPA.  It's still a rough ride though.

Dan


___
NetworkManager-list mailing list
NetworkManager-list@gnome.org
http://mail.gnome.org/mailman/listinfo/networkmanager-list


Re: ModemManager / MBM / authentication

2010-03-17 Thread Dan Williams
On Tue, 2010-03-16 at 09:24 +0100, Andreas Böhler wrote:
> On Mon, 2010-03-15 at 16:22 -0700, Dan Williams wrote:
> > On Thu, 2010-03-11 at 15:55 -0800, Dan Williams wrote:
> > > On Mon, 2010-03-08 at 19:31 +0100, Andreas Böhler wrote:
> > > > I'm using NetworkManager 0.8 / ModemManager 0.3 on Arch Linux in
> > > > Austria, my provider is A1 on an Ericsson F3507g HSPA card. It is
> > > > necessary to authenticate as user "p...@a1plus.at". 
> > > > 
> > > > With the current NM/MM it is impossible to authenticate with this
> > > > username (because of the "@" symbol), the card needs to be put into
> > > > UTF-8 mode first (Thanks to Torgny Johansson for pointing this out on
> > > > the mbm-devel list). The attached patch forces UTF-8 if an
> > > > authentication is requested. It is against MM 0.3 as found in Arch, but
> > > > it should apply with a small offset to the current git as well.
> > > > 
> > > > I'm not sure if it is safe to force UTF-8 for everyone, but at least it
> > > > works for me!
> > > > 
> > > > However, I'm experiencing another small problem with the Ericsson card:
> > > > I have to enter the password manually everytime I fire up the
> > > > connection. If I use a Huawei K3715 HSPA stick, it connects happily
> > > > without asking first. Is this a known problem with the Ericsson card?
> > > 
> > > Different cards support different charsets, I'm investigating this issue
> > > generally.  Thanks for the heads-up.  But your patch is mostly correct,
> > > though I think we probably want to use UTF-8 or UCS2 everywhere we can,
> > > and fall back to "GSM" when that doesn't work.  Currently we don't set a
> > > charset, which is why you have this issue.  That's a bug.
> > 
> > I've pushed some fixes for this issue to MM git; any chance you can test
> > them out for me?
> 
> Just checked out today's git of NM and MM: It registers and connects
> fine now!
> 
> It still asks for the password and MM sometimes tries to use the ttyACM2
> device which fails. Disabling and enabling the card again usually works
> and MM either uses ttyACM0 or ttyACM1 which are both fine. This issue
> was also present in the stable release!

Hmm; that indicates that we need to make sure we grab the right port;
I'll ask the Ericsson  guys if we can figure out which port  is always
the right one.

Dan


___
NetworkManager-list mailing list
NetworkManager-list@gnome.org
http://mail.gnome.org/mailman/listinfo/networkmanager-list


Re: network manager install help please

2010-03-17 Thread Dan Williams
On Tue, 2010-03-16 at 21:51 +, Ken Taylor wrote:
> Hi Guys
> 
> I have a Suse distro
> 
> How do I install the network manager?
> 
> I have it downloaded, but can't work out how to install it
> 
> Any help really appreciated as my little lenovo S10e has lost it's
> ability to connect to a wifi network and Lenovo Support are clueless

Usually NetworkManager is included with the Linux distribution that
you've installed.  If not, you can use that distribution's package
manager or command-line tools to install NetworkManager.  For
Ubuntu/Debian-derived distributions, try the System menu, ->
Administration, and then Synaptic Package Manager.  Search for
"network-manager" and check (or "mark for installation") it when it's
found, then hit the Apply button and let the operation complete.

For Fedora, choose System -> Administration -> Add/Remove software, then
search for "NetworkManager", then check "NetworkManager" and
"NetworkManager-gnome", then hit Apply and let the operation complete.

Other distros have similar mechanisms for installing new software.  Hope
this helps!

Dan


___
NetworkManager-list mailing list
NetworkManager-list@gnome.org
http://mail.gnome.org/mailman/listinfo/networkmanager-list


Re: Modem Manager gets into a funny state with CDMA modems

2010-03-17 Thread Jason Glasgow
Dan, No problem.  I'm happy to rebuild the kernel module and I'm familiar
with the process.)  I'm using a 2.6.31 kernel.

Do you suggest that I just try removing the code below?


 if (old_dcd_state && !portdata->dcd_state) {
struct tty_struct *tty =

 tty_port_tty_get(&port->port);
if (tty && !C_CLOCAL(tty))
tty_hangup(tty);
tty_kref_put(tty);
}

-Jason


On Wed, Mar 17, 2010 at 8:04 PM, Dan Williams  wrote:

> On Wed, 2010-03-17 at 17:48 -0400, Jason Glasgow wrote:
> > Dan,
> > I tried the patch below, but it had no effect.
>
> Are you comfortable with rebuilding a single kernel driver (don't need
> to do the whole kernel)?  If so, we could put some code into the
> 'option' driver to see if the tty_hangup() call in
> option_instat_callback() is causing your problem or not.  It's actually
> pretty easy, if you have the option.c file and kernel headers from your
> kernel version.  If you're not familiar with the process I can give you
> some tips.
>
> Dan
>
> > -Jason
> >
> >
> >
> >
> > diff --git a/src/mm-serial-port.c b/src/mm-serial-port.c
> >
> >
> > index 07010e1..0ed57f9 100644
> >
> >
> > --- a/src/mm-serial-port.c
> >
> >
> > +++ b/src/mm-serial-port.c
> >
> >
> > @@ -358,7 +358,7 @@ config_fd (MMSerialPort *self, GError **error)
> >
> >
> >  stbuf.c_cc[VEOF] = 1;
> >
> >
> >
> >
> >
> >  stbuf.c_cflag &= ~(CBAUD | CSIZE | CSTOPB | CLOCAL | PARENB);
> >
> >
> > -stbuf.c_cflag |= (speed | bits | CREAD | 0 | parity | stopbits);
> >
> >
> > +stbuf.c_cflag |= (speed | bits | CREAD | 0 | parity | stopbits |
> > CLOCAL);
> >
> >
> >
> >
> >  if (ioctl (priv->fd, TCSETA, &stbuf) < 0) {
> >
> >
> >  g_set_error (error,
> >
> >
> >
> >
> > jglas...@visitor-1950-269a-x600:modemmanager$
> >
> >
> >
> > On Mon, Mar 15, 2010 at 8:22 PM, Jason Glasgow 
> > wrote:
> > Sure, I'll give that a try and let you know what happens.
> >  Thanks, -Jason
> >
> >
> >
> > On Mon, Mar 15, 2010 at 7:13 PM, Dan Williams
> >  wrote:
> > On Fri, 2010-03-12 at 12:50 -0500, Jason Glasgow
> > wrote:
> > > Dan,
> > >
> > >
> > > Novatel U760.  The modem appears to be fine (not
> > sure what you mean
> > > drop off the bus.  If I reopen the device all is
> > fine).  I hacked up
> > > my version of the code (mm-generic-cdma.c) to always
> > call
> > > mm_serial_port_open() before using the file
> > descriptor, and it works
> > > great.  But I don't think this is a good solution.
> >
> >
> > It looks like this device actually cares about DCD
> > state, or at least
> > it's sending messages that make 'option' think it
> > does.  Can you try
> > adding CLOCAL to the c_cflags in mm-serial-port.c's
> > config_fd()
> > function?  Just logical OR it together with the rest
> > of the flags there
> > and let us know if that helps things.
> >
> > I've been meaning to add CLOCAL for a while, since for
> > most 3G modems
> > the control lines are completely ignored by either the
> > driver or the
> > device anyway, but I've shied away from it because
> > it's a change that
> > could potentially break stuff that I have no way to
> > test.  There's a lot
> > of odd hardware out there.  Now that we're on the
> > track to MM 0.4
> > though, we may want to revisit that.
> >
> > Dan
> >
> >
> > >
> > > -Jason
> > >
> > >
> > > diff --git a/src/mm-generic-cdma.c
> > b/src/mm-generic-cdma.c
> > > index 50cd86c..7f44775 100644
> > > --- a/src/mm-generic-cdma.c
> > > +++ b/src/mm-generic-cdma.c
> > > @@ -598,6 +598,10 @@ connect (MMModem *modem,
> > >
> > >  info = mm_callback_info_new (modem, callback,
> > user_data);
> > >  command = g_strconcat ("DT", number, NULL);
> > > +if (!mm_serial_port_open (priv->primary,
> > &info->error)) {
> > > +g_assert (info->error);
> > > +/* TODO(jglasgow): what should we do? */
> > > +}
> > >  mm_serial_port_queue_command (priv->primary,
> > command, 90,
> > > dial_done,

Re: Received Bytes, transmited bytes and connection speed

2010-03-17 Thread Dan Williams
On Thu, 2010-03-18 at 03:40 -0700, Nguyen Canh Toan wrote:
> Dear all,
> 
>  
> 
> I am wondering how to get current connection speed. Or, alternatively,
> how to get total bytes received and transmited (so current speed ~
> RX[n]-RX[n-1]).

Using bytes received and transmitted won't really get you a connection
speed, since devices are usually not transmitting at full capacity all
the time.  It'll give you a "current DL/UL rate", but certainly not the
actual connection speed of the device.

Current connection speed is tricky, and depends on the specific device
and the technology that the device is using.

For Ethernet, you have the 'Speed' property in the D-Bus interface,
which reports the current network device speed (10Mb, 100Mb, 1000Mb,
etc) in Mb/s.

For Wifi, there's the 'Bitrate' property in the D-Bus interface, which
while the device is associated to an access point, reports the device's
current rate in Kb/s (since wifi devices can transmit in odd rates, we
can't just use Mb/s).

For 3G, you can only get the general access technology that the device
is using, not a raw bitrate.  ModemManager reports current access
technology for devices that support it via the AccessTechnology property
of the device for GSM devices, which we'll also probably use for CDMA
when that support gets folded in.

For Bluetooth, it'll be the same as either Ethernet or 3G depending on
how you're using the bluetooth device.

Dan



___
NetworkManager-list mailing list
NetworkManager-list@gnome.org
http://mail.gnome.org/mailman/listinfo/networkmanager-list


Re: NetworkManager multi-client support

2010-03-17 Thread Dan Williams
On Tue, 2010-03-16 at 12:43 -0400, Bill C Riemers wrote:
> I do not know if this is the same thing, but one really annoying think
> I have found with network manager, is the desktop icon for it only
> appears under one login.   Which means for example if my son gets up
> in the morning and logs into my laptop to play a game.   When I come
> down and press "switch user".   My login will have no access to
> network manager.   If I need to connect to vpn or such, I'm screwed.
> If the wifi connection drops and I need to change a setting, I end up
> having to logout, force logout my son, and then log back in, just so I
> can access the wifi settings.
> 
> Considering that Linux is designed from the ground up to be a
> multi-user multi-process operating system, this type of oversight
> seems unimaginable.   So what can I do to help to fix this?

Fast-user-switching has only really become feasible on Linux in the last
few years, and that's what you're looking for.  There's a plan in place
for supporting it though, so it'll show for an upcoming release.  Yes,
it sucks that it's not "supported" yet.  But we're working to fix that.

Dan

> 
> Bill
> 
> 
> On 16/03/10 01:52 AM, 代尔欣 wrote: 
> > Hi Dan,
> >I add some comments below. Thanks!
> > 
> > 2010/3/16 Dan Williams 
> > On Fri, 2010-03-12 at 09:20 +0800, 代尔欣 wrote:
> > > Thanks! Dan. The clients I mean are 2 applications on same
> > computer
> > > and run at same time.
> > 
> > 
> > Are the applications run as different unix users?  The
> > current
> > permissions model in Linux in general is largely tied to
> > specific users;
> > generally a user is allowed to perform some operation (like
> > connecting
> > 3G) or they are not allowed to perform it.
> > The 2 applications run as same user.  
> > 
> > 
> > If you don't actually care about permissions, then NM can
> > certainly
> > support the use-cases you mention, since any client using
> > D-Bus can talk
> > to NetworkManager.  But certain restrictions apply to
> > telling NM to
> > activate/deactivate connections due to security concerns.
> > It's an embedded device. Only one user available. So do not have
> > permission concern.
> > 
> > 
> > To activate connections, the application must be running as
> > the same
> > unix user as nm-applet (or knetworkmanager, or whatever), or
> > it must be
> > running as root.  This prevents unprivileged daemons or
> > other
> > unprivileged users from hijacking your network connections.
> >  As long as
> > these restrictions are met, the application can control
> > network
> > connections or get their status.
> > Questions about the use-case:
> > 
> > Assume the 2 applications are nm-applet1 and nm-applet2. And the 2
> > applications have implemented correctly.
> > 
> > After both application running, when activate the connection through
> > nm-applet1. Can nm-applet2 also know this and change to correct
> > status?
> > 
> > When the connection is *activating* through nm-applet1, user through
> > nm-applet2 activate the connection again! What will happen? NM
> > daemon can handle this or just confused.
> > 
> > 
> > 
> > Dan
> > 
> > > 2010/3/12 Dan Williams 
> > > On Thu, 2010-03-11 at 13:56 +0800, 代尔欣 wrote:
> > > > Hi all,
> > > >Does NM daemon support this usage? I know
> > it's weird.
> > > But
> > > > please help.
> > > >
> > > > Device only have one wifi modem and one 3G
> > modem.
> > > >
> > > > Client1:
> > > > a. User can connect wifi through it.
> > > > b. User can't connect 3G using it but it can
> > reflect 3G
> > > connection
> > > > states.
> > >
> > >
> > > By "clients" do you mean two users or applications
> > on the same
> > > computer?
> > >
> > > Dan
> > >
> > > > Client2:
> > > > a. User can connect wifi through it.
> > > > b. User can connect 3G through it but it do not
> > need reflect
> > > 3G
> > > > connection states.
> > > >
> > > > Can NM daemon handle multi-client?
> > > >
> > > > When connect 3G through client2, can client1
> > know it?
> > > >
> > > > If user connect AP1 through client1, and then
> > connect AP2
> > > through
> > > > client2, what will happen? And other
> > combinat

Re: Disabling wireless networking.

2010-03-17 Thread Dan Williams
On Tue, 2010-03-16 at 10:04 +0300, Eugene Crosser wrote:
> Dan Williams wrote:
> 
> > Second is that NM 0.8.x has IPv6 support, and if you're running that
> > version you can set your wifi connection's IPv6 method to "ignore", and
> > NM will not start IPv6 on that interface.
> 
> network-manager:
>   Installed: 0.8~a~git.20091013t193206.679d548-0ubuntu1
> 
> IPv6 set to "ignore" in the connection editor.
> The router is running radvd.
> 
> I *am* getting RA IPv6 address. As far as I understand, this is done by the
> kernel without the help of networkmanager or any other userspace. Actually, it
> works quite well *unless* I try to configure anything IPv6 related in the
> connection editor, as I have posted earlier ("Additional IPv6 address").

For backwards compatibility reasons, NM won't suppress the kernel's
automatic IPv6 ability if it's been enabled via /proc by your
distribution's init scripts.  What we probably should do is add a
"disabled" method that will actually turn stuff off.

Ignore means NM won't touch IPv6 on the interface, just like NM 0.7
didn't.

I'll have to check out your original problem again and make sure that
what we expect to happen does happen.

> About the original question: isn't there any way to specify metric on the 
> routes
> that would make the kernel always "prefer" the Ethernet interface?

It should do that already; the priority order that controls how NM
assigns the default route is (unless you've checked "Only use this
connection for resources on its network" in the Routes dialog of the
connection editor):

1. Ethernet
2. Wifi
3. 3G/Bluetooth

But you can also set a metric on routes you add yourself through the
"Routes" dialog in the connection editor.

Dan


___
NetworkManager-list mailing list
NetworkManager-list@gnome.org
http://mail.gnome.org/mailman/listinfo/networkmanager-list


Re: network manager install help please

2010-03-17 Thread Larry Finger
On 03/16/2010 04:51 PM, Ken Taylor wrote:
> Hi Guys
> 
> I have a Suse distro
> 
> How do I install the network manager?
> 
> I have it downloaded, but can't work out how to install it
> 
> Any help really appreciated as my little lenovo S10e has lost it's
> ability to connect to a wifi network and Lenovo Support are clueless

If it is openSUSE 11.1 or 11.2, it is built in. For earlier releases, you would
have to build from source. What did you download?
___
NetworkManager-list mailing list
NetworkManager-list@gnome.org
http://mail.gnome.org/mailman/listinfo/networkmanager-list


Re: ZTE EVDO is not working in the Updated fedora.

2010-03-17 Thread Dan Williams
On Tue, 2010-03-16 at 08:11 +0530, Smartboy wrote:
> Hello Dan,
>  I think it's a usual problem, I found the same questions in
> several linux forums (with earlier version of Fedora).  but I didn't
> got a solution yet. Fedora says Modem is not responding. but It's
> working well in Windows.
> i tried
> http://www.kenneyjacob.com/2008/04/01/how-to-configure-bsnl-evdo-usb-broadband-in-linux/
>   
> I got the reply as 
> [r...@ameen ~]# wvdial
> --> WvDial: Internet dialer version 1.60
> --> Cannot get information for serial port.
> --> Initializing modem.
> --> Sending: ATZ
> OK
> --> Sending: AT+CRM=1
> --> Sending: ATQ0
> --> Re-Sending: AT+CRM=1
> --> Modem not responding.
> [r...@ameen ~]# 

This is probably because the serial port is not an AT capable port.
Only one port of most devices is AT capable. You've probably run into
the QCDM port here.

Dan


> 
> 
> 
> Dan Williams wrote: 
> > On Sat, 2010-03-13 at 08:42 +1100, Smartboy wrote:
> >   
> > > Hello Dan,
> > >Thanks for getting back to me. I'm using ZTE AC8700 800M Wireless
> > > network terminal. It's having both EVDO service and 1X (CDMA2000)
> > > service. It's service provider is BSNL india.
> > > 
> > > I am a new user of Linux. I just changed to Fedora 12 from Win 7
> > > before 2 weeks. so I don't know much tech details about it. Anyway I
> > > would like to continue using as much as I can. but, now I'm not able
> > > to use internet using my LAPTOP. 
> > > 
> > > Can you pls let me know what I want to do to debug in detail?
> > > "
> > > 1) service NetworkManager stop
> > > 2) killall -TERM modem-manager
> > > 3) modem-manager --debug
> > > 4) service NetworkManager start
> > > 5) try to reproduce the problem, and then reply to this mail with the
> > > output of modem-manager
> > > "
> > > is there any TERMINAL command? 
> > > 
> > 
> > Yeah, these are terminal commands.  But you found that out...  Are you
> > familiar at all with 'minicom' at all?  There's some upcoming stuff that
> > allows us to actually talk to these modems and find out their status,
> > since they dont' provide a very good AT command set.  We can try to see
> > if the device supports any commands, but otherwise we'll need to wait a
> > bit until we can get the new stuff in...
> > 
> > Dan
> > 
> > 
> >   
> > > sothat I can check it easily...
> > > 
> > > Note : The Device is getting detected. but I'm not able to connect
> > > internet. (I havn't made any change in setting, the only thing is I
> > > updated fedora 12 including network manager.)
> > > 
> > > Waiting to hear back from you,
> > > 
> > > Regards,
> > > Rashad
> > > 
> > > 
> > > 
> > > 
> > > 
> > > so It's a big problem for me. 
> > > Dan Williams wrote: 
> > > 
> > > > On Thu, 2010-03-11 at 21:51 +0530, Mr. smart wrote:
> > > >   
> > > >   
> > > > > Hello,
> > > > >I'm using ZTE EVDO Wireless terminal (AC8700) . It was working well
> > > > > in fedora  but  Yesterday I updated to the new updates including
> > > > > network manager, Now my ZTE is not getting connected ...
> > > > > 
> > > > > 
> > > > > Please help me.
> > > > > 
> > > > > 
> > > > > Let me know if you need anymore info regarding this.
> > > > > 
> > > > > 
> > > > Does your provider *only* have EVDO service, ie it does not provide
> > > > 1xRTT service?  You can do the following to help debug:
> > > > 
> > > > 1) service NetworkManager stop
> > > > 2) killall -TERM modem-manager
> > > > 3) modem-manager --debug
> > > > 4) service NetworkManager start
> > > > 5) try to reproduce the problem, and then reply to this mail with the
> > > > output of modem-manager
> > > > 
> > > > Thanks,
> > > > Dan
> > > > 
> > > > 
> > > > 
> > > > 
> > > >   
> > > >   
> > 
> > 
> > 
> >   
> 


___
NetworkManager-list mailing list
NetworkManager-list@gnome.org
http://mail.gnome.org/mailman/listinfo/networkmanager-list


Re: ZTE EVDO is not working in the Updated fedora.

2010-03-17 Thread Dan Williams
On Tue, 2010-03-16 at 19:43 +, Sergio Monteiro Basto wrote:
> Don't see email incoming , so send again .
> 
> On Tue, 2010-03-16 at 08:11 +0530, Smartboy wrote:
> > Hello Dan,
> >  I think it's a usual problem, I found the same questions in
> > several linux forums (with earlier version of Fedora).  but I didn't
> > got a solution yet. Fedora says Modem is not responding. but It's
> > working well in Windows.
> > i tried
> > http://www.kenneyjacob.com/2008/04/01/how-to-configure-bsnl-evdo-usb-broadband-in-linux/
> >   
> > I got the reply as 
> > [r...@ameen ~]# wvdial
> > --> WvDial: Internet dialer version 1.60
> > --> Cannot get information for serial port.
> > --> Initializing modem.
> > --> Sending: ATZ
> > OK
> > --> Sending: AT+CRM=1
> > --> Sending: ATQ0
> > --> Re-Sending: AT+CRM=1
> > --> Modem not responding.
> > [r...@ameen ~]# 
> > 
> > 
> > I think some small change may help to get rid off the problem. 
> > 
> > Whether you got any clue in regarding this?
> > Can you please help me?
> 
> 
> Have you PIN locked ? 
> 
> what you see in /var/log/messages ?
> in a terminal as root do tail -f /var/log/messages, 
> the NetworkManager lines what shows up ?

Most CDMA 1x/EVDO devices don't do PINs the same way that GSM/WCDMA
devices do, so I don't think PIN codes are the problem here.  It's a
limitation with the way that CDMA devices are currently used, because
they usually have on AT-capable port with a very limited command set,
and one or more additional ports that talk the Qualcomm Diagnostic
Monitor protocol (which some Qualcomm-based WCDMA devices also use).
The problem is that the AT command port doesn't have sufficient
capability to report the CDMA 1x registration status separately from the
EVDO registration status.

Dan

> 
> > 
> > Thanks.
> > Rashad
> > 
> > 
> > 
> > Dan Williams wrote: 
> > > On Sat, 2010-03-13 at 08:42 +1100, Smartboy wrote:
> > >   
> > > > Hello Dan,
> > > >Thanks for getting back to me. I'm using ZTE AC8700 800M Wireless
> > > > network terminal. It's having both EVDO service and 1X (CDMA2000)
> > > > service. It's service provider is BSNL india.
> > > > 
> > > > I am a new user of Linux. I just changed to Fedora 12 from Win 7
> > > > before 2 weeks. so I don't know much tech details about it. Anyway I
> > > > would like to continue using as much as I can. but, now I'm not able
> > > > to use internet using my LAPTOP. 
> > > > 
> > > > Can you pls let me know what I want to do to debug in detail?
> > > > "
> > > > 1) service NetworkManager stop
> > > > 2) killall -TERM modem-manager
> > > > 3) modem-manager --debug
> > > > 4) service NetworkManager start
> > > > 5) try to reproduce the problem, and then reply to this mail with the
> > > > output of modem-manager
> > > > "
> > > > is there any TERMINAL command? 
> > > > 
> > > 
> > > Yeah, these are terminal commands.  But you found that out...  Are you
> > > familiar at all with 'minicom' at all?  There's some upcoming stuff that
> > > allows us to actually talk to these modems and find out their status,
> > > since they dont' provide a very good AT command set.  We can try to see
> > > if the device supports any commands, but otherwise we'll need to wait a
> > > bit until we can get the new stuff in...
> > > 
> > > Dan
> > > 
> > > 
> > >   
> > > > sothat I can check it easily...
> > > > 
> > > > Note : The Device is getting detected. but I'm not able to connect
> > > > internet. (I havn't made any change in setting, the only thing is I
> > > > updated fedora 12 including network manager.)
> > > > 
> > > > Waiting to hear back from you,
> > > > 
> > > > Regards,
> > > > Rashad
> > > > 
> > > > 
> > > > 
> > > > 
> > > > 
> > > > so It's a big problem for me. 
> > > > Dan Williams wrote: 
> > > > 
> > > > > On Thu, 2010-03-11 at 21:51 +0530, Mr. smart wrote:
> > > > >   
> > > > >   
> > > > > > Hello,
> > > > > >I'm using ZTE EVDO Wireless terminal (AC8700) . It was working 
> > > > > > well
> > > > > > in fedora  but  Yesterday I updated to the new updates including
> > > > > > network manager, Now my ZTE is not getting connected ...
> > > > > > 
> > > > > > 
> > > > > > Please help me.
> > > > > > 
> > > > > > 
> > > > > > Let me know if you need anymore info regarding this.
> > > > > > 
> > > > > > 
> > > > > Does your provider *only* have EVDO service, ie it does not provide
> > > > > 1xRTT service?  You can do the following to help debug:
> > > > > 
> > > > > 1) service NetworkManager stop
> > > > > 2) killall -TERM modem-manager
> > > > > 3) modem-manager --debug
> > > > > 4) service NetworkManager start
> > > > > 5) try to reproduce the problem, and then reply to this mail with the
> > > > > output of modem-manager
> > > > > 
> > > > > Thanks,
> > > > > Dan
> > > > > 
> > > > > 
> > > > > 
> > > > > 
> > > > >   
> > > > >   
> > > 
> > > 
> > > 
> > >   
> > 
> > ___
> > NetworkManager-list mailing

network manager install help please

2010-03-17 Thread Ken Taylor
Hi Guys

I have a Suse distro

How do I install the network manager?

I have it downloaded, but can't work out how to install it

Any help really appreciated as my little lenovo S10e has lost it's ability
to connect to a wifi network and Lenovo Support are clueless

Ken
___
NetworkManager-list mailing list
NetworkManager-list@gnome.org
http://mail.gnome.org/mailman/listinfo/networkmanager-list


Re: Modem Manager gets into a funny state with CDMA modems

2010-03-17 Thread Dan Williams
On Wed, 2010-03-17 at 17:48 -0400, Jason Glasgow wrote:
> Dan,
> I tried the patch below, but it had no effect.

Are you comfortable with rebuilding a single kernel driver (don't need
to do the whole kernel)?  If so, we could put some code into the
'option' driver to see if the tty_hangup() call in
option_instat_callback() is causing your problem or not.  It's actually
pretty easy, if you have the option.c file and kernel headers from your
kernel version.  If you're not familiar with the process I can give you
some tips.

Dan

> -Jason
> 
> 
> 
> 
> diff --git a/src/mm-serial-port.c b/src/mm-serial-port.c
> 
> 
> index 07010e1..0ed57f9 100644
> 
>
> --- a/src/mm-serial-port.c
> 
> 
> +++ b/src/mm-serial-port.c
> 
> 
> @@ -358,7 +358,7 @@ config_fd (MMSerialPort *self, GError **error)
> 
> 
>  stbuf.c_cc[VEOF] = 1;
> 
> 
> 
> 
> 
>  stbuf.c_cflag &= ~(CBAUD | CSIZE | CSTOPB | CLOCAL | PARENB);
> 
> 
> -stbuf.c_cflag |= (speed | bits | CREAD | 0 | parity | stopbits);
> 
>
> +stbuf.c_cflag |= (speed | bits | CREAD | 0 | parity | stopbits |
> CLOCAL);
> 
> 
> 
> 
>  if (ioctl (priv->fd, TCSETA, &stbuf) < 0) {
> 
> 
>  g_set_error (error,
> 
> 
> 
> 
> jglas...@visitor-1950-269a-x600:modemmanager$ 
> 
> 
> 
> On Mon, Mar 15, 2010 at 8:22 PM, Jason Glasgow 
> wrote:
> Sure, I'll give that a try and let you know what happens.
>  Thanks, -Jason
> 
> 
> 
> On Mon, Mar 15, 2010 at 7:13 PM, Dan Williams
>  wrote:
> On Fri, 2010-03-12 at 12:50 -0500, Jason Glasgow
> wrote:
> > Dan,
> >
> >
> > Novatel U760.  The modem appears to be fine (not
> sure what you mean
> > drop off the bus.  If I reopen the device all is
> fine).  I hacked up
> > my version of the code (mm-generic-cdma.c) to always
> call
> > mm_serial_port_open() before using the file
> descriptor, and it works
> > great.  But I don't think this is a good solution.
> 
> 
> It looks like this device actually cares about DCD
> state, or at least
> it's sending messages that make 'option' think it
> does.  Can you try
> adding CLOCAL to the c_cflags in mm-serial-port.c's
> config_fd()
> function?  Just logical OR it together with the rest
> of the flags there
> and let us know if that helps things.
> 
> I've been meaning to add CLOCAL for a while, since for
> most 3G modems
> the control lines are completely ignored by either the
> driver or the
> device anyway, but I've shied away from it because
> it's a change that
> could potentially break stuff that I have no way to
> test.  There's a lot
> of odd hardware out there.  Now that we're on the
> track to MM 0.4
> though, we may want to revisit that.
> 
> Dan
> 
> 
> >
> > -Jason
> >
> >
> > diff --git a/src/mm-generic-cdma.c
> b/src/mm-generic-cdma.c
> > index 50cd86c..7f44775 100644
> > --- a/src/mm-generic-cdma.c
> > +++ b/src/mm-generic-cdma.c
> > @@ -598,6 +598,10 @@ connect (MMModem *modem,
> >
> >  info = mm_callback_info_new (modem, callback,
> user_data);
> >  command = g_strconcat ("DT", number, NULL);
> > +if (!mm_serial_port_open (priv->primary,
> &info->error)) {
> > +g_assert (info->error);
> > +/* TODO(jglasgow): what should we do? */
> > +}
> >  mm_serial_port_queue_command (priv->primary,
> command, 90,
> > dial_done, info);
> >  g_free (command);
> >  }
> > @@ -620,7 +624,9 @@ disconnect_flash_done
> (MMSerialPort *port,
> >
>  MM_MODEM_STATE_REASON_NONE);
> >  }
> >  } else {
> > -mm_port_set_connected
> (MM_GENERIC_CDMA_GET_PRIVATE
> > (info->modem)->data, FALSE);
> > +MMGenericCdmaPrivate *priv =
> MM_GENERIC_CDMA_GET_PRIVATE
> > 

Re: Modem Manager gets into a funny state with CDMA modems

2010-03-17 Thread Jason Glasgow
Dan,
I tried the patch below, but it had no effect.
-Jason


diff --git a/src/mm-serial-port.c b/src/mm-serial-port.c

index 07010e1..0ed57f9 100644

--- a/src/mm-serial-port.c

+++ b/src/mm-serial-port.c

@@ -358,7 +358,7 @@ config_fd (MMSerialPort *self, GError **error)

 stbuf.c_cc[VEOF] = 1;



 stbuf.c_cflag &= ~(CBAUD | CSIZE | CSTOPB | CLOCAL | PARENB);

-stbuf.c_cflag |= (speed | bits | CREAD | 0 | parity | stopbits);

+stbuf.c_cflag |= (speed | bits | CREAD | 0 | parity | stopbits |
CLOCAL);



 if (ioctl (priv->fd, TCSETA, &stbuf) < 0) {

 g_set_error (error,


jglas...@visitor-1950-269a-x600:modemmanager$


On Mon, Mar 15, 2010 at 8:22 PM, Jason Glasgow  wrote:

> Sure, I'll give that a try and let you know what happens.  Thanks, -Jason
>
>
> On Mon, Mar 15, 2010 at 7:13 PM, Dan Williams  wrote:
>
>> On Fri, 2010-03-12 at 12:50 -0500, Jason Glasgow wrote:
>> > Dan,
>> >
>> >
>> > Novatel U760.  The modem appears to be fine (not sure what you mean
>> > drop off the bus.  If I reopen the device all is fine).  I hacked up
>> > my version of the code (mm-generic-cdma.c) to always call
>> > mm_serial_port_open() before using the file descriptor, and it works
>> > great.  But I don't think this is a good solution.
>>
>> It looks like this device actually cares about DCD state, or at least
>> it's sending messages that make 'option' think it does.  Can you try
>> adding CLOCAL to the c_cflags in mm-serial-port.c's config_fd()
>> function?  Just logical OR it together with the rest of the flags there
>> and let us know if that helps things.
>>
>> I've been meaning to add CLOCAL for a while, since for most 3G modems
>> the control lines are completely ignored by either the driver or the
>> device anyway, but I've shied away from it because it's a change that
>> could potentially break stuff that I have no way to test.  There's a lot
>> of odd hardware out there.  Now that we're on the track to MM 0.4
>> though, we may want to revisit that.
>>
>> Dan
>>
>> >
>> > -Jason
>> >
>> >
>> > diff --git a/src/mm-generic-cdma.c b/src/mm-generic-cdma.c
>> > index 50cd86c..7f44775 100644
>> > --- a/src/mm-generic-cdma.c
>> > +++ b/src/mm-generic-cdma.c
>> > @@ -598,6 +598,10 @@ connect (MMModem *modem,
>> >
>> >  info = mm_callback_info_new (modem, callback, user_data);
>> >  command = g_strconcat ("DT", number, NULL);
>> > +if (!mm_serial_port_open (priv->primary, &info->error)) {
>> > +g_assert (info->error);
>> > +/* TODO(jglasgow): what should we do? */
>> > +}
>> >  mm_serial_port_queue_command (priv->primary, command, 90,
>> > dial_done, info);
>> >  g_free (command);
>> >  }
>> > @@ -620,7 +624,9 @@ disconnect_flash_done (MMSerialPort *port,
>> >  MM_MODEM_STATE_REASON_NONE);
>> >  }
>> >  } else {
>> > -mm_port_set_connected (MM_GENERIC_CDMA_GET_PRIVATE
>> > (info->modem)->data, FALSE);
>> > +MMGenericCdmaPrivate *priv = MM_GENERIC_CDMA_GET_PRIVATE
>> > (info->modem);
>> > +
>> > +mm_port_set_connected (priv->data, FALSE);
>> >  update_enabled_state (MM_GENERIC_CDMA (info->modem), FALSE,
>> > MM_MODEM_STATE_REASON_NONE);
>> >  }
>> >
>> > @@ -753,6 +759,10 @@ get_card_info (MMModem *modem,
>> >  port = priv->secondary;
>> >  }
>> >
>> > +if (!mm_serial_port_open (port, &info->error)) {
>> > +g_assert (info->error);
>> > +/* TODO(jglasgow): what should we do? */
>> > +}
>> >  mm_serial_port_queue_command_cached (port, "+GMI", 3,
>> > get_manufacturer_done, info);
>> >  mm_serial_port_queue_command_cached (port, "+GMM", 3,
>> > get_model_done, info);
>> >  mm_serial_port_queue_command_cached (port, "+GMR", 3,
>> > get_version_done, info);
>> > @@ -867,6 +877,10 @@ get_signal_quality (MMModemCdma *modem,
>> >  }
>> >
>> >  info = mm_callback_info_uint_new (MM_MODEM (modem), callback,
>> > user_data);
>> > +if (!mm_serial_port_open (port, &info->error)) {
>> > +g_assert (info->error);
>> > +/* TODO(jglasgow): what should we do? */
>> > +}
>> >  mm_serial_port_queue_command (port, "+CSQ", 3,
>> > get_signal_quality_done, info);
>> >  }
>> >
>> > @@ -913,6 +927,10 @@ get_esn (MMModemCdma *modem,
>> >  }
>> >
>> >  info = mm_callback_info_string_new (MM_MODEM (modem), callback,
>> > user_data);
>> > +if (!mm_serial_port_open (port, &info->error)) {
>> > +g_assert (info->error);
>> > +/* TODO(jglasgow): what should we do? */
>> > +}
>> >  mm_serial_port_queue_command_cached (port, "+GSN", 3,
>> > get_string_done, info);
>> >  }
>> >
>> > @@ -1136,6 +1154,11 @@ get_serving_system (MMModemCdma *modem,
>> >G_CALLBACK (callback),
>> >user_data);
>> >
>> > +if (!mm_serial_port_open (port, &info->error)) {
>> > +g_assert (info->error);
>> > +/* TODO(jglasgow): 

Re: Received Bytes, transmited bytes and connection speed

2010-03-17 Thread John Mahoney
On Thu, Mar 18, 2010 at 6:40 AM, Nguyen Canh Toan wrote:

>  Dear all,
>
>
>
> I am wondering how to get current connection speed. Or, alternatively, how
> to get total bytes received and transmited (so current speed ~
> RX[n]-RX[n-1]).
>
>
>

I do not know if it is build into NM, but bwm-ng is a simple nice tool to
accomplish such or the iptables RATEEST target can do some fancy stuff.
___
NetworkManager-list mailing list
NetworkManager-list@gnome.org
http://mail.gnome.org/mailman/listinfo/networkmanager-list


Received Bytes, transmited bytes and connection speed

2010-03-17 Thread Nguyen Canh Toan
Dear all,

 

I am wondering how to get current connection speed. Or, alternatively, how
to get total bytes received and transmited (so current speed ~
RX[n]-RX[n-1]).

 

Thanks.

Toannc

___
NetworkManager-list mailing list
NetworkManager-list@gnome.org
http://mail.gnome.org/mailman/listinfo/networkmanager-list