Re: How to Test NetworkManager 0.9

2011-06-09 Thread David Narvaez
On Thu, Jun 9, 2011 at 11:19 AM, Dan Williams  wrote:
> On Thu, 2011-06-09 at 15:12 +0200, Jirka Klimes wrote:
>> On Thursday 09 of June 2011 14:00:29 David Narvaez wrote:
>> First, basically you don't need any client (KDE plasma or nm-applet or gnome-
>> shell applet or whatever) to run NetworkManager. You can edit connection 
>> files
>> and everything will work.
>>
>> To list available APs use:
>> nm-tool
>> or
>> nmcli dev wifi
>>
>> > nmcli nm shows Wifi and Wifi-Hardware are both enabled but I can't see
>> > a list of the networks. Any ideas from this point?
>> >
>>
>> There could be a problem with WiFi driver or wireless could be disabled by
>> rfkill switch (either hardware or software). Can you show the output of 'nm-
>> tool' and 'rfkill list' commands? Also attach /var/log/messages or
>> /var/log/daemon.log, or whatever file contains NetworkManager logs in your
>> distro.
>
> After that, try a manual wifi scan:
>
> iw dev wlan0 scan trigger
>
> or if your card is really old:
>
> iwlist wlan0 scan
>
> and see what happens.  If that's working, the next thing we need to do
> is enable wpa_supplicant debugging to see why the scan requests are
> getting rejected by the driver.

Thanks for the replies,

I had an awfully busy night and didn't have much time to hack NM but
just wanted to give quick updates on the commands above:

* nm-tool shows no wireless networks
* rfkill shows everything is unblocked
* I can scan wireless networks with iwlist
* This is something relevant I found on messages:

> (wlan0): device state change: unavailable -> disconnected (reason 
> 'supplicant-available')

I am not able to copy the exact outputs right now (they are in the
laptop, without wireless), but that should give us a bit of an idea of
what the situation looks like. I searched around and found some
strikingly similar bugs in Fedora 15[0][1], which uses NM 0.9 so my
issue could be along those lines. I didn't have time to read through
all of them, but I'll try that tomorrow. If needed, I could still post
the output of the commands tomorrow to help debugging

Thanks againf or the help.

David E. Narváez

[0] https://bugzilla.redhat.com/show_bug.cgi?id=695959
[1] https://bugzilla.redhat.com/show_bug.cgi?id=697946
___
networkmanager-list mailing list
networkmanager-list@gnome.org
http://mail.gnome.org/mailman/listinfo/networkmanager-list


[nm-applet][PATCH v2 2/2] add CDMA registration status notification

2011-06-09 Thread Alex Chiang
The current UI requires the user to mouse-over and reveal a tool
tip (or click an indicator) to discover the registration state
(aka polling). If the user inadvertently re-registers on a
roaming network, the operation is silent until the user decides
to check the applet for network status, possibly incurring
expensive roaming tariffs in the mean time.

So, alert the user with a notification when the CDMA registration
status changes, either from home to roaming or vice versa, to
prevent silent registration changes.

Refactor internal function cdma_state_to_mb_state so it calls
helper function reg_state_to_mb_state.

The new helper function can be re-used to convert the EVDO and
CDMA1x registration states to an internal mb_state in
reg_info_changed_cb().
---
v1 -> v2, no change in CDMA patch

note, I haven't actually tested this patch, since I do
not have any CDMA devices, nor do I understand CDMA
registration priority very well, so would appreciate a
sanity check on my assumption below.

 src/applet-device-cdma.c |   47 ++
 1 files changed, 35 insertions(+), 12 deletions(-)

diff --git a/src/applet-device-cdma.c b/src/applet-device-cdma.c
index 7b0bf85..9fd4fbd 100644
--- a/src/applet-device-cdma.c
+++ b/src/applet-device-cdma.c
@@ -287,23 +287,24 @@ add_connection_item (NMDevice *device,
 }
 
 static guint32
+reg_state_to_mb_state (guint32 evdo_state, guint32 cdma1x_state)
+{
+   /* EVDO state overrides 1X state for now */
+   if (evdo_state)
+   return (evdo_state == 3) ? MB_STATE_ROAMING : MB_STATE_HOME;
+   else if (cdma1x_state)
+   return (cdma1x_state == 3) ? MB_STATE_ROAMING : MB_STATE_HOME;
+
+   return MB_STATE_UNKNOWN;
+}
+
+static guint32
 cdma_state_to_mb_state (CdmaDeviceInfo *info)
 {
if (!info->modem_enabled)
return MB_STATE_UNKNOWN;
 
-   /* EVDO state overrides 1X state for now */
-   if (info->evdo_state) {
-   if (info->evdo_state == 3)
-   return MB_STATE_ROAMING;
-   return MB_STATE_HOME;
-   } else if (info->cdma1x_state) {
-   if (info->cdma1x_state == 3)
-   return MB_STATE_ROAMING;
-   return MB_STATE_HOME;
-   }
-
-   return MB_STATE_UNKNOWN;
+   return reg_state_to_mb_state(info->evdo_state, info->cdma1x_state);
 }
 
 static guint32
@@ -836,7 +837,29 @@ reg_state_changed_cb (DBusGProxy *proxy,
   gpointer user_data)
 {
CdmaDeviceInfo *info = user_data;
+   guint32 mb_state;
+
+   /* Since we prefer EVDO over 1x, bail if EVDO state hasn't changed */
+   if (evdo_state && info->evdo_state == evdo_state)
+   goto out;
+
+   if (info->evdo_state != evdo_state || info->cdma1x_state != 
cdma1x_state) {
+   mb_state = reg_state_to_mb_state(evdo_state, cdma1x_state);
+   if (mb_state == MB_STATE_HOME)
+   applet_do_notify_with_pref (info->applet,
+_("CDMA network."),
+_("You are now registered on 
the home network."),
+"notification-gsm-high",
+
PREF_DISABLE_CONNECTED_NOTIFICATIONS);
+   else if (mb_state == MB_STATE_ROAMING)
+   applet_do_notify_with_pref (info->applet,
+   _("CDMA network."),
+   _("You are now registered on a 
roaming network."),
+   "notification-gsm-high",
+   
PREF_DISABLE_CONNECTED_NOTIFICATIONS);
+   }
 
+out:
info->cdma1x_state = cdma1x_state;
info->evdo_state = evdo_state;
info->skip_reg_poll = TRUE;
___
networkmanager-list mailing list
networkmanager-list@gnome.org
http://mail.gnome.org/mailman/listinfo/networkmanager-list


[nm-applet][PATCH v2 1/2] add GSM registration status notification

2011-06-09 Thread Alex Chiang
The current UI requires the user to mouse-over and reveal a tool
tip (or click an indicator) to discover the registration state
(aka polling). If the user inadvertently re-registers on a
roaming network, the operation is silent until the user decides
to check the applet for network status, possibly incurring
expensive roaming tariffs in the mean time.

So, alert the user with a notification when the GSM registration
status changes, either from home to roaming or vice versa, to
prevent silent registration changes.
---
v1 -> v2, fix incorrect mapping of reg_state to mb_state,
thanks Andrew Bird for review

 src/applet-device-gsm.c |   19 +--
 1 files changed, 17 insertions(+), 2 deletions(-)

diff --git a/src/applet-device-gsm.c b/src/applet-device-gsm.c
index 5d0d584..ad79909 100644
--- a/src/applet-device-gsm.c
+++ b/src/applet-device-gsm.c
@@ -1281,8 +1281,23 @@ reg_info_changed_cb (DBusGProxy *proxy,
  gpointer user_data)
 {
GsmDeviceInfo *info = user_data;
-
-   info->reg_state = reg_state + 1;
+   guint32 mb_state = reg_state + 1;
+
+   if (info->reg_state != mb_state) {
+if (mb_state == MB_STATE_HOME)
+applet_do_notify_with_pref (info->applet,
+_("GSM network."),
+_("You are now registered on the 
home network."),
+"notification-gsm-high",
+
PREF_DISABLE_CONNECTED_NOTIFICATIONS);
+else if (mb_state == MB_STATE_ROAMING)
+applet_do_notify_with_pref (info->applet,
+_("GSM network."),
+_("You are now registered on a 
roaming network."),
+"notification-gsm-high",
+
PREF_DISABLE_CONNECTED_NOTIFICATIONS);
+}
+   info->reg_state = mb_state;
g_free (info->op_code);
info->op_code = strlen (op_code) ? g_strdup (op_code) : NULL;
g_free (info->op_name);
___
networkmanager-list mailing list
networkmanager-list@gnome.org
http://mail.gnome.org/mailman/listinfo/networkmanager-list


Re: [PATCH] ModemManager: handle "change" uevents as well as "add"

2011-06-09 Thread Dan Williams
On Wed, 2011-06-08 at 16:08 -0400, Nathan Williams wrote:
> The udev strategy used by ModemManager, as expressed in
> 80-mm-candidate.rules, expects "add" events to be emitted at startup
> when device rules have been processed (said events usually being
> generated by "udevadm trigger"). However, since udev-152, "udevadm
> trigger" generates "change" events instead. It's possible for distros
> or startup scripts to work around this, but I suggest we should just
> go ahead and accept these events as-is.

Pushed, thanks.  Though the patch you sent didn't build... fixed that up
before pushing of course.

Dan


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


Re: [PATCH] ModemManager: Enhancements to Icera error reporting and access technology reporting

2011-06-09 Thread Dan Williams
On Tue, 2011-06-07 at 10:35 -0400, Eric Shienbrood wrote:
> Thanks Aleksander! New patch file is attached.

I split these up and pushed all hunks except the hunk for processing the
match info for the NWSTATE response.  Two things there... first you need
to make sure you free the result of g_match_info_fetch() since that's an
allocated string.  Second, what does '-' mean again for the 
field?  I had the docs at some point but I appear to have lost them;
what other values can be there, and why don't we want to update the
access technology when that field is something other than '-'?

Thanks!
Dan

> Eric
> 
> 
> 
> On Tue, Jun 7, 2011 at 2:56 AM, Aleksander Morgado
>  wrote:
> Hi Eric,
> 
> 
> > The additional error detail allows us to know that a
> connection failed
> > because of an invalid APN. Also, when handling access
> technology
> > changes, report the technology in use if we're connected.
> Finally,
> > avoid using CFUN=0 when disabling the modem.
> 
> 
> A small thing to fix in the patch.
> 
> All callbacks receiving a response from the AT serial port
> should check
> if the modem has already been removed, so in
> query_network_error_code_done(), this check is needed just
> before trying
> to parse any reply:
> 
>/* If the modem has already been removed, return without
> * scheduling callback */
>if (mm_callback_info_check_modem_removed (info))
>return;
> 
> See
> 
> http://cgit.freedesktop.org/ModemManager/ModemManager/commit/?id=9323daec015ecad65c39b6020b62e864c027d858
> 
> Cheers!
> 
> --
> Aleksander
> 
> 
> 
> ___
> 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


[RFC PATCH] ModemManager: fix USSD reception, network notifications, and network requests

2011-06-09 Thread Dan Williams
RFC patch; I'm tired and don't want to look at this anymore so somebody
else double-check the cases for me.  Because the code was sending the
USSD request with a "notify me via unsolicited result code" tag, the
response could come from any port, and in was coming from other ports on
various devices.  But the code expected the response on the main port,
thus it got lost.

So turn the USSD response processing into an unsolicited command handler
instead, which allows us to process the response no matter where it
comes from.  This patch also enables network-initiated USSD
notifications and requests since that's easy to add once the first thing
here is done.

I'm somewhat wary about having to cache the MMCallbackInfo from
user-originated requests, since tracking the lifetime of those is easy
to screw up.  So any double-checking of that would be much appreciated.

---
diff --git a/src/mm-generic-gsm.c b/src/mm-generic-gsm.c
index bc718d1..d814c57 100644
--- a/src/mm-generic-gsm.c
+++ b/src/mm-generic-gsm.c
@@ -120,7 +120,11 @@ typedef struct {
 gboolean loc_enabled;
 gboolean loc_signal;
 
+gboolean ussd_enabled;
+MMCallbackInfo *pending_ussd_info;
 MMModemGsmUssdState ussd_state;
+char *ussd_network_request;
+char *ussd_network_notification;
 
 /* SMS */
 GHashTable *sms_present;
@@ -174,6 +178,10 @@ static void cmti_received (MMAtSerialPort *port,
GMatchInfo *info,
gpointer user_data);
 
+static void cusd_received (MMAtSerialPort *port,
+   GMatchInfo *info,
+   gpointer user_data);
+
 #define GS_HASH_TAG "get-sms"
 static GValue *simple_string_value (const char *str);
 static GValue *simple_uint_value (guint32 i);
@@ -844,6 +852,10 @@ mm_generic_gsm_grab_port (MMGenericGsm *self,
 mm_at_serial_port_add_unsolicited_msg_handler (MM_AT_SERIAL_PORT 
(port), regex, cmti_received, self, NULL);
 g_regex_unref (regex);
 
+regex = g_regex_new ("\\r\\n\\+CUSD:\\s*(.*)\\r\\n", G_REGEX_RAW | 
G_REGEX_OPTIMIZE, 0, NULL);
+mm_at_serial_port_add_unsolicited_msg_handler (MM_AT_SERIAL_PORT 
(port), regex, cusd_received, self, NULL);
+g_regex_unref (regex);
+
 if (ptype == MM_PORT_TYPE_PRIMARY) {
 priv->primary = MM_AT_SERIAL_PORT (port);
 if (!priv->data) {
@@ -1412,6 +1424,21 @@ cind_cb (MMAtSerialPort *port,
 }
 }
 
+static void
+cusd_enable_cb (MMAtSerialPort *port,
+GString *response,
+GError *error,
+gpointer user_data)
+{
+if (error) {
+mm_warn ("(%s): failed to enable USSD notifications.",
+ mm_port_get_device (MM_PORT (port)));
+return;
+}
+
+MM_GENERIC_GSM_GET_PRIVATE (user_data)->ussd_enabled = TRUE;
+}
+
 void
 mm_generic_gsm_enable_complete (MMGenericGsm *self,
 GError *error,
@@ -1462,6 +1489,9 @@ mm_generic_gsm_enable_complete (MMGenericGsm *self,
 mm_at_serial_port_queue_command (priv->primary, cmd, 3, NULL, NULL);
 g_free (cmd);
 
+/* Enable USSD notifications */
+mm_at_serial_port_queue_command (priv->primary, "+CUSD=1", 3, 
cusd_enable_cb, self);
+
 mm_at_serial_port_queue_command (priv->primary, "+CIND=?", 3, cind_cb, 
self);
 
 /* Try one more time to get the SIM ID */
@@ -1689,6 +1719,11 @@ disable_flash_done (MMSerialPort *port,
 mm_at_serial_port_queue_command (MM_AT_SERIAL_PORT (port), "+CREG=0", 3, 
NULL, NULL);
 mm_at_serial_port_queue_command (MM_AT_SERIAL_PORT (port), "+CGREG=0", 3, 
NULL, NULL);
 
+if (priv->ussd_enabled) {
+mm_at_serial_port_queue_command (MM_AT_SERIAL_PORT (port), "+CUSD=0", 
3, NULL, NULL);
+priv->ussd_enabled = FALSE;
+}
+
 if (priv->cmer_enabled) {
 mm_at_serial_port_queue_command (MM_AT_SERIAL_PORT (port), "+CMER=0", 
3, NULL, NULL);
 
@@ -1732,6 +1767,8 @@ disable (MMModem *modem,
 
 mm_generic_gsm_pending_registration_stop (MM_GENERIC_GSM (modem));
 
+mm_generic_gsm_ussd_cleanup (MM_GENERIC_GSM (modem));
+
 if (priv->poll_id) {
 g_source_remove (priv->poll_id);
 priv->poll_id = 0;
@@ -4676,93 +4713,171 @@ ussd_update_state (MMGenericGsm *self, 
MMModemGsmUssdState new_state)
 }
 }
 
+void
+mm_generic_gsm_ussd_cleanup (MMGenericGsm *self)
+{
+MMGenericGsmPrivate *priv = MM_GENERIC_GSM_GET_PRIVATE (self);
+
+if (priv->pending_ussd_info) {
+/* And schedule the callback */
+g_clear_error (&priv->pending_ussd_info->error);
+priv->pending_ussd_info->error = g_error_new_literal (MM_MODEM_ERROR,
+  
MM_MODEM_ERROR_GENERAL,
+  "USSD session 
terminated without reply.");
+mm_callback_info_schedule (priv->pending_ussd_info);
+priv->pending_ussd_info = NULL;
+}
+
+ussd_update_

Re: take me off the mailing list please

2011-06-09 Thread Dan Williams
On Thu, 2011-06-09 at 15:15 -0500, Marco Antonio wrote:
> Please take me off of the mailing list. Thank you very much.

The instructions for how you can do this yourself are at the bottom of
every mail you receive:

> ___
> 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


take me off the mailing list please

2011-06-09 Thread Marco Antonio
Please take me off of the mailing list. Thank you very much.
___
networkmanager-list mailing list
networkmanager-list@gnome.org
http://mail.gnome.org/mailman/listinfo/networkmanager-list


Re: How to Test NetworkManager 0.9

2011-06-09 Thread Dan Williams
On Thu, 2011-06-09 at 15:12 +0200, Jirka Klimes wrote:
> On Thursday 09 of June 2011 14:00:29 David Narvaez wrote:
> > On Wed, Jun 8, 2011 at 2:40 PM, David Narvaez
> > 
> >  wrote:
> > > Ok. I don't have my laptop right now but I'll try nmcli nm as soon as
> > > I get home. Thanks a lot for your fast answers, I now have a clear
> > > picture of what the debugging path should be.
> > 
> 
> First, basically you don't need any client (KDE plasma or nm-applet or gnome-
> shell applet or whatever) to run NetworkManager. You can edit connection 
> files 
> and everything will work.
> 
> To list available APs use:
> nm-tool
> or
> nmcli dev wifi
> 
> > nmcli nm shows Wifi and Wifi-Hardware are both enabled but I can't see
> > a list of the networks. Any ideas from this point?
> > 
> 
> There could be a problem with WiFi driver or wireless could be disabled by 
> rfkill switch (either hardware or software). Can you show the output of 'nm-
> tool' and 'rfkill list' commands? Also attach /var/log/messages or 
> /var/log/daemon.log, or whatever file contains NetworkManager logs in your 
> distro.

After that, try a manual wifi scan:

iw dev wlan0 scan trigger

or if your card is really old:

iwlist wlan0 scan

and see what happens.  If that's working, the next thing we need to do
is enable wpa_supplicant debugging to see why the scan requests are
getting rejected by the driver.

Dan


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


[PATCH] Simple patches for NM

2011-06-09 Thread Aleksander Morgado
Hey,

Attached the patches for:
 * the automake portability warnings (0001, 2 versions, one for master
and the other for NM_0_8)
 * the missing U2600 band ID (applicable to both master and NM_0_8)

Cheers

-- 
Aleksander
>From fd8f5f7eee34f7e5eb738af4395aa1d607887079 Mon Sep 17 00:00:00 2001
From: Aleksander Morgado 
Date: Thu, 9 Jun 2011 09:35:25 +0200
Subject: [PATCH 2/2] libnm-util: added missing U2600 GSM band enumeration

---
 libnm-util/nm-setting-gsm.c |3 ++-
 libnm-util/nm-setting-gsm.h |1 +
 2 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/libnm-util/nm-setting-gsm.c b/libnm-util/nm-setting-gsm.c
index 0ece448..643702c 100644
--- a/libnm-util/nm-setting-gsm.c
+++ b/libnm-util/nm-setting-gsm.c
@@ -643,7 +643,8 @@ nm_setting_gsm_class_init (NMSettingGsmClass *setting_class)
 		 || NM_SETTING_GSM_BAND_U850
 		 || NM_SETTING_GSM_BAND_U900
 		 || NM_SETTING_GSM_BAND_U17IX
-		 || NM_SETTING_GSM_BAND_U1900,
+		 || NM_SETTING_GSM_BAND_U1900
+		 || NM_SETTING_GSM_BAND_U2600,
 		NM_SETTING_GSM_BAND_ANY,
 		G_PARAM_READWRITE | G_PARAM_CONSTRUCT | NM_SETTING_PARAM_SERIALIZE));
 
diff --git a/libnm-util/nm-setting-gsm.h b/libnm-util/nm-setting-gsm.h
index 855787c..92aa5f7 100644
--- a/libnm-util/nm-setting-gsm.h
+++ b/libnm-util/nm-setting-gsm.h
@@ -88,6 +88,7 @@ typedef enum {
 	NM_SETTING_GSM_BAND_U900 = 0x0400, /* WCDMA 3GPP UMTS 900 MHz  (Class VIII) */
 	NM_SETTING_GSM_BAND_U17IX= 0x0800, /* WCDMA 3GPP UMTS 1700 MHz (Class IX) */
 	NM_SETTING_GSM_BAND_U1900= 0x1000, /* WCDMA 3GPP UMTS 1900 MHz (Class II) */
+	NM_SETTING_GSM_BAND_U2600= 0x2000, /* WCDMA 3GPP UMTS 2600 MHz (Class VII, internal) */
 } NMSettingGsmNetworkBand;
 
 typedef struct {
-- 
1.7.4.1

>From 77d4032d02b2da700f9751a6bcbb91e231601398 Mon Sep 17 00:00:00 2001
From: Aleksander Morgado 
Date: Thu, 9 Jun 2011 09:38:24 +0200
Subject: [PATCH 1/2] build: fix automake portability warnings

---
 configure.ac |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/configure.ac b/configure.ac
index 3767206..2a33ebd 100644
--- a/configure.ac
+++ b/configure.ac
@@ -15,7 +15,7 @@ AC_CONFIG_HEADERS([config.h])
 AC_CONFIG_MACRO_DIR([m4])
 AC_CONFIG_AUX_DIR([build-aux])
 
-AM_INIT_AUTOMAKE([1.10 subdir-objects tar-ustar no-dist-gzip dist-bzip2])
+AM_INIT_AUTOMAKE([1.10 subdir-objects tar-ustar no-dist-gzip dist-bzip2 -Wno-portability])
 AM_MAINTAINER_MODE([enable])
 
 m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([no])])
-- 
1.7.4.1

>From 8eb611f66c533af126dd1d9bc80439868588236c Mon Sep 17 00:00:00 2001
From: Aleksander Morgado 
Date: Thu, 9 Jun 2011 17:09:31 +0200
Subject: [PATCH 1/2] build: fix automake portability warnings

---
 configure.ac |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/configure.ac b/configure.ac
index 1324f83..3caaf82 100644
--- a/configure.ac
+++ b/configure.ac
@@ -11,7 +11,7 @@ m4_define([nm_version],
 AC_INIT([NetworkManager], [nm_version],
 [http://bugzilla.gnome.org/enter_bug.cgi?product=NetworkManager],
 [NetworkManager])
-AM_INIT_AUTOMAKE([1.9 subdir-objects tar-ustar no-dist-gzip dist-bzip2])
+AM_INIT_AUTOMAKE([1.9 subdir-objects tar-ustar no-dist-gzip dist-bzip2 -Wno-portability])
 m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([no])])
 AM_MAINTAINER_MODE
 
-- 
1.7.4.1

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


Re: How to Test NetworkManager 0.9

2011-06-09 Thread Jirka Klimes
On Thursday 09 of June 2011 14:00:29 David Narvaez wrote:
> On Wed, Jun 8, 2011 at 2:40 PM, David Narvaez
> 
>  wrote:
> > Ok. I don't have my laptop right now but I'll try nmcli nm as soon as
> > I get home. Thanks a lot for your fast answers, I now have a clear
> > picture of what the debugging path should be.
> 

First, basically you don't need any client (KDE plasma or nm-applet or gnome-
shell applet or whatever) to run NetworkManager. You can edit connection files 
and everything will work.

To list available APs use:
nm-tool
or
nmcli dev wifi

> nmcli nm shows Wifi and Wifi-Hardware are both enabled but I can't see
> a list of the networks. Any ideas from this point?
> 

There could be a problem with WiFi driver or wireless could be disabled by 
rfkill switch (either hardware or software). Can you show the output of 'nm-
tool' and 'rfkill list' commands? Also attach /var/log/messages or 
/var/log/daemon.log, or whatever file contains NetworkManager logs in your 
distro.

> David E. Narvaez

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


Re: How to Test NetworkManager 0.9

2011-06-09 Thread David Narvaez
On Wed, Jun 8, 2011 at 2:40 PM, David Narvaez
 wrote:
> Ok. I don't have my laptop right now but I'll try nmcli nm as soon as
> I get home. Thanks a lot for your fast answers, I now have a clear
> picture of what the debugging path should be.

nmcli nm shows Wifi and Wifi-Hardware are both enabled but I can't see
a list of the networks. Any ideas from this point?

David E. Narvaez
___
networkmanager-list mailing list
networkmanager-list@gnome.org
http://mail.gnome.org/mailman/listinfo/networkmanager-list


Re: Using NetworkManager in shell script

2011-06-09 Thread Jirka Klimes
On Saturday 26 of March 2011 09:13:37 Aniket Oak wrote:
> Hi,
> 
> I have a problem again. I can connect by cnetworkmanager but I dont know
> how to disconnect.
> 
> I tried
> 
> *[aniket cnetworkmanager-0.21.1]$ ./cnetworkmanager --online=false*
> 
> *gives following error*
> 
> *Traceback (most recent call last):
>   File "./cnetworkmanager", line 119, in 
> nm.Sleep(not options.online in true_choices)
>   File "/usr/lib/python2.6/site-packages/dbus/proxies.py", line 140, in
> __call__
> **keywords)
>   File "/usr/lib/python2.6/site-packages/dbus/connection.py", line 630, in
> call_blocking
> message, timeout)
> dbus.exceptions.DBusException: org.freedesktop.DBus.Error.AccessDenied:
> Rejected send message, 9 matched rules; type="method_call", sender=":1.116"
> (uid=500 pid=2932 comm="/usr/bin/python)
> interface="org.freedesktop.NetworkManager" member="Sleep" error
> name="(unset)" requested_reply=0 destination=":1.101" (uid=0 pid=2707
> comm="NetworkManager))
> [aniket cnetworkmanager-0.21.1]$ *
> 
> is there any way to disconnect?
> 

NetworkManager provides its own command-line tool - nmcli. You can use it for 
most of controlling stuff on the command line.

Deactivating a connection:
nmcli con down id "your connetcion name"

or disconnecting an interface:
nmcli dev disconnect iface wlan0

Info:
* man nmcli
* Comparison of cnetworkmanager x nmcli commands:
 http://repo.or.cz/w/cnetworkmanager.git/blob_plain/HEAD:/nmcli-migration.html

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


Re: Password Security

2011-06-09 Thread Marius Bjørnstad Kotsbak

Den 08. juni 2011 10:10, skrev Timo Babst:
Hello, I am using NetworkManager Applet 0.8. It works great except for 
one very annoying thing : there is a checkbox that says "show 
password" and someone (luckily a friend) was able to copy my password 
just by using this little funny feature. Could'nt you make sure that 
the user has to be root in order to view the password? It IS very 
annoying, since this feature makes every password absolutely useless. 
Sorry to be so direct, but this really is a BIG issue for me (and I 
think it should not be too hard to change it for the guy who 
developped it).




Create and use guest account(s) for your friends... Or if they alsa 
wants to use your networks probably tick the global available on the 
connections.


--
Marius


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


Re: Password Security

2011-06-09 Thread Jirka Klimes
On Wednesday 08 of June 2011 10:10:09 Timo Babst wrote:
> Hello, I am using NetworkManager Applet 0.8. It works great except for
> one very annoying thing : there is a checkbox that says "show password"
> and someone (luckily a friend) was able to copy my password just by
> using this little funny feature. Could'nt you make sure that the user
> has to be root in order to view the password? It IS very annoying, since
> this feature makes every password absolutely useless. Sorry to be so
> direct, but this really is a BIG issue for me (and I think it should not
> be too hard to change it for the guy who developped it).
> 
> Best regards,
> 
> Timo Babst

As others said you should keep an eye on the computer when logged in.

But, if you really want to, you can hide the "Show password" checkbox easily.
Edit UI files in /usr/share/nm-applet and change 'visible' property for Show 
checkboxes to 'False'.

Examples for WEP and WPA-PSK passwords:

--- /usr/share/nm-applet/ws-wep-key.ui  2011-06-09 11:30:06.205972001 +0200
+++ a   2011-06-09 11:29:35.643972000 +0200
@@ -86,7 +86,7 @@
 
   
 Sho_w 
key
-True
+False
 True
 False
 True

--- /usr/share/nm-applet/ws-wpa-psk.ui  2011-06-09 11:30:29.037972027 +0200
+++ b   2011-06-09 11:29:47.469972001 +0200
@@ -70,7 +70,7 @@
 
   
 Sho_w 
password
-True
+False
 True
 False
 True

You can do the same for other dialogs.
Hint: grep -r Sho /usr/share/nm-applet/

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


Re: changing ip addresses using nm dbus with qt

2011-06-09 Thread Jirka Klimes
On Monday 06 of June 2011 12:07:27 Savio Sebastian wrote:
> Hi all,
> I am trying to change the ip addresses(switching between DHCP and manual)
> using nm dbus with the qt i am able to get the devices list  but how can i
> change the ip addresses any examples available
> Thanks

I've added an example to change IP method in a connection:
http://cgit.freedesktop.org/NetworkManager/NetworkManager/tree/examples/C/qt/change-
ipv4-addresses.cpp
You can simply adapt that to change other settings as well.

See also other examples in the directory.

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