Re: F16 NetworkManager icon showing connecting when connected

2012-11-07 Thread Brian Morrison
On Wed, 07 Nov 2012 18:02:05 -0500
Robert Moskowitz  wrote:

> Reboot go NM showing the 'proper' connect icon. Now we go through the 
> suspend/resume cycle and see if it stays working right.

Well if not then post your experience here, I'm sure someone will
request the needed information to diagnose and fix it if it doesn't work
for you.

-- 

Brian Morrison

"I am not young enough to know everything"
  Oscar Wilde
___
networkmanager-list mailing list
networkmanager-list@gnome.org
https://mail.gnome.org/mailman/listinfo/networkmanager-list


Re: F16 NetworkManager icon showing connecting when connected

2012-11-07 Thread Brian Morrison
On Wed, 07 Nov 2012 17:55:13 -0500
Robert Moskowitz  wrote:

> So here comes the reboot.  Sigh.

The days of long uptimes for Linux boxen seem to be over, I am no
longer sure when I need to reboot these days but I've found that things
that hook into dbus are quite picky and if the underlying stuff changes
then all sorts of other programs break until they are restarted.

It's often just simpler to reboot, and F17 helps by pushing out kernel
updates every couple of weeks ;-)

-- 

Brian Morrison

"I am not young enough to know everything"
  Oscar Wilde
___
networkmanager-list mailing list
networkmanager-list@gnome.org
https://mail.gnome.org/mailman/listinfo/networkmanager-list


Re: F16 NetworkManager icon showing connecting when connected

2012-11-07 Thread Robert Moskowitz


On 11/07/2012 05:55 PM, Robert Moskowitz wrote:


On 11/07/2012 05:00 PM, Derek Atkins wrote:

On Wed, November 7, 2012 4:50 pm, Robert Moskowitz wrote:

On 11/07/2012 11:00 AM, Derek Atkins wrote:

Bob,

On Wed, November 7, 2012 10:37 am, Robert Moskowitz wrote:

yum --enablerepo=updates-testing update NetworkManager
Loaded plugins: langpacks, presto, refresh-packagekit
No Packages marked for Update

Derek, where are you? Can we sit down and get this installed so I can
test it? (Brian, Derek is also here at the IETF meeting, and an old
colleague of mine).

According to koji[0] it looks like it was just built yesterday, so it
might not have made the mirrors yet. You could download and install
from
koji, or wait for the package to propagate, which might take another
day.

For what it's worth I see this myself with VPNs too, but I'm on F15
still
so have no hope for a fix ;)

-derek

[0] http://koji.fedoraproject.org/koji/buildinfo?buildID=364798


Ok. I downloaded and did a yum localinstall of:

NetworkManager-0.9.6.4-1.fc16.x86_64.rpm
NetworkManager-glib-0.9.6.4-1.fc16.x86_64.rpm
NetworkManager-gnome-0.9.6.4-1.fc16.x86_64.rpm
NetworkManager-gtk-0.9.6.4-1.fc16.x86_64.rpm

Do now do how do I restart NetworkManager? Is there someway other than
a reboot?

For the service you can run, as root: service NetworkManager restart
I'm not sure how to restart the applet.


I did an  then  to restart Gnome, but I am still seeing 
the ...


So here comes the reboot. Sigh.

Reboot go NM showing the 'proper' connect icon. Now we go through the 
suspend/resume cycle and see if it stays working right.



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


Re: F16 NetworkManager icon showing connecting when connected

2012-11-07 Thread Robert Moskowitz


On 11/07/2012 05:00 PM, Derek Atkins wrote:

On Wed, November 7, 2012 4:50 pm, Robert Moskowitz wrote:

On 11/07/2012 11:00 AM, Derek Atkins wrote:

Bob,

On Wed, November 7, 2012 10:37 am, Robert Moskowitz wrote:

yum --enablerepo=updates-testing update NetworkManager
Loaded plugins: langpacks, presto, refresh-packagekit
No Packages marked for Update

Derek, where are you?  Can we sit down and get this installed so I can
test it?  (Brian, Derek is also here at the IETF meeting, and an old
colleague of mine).

According to koji[0] it looks like it was just built yesterday, so it
might not have made the mirrors yet.  You could download and install
from
koji, or wait for the package to propagate, which might take another
day.

For what it's worth I see this myself with VPNs too, but I'm on F15
still
so have no hope for a fix ;)

-derek

[0] http://koji.fedoraproject.org/koji/buildinfo?buildID=364798


Ok.  I downloaded and did a yum localinstall of:

NetworkManager-0.9.6.4-1.fc16.x86_64.rpm
NetworkManager-glib-0.9.6.4-1.fc16.x86_64.rpm
NetworkManager-gnome-0.9.6.4-1.fc16.x86_64.rpm
NetworkManager-gtk-0.9.6.4-1.fc16.x86_64.rpm

Do now do how do I restart NetworkManager?  Is there someway other than
a reboot?

For the service you can run, as root:  service NetworkManager restart
I'm not sure how to restart the applet.


I did an  then  to restart Gnome, but I am still seeing the ...

So here comes the reboot.  Sigh.


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


Re: F16 NetworkManager icon showing connecting when connected

2012-11-07 Thread Derek Atkins

On Wed, November 7, 2012 4:50 pm, Robert Moskowitz wrote:
>
> On 11/07/2012 11:00 AM, Derek Atkins wrote:
>> Bob,
>>
>> On Wed, November 7, 2012 10:37 am, Robert Moskowitz wrote:
>>>
>>> yum --enablerepo=updates-testing update NetworkManager
>>> Loaded plugins: langpacks, presto, refresh-packagekit
>>> No Packages marked for Update
>>>
>>> Derek, where are you?  Can we sit down and get this installed so I can
>>> test it?  (Brian, Derek is also here at the IETF meeting, and an old
>>> colleague of mine).
>> According to koji[0] it looks like it was just built yesterday, so it
>> might not have made the mirrors yet.  You could download and install
>> from
>> koji, or wait for the package to propagate, which might take another
>> day.
>>
>> For what it's worth I see this myself with VPNs too, but I'm on F15
>> still
>> so have no hope for a fix ;)
>>
>> -derek
>>
>> [0] http://koji.fedoraproject.org/koji/buildinfo?buildID=364798
>>
> Ok.  I downloaded and did a yum localinstall of:
>
> NetworkManager-0.9.6.4-1.fc16.x86_64.rpm
> NetworkManager-glib-0.9.6.4-1.fc16.x86_64.rpm
> NetworkManager-gnome-0.9.6.4-1.fc16.x86_64.rpm
> NetworkManager-gtk-0.9.6.4-1.fc16.x86_64.rpm
>
> Do now do how do I restart NetworkManager?  Is there someway other than
> a reboot?

For the service you can run, as root:  service NetworkManager restart
I'm not sure how to restart the applet.

-derek

-- 
   Derek Atkins 617-623-3745
   de...@ihtfp.com www.ihtfp.com
   Computer and Internet Security Consultant

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


Re: F16 NetworkManager icon showing connecting when connected

2012-11-07 Thread Nathanael D. Noblet

On 11/07/2012 02:50 PM, Robert Moskowitz wrote:


On 11/07/2012 11:00 AM, Derek Atkins wrote:

Bob,

On Wed, November 7, 2012 10:37 am, Robert Moskowitz wrote:


yum --enablerepo=updates-testing update NetworkManager
Loaded plugins: langpacks, presto, refresh-packagekit
No Packages marked for Update

Derek, where are you?  Can we sit down and get this installed so I can
test it?  (Brian, Derek is also here at the IETF meeting, and an old
colleague of mine).

According to koji[0] it looks like it was just built yesterday, so it
might not have made the mirrors yet.  You could download and install from
koji, or wait for the package to propagate, which might take another day.

For what it's worth I see this myself with VPNs too, but I'm on F15 still
so have no hope for a fix ;)

-derek

[0] http://koji.fedoraproject.org/koji/buildinfo?buildID=364798


Ok.  I downloaded and did a yum localinstall of:

NetworkManager-0.9.6.4-1.fc16.x86_64.rpm
NetworkManager-glib-0.9.6.4-1.fc16.x86_64.rpm
NetworkManager-gnome-0.9.6.4-1.fc16.x86_64.rpm
NetworkManager-gtk-0.9.6.4-1.fc16.x86_64.rpm

Do now do how do I restart NetworkManager?  Is there someway other than
a reboot?


Running 'service NetworkManager restart' as root I would presume should 
work from a terminal. The only thing I'd be worried about but don't 
remember coming across would be initscript vs systemd unit files. Either 
way I didn't have issues so I would expect the service restart to be 
successful. Otherwise a reboot would do it yes.

--
Nathanael d. Noblet
t 403.875.4613
___
networkmanager-list mailing list
networkmanager-list@gnome.org
https://mail.gnome.org/mailman/listinfo/networkmanager-list


Re: F16 NetworkManager icon showing connecting when connected

2012-11-07 Thread Robert Moskowitz


On 11/07/2012 11:00 AM, Derek Atkins wrote:

Bob,

On Wed, November 7, 2012 10:37 am, Robert Moskowitz wrote:


yum --enablerepo=updates-testing update NetworkManager
Loaded plugins: langpacks, presto, refresh-packagekit
No Packages marked for Update

Derek, where are you?  Can we sit down and get this installed so I can
test it?  (Brian, Derek is also here at the IETF meeting, and an old
colleague of mine).

According to koji[0] it looks like it was just built yesterday, so it
might not have made the mirrors yet.  You could download and install from
koji, or wait for the package to propagate, which might take another day.

For what it's worth I see this myself with VPNs too, but I'm on F15 still
so have no hope for a fix ;)

-derek

[0] http://koji.fedoraproject.org/koji/buildinfo?buildID=364798


Ok.  I downloaded and did a yum localinstall of:

NetworkManager-0.9.6.4-1.fc16.x86_64.rpm
NetworkManager-glib-0.9.6.4-1.fc16.x86_64.rpm
NetworkManager-gnome-0.9.6.4-1.fc16.x86_64.rpm
NetworkManager-gtk-0.9.6.4-1.fc16.x86_64.rpm

Do now do how do I restart NetworkManager?  Is there someway other than 
a reboot?



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


Re: F16 NetworkManager icon showing connecting when connected

2012-11-07 Thread Brian Morrison
On Wed, 7 Nov 2012 10:24:28 -0500
"Derek Atkins"  wrote:

> Try it without the dash

Always catches me out...

-- 

Brian Morrison

"I am not young enough to know everything"
  Oscar Wilde
___
networkmanager-list mailing list
networkmanager-list@gnome.org
https://mail.gnome.org/mailman/listinfo/networkmanager-list


Re: F16 NetworkManager icon showing connecting when connected

2012-11-07 Thread Nathanael D. Noblet

On 11/07/2012 09:00 AM, Derek Atkins wrote:

Bob,

On Wed, November 7, 2012 10:37 am, Robert Moskowitz wrote:



yum --enablerepo=updates-testing update NetworkManager
Loaded plugins: langpacks, presto, refresh-packagekit
No Packages marked for Update

Derek, where are you?  Can we sit down and get this installed so I can
test it?  (Brian, Derek is also here at the IETF meeting, and an old
colleague of mine).


According to koji[0] it looks like it was just built yesterday, so it
might not have made the mirrors yet.  You could download and install from
koji, or wait for the package to propagate, which might take another day.

For what it's worth I see this myself with VPNs too, but I'm on F15 still
so have no hope for a fix ;)


I've built 0.9.4.0 for F15 to backport some fixes I needed. No adverse 
issues. So you may want to try


yumdownloader --source -releasever 16 --enablerepo=updates-testing 
NetworkManager


and then mock -r fedora-15-$ARCH NetworkManager-...src.rpm

you may need some updated dependencies perhaps wpa_supplicant and libnl3 
or something like that. Otherwise if you are interested I could provide 
some rpms for F15 tests from the official F16 src rpms.



--
Nathanael d. Noblet
t 403.875.4613
___
networkmanager-list mailing list
networkmanager-list@gnome.org
https://mail.gnome.org/mailman/listinfo/networkmanager-list


Re: GSM dongle fails to connect

2012-11-07 Thread Radu Rendec
Hi Aleksander,

Thanks for the input! Please see my comments below.

On Tue, 2012-11-06 at 19:40 +0100, Aleksander Morgado wrote:
> Which modem is this? If it's a Huawei modem, your issue may be known
> (wrong tty used for data).

It is Huawei (initial vid/pid 12d1:1c0b, then switched to 12d1:1c08 by
usb_modeswitch). But the thing is that the driver exposes 2 ttys, and
both of them respond. I successfully connected with screen directly and
sent some AT commands and got back the response.

I know that ModemManager tries to do auto detection - because usually
only one tty should respond and probably ModemManager relies on this for
detecting the "valid" tty. Given the fact that both ttys respond, I have
no idea how one of them is picked as "good".

> >   * on the new system, Mobile Broadband is disabled by default; if I
> > enable it, I can see an "orange UMTS" entry in the
> > active/available connections list. It shows a signal strength
> > icon, but the list entry is grayed out.
> 
> That's the information about the current network where the modem is
> registered, and the user is not supposed to click on it. You're not the
> only one confused about this:
> https://bugzilla.gnome.org/show_bug.cgi?id=658230

Thanks for the link. I read the bug comments and it makes much more
sense now. Given the discussions, I guess this will be changed in a
future release.

> Your modem has probably different PDP contexts configured (APNs, IP
> type...), ModemManager will try to activate the PDP context
> corresponding to the settings you passed, the one with CID=2 in your
> case. Nothing to worry about here, unless you're really passing the
> wrong APN in the settings.

The APN is "internet" (I think this is the default for most providers)
and it's the correct setting. However, I've just double checked this on
the provider's page ( http://www.orange.ro/services/internet.html ) and
I'm a little bit confused about the "phone number" setting. This is what
they say on their page:

APN (Access Point Name): "internet"
number call: *99# or *99***1# (depending on the telephone type)
proxy server: 172.22.7.20
port: 80
user name: blank
password: blank
modem initialization commands:
at+cgdcont=1,”ip”,”internet”,””,0,0
at+cgdcont=1,”ip”,”internet”

So maybe CID=2 is actually wrong, but the APN setting is correct.

> I would try to grab both ModemManager and NetworkManager debug logs. See
> the "Debugging NetworkManager 0.8 and 0.9 3G connections" section at
> https://live.gnome.org/NetworkManager/Debugging.

Thanks! I had done that already, but I'm not sure about the mailing list
policy. Is it ok to post back on the list and include it as an
attachment? It's around 60k (or 7k if I gzip it).

Thanks,

Radu


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


Re: F16 NetworkManager icon showing connecting when connected

2012-11-07 Thread Derek Atkins
Bob,

On Wed, November 7, 2012 10:37 am, Robert Moskowitz wrote:
>
>
> yum --enablerepo=updates-testing update NetworkManager
> Loaded plugins: langpacks, presto, refresh-packagekit
> No Packages marked for Update
>
> Derek, where are you?  Can we sit down and get this installed so I can
> test it?  (Brian, Derek is also here at the IETF meeting, and an old
> colleague of mine).

According to koji[0] it looks like it was just built yesterday, so it
might not have made the mirrors yet.  You could download and install from
koji, or wait for the package to propagate, which might take another day.

For what it's worth I see this myself with VPNs too, but I'm on F15 still
so have no hope for a fix ;)

-derek

[0] http://koji.fedoraproject.org/koji/buildinfo?buildID=364798

-- 
   Derek Atkins 617-623-3745
   de...@ihtfp.com www.ihtfp.com
   Computer and Internet Security Consultant


-- 
   Derek Atkins 617-623-3745
   de...@ihtfp.com www.ihtfp.com
   Computer and Internet Security Consultant

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


Re: F16 NetworkManager icon showing connecting when connected

2012-11-07 Thread Robert Moskowitz


On 11/07/2012 10:24 AM, Derek Atkins wrote:

On Wed, November 7, 2012 10:18 am, Robert Moskowitz wrote:

On 11/07/2012 08:13 AM, Brian Morrison wrote:

On Wed, 07 Nov 2012 07:43:46 -0500
Robert Moskowitz  wrote:


Well if I get the update before next week,

yum --enablerepo=updates-testing update Network-Manager

will get the package from the testing repo and any dependencies that
have been updated.


# yum --enablerepo=updates-testing update Network-Manager
Loaded plugins: langpacks, presto, refresh-packagekit
updates-testing/metalink | 2.3 kB 00:00
updates-testing | 4.7 kB 00:00
updates-testing/primary_db | 619 kB 00:03
updates-testing/group_gz | 435 kB 00:01
No Match for argument: Network-Manager
No package Network-Manager available.
No Packages marked for Update

Now what?

Try it without the dash

yum --enablerepo=updates-testing update NetworkManager


yum --enablerepo=updates-testing update NetworkManager
Loaded plugins: langpacks, presto, refresh-packagekit
No Packages marked for Update

Derek, where are you?  Can we sit down and get this installed so I can 
test it?  (Brian, Derek is also here at the IETF meeting, and an old 
colleague of mine).



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


Re: F16 NetworkManager icon showing connecting when connected

2012-11-07 Thread Derek Atkins

On Wed, November 7, 2012 10:18 am, Robert Moskowitz wrote:
>
> On 11/07/2012 08:13 AM, Brian Morrison wrote:
>> On Wed, 07 Nov 2012 07:43:46 -0500
>> Robert Moskowitz  wrote:
>>
>>> Well if I get the update before next week,
>> yum --enablerepo=updates-testing update Network-Manager
>>
>> will get the package from the testing repo and any dependencies that
>> have been updated.
>>
> # yum --enablerepo=updates-testing update Network-Manager
> Loaded plugins: langpacks, presto, refresh-packagekit
> updates-testing/metalink | 2.3 kB 00:00
> updates-testing | 4.7 kB 00:00
> updates-testing/primary_db | 619 kB 00:03
> updates-testing/group_gz | 435 kB 00:01
> No Match for argument: Network-Manager
> No package Network-Manager available.
> No Packages marked for Update
>
> Now what?

Try it without the dash

yum --enablerepo=updates-testing update NetworkManager

>
> ___
> networkmanager-list mailing list
> networkmanager-list@gnome.org
> https://mail.gnome.org/mailman/listinfo/networkmanager-list
>

-derek

-- 
   Derek Atkins 617-623-3745
   de...@ihtfp.com www.ihtfp.com
   Computer and Internet Security Consultant

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


Re: F16 NetworkManager icon showing connecting when connected

2012-11-07 Thread Brian Morrison

I would suggest waiting for a day or so and then repeat the same command. 
Probably not made it to the mirrors yet or still being added to the 
updates-testing repo... 



Brian MorrisonRobert Moskowitz  wrote:
On 11/07/2012 08:13 AM, Brian Morrison wrote:
> On Wed, 07 Nov 2012 07:43:46 -0500
> Robert Moskowitz  wrote:
>
>> Well if I get the update before next week,
> yum --enablerepo=updates-testing update Network-Manager
>
> will get the package from the testing repo and any dependencies that
> have been updated.
>
# yum --enablerepo=updates-testing update Network-Manager
Loaded plugins: langpacks, presto, refresh-packagekit
updates-testing/metalink | 2.3 kB 00:00
updates-testing | 4.7 kB 00:00
updates-testing/primary_db | 619 kB 00:03
updates-testing/group_gz | 435 kB 00:01
No Match for argument: Network-Manager
No package Network-Manager available.
No Packages marked for Update

Now what?


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


Re: F16 NetworkManager icon showing connecting when connected

2012-11-07 Thread Robert Moskowitz


On 11/07/2012 08:13 AM, Brian Morrison wrote:

On Wed, 07 Nov 2012 07:43:46 -0500
Robert Moskowitz  wrote:


Well if I get the update before next week,

yum --enablerepo=updates-testing update Network-Manager

will get the package from the testing repo and any dependencies that
have been updated.


# yum --enablerepo=updates-testing update Network-Manager
Loaded plugins: langpacks, presto, refresh-packagekit
updates-testing/metalink | 2.3 kB 00:00
updates-testing | 4.7 kB 00:00
updates-testing/primary_db | 619 kB 00:03
updates-testing/group_gz | 435 kB 00:01
No Match for argument: Network-Manager
No package Network-Manager available.
No Packages marked for Update

Now what?

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


[PATCH 6/8] device-bt, device-modem: listen for data port changes in the `NMModem'

2012-11-07 Thread Aleksander Morgado
The new ModemManager1-based `NMModemBroadband' objects will set the data port
information only after having created the bearer as part of the connection
process. The devices, therefore, need to listen to changes in the `data-port'
property, so that the `ip-iface' in the `NMDevice' is set before finishing the
stage1 of the activation. This is required in order to have a proper ifup of the
data port.
---
 src/nm-device-bt.c| 15 ++-
 src/nm-device-modem.c | 15 +++
 2 files changed, 29 insertions(+), 1 deletion(-)

diff --git a/src/nm-device-bt.c b/src/nm-device-bt.c
index 9d0d634..5bc324c 100644
--- a/src/nm-device-bt.c
+++ b/src/nm-device-bt.c
@@ -578,6 +578,14 @@ modem_ip4_config_result (NMModem *self,
}
 }
 
+static void
+data_port_changed_cb (NMModem *modem, GParamSpec *pspec, gpointer user_data)
+{
+   NMDevice *self = NM_DEVICE (user_data);
+
+   nm_device_set_ip_iface (self, nm_modem_get_data_port (modem));
+}
+
 static gboolean
 modem_stage1 (NMDeviceBt *self, NMModem *modem, NMDeviceStateReason *reason)
 {
@@ -672,7 +680,12 @@ nm_device_bt_modem_added (NMDeviceBt *self,
g_signal_connect (modem, NM_MODEM_AUTH_REQUESTED, G_CALLBACK 
(modem_auth_requested), self);
g_signal_connect (modem, NM_MODEM_AUTH_RESULT, G_CALLBACK 
(modem_auth_result), self);
 
-   nm_device_set_ip_iface (NM_DEVICE (self), modem_data_port);
+   /* In the old ModemManager the data port is known from the very 
beginning;
+* while in the new ModemManager the data port is set afterwards when 
the bearer gets
+* created */
+   if (modem_data_port)
+   nm_device_set_ip_iface (NM_DEVICE (self), modem_data_port);
+   g_signal_connect (modem, "notify::" NM_MODEM_DATA_PORT, G_CALLBACK 
(data_port_changed_cb), self);
 
/* Kick off the modem connection */
if (!modem_stage1 (self, modem, &reason))
diff --git a/src/nm-device-modem.c b/src/nm-device-modem.c
index 0a331f8..d9ef5c8 100644
--- a/src/nm-device-modem.c
+++ b/src/nm-device-modem.c
@@ -163,6 +163,16 @@ modem_ip4_config_result (NMModem *self,
 }
 
 static void
+data_port_changed_cb (NMModem *modem, GParamSpec *pspec, gpointer user_data)
+{
+   NMDevice *self = NM_DEVICE (user_data);
+
+   /* We set the IP iface in the device as soon as we know it, so that we
+* properly ifup it if needed */
+   nm_device_set_ip_iface (self, nm_modem_get_data_port (modem));
+}
+
+static void
 modem_enabled_cb (NMModem *modem, GParamSpec *pspec, gpointer user_data)
 {
NMDeviceModem *self = NM_DEVICE_MODEM (user_data);
@@ -417,6 +427,11 @@ set_modem (NMDeviceModem *self, NMModem *modem)
g_signal_connect (modem, NM_MODEM_AUTH_RESULT, G_CALLBACK 
(modem_auth_result), self);
g_signal_connect (modem, "notify::" NM_MODEM_ENABLED, G_CALLBACK 
(modem_enabled_cb), self);
g_signal_connect (modem, "notify::" NM_MODEM_CONNECTED, G_CALLBACK 
(modem_connected_cb), self);
+
+   /* In the old ModemManager the data port is known from the very 
beginning;
+* while in the new ModemManager the data port is set afterwards when 
the bearer gets
+* created */
+   g_signal_connect (modem, "notify::" NM_MODEM_DATA_PORT, G_CALLBACK 
(data_port_changed_cb), self);
 }
 
 static void
-- 
1.8.0

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


[PATCH 3/8] modem-manager: new `NMModemBroadband'

2012-11-07 Thread Aleksander Morgado
This new object, which is a subclass of `NMModem', implements the basic support
of the new ModemManager1 interface.
---
 src/generated/Makefile.am  |   18 +-
 src/modem-manager/Makefile.am  |8 +
 src/modem-manager/README   |9 +
 src/modem-manager/nm-modem-broadband.c | 1012 
 src/modem-manager/nm-modem-broadband.h |   69 +++
 5 files changed, 1115 insertions(+), 1 deletion(-)
 create mode 100644 src/modem-manager/nm-modem-broadband.c
 create mode 100644 src/modem-manager/nm-modem-broadband.h

diff --git a/src/generated/Makefile.am b/src/generated/Makefile.am
index 8f63f39..307766e 100644
--- a/src/generated/Makefile.am
+++ b/src/generated/Makefile.am
@@ -27,9 +27,21 @@ if WITH_WIMAX
 nm_daemon_all_sources += $(top_srcdir)/src/wimax/*.[ch]
 endif
 
-nm_daemon_sources = \
+nm_daemon_sources_no_bindings = \
$(filter-out %-glue.h %-bindings.h, $(wildcard 
$(nm_daemon_all_sources)))
 
+if WITH_MODEM_MANAGER_1
+# We filter out this file, which doesn't have any enum, and which clashes
+# with ModemManager1-defined symbols
+nm_daemon_sources = \
+   $(filter-out $(top_srcdir)/src/modem-manager/nm-modem-types.h, 
$(wildcard $(nm_daemon_sources_no_bindings)))
+else
+# Don't include ModemManager1-specific headers if we're not compiling with
+# ModemManager1 support.
+nm_daemon_sources = \
+   $(filter-out $(top_srcdir)/src/modem-manager/nm-modem-broadband.h, 
$(wildcard $(nm_daemon_sources_no_bindings)))
+endif
+
 GLIB_GENERATED = nm-enum-types.h nm-enum-types.c
 nm_enum_types_sources = $(nm_daemon_sources)
 GLIB_MKENUMS_H_FLAGS = --identifier-prefix NM
@@ -70,6 +82,10 @@ libnm_generated_la_CPPFLAGS = \
$(SYSTEMD_LOGIN_CFLAGS) \
$(IWMX_SDK_CFLAGS)
 
+if WITH_MODEM_MANAGER_1
+   libnm_generated_la_CPPFLAGS += $(MM_GLIB_CFLAGS)
+endif
+
 libnm_generated_la_LIBADD = \
$(GLIB_LIBS)
 
diff --git a/src/modem-manager/Makefile.am b/src/modem-manager/Makefile.am
index 192ed2e..aa5534f 100644
--- a/src/modem-manager/Makefile.am
+++ b/src/modem-manager/Makefile.am
@@ -35,3 +35,11 @@ libmodem_manager_la_LIBADD = \
$(LIBNL_LIBS) \
$(DBUS_LIBS)
 
+# Support for the new ModemManager1 interface
+if WITH_MODEM_MANAGER_1
+libmodem_manager_la_SOURCES += \
+   nm-modem-broadband.h \
+   nm-modem-broadband.c
+libmodem_manager_la_CPPFLAGS += $(MM_GLIB_CFLAGS)
+libmodem_manager_la_LIBADD += $(MM_GLIB_LIBS)
+endif
diff --git a/src/modem-manager/README b/src/modem-manager/README
index eba36ba..d3f9122 100644
--- a/src/modem-manager/README
+++ b/src/modem-manager/README
@@ -11,6 +11,15 @@ Common source
   the modem object.
 
 
+ModemManager 0.7 integration
+
+
+ * nm-modem-broadband.[h|c]:
+  Defines the `NMModemBroadband' object, which is a subclass of `NMModem'.
+  This object handles both 3GPP and 3GPP2 modems exposed in the new
+  `ModemManager1' interface.
+
+
 ModemManager 0.4/0.5/0.6 integration
 

 
diff --git a/src/modem-manager/nm-modem-broadband.c 
b/src/modem-manager/nm-modem-broadband.c
new file mode 100644
index 000..bc68d9a
--- /dev/null
+++ b/src/modem-manager/nm-modem-broadband.c
@@ -0,0 +1,1012 @@
+/* -*- Mode: C; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- */
+/* NetworkManager -- Network link manager
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Copyright (C) 2012 Aleksander Morgado 
+ */
+
+#include 
+#include 
+#include 
+#include "nm-modem-broadband.h"
+#include "nm-system.h"
+#include "nm-setting-connection.h"
+#include "nm-logging.h"
+#include "NetworkManagerUtils.h"
+#include "nm-device-private.h"
+
+G_DEFINE_TYPE (NMModemBroadband, nm_modem_broadband, NM_TYPE_MODEM)
+
+struct _NMModemBroadbandPrivate {
+   /* The modem object from dbus */
+   MMObject *modem_object;
+   /* Per-interface objects */
+   MMModem *modem_iface;
+   MMModemSimple *simple_iface;
+
+   /* Connection setup */
+   MMSimpleConnectProperties *connect_properties;
+   MMBearer *bearer;
+   MMBearerIpConfig *ipv4_config;
+   MMBearerIpConfig *ipv6_config;
+
+   guint32 pin_tries;
+};
+
+enum {
+

[PATCH 5/8] modem-manager, manager: avoid calling G_TYPE_INSTANCE_GET_PRIVATE() often

2012-11-07 Thread Aleksander Morgado
G_TYPE_INSTANCE_GET_PRIVATE() is known to be slow, so just call it once when
the private data is created, and keep a 'priv' pointer around for easy access.
---
 src/modem-manager/nm-modem-manager.c | 192 +++
 src/modem-manager/nm-modem-manager.h |  13 ++-
 2 files changed, 90 insertions(+), 115 deletions(-)

diff --git a/src/modem-manager/nm-modem-manager.c 
b/src/modem-manager/nm-modem-manager.c
index 9c32a10..6b90d9b 100644
--- a/src/modem-manager/nm-modem-manager.c
+++ b/src/modem-manager/nm-modem-manager.c
@@ -41,9 +41,7 @@
 
 G_DEFINE_TYPE (NMModemManager, nm_modem_manager, G_TYPE_OBJECT)
 
-#define NM_MODEM_MANAGER_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), 
NM_TYPE_MODEM_MANAGER, NMModemManagerPrivate))
-
-typedef struct {
+struct _NMModemManagerPrivate {
/* ModemManager < 0.7 */
NMDBusManager *dbus_mgr;
DBusGProxy *proxy;
@@ -60,8 +58,7 @@ typedef struct {
 
/* Common */
GHashTable *modems;
-   gboolean disposed;
-} NMModemManagerPrivate;
+};
 
 enum {
MODEM_ADDED,
@@ -92,21 +89,19 @@ nm_modem_manager_get (void)
 static void
 clear_modem_manager_support (NMModemManager *self)
 {
-   NMModemManagerPrivate *priv = NM_MODEM_MANAGER_GET_PRIVATE (self);
-
-   if (priv->poke_id) {
-   g_source_remove (priv->poke_id);
-   priv->poke_id = 0;
+   if (self->priv->poke_id) {
+   g_source_remove (self->priv->poke_id);
+   self->priv->poke_id = 0;
}
 
-   if (priv->proxy) {
-   g_object_unref (priv->proxy);
-   priv->proxy = NULL;
+   if (self->priv->proxy) {
+   g_object_unref (self->priv->proxy);
+   self->priv->proxy = NULL;
}
 
-   if (priv->dbus_mgr) {
-   g_object_unref (priv->dbus_mgr);
-   priv->dbus_mgr = NULL;
+   if (self->priv->dbus_mgr) {
+   g_object_unref (self->priv->dbus_mgr);
+   self->priv->dbus_mgr = NULL;
}
 }
 
@@ -176,9 +171,8 @@ get_modem_properties (DBusGConnection *connection,
 }
 
 static void
-create_modem (NMModemManager *manager, const char *path)
+create_modem (NMModemManager *self, const char *path)
 {
-   NMModemManagerPrivate *priv = NM_MODEM_MANAGER_GET_PRIVATE (manager);
NMModem *modem = NULL;
char *data_device = NULL, *driver = NULL, *master_device = NULL;
uint modem_type = MM_MODEM_TYPE_UNKNOWN;
@@ -186,12 +180,12 @@ create_modem (NMModemManager *manager, const char *path)
uint ip_timeout = 0;
NMModemState state = NM_MODEM_STATE_UNKNOWN;
 
-   if (g_hash_table_lookup (priv->modems, path)) {
+   if (g_hash_table_lookup (self->priv->modems, path)) {
nm_log_warn (LOGD_MB, "modem with path %s already exists, 
ignoring", path);
return;
}
 
-   if (!get_modem_properties (nm_dbus_manager_get_connection 
(priv->dbus_mgr),
+   if (!get_modem_properties (nm_dbus_manager_get_connection 
(self->priv->dbus_mgr),
   path, &master_device, &data_device, &driver,
   &modem_type, &ip_method, &ip_timeout, 
&state))
return;
@@ -227,8 +221,8 @@ create_modem (NMModemManager *manager, const char *path)
 
if (modem) {
g_object_set (G_OBJECT (modem), NM_MODEM_IP_TIMEOUT, 
ip_timeout, NULL);
-   g_hash_table_insert (priv->modems, g_strdup (path), modem);
-   g_signal_emit (manager, signals[MODEM_ADDED], 0, modem, driver);
+   g_hash_table_insert (self->priv->modems, g_strdup (path), 
modem);
+   g_signal_emit (self, signals[MODEM_ADDED], 0, modem, driver);
}
 
g_free (driver);
@@ -243,13 +237,13 @@ modem_added (DBusGProxy *proxy, const char *path, 
gpointer user_data)
 static void
 modem_removed (DBusGProxy *proxy, const char *path, gpointer user_data)
 {
-   NMModemManagerPrivate *priv = NM_MODEM_MANAGER_GET_PRIVATE (user_data);
+   NMModemManager *self = NM_MODEM_MANAGER (user_data);
NMModem *modem;
 
-   modem = (NMModem *) g_hash_table_lookup (priv->modems, path);
+   modem = (NMModem *) g_hash_table_lookup (self->priv->modems, path);
if (modem) {
-   g_signal_emit (user_data, signals[MODEM_REMOVED], 0, modem);
-   g_hash_table_remove (priv->modems, path);
+   g_signal_emit (self, signals[MODEM_REMOVED], 0, modem);
+   g_hash_table_remove (self->priv->modems, path);
}
 }
 
@@ -274,12 +268,11 @@ static gboolean
 poke_modem_cb (gpointer user_data)
 {
NMModemManager *self = NM_MODEM_MANAGER (user_data);
-   NMModemManagerPrivate *priv = NM_MODEM_MANAGER_GET_PRIVATE (self);
DBusGConnection *g_connection;
DBusGProxy *proxy;
DBusGProxyCall *call;
 
-   g_connection = nm_dbus_manager_get_connection (priv->dbus_mgr);
+   g_connec

[PATCH 4/8] modem-manager, manager: integrate the new `ModemManager1' interface support

2012-11-07 Thread Aleksander Morgado
The new `MMManager' object takes care of notifying modems added or removed from
the ModemManager1 interface.

We will listen to both the old and new ModemManager implementations, but as soon
as the first ModemManager implementation is found, the other one gets cleared,
so that we don't wait forever to appear.
---
 src/modem-manager/README |  12 +-
 src/modem-manager/nm-modem-manager.c | 359 +--
 src/nm-device-modem.c|  16 +-
 src/nm-manager.c |  20 +-
 4 files changed, 372 insertions(+), 35 deletions(-)

diff --git a/src/modem-manager/README b/src/modem-manager/README
index d3f9122..c9f0f5f 100644
--- a/src/modem-manager/README
+++ b/src/modem-manager/README
@@ -10,6 +10,12 @@ Common source
   will use this interface exclusively, regardless of the real final type of
   the modem object.
 
+ * nm-modem-manager.[h|c]:
+  Defines the `NMModemManager' object, which takes care of listening to
+  signals from the DBus inteface notifying about added or removed modems.
+  It also takes care of creating proper `NMModem' objects from the
+  information retrieved from the DBus interface.
+
 
 ModemManager 0.7 integration
 

@@ -37,9 +43,3 @@ ModemManager 0.4/0.5/0.6 integration
  * nm-modem-cdma.[h|c]:
   Defines the `NMModemCdma' object, which is a subclass of 
`NMModemGeneric'.
   This object handles 3GPP2-specific modems (CDMA, EV-DO).
-
- * nm-modem-manager.[h|c]:
-  Defines the `NMModemManager' object, which takes care of listening to
-  signals from the DBus inteface notifying about added or removed modems.
-  It also takes care of creating proper `NMModemGsm' or `NMModemCdma'
-  objects from the information retrieved from the DBus interface.
diff --git a/src/modem-manager/nm-modem-manager.c 
b/src/modem-manager/nm-modem-manager.c
index 049b5a5..9c32a10 100644
--- a/src/modem-manager/nm-modem-manager.c
+++ b/src/modem-manager/nm-modem-manager.c
@@ -21,6 +21,7 @@
  */
 
 #include 
+#include "config.h"
 #include "nm-modem-manager.h"
 #include "nm-logging.h"
 #include "nm-modem.h"
@@ -31,6 +32,11 @@
 #include "nm-marshal.h"
 #include "nm-dbus-glib-types.h"
 
+#if WITH_MODEM_MANAGER_1
+#include 
+#include "nm-modem-broadband.h"
+#endif
+
 #define MODEM_POKE_INTERVAL 120
 
 G_DEFINE_TYPE (NMModemManager, nm_modem_manager, G_TYPE_OBJECT)
@@ -38,11 +44,23 @@ G_DEFINE_TYPE (NMModemManager, nm_modem_manager, 
G_TYPE_OBJECT)
 #define NM_MODEM_MANAGER_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), 
NM_TYPE_MODEM_MANAGER, NMModemManagerPrivate))
 
 typedef struct {
+   /* ModemManager < 0.7 */
NMDBusManager *dbus_mgr;
DBusGProxy *proxy;
+   guint poke_id;
+
+#if WITH_MODEM_MANAGER_1
+   /* ModemManager >= 0.7 */
+   GDBusConnection *dbus_connection;
+   MMManager *modem_manager_1;
+   guint modem_manager_1_poke_id;
+   gboolean old_modem_manager_found;
+   gboolean new_modem_manager_found;
+#endif
+
+   /* Common */
GHashTable *modems;
gboolean disposed;
-   guint poke_id;
 } NMModemManagerPrivate;
 
 enum {
@@ -54,7 +72,6 @@ enum {
 
 static guint signals[LAST_SIGNAL] = { 0 };
 
-
 NMModemManager *
 nm_modem_manager_get (void)
 {
@@ -69,6 +86,30 @@ nm_modem_manager_get (void)
return singleton;
 }
 
+//
+/* Support for ModemManager < 0.7 */
+
+static void
+clear_modem_manager_support (NMModemManager *self)
+{
+   NMModemManagerPrivate *priv = NM_MODEM_MANAGER_GET_PRIVATE (self);
+
+   if (priv->poke_id) {
+   g_source_remove (priv->poke_id);
+   priv->poke_id = 0;
+   }
+
+   if (priv->proxy) {
+   g_object_unref (priv->proxy);
+   priv->proxy = NULL;
+   }
+
+   if (priv->dbus_mgr) {
+   g_object_unref (priv->dbus_mgr);
+   priv->dbus_mgr = NULL;
+   }
+}
+
 static gboolean
 get_modem_properties (DBusGConnection *connection,
  const char *path,
@@ -244,6 +285,8 @@ poke_modem_cb (gpointer user_data)
   
MM_OLD_DBUS_PATH,
   
MM_OLD_DBUS_INTERFACE);
 
+   nm_log_info (LOGD_MB, "Requesting to (re)launch modem-manager...");
+
call = dbus_g_proxy_begin_call_with_timeout (proxy,
 "EnumerateDevices",
 mm_poke_cb,
@@ -280,6 +323,10 @@ enumerate_devices_done (DBusGProxy *proxy, DBusGProxyCall 
*call_id, gpointer dat
}
 }
 
+#if WITH_MODEM_MANAGER_1
+static void clear_modem_manager_1_support (NMModemManager *self);
+#endif
+
 static void
 modem_manager_appeared (NMModemManage

[PATCH 8/8] device-bt: watch both old and new ModemManager interface name owner changes

2012-11-07 Thread Aleksander Morgado
---
 src/nm-device-bt.c | 19 ---
 1 file changed, 16 insertions(+), 3 deletions(-)

diff --git a/src/nm-device-bt.c b/src/nm-device-bt.c
index 4a6804e..cadedcf 100644
--- a/src/nm-device-bt.c
+++ b/src/nm-device-bt.c
@@ -47,7 +47,8 @@
 #include "nm-enum-types.h"
 #include "nm-utils.h"
 
-#define MM_DBUS_SERVICE  "org.freedesktop.ModemManager"
+#define MM_OLD_DBUS_SERVICE  "org.freedesktop.ModemManager"
+#define MM_NEW_DBUS_SERVICE  "org.freedesktop.ModemManager1"
 #define BLUETOOTH_DUN_UUID "dun"
 #define BLUETOOTH_NAP_UUID "nap"
 
@@ -1154,9 +1155,14 @@ mm_name_owner_changed (NMDBusManager *dbus_mgr,
gboolean new_owner_good;
 
/* Can't handle the signal if its not from the modem service */
-   if (strcmp (MM_DBUS_SERVICE, name) != 0)
+   if (strcmp (MM_OLD_DBUS_SERVICE, name) != 0)
return;
 
+#if WITH_MODEM_MANAGER_1
+   if (strcmp (MM_NEW_DBUS_SERVICE, name) != 0)
+   return;
+#endif
+
old_owner_good = (old_owner && strlen (old_owner));
new_owner_good = (new_owner && strlen (new_owner));
 
@@ -1197,6 +1203,7 @@ static void
 nm_device_bt_init (NMDeviceBt *self)
 {
NMDeviceBtPrivate *priv = NM_DEVICE_BT_GET_PRIVATE (self);
+   gboolean mm_running;
 
priv->dbus_mgr = nm_dbus_manager_get ();
 
@@ -1205,7 +1212,13 @@ nm_device_bt_init (NMDeviceBt *self)
  G_CALLBACK 
(mm_name_owner_changed),
  self);
 
-   set_mm_running (self, nm_dbus_manager_name_has_owner (priv->dbus_mgr, 
MM_DBUS_SERVICE));
+   /* Initial check to see if ModemManager is running */
+   mm_running = nm_dbus_manager_name_has_owner (priv->dbus_mgr, 
MM_OLD_DBUS_SERVICE);
+#if WITH_MODEM_MANAGER_1
+   if (!mm_running)
+   mm_running = nm_dbus_manager_name_has_owner (priv->dbus_mgr, 
MM_NEW_DBUS_SERVICE);
+#endif
+   set_mm_running (self, mm_running);
 }
 
 static void
-- 
1.8.0

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


Initial integration of the new MM iface in NM (v2)

2012-11-07 Thread Aleksander Morgado
The following patches introduce the new ModemManager1 interface support.

The logic to watch for modem additions and removals is now done in the
'NMModemManager' object both for the old and the new interfaces.

[PATCH 1/8] build: new `--with-modem-manager-1' to check for new
[PATCH 2/8] modem-manager: rename old interface symbols
[PATCH 3/8] modem-manager: new `NMModemBroadband'
[PATCH 4/8] modem-manager,manager: integrate the new `ModemManager1'
[PATCH 5/8] modem-manager,manager: avoid calling
[PATCH 6/8] device-bt,device-modem: listen for data port changes in
[PATCH 7/8] modem-manager: don't report the data interface along
[PATCH 8/8] device-bt: watch both old and new ModemManager interface
___
networkmanager-list mailing list
networkmanager-list@gnome.org
https://mail.gnome.org/mailman/listinfo/networkmanager-list


[PATCH 2/8] modem-manager: rename old interface symbols

2012-11-07 Thread Aleksander Morgado
The new ModemManager comes with its own headers, and defines its own symbols to
name e.g. each interface. In order not to collide with the new ones, rename the
existing ones with a 'MM_OLD_DBUS' prefix instead of just 'MM_DBUS'.
---
 src/modem-manager/nm-modem-cdma.c|  6 +++---
 src/modem-manager/nm-modem-generic.c | 18 +-
 src/modem-manager/nm-modem-gsm.c |  8 
 src/modem-manager/nm-modem-manager.c | 16 
 src/modem-manager/nm-modem-types.h   | 35 +--
 5 files changed, 41 insertions(+), 42 deletions(-)

diff --git a/src/modem-manager/nm-modem-cdma.c 
b/src/modem-manager/nm-modem-cdma.c
index 3002e79..73c87c2 100644
--- a/src/modem-manager/nm-modem-cdma.c
+++ b/src/modem-manager/nm-modem-cdma.c
@@ -110,7 +110,7 @@ do_connect (NMModemCdma *self)
NMModemCdmaPrivate *priv = NM_MODEM_CDMA_GET_PRIVATE (self);
DBusGProxy *proxy;
 
-   proxy = nm_modem_generic_get_proxy (NM_MODEM_GENERIC (self), 
MM_DBUS_INTERFACE_MODEM_SIMPLE);
+   proxy = nm_modem_generic_get_proxy (NM_MODEM_GENERIC (self), 
MM_OLD_DBUS_INTERFACE_MODEM_SIMPLE);
priv->call = dbus_g_proxy_begin_call_with_timeout (proxy,
   "Connect", 
stage1_prepare_done,
   self, NULL, 12,
@@ -178,7 +178,7 @@ act_stage1_prepare (NMModem *modem,
if (enabled)
do_connect (self);
else {
-   proxy = nm_modem_generic_get_proxy (NM_MODEM_GENERIC 
(modem), MM_DBUS_INTERFACE_MODEM);
+   proxy = nm_modem_generic_get_proxy (NM_MODEM_GENERIC 
(modem), MM_OLD_DBUS_INTERFACE_MODEM);
dbus_g_proxy_begin_call_with_timeout (proxy,
  "Enable", 
stage1_enable_done,
  modem, NULL, 
2,
@@ -318,7 +318,7 @@ deactivate (NMModem *modem, NMDevice *device)
if (priv->call) {
DBusGProxy *proxy;
 
-   proxy = nm_modem_generic_get_proxy (NM_MODEM_GENERIC (modem), 
MM_DBUS_INTERFACE_MODEM_SIMPLE);
+   proxy = nm_modem_generic_get_proxy (NM_MODEM_GENERIC (modem), 
MM_OLD_DBUS_INTERFACE_MODEM_SIMPLE);
dbus_g_proxy_cancel_call (proxy, priv->call);
priv->call = NULL;
}
diff --git a/src/modem-manager/nm-modem-generic.c 
b/src/modem-manager/nm-modem-generic.c
index 0214f1c..df621d5 100644
--- a/src/modem-manager/nm-modem-generic.c
+++ b/src/modem-manager/nm-modem-generic.c
@@ -60,7 +60,7 @@ nm_modem_generic_get_proxy (NMModemGeneric *self,
 
/* Default to the default interface. */
if (interface == NULL)
-   interface = MM_DBUS_INTERFACE_MODEM;
+   interface = MM_OLD_DBUS_INTERFACE_MODEM;
 
if (interface && !strcmp (interface, DBUS_INTERFACE_PROPERTIES))
return priv->props_proxy;
@@ -116,7 +116,7 @@ query_mm_enabled (NMModemGeneric *self)
dbus_g_proxy_begin_call (NM_MODEM_GENERIC_GET_PRIVATE 
(self)->props_proxy,
 "Get", get_mm_enabled_done,
 self, NULL,
-G_TYPE_STRING, MM_DBUS_INTERFACE_MODEM,
+G_TYPE_STRING, MM_OLD_DBUS_INTERFACE_MODEM,
 G_TYPE_STRING, "Enabled",
 G_TYPE_INVALID);
 }
@@ -144,7 +144,7 @@ set_mm_enabled (NMModem *self, gboolean enabled)
 * toggle rfkill status of the WWAN modem.
 */
dbus_g_proxy_begin_call (nm_modem_generic_get_proxy (NM_MODEM_GENERIC 
(self),
-
MM_DBUS_INTERFACE_MODEM),
+
MM_OLD_DBUS_INTERFACE_MODEM),
 "Enable", set_mm_enabled_done,
 self, NULL,
 G_TYPE_BOOLEAN, enabled,
@@ -245,7 +245,7 @@ static_stage3_ip4_config_start (NMModem *self,
priv = NM_MODEM_GENERIC_GET_PRIVATE (self);
 
priv->call = dbus_g_proxy_begin_call (nm_modem_generic_get_proxy 
(NM_MODEM_GENERIC (self),
- 
MM_DBUS_INTERFACE_MODEM),
+ 
MM_OLD_DBUS_INTERFACE_MODEM),
  "GetIP4Config", 
static_stage3_done,
  self, NULL,
  G_TYPE_INVALID);
@@ -275,7 +275,7 @@ disconnect (NMModem *self,
 gboolean warn)
 {
dbus_g_proxy_begin_call (nm_modem_generic_get_proxy (NM_MODEM_GENERIC 
(self),
-
MM_DBUS_INTE

[PATCH 7/8] modem-manager: don't report the data interface along with the IPv4 configuration

2012-11-07 Thread Aleksander Morgado
The only case where this was being used was in PPP-based connections, as the
ppp0 interface was reported by pppd once the IP setup was done. Instead, just
update the 'NM_MODEM_DATA_PORT' property, as the NMDevices already listen for
changes in that property.
---
 src/modem-manager/nm-modem-broadband.c |  6 +-
 src/modem-manager/nm-modem-generic.c   |  2 +-
 src/modem-manager/nm-modem.c   | 12 +---
 src/modem-manager/nm-modem.h   |  2 +-
 src/nm-device-bt.c |  7 +--
 src/nm-device-modem.c  |  7 +--
 6 files changed, 14 insertions(+), 22 deletions(-)

diff --git a/src/modem-manager/nm-modem-broadband.c 
b/src/modem-manager/nm-modem-broadband.c
index bc68d9a..77ad3ff 100644
--- a/src/modem-manager/nm-modem-broadband.c
+++ b/src/modem-manager/nm-modem-broadband.c
@@ -727,11 +727,7 @@ static_stage3_done (NMModemBroadband *self)
}
 
 out:
-   g_signal_emit_by_name (self,
-  NM_MODEM_IP4_CONFIG_RESULT,
-  mm_bearer_get_interface (self->priv->bearer),
-  config,
-  error);
+   g_signal_emit_by_name (self, NM_MODEM_IP4_CONFIG_RESULT, config, error);
g_clear_error (&error);
return FALSE;
 }
diff --git a/src/modem-manager/nm-modem-generic.c 
b/src/modem-manager/nm-modem-generic.c
index df621d5..f4e7a52 100644
--- a/src/modem-manager/nm-modem-generic.c
+++ b/src/modem-manager/nm-modem-generic.c
@@ -225,7 +225,7 @@ static_stage3_done (DBusGProxy *proxy, DBusGProxyCall 
*call, gpointer user_data)
g_value_array_free (ret_array);
}
 
-   g_signal_emit_by_name (self, NM_MODEM_IP4_CONFIG_RESULT, NULL, config, 
error);
+   g_signal_emit_by_name (self, NM_MODEM_IP4_CONFIG_RESULT, config, error);
g_clear_error (&error);
 }
 
diff --git a/src/modem-manager/nm-modem.c b/src/modem-manager/nm-modem.c
index db5d4ee..45d1bdf 100644
--- a/src/modem-manager/nm-modem.c
+++ b/src/modem-manager/nm-modem.c
@@ -137,6 +137,7 @@ ppp_ip4_config (NMPPPManager *ppp_manager,
gpointer user_data)
 {
NMModem *self = NM_MODEM (user_data);
+   NMModemPrivate *priv = NM_MODEM_GET_PRIVATE (self);
guint32 i, num;
guint32 bad_dns1 = htonl (0x0A0B0C0D);
guint32 good_dns1 = htonl (0x04020201);  /* GTE nameserver */
@@ -144,6 +145,11 @@ ppp_ip4_config (NMPPPManager *ppp_manager,
guint32 good_dns2 = htonl (0x04020202);  /* GTE nameserver */
gboolean dns_workaround = FALSE;
 
+   /* Notify about the new data port to use */
+   g_free (priv->data_port);
+   priv->data_port = g_strdup (iface);
+   g_object_notify (G_OBJECT (self), NM_MODEM_DATA_PORT);
+
/* Work around a PPP bug (#1732) which causes many mobile broadband
 * providers to return 10.11.12.13 and 10.11.12.14 for the DNS servers.
 * Apparently fixed in ppp-2.4.5 but we've had some reports that this is
@@ -180,7 +186,7 @@ ppp_ip4_config (NMPPPManager *ppp_manager,
nm_ip4_config_add_nameserver (config, good_dns2);
}
 
-   g_signal_emit (self, signals[IP4_CONFIG_RESULT], 0, iface, config, 
NULL);
+   g_signal_emit (self, signals[IP4_CONFIG_RESULT], 0, config, NULL);
 }
 
 static void
@@ -885,8 +891,8 @@ nm_modem_class_init (NMModemClass *klass)
  G_SIGNAL_RUN_FIRST,
  G_STRUCT_OFFSET (NMModemClass, ip4_config_result),
  NULL, NULL,
- _nm_marshal_VOID__STRING_OBJECT_POINTER,
- G_TYPE_NONE, 3, G_TYPE_STRING, G_TYPE_OBJECT, 
G_TYPE_POINTER);
+ _nm_marshal_VOID__OBJECT_POINTER,
+ G_TYPE_NONE, 2, G_TYPE_OBJECT, G_TYPE_POINTER);
 
signals[PREPARE_RESULT] =
g_signal_new (NM_MODEM_PREPARE_RESULT,
diff --git a/src/modem-manager/nm-modem.h b/src/modem-manager/nm-modem.h
index c42f449..31e73c3 100644
--- a/src/modem-manager/nm-modem.h
+++ b/src/modem-manager/nm-modem.h
@@ -104,7 +104,7 @@ typedef struct {
void (*ppp_failed) (NMModem *self, NMDeviceStateReason reason);
 
void (*prepare_result)(NMModem *self, gboolean success, 
NMDeviceStateReason reason);
-   void (*ip4_config_result) (NMModem *self, const char *iface, 
NMIP4Config *config, GError *error);
+   void (*ip4_config_result) (NMModem *self, NMIP4Config *config, GError 
*error);
 
void (*auth_requested)(NMModem *self);
void (*auth_result)   (NMModem *self, GError *error);
diff --git a/src/nm-device-bt.c b/src/nm-device-bt.c
index 5bc324c..4a6804e 100644
--- a/src/nm-device-bt.c
+++ b/src/nm-device-bt.c
@@ -553,7 +553,6 @@ device_state_changed (NMDevice *device,
 
 static void
 modem_ip4_config_result (NMModem *self,
- const char *iface,

[PATCH 1/8] build: new `--with-modem-manager-1' to check for new ModemManager1 support

2012-11-07 Thread Aleksander Morgado
The new switch will run in 'auto' mode when not explicitly specified. In this
case the new ModemManager1 support will only be available if it finds libmm-glib
through pkg-config.

Other than the 'auto' mode, 'yes' and 'no' are allowed in order to specify
explicit requirements.
---
 configure.ac | 31 +++
 1 file changed, 31 insertions(+)

diff --git a/configure.ac b/configure.ac
index db61bd8..3ad8b5c 100644
--- a/configure.ac
+++ b/configure.ac
@@ -499,6 +499,31 @@ else
 fi
 AC_SUBST(PPPD_PLUGIN_DIR)
 
+# ModemManager1 with libmm-glib
+AC_ARG_WITH(modem-manager-1, AS_HELP_STRING([--with-modem-manager-1], [Enable 
new ModemManager1 interface support]),,[with_modem_manager_1=auto])
+if (test "${with_modem_manager_1}" != "no"); then
+PKG_CHECK_MODULES(MM_GLIB,
+  [mm-glib],
+  [have_libmm_glib=yes],
+  [have_libmm_glib=no])
+AC_SUBST(MM_GLIB_CFLAGS)
+AC_SUBST(MM_GLIB_LIBS)
+
+if (test "${have_libmm_glib}" = "no"); then
+if (test "${with_modem_manager_1}" = "yes"); then
+AC_MSG_ERROR([Couldn't find libmm-glib])
+fi
+else
+with_modem_manager_1="yes"
+fi
+fi
+
+if (test "${with_modem_manager_1}" = "yes"); then
+AC_DEFINE(WITH_MODEM_MANAGER_1, 1, [Define if you have ModemManager1 
support])
+else
+   AC_DEFINE(WITH_MODEM_MANAGER_1, 0, [Define if you have ModemManager1 
support])
+fi
+AM_CONDITIONAL(WITH_MODEM_MANAGER_1, test "${with_modem_manager_1}" = "yes")
 
 # dhclient support
 AC_ARG_WITH([dhclient], AS_HELP_STRING([--with-dhclient=yes|no|path], [Enable 
dhclient 4.x support]))
@@ -835,6 +860,12 @@ else
echo PPP support: no
 fi
 
+if test "${with_modem_manager_1}" = "yes"; then
+   echo ModemManager1 support: yes
+else
+   echo ModemManager1 support: no
+fi
+
 if test "${enable_concheck}" = "yes"; then
echo Connectivity checking support: yes
 else
-- 
1.8.0

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


[PATCH 1/2] build: new `--with-modem-manager-1' to check for new ModemManager1 support

2012-11-07 Thread Aleksander Morgado
The new switch will run in 'auto' mode when not explicitly specified. In this
case the new ModemManager1 support will only be available if it finds libmm-glib
through pkg-config.

Other than the 'auto' mode, 'yes' and 'no' are allowed in order to specify
explicit requirements.
---
 configure.ac | 29 -
 1 file changed, 28 insertions(+), 1 deletion(-)

diff --git a/configure.ac b/configure.ac
index 6cc94f5..b41f015 100644
--- a/configure.ac
+++ b/configure.ac
@@ -202,10 +202,38 @@ esac
 
 AM_CONDITIONAL(HAVE_GBT, test x"$have_gbt" = "xyes")
 
+dnl ModemManager1 with libmm-glib
+AC_ARG_WITH(modem-manager-1, AS_HELP_STRING([--with-modem-manager-1], [Enable 
new ModemManager1 interface support]),,[with_modem_manager_1=auto])
+if (test "${with_modem_manager_1}" != "no"); then
+PKG_CHECK_MODULES(MM_GLIB,
+  [mm-glib],
+  [have_libmm_glib=yes],
+  [have_libmm_glib=no])
+AC_SUBST(MM_GLIB_CFLAGS)
+AC_SUBST(MM_GLIB_LIBS)
+
+if (test "${have_libmm_glib}" = "no"); then
+if (test "${with_modem_manager_1}" = "yes"); then
+AC_MSG_ERROR([Couldn't find libmm-glib])
+fi
+else
+with_modem_manager_1="yes"
+fi
+fi
+
+if (test "${with_modem_manager_1}" = "yes"); then
+AC_DEFINE(WITH_MODEM_MANAGER_1, 1, [Define if you have ModemManager1 
support])
+else
+   AC_DEFINE(WITH_MODEM_MANAGER_1, 0, [Define if you have ModemManager1 
support])
+fi
+AM_CONDITIONAL(WITH_MODEM_MANAGER_1, test "${with_modem_manager_1}" = "yes")
+
+dnl Check for gudev
 PKG_CHECK_MODULES(GUDEV, gudev-1.0 >= 147)
 AC_SUBST(GUDEV_CFLAGS)
 AC_SUBST(GUDEV_LIBS)
 
+dnl Check for gobject introspection
 GOBJECT_INTROSPECTION_CHECK([0.9.6])
 
 GLIB_CONFIG_NMA
@@ -240,4 +268,3 @@ icons/scalable/Makefile
 po/Makefile.in
 ])
 AC_OUTPUT
-
-- 
1.8.0

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


[n-m-a] Support for the ModemManager1 interface in bluetooth DUN setups

2012-11-07 Thread Aleksander Morgado
The following two patches include support for the new ModemManager1 interface
in the bluetooth DUN setups, so that we know which kind of device we're handling
before launching the mobile broadband wizard.

[PATCH 1/2] build: new `--with-modem-manager-1' to check for new...
[PATCH 2/2] nma-bt-device: handle modems from the new...
___
networkmanager-list mailing list
networkmanager-list@gnome.org
https://mail.gnome.org/mailman/listinfo/networkmanager-list


[PATCH 2/2] nma-bt-device: handle modems from the new `ModemManager1' interface

2012-11-07 Thread Aleksander Morgado
Needed so that the wizard is launched for the correct modem type.
---
 src/gnome-bluetooth/Makefile.am |   9 ++
 src/gnome-bluetooth/nma-bt-device.c | 172 +++-
 2 files changed, 158 insertions(+), 23 deletions(-)

diff --git a/src/gnome-bluetooth/Makefile.am b/src/gnome-bluetooth/Makefile.am
index 6679589..dbf5373 100644
--- a/src/gnome-bluetooth/Makefile.am
+++ b/src/gnome-bluetooth/Makefile.am
@@ -22,6 +22,10 @@ plugin_LTLIBRARIES = libnma.la
 
 libnma_la_SOURCES = $(BT_WIDGET_SOURCES)
 
+if WITH_MODEM_MANAGER_1
+libnma_la_CPPFLAGS = $(MM_GLIB_CFLAGS)
+endif
+
 libnma_la_LDFLAGS = -module -avoid-version
 
 libnma_la_LIBADD = \
@@ -29,6 +33,11 @@ libnma_la_LIBADD = \
$(top_builddir)/src/utils/libutils.la \
$(top_builddir)/src/libnm-gtk/libnm-gtk.la \
$(GNOME_BLUETOOTH_LIBS)
+
+if WITH_MODEM_MANAGER_1
+libnma_la_LIBADD += $(MM_GLIB_LIBS)
+endif
+
 endif
 
 EXTRA_DIST = $(BT_WIDGET_SOURCES)
diff --git a/src/gnome-bluetooth/nma-bt-device.c 
b/src/gnome-bluetooth/nma-bt-device.c
index e1b9f38..968dc89 100644
--- a/src/gnome-bluetooth/nma-bt-device.c
+++ b/src/gnome-bluetooth/nma-bt-device.c
@@ -43,6 +43,10 @@
 #include "nm-utils.h"
 #include "utils.h"
 
+#if WITH_MODEM_MANAGER_1
+#include 
+#endif
+
 #if !GLIB_CHECK_VERSION(2,28,0)
 #define g_clear_object(object_ptr) \
G_STMT_START { \
@@ -83,6 +87,11 @@ typedef struct {
char *rfcomm_iface;
guint dun_timeout_id;
 
+#if WITH_MODEM_MANAGER_1
+   GDBusConnection *dbus_connection;
+   MMManager *modem_manager_1;
+#endif
+
GtkWindow *parent_window;
NMAMobileWizard *wizard;
GtkWindowGroup *window_group;
@@ -122,6 +131,10 @@ static void _set_dun_enabled (NmaBtDevice *device, 
gboolean enabled);
 #define MM_INTERFACE   "org.freedesktop.ModemManager"
 #define MM_MODEM_INTERFACE "org.freedesktop.ModemManager.Modem"
 
+#if WITH_MODEM_MANAGER_1
+#include 
+#endif
+
 /*/
 
 static gboolean
@@ -283,13 +296,18 @@ dun_cleanup (NmaBtDevice *self)
NmaBtDevicePrivate *priv = NMA_BT_DEVICE_GET_PRIVATE (self);
GSList *iter;
 
+   /* ModemManager */
for (iter = priv->modem_proxies; iter; iter = g_slist_next (iter))
g_object_unref (DBUS_G_PROXY (iter->data));
g_slist_free (priv->modem_proxies);
priv->modem_proxies = NULL;
-
g_clear_object (&priv->mm_proxy);
 
+#if WITH_MODEM_MANAGER_1
+   g_clear_object (&priv->dbus_connection);
+   g_clear_object (&priv->modem_manager_1);
+#endif
+
if (priv->dun_proxy && priv->rfcomm_iface) {
dbus_g_proxy_call_no_reply (priv->dun_proxy, "Disconnect",
G_TYPE_STRING, priv->rfcomm_iface,
@@ -485,6 +503,38 @@ wizard_done_cb (NMAMobileWizard *wizard,
 }
 
 static void
+start_wizard (NmaBtDevice *self,
+  const gchar *path,
+  NMDeviceType devtype)
+{
+   NmaBtDevicePrivate *priv = NMA_BT_DEVICE_GET_PRIVATE (self);
+
+   if (devtype == NM_DEVICE_TYPE_UNKNOWN) {
+   dun_error (self, __func__, NULL, _("unknown modem type."));
+   return;
+   }
+
+   if (priv->wizard) {
+   g_message ("%s: (%s) oops! not starting Wizard as one is 
already in progress", __func__, path);
+   return;
+   }
+
+   g_message ("%s: (%s) starting the mobile wizard", __func__, path);
+
+   g_source_remove (priv->dun_timeout_id);
+   priv->dun_timeout_id = 0;
+
+   /* Start the mobile wizard */
+   priv->wizard = nma_mobile_wizard_new (priv->parent_window,
+ priv->window_group,
+ devtype,
+ FALSE,
+ wizard_done_cb,
+ self);
+   nma_mobile_wizard_present (priv->wizard);
+}
+
+static void
 modem_get_all_cb (DBusGProxy *proxy, DBusGProxyCall *call, gpointer user_data)
 {
NmaBtDevice *self = NMA_BT_DEVICE (user_data);
@@ -544,28 +594,8 @@ modem_get_all_cb (DBusGProxy *proxy, DBusGProxyCall *call, 
gpointer user_data)
 
g_hash_table_unref (properties);
 
-   if (devtype != NM_DEVICE_TYPE_UNKNOWN) {
-   if (priv->wizard) {
-   g_message ("%s: (%s) oops! not starting Wizard as one 
is already in progress", __func__, path);
-   goto out;
-   }
-
-   g_message ("%s: (%s) starting the mobile wizard", __func__, 
path);
-
-   g_source_remove (priv->dun_timeout_id);
-   priv->dun_timeout_id = 0;
-
-   /* Start the mobile wizard */
-   priv->wizard = nma_mobile_wizard_new (priv->parent_window,
-   
  priv->window_grou

Re: F16 NetworkManager icon showing connecting when connected

2012-11-07 Thread Brian Morrison
On Wed, 07 Nov 2012 07:43:46 -0500
Robert Moskowitz  wrote:

> Well if I get the update before next week,

yum --enablerepo=updates-testing update Network-Manager

will get the package from the testing repo and any dependencies that
have been updated.

-- 

Brian Morrison

"I am not young enough to know everything"
  Oscar Wilde
___
networkmanager-list mailing list
networkmanager-list@gnome.org
https://mail.gnome.org/mailman/listinfo/networkmanager-list


Re: F16 NetworkManager icon showing connecting when connected

2012-11-07 Thread Robert Moskowitz


On 11/06/2012 05:18 PM, Dan Williams wrote:

On Tue, 2012-11-06 at 14:02 -0500, Robert Moskowitz wrote:

On 11/06/2012 11:43 AM, Brian Morrison wrote:

On Tue, 6 Nov 2012 16:30:53 +
Brian Morrison wrote:


On Tue, 6 Nov 2012 16:15:37 +
Brian Morrison wrote:


On Tue, 06 Nov 2012 10:30:12 -0500
Robert Moskowitz wrote:


I am current on all updates with F16 as of last night.

Not sure if it applies to F16, but some updated NM rpms landed for
F17 this morning in the UK.


See here:

https://bugzilla.gnome.org/show_bug.cgi?id=685581

Seems to have made it into Fedora NM packages from
0.9.7.0-4.git20121004 onwards. I can't see anything that new for F16,
you might be able to rebuild one of the packages for F18 or F19 if
dependencies haven't changed too much.


The patch needed is fairly simple:

http://bugzilla-attachments.gnome.org/attachment.cgi?id=225900

it should be possible to apply this as a patch in the .spec file for NM
and rebuild the packages locally.


I am not one for patching.  I will take this to the Fedora test list and
see if I can get this into updates for F16 and F17.

But for what it is worth, I have had this problem for quite some time;
at least the past 6 mo of conferences (I am active in IETF and IEEE 802,
so have at least 9 week long meetings every year).  This is not
something recently introduced into NM.  I finally decided to ask about it.

Update for F16; submitted but not yet pushed to testing:

https://admin.fedoraproject.org/updates/NetworkManager-0.9.6.4-1.fc16

The update for F17 should already be in updates-testing, I think:

https://admin.fedoraproject.org/updates/FEDORA-2012-17387/NetworkManager-0.9.6.4-1.fc17

Please give bodhi feedback on either of these, thanks!


Well if I get the update before next week, I will have the chance as 
next week is IEEE 802 plenary.  After that I will be at an EU conference 
start of Dec that MAY have an environment similar enough to trigger the 
same event!  Then nothing on the books until mid-Jan :)



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


Re: racoon?

2012-11-07 Thread Marius Kotsbak

Den 07. nov. 2012 08:51, skrev Bjørge Solli:

Is there racoon capabilities in NM or any other way to achieve this?



I think there are ways to do this without racoon. What about the 
"strongswan" VPN plugin?


--
Marius

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