vpnc plugin parameter

2011-02-10 Thread Jan Malanik

hi,
it's possible to start vpnc plugin from network manager with parameter 
--local-port 0?


thank you Jan Malanik
___
networkmanager-list mailing list
networkmanager-list@gnome.org
http://mail.gnome.org/mailman/listinfo/networkmanager-list


Network Manager reason codes

2011-02-10 Thread Byte Soup
Hi All,

I was wondering about the reason codes Im seeing in my /var/log/syslog, for
example:

Feb 10 13:15:57 Homer NetworkManager: info  (eth1): supplicant connection
state:  associating - disconnected
Feb 10 13:15:59 Homer NetworkManager: info  (eth1): supplicant connection
state:  disconnected - scanning
Feb 10 13:16:11 Homer NetworkManager: info  (eth1): supplicant connection
state:  scanning - disconnected
Feb 10 13:16:13 Homer NetworkManager: info  (eth1): device state change: 8
- 3 (reason 11)
Feb 10 13:16:13 Homer NetworkManager: info  (eth1): deactivating device
(reason: 11).

Is there a reference for the reason codes? Also Im working in a location
where there are a number of different access points for the same network.
Can I configure network manager to just associated to one MAC address,
because it seems to be hopping from one to another and then subsequently my
VPN connection drops

Thanks

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


Re: [PATCH] one more +CREG syntax

2011-02-10 Thread Michał Sroczyński
Hi,

W dniu 11 stycznia 2011 20:44 użytkownik Dan Williams d...@redhat.comnapisał:

 On Tue, 2010-12-21 at 21:18 +0100, Michał Sroczyński wrote:
  Hi,
 
  With current version of modem-manager connecting to the internet using
  Samsung Wave S8500 doesn't work (I've used modemmanager from fedora-14:
  0.4-4.git20100720). It turned out that samsung's response for +CREG is
 different
  than expected (it has extra parameter). So I've added another (7th)
 syntax to
  mm_gsm_creg_regex_get. Now it works ok with the attached patch. It would
  be nice if it got included next version of modem-manager. Probably Wave
  isn't the only phone with such a syntax.

 Pushed, thanks.  The 'B' there isn't very useful, and while that's
 probably some sort of access technology marker, I have no idea what it
 means and cannot find anything about it.  Does it change?  Can you lock
 the phone into 2G mode and see what it says, then lock it into 3G mode
 and report what it changes to, if anything?


Sory for slow response. I've changed network modes, and here are results:
1. automatic:
CREG: 2,1,000B,3899, B, C3899
2. gsm900/1800:
CREG: 2,1,03F7,4908, 3F7, 4908
3. umts900/2100:
CREG: 2,1,000B,3899, B, C3899

Regards,
Michal Sroczynski
--
Life is complex: it has real and imaginary parts.
___
networkmanager-list mailing list
networkmanager-list@gnome.org
http://mail.gnome.org/mailman/listinfo/networkmanager-list


Re: Network Manager reason codes

2011-02-10 Thread Jirka Klimes
On Thursday 10 of February 2011 14:20:12 Byte Soup wrote:
 Hi All,
 
 I was wondering about the reason codes Im seeing in my /var/log/syslog, for
 example:
 
 Feb 10 13:15:57 Homer NetworkManager: info  (eth1): supplicant connection
 state:  associating - disconnected
 Feb 10 13:15:59 Homer NetworkManager: info  (eth1): supplicant connection
 state:  disconnected - scanning
 Feb 10 13:16:11 Homer NetworkManager: info  (eth1): supplicant connection
 state:  scanning - disconnected
 Feb 10 13:16:13 Homer NetworkManager: info  (eth1): device state change:
 8 - 3 (reason 11)
 Feb 10 13:16:13 Homer NetworkManager: info  (eth1): deactivating device
 (reason: 11).
 
 Is there a reference for the reason codes? Also Im working in a location
 where there are a number of different access points for the same network.
 Can I configure network manager to just associated to one MAC address,
 because it seems to be hopping from one to another and then subsequently my
 VPN connection drops
 
 Thanks
 
 -Mark

You can find the reason codes in
http://cgit.freedesktop.org/NetworkManager/NetworkManager/tree/include/NetworkManager.h?id=2dbaab2221c092e1cb1855b14419964b4b8a04fc#n235

If you want to use just one AP, you can lock a connection to it via BSSID 
field in nm-connection-editor.

right-click on nm-applet - Edit Connections... -click to Wireless tab - 
find your connection - click Edit... - on Wireless tab add MAC address of 
your AP to BSSID edit field and save the connection.

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


Re: Network Manager reason codes

2011-02-10 Thread mike cloaked
On Thu, Feb 10, 2011 at 1:52 PM, Jirka Klimes jkli...@redhat.com wrote:
 On Thursday 10 of February 2011 14:20:12 Byte Soup wrote:
 Hi All,

 I was wondering about the reason codes Im seeing in my /var/log/syslog, for
 example:

 Feb 10 13:15:57 Homer NetworkManager: info  (eth1): supplicant connection
 state:  associating - disconnected
 Feb 10 13:15:59 Homer NetworkManager: info  (eth1): supplicant connection
 state:  disconnected - scanning
 Feb 10 13:16:11 Homer NetworkManager: info  (eth1): supplicant connection
 state:  scanning - disconnected
 Feb 10 13:16:13 Homer NetworkManager: info  (eth1): device state change:
 8 - 3 (reason 11)
 Feb 10 13:16:13 Homer NetworkManager: info  (eth1): deactivating device
 (reason: 11).

 Is there a reference for the reason codes? Also Im working in a location
 where there are a number of different access points for the same network.
 Can I configure network manager to just associated to one MAC address,
 because it seems to be hopping from one to another and then subsequently my
 VPN connection drops

 Thanks

 -Mark

 You can find the reason codes in
 http://cgit.freedesktop.org/NetworkManager/NetworkManager/tree/include/NetworkManager.h?id=2dbaab2221c092e1cb1855b14419964b4b8a04fc#n235

 If you want to use just one AP, you can lock a connection to it via BSSID
 field in nm-connection-editor.

 right-click on nm-applet - Edit Connections... -click to Wireless tab -
 find your connection - click Edit... - on Wireless tab add MAC address 
 of
 your AP to BSSID edit field and save the connection.

If there are two different connections defined in NM with the same
ssid and encryption but each with different BSSID values (i.e. because
there are two APs
in different parts of a building for example), how does NM determine
which of the two to associate with on initial connection?

Is there a way to get NM to always choose the one with the strongest
signal at the time of making the initial connection?

What is the internal NM decision if one then moves from from near the
first AP to the other one so that the signal that was weak initially
then later becomes the stronger signal?

Thanks

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


bug report - samsung n150 netbook - after update not able to connect 3G broadband + debug

2011-02-10 Thread Daniel Duris
I am reporting bug - after update of Ubuntu Mint, 3g modem is unable
to connect. SIM card is correctly connected I can assure you despite
the message from the network manager. as no chabnge to the sim card
has been done. only change is complete update of ubuntu mint. same
error (unable to connect) happens for multiple SIM card from different
providers and multiple distributions (xubuntu tested as well).

so this is definitely some bug in networkmanager used by the both
systems i suppose.

uname -a output:
Linux sumo 2.6.35-22 generic #35-Ubuntu SMP  i686 GNU/Linux


complete DEBUG showing the bug and making computer totally useless for
3G connections:
Feb  9 23:47:21 sumo NetworkManager[859]: info Activation (ttyACM0)
starting connection 'O2 Internet'
Feb  9 23:47:21 sumo NetworkManager[859]: info (ttyACM0): device
state change: 3 - 4 (reason 0)
Feb  9 23:47:21 sumo NetworkManager[859]: info Activation (ttyACM0)
Stage 1 of 5 (Device Prepare) scheduled...
Feb  9 23:47:21 sumo NetworkManager[859]: info Activation (ttyACM0)
Stage 1 of 5 (Device Prepare) started...
Feb  9 23:47:21 sumo NetworkManager[859]: info Activation (ttyACM0)
Stage 1 of 5 (Device Prepare) complete.
Feb  9 23:47:21 sumo modem-manager: (ttyACM0) opening serial device...
Feb  9 23:47:21 sumo modem-manager: Modem
/org/freedesktop/ModemManager/Modems/0: state changed (disabled -
enabling)
Feb  9 23:47:22 sumo modem-manager: (ttyACM1) opening serial device...
Feb  9 23:47:22 sumo modem-manager: Got failure code 100: Unknown error
Feb  9 23:47:22 sumo modem-manager: Modem
/org/freedesktop/ModemManager/Modems/0: state changed (enabling -
enabled)
Feb  9 23:47:22 sumo modem-manager: Got failure code 10: SIM not inserted
Feb  9 23:48:13 sumo sudo: pam_sm_authenticate: Called
Feb  9 23:48:13 sumo sudo: pam_sm_authenticate: username = [dusoft]
Feb  9 23:48:13 sumo sudo: pam_sm_authenticate: /home/dusoft is already mounted
Feb  9 23:48:23 sumo NetworkManager[859]: warn GSM connection
failed: (32) Network timeout
Feb  9 23:48:23 sumo NetworkManager[859]: info (ttyACM0): device
state change: 4 - 9 (reason 1)
Feb  9 23:48:23 sumo NetworkManager[859]: info Marking connection
'O2 Internet' invalid.
Feb  9 23:48:23 sumo NetworkManager[859]: warn Activation (ttyACM0) failed.
Feb  9 23:48:23 sumo NetworkManager[859]: info (ttyACM0): device
state change: 9 - 3 (reason 0)
Feb  9 23:48:23 sumo NetworkManager[859]: info (ttyACM0):
deactivating device (reason: 0).
Feb  9 23:48:23 sumo NetworkManager[859]: info Policy set 'Auto
eth0' (eth0) as default for IPv4 routing and DNS.
Feb  9 23:48:23 sumo NetworkManager[859]: info Policy set 'Auto
eth0' (eth0) as default for IPv4 routing and DNS.
Feb  9 23:48:31 sumo NetworkManager[859]: info Activation (ttyACM0)
starting connection 'O2 Internet'
Feb  9 23:48:31 sumo NetworkManager[859]: info (ttyACM0): device
state change: 3 - 4 (reason 0)
Feb  9 23:48:31 sumo NetworkManager[859]: info Activation (ttyACM0)
Stage 1 of 5 (Device Prepare) scheduled...
Feb  9 23:48:31 sumo NetworkManager[859]: info Activation (ttyACM0)
Stage 1 of 5 (Device Prepare) started...
Feb  9 23:48:31 sumo NetworkManager[859]: info Activation (ttyACM0)
Stage 1 of 5 (Device Prepare) complete.
Feb  9 23:48:31 sumo modem-manager: Got failure code 10: SIM not inserted
Feb  9 23:49:30 sumo NetworkManager[859]: info (ttyACM0): device
state change: 4 - 3 (reason 0)
Feb  9 23:49:30 sumo NetworkManager[859]: info (ttyACM0):
deactivating device (reason: 0).
Feb  9 23:49:30 sumo NetworkManager[859]: info Policy set 'Auto
eth0' (eth0) as default for IPv4 routing and DNS.
Feb  9 23:49:30 sumo NetworkManager[859]: info Policy set 'Auto
eth0' (eth0) as default for IPv4 routing and DNS.
Feb  9 23:49:30 sumo NetworkManager[859]: info Activation (ttyACM0)
starting connection 'O2 Internet'
Feb  9 23:49:30 sumo NetworkManager[859]: info (ttyACM0): device
state change: 3 - 4 (reason 0)
Feb  9 23:49:30 sumo NetworkManager[859]: info Activation (ttyACM0)
Stage 1 of 5 (Device Prepare) scheduled...
Feb  9 23:49:30 sumo NetworkManager[859]: info Activation (ttyACM0)
Stage 1 of 5 (Device Prepare) started...
Feb  9 23:49:30 sumo NetworkManager[859]: info Activation (ttyACM0)
Stage 1 of 5 (Device Prepare) complete.
Feb  9 23:49:30 sumo modem-manager: Got failure code 10: SIM not inserted
Feb  9 23:49:30 sumo modem-manager: Modem
/org/freedesktop/ModemManager/Modems/0: state changed (enabled -
connecting)
Feb  9 23:49:31 sumo modem-manager: Got failure code 100: Unknown error
Feb  9 23:49:31 sumo modem-manager: Modem
/org/freedesktop/ModemManager/Modems/0: state changed (connecting -
enabled)
Feb  9 23:49:31 sumo NetworkManager[859]: warn GSM connection
failed: (32) unknown
Feb  9 23:49:31 sumo NetworkManager[859]: info (ttyACM0): device
state change: 4 - 9 (reason 1)
Feb  9 23:49:31 sumo NetworkManager[859]: info Marking connection
'O2 Internet' invalid.
Feb  9 23:49:31 sumo NetworkManager[859]: warn Activation (ttyACM0) failed.
Feb  9 23:49:31 sumo 

Re: Network Manager reason codes

2011-02-10 Thread mike cloaked
On Thu, Feb 10, 2011 at 6:49 PM, Dan Williams d...@redhat.com wrote:

 Is there a way to get NM to always choose the one with the strongest
 signal at the time of making the initial connection?

 Not at this time, but it's reasonable to pick the highest signal
 strength AP if there are two connections for the same SSID but different
 BSSIDs.

I would love this to actually happen!  But it seems not to with the
version I have (NetworkManager-0.8.1-10.git20100831.fc14)
In fact in this case I find it exceptionally difficult to get a
connection with the near strong one if it previously had connected to
the weaker one.
If I remove all previously stored connections to this ssid and start
again then it does connect to the strong near one and it can be locked
to the bssid of course.

 We shouldn't be using strongest signal in general though, because that
 often doesn't do what users want in cases where there are multiple
 networks the user periodically connects to.

 Here's a case: you've connected to your neighbors wifi before when your
 ISP goes down.  But almost all of the time you want to connect to your
 own wifi.  But in the 2nd floor room your wifi is weaker than your
 neighbors.  If the strongest signal were preferred, NM would connect
 to your neighbors wifi instead of your own.

That is of course fine - but there are use cases where the two APs are
both in one's own home - and both have the same ssid and that
presents a problem - at least for me.

 Plus, signal strength is wildly variable and it's only useful to compare
 signal strengths when the difference is large (say, 25+%).  Deciding to
 connect to a wifi network that's 5% or 10% better than some other
 network is making a choice based on faulty information.

True but if the near one is about 100% and the far one is about 25%
and both have the same ssid and are on the same network then it seems
odd to connect to the 25% signal as a preference irrespective of the
historical connection to the bssid corresponding to the weaker signal.

I suppose what I am saying is that all of the logic you present is
fine but there should perhaps be an exception if the system sees two
signals on different channels with the same ssid with very different
signal levels it is this specific instance where maybe an
additional selection criterion is used by NM?


 Thus most recently used generally provides better, more understandable
 behavior.  If you boot your laptop at home, you'll connect to your home
 network because that's the most recent network you used that NM can see.
 Instead of having NM appear to prefer some network randomly over another
 just because it has 10% better signal strength, even though you almost
 never connect to that network.

If you then take it to work presumably it won't then try to connect to
the home (non-existent network at that stage) andwait before
connecting to the work one will it?

 There are clearly some optimizations we can do, including keeping around
 a connect-count, to determine what networks you use more often, and
 perhaps in combination with the most recently used information, make a
 better choice.

 What is the internal NM decision if one then moves from from near the
 first AP to the other one so that the signal that was weak initially
 then later becomes the stronger signal?

 NM doesn't make this decision at all.  wpa_supplicant and the kernel
 drivers make the decision to roam between APs in the same BSS depending
 on signal strength, error rates, etc.  If you do not lock the connection
 to a specific BSSID, then the roaming decisions are all made in the
 driver and the supplicant.

OK - and what does the supplicant/driver do in the instance that you
have two APs on different channels with the same ssid and initially
the first is at 100% with the second hovering around 20 -40% and then
move to a position where that reverses?  If there is a really solid
difference in signal and despite variations over some range one
maintains a significant difference over a period of minutes would that
make a difference to the decision logic?

 wpa_supplicant 0.6.x and earlier have known problems here, and may
 gratuitously roam between APs of similar signal strength.
 wpa_supplicant 0.7.x and later are smarter about when to roam, and will
 only roam between APs when the current AP is much worse than a candidate
 AP, and will also perform background scanning when the current AP's
 strength gets too low.

I guess then that this answers the intended behaviour in my previous
paragraph - and presume this remains the same logic for bersion 0.8.x
?

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


Re: Network Manager reason codes

2011-02-10 Thread Byte Soup
On 10 February 2011 13:52, Jirka Klimes jkli...@redhat.com wrote:

 On Thursday 10 of February 2011 14:20:12 Byte Soup wrote:
  Hi All,
 
  I was wondering about the reason codes Im seeing in my /var/log/syslog,
 for
  example:
 
  Feb 10 13:15:57 Homer NetworkManager: info  (eth1): supplicant
 connection
  state:  associating - disconnected
  Feb 10 13:15:59 Homer NetworkManager: info  (eth1): supplicant
 connection
  state:  disconnected - scanning
  Feb 10 13:16:11 Homer NetworkManager: info  (eth1): supplicant
 connection
  state:  scanning - disconnected
  Feb 10 13:16:13 Homer NetworkManager: info  (eth1): device state
 change:
  8 - 3 (reason 11)
  Feb 10 13:16:13 Homer NetworkManager: info  (eth1): deactivating device
  (reason: 11).
 
  Is there a reference for the reason codes? Also Im working in a location
  where there are a number of different access points for the same network.
  Can I configure network manager to just associated to one MAC address,
  because it seems to be hopping from one to another and then subsequently
 my
  VPN connection drops
 
  Thanks
 
  -Mark

 You can find the reason codes in

 http://cgit.freedesktop.org/NetworkManager/NetworkManager/tree/include/NetworkManager.h?id=2dbaab2221c092e1cb1855b14419964b4b8a04fc#n235


Sorry, I dont really understand the code that well, can I assume that the
enum means we take each line as the next reason code? (see my comments
below)

typedef enum {
/* No reason given */
NM_DEVICE_STATE_REASON_NONE = 0,

/* Unknown error */
NM_DEVICE_STATE_REASON_UNKNOWN, -- reason code 1?

/* Device is now managed */
NM_DEVICE_STATE_REASON_NOW_MANAGED, -- reason code 2?

Thanks



 If you want to use just one AP, you can lock a connection to it via BSSID
 field in nm-connection-editor.

 right-click on nm-applet - Edit Connections... -click to Wireless tab
 -
 find your connection - click Edit... - on Wireless tab add MAC
 address of
 your AP to BSSID edit field and save the connection.

 Jirka

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


Re: Network Manager reason codes

2011-02-10 Thread Byte Soup
On 10 February 2011 18:49, Dan Williams d...@redhat.com wrote:

 On Thu, 2011-02-10 at 16:05 +, mike cloaked wrote:
  On Thu, Feb 10, 2011 at 1:52 PM, Jirka Klimes jkli...@redhat.com
 wrote:
   On Thursday 10 of February 2011 14:20:12 Byte Soup wrote:
   Hi All,
  
   I was wondering about the reason codes Im seeing in my
 /var/log/syslog, for
   example:
  
   Feb 10 13:15:57 Homer NetworkManager: info  (eth1): supplicant
 connection
   state:  associating - disconnected
   Feb 10 13:15:59 Homer NetworkManager: info  (eth1): supplicant
 connection
   state:  disconnected - scanning
   Feb 10 13:16:11 Homer NetworkManager: info  (eth1): supplicant
 connection
   state:  scanning - disconnected
   Feb 10 13:16:13 Homer NetworkManager: info  (eth1): device state
 change:
   8 - 3 (reason 11)
   Feb 10 13:16:13 Homer NetworkManager: info  (eth1): deactivating
 device
   (reason: 11).
  
   Is there a reference for the reason codes? Also Im working in a
 location
   where there are a number of different access points for the same
 network.
   Can I configure network manager to just associated to one MAC address,
   because it seems to be hopping from one to another and then
 subsequently my
   VPN connection drops
  
   Thanks
  
   -Mark
  
   You can find the reason codes in
  
 http://cgit.freedesktop.org/NetworkManager/NetworkManager/tree/include/NetworkManager.h?id=2dbaab2221c092e1cb1855b14419964b4b8a04fc#n235
  
   If you want to use just one AP, you can lock a connection to it via
 BSSID
   field in nm-connection-editor.
  
   right-click on nm-applet - Edit Connections... -click to Wireless
 tab -
   find your connection - click Edit... - on Wireless tab add MAC
 address of
   your AP to BSSID edit field and save the connection.
 
  If there are two different connections defined in NM with the same
  ssid and encryption but each with different BSSID values (i.e. because
  there are two APs
  in different parts of a building for example), how does NM determine
  which of the two to associate with on initial connection?

 The connection is a candidate for activation if the SSID is seen in the
 scan list, and if it's BSSD-locked, the BSSID must also be seen in the
 scan list.  Then, of the connections that are candidates, the one that
 was most recently connected to is chosen.


In my case there are several access points in the same building that use
different channels, they are all open (i.e. no encryption) but connect to
the same network. I then use VPN from here to get into my work LAN corporate
network. So its not NM thats hopping across these APs but the driver? Could
it be the channel change thats causing a drop and then NM to disconnect and
reconnect?


  Is there a way to get NM to always choose the one with the strongest
  signal at the time of making the initial connection?

 Not at this time, but it's reasonable to pick the highest signal
 strength AP if there are two connections for the same SSID but different
 BSSIDs.

 We shouldn't be using strongest signal in general though, because that
 often doesn't do what users want in cases where there are multiple
 networks the user periodically connects to.

 Here's a case: you've connected to your neighbors wifi before when your
 ISP goes down.  But almost all of the time you want to connect to your
 own wifi.  But in the 2nd floor room your wifi is weaker than your
 neighbors.  If the strongest signal were preferred, NM would connect
 to your neighbors wifi instead of your own.

 Plus, signal strength is wildly variable and it's only useful to compare
 signal strengths when the difference is large (say, 25+%).  Deciding to
 connect to a wifi network that's 5% or 10% better than some other
 network is making a choice based on faulty information.

 Thus most recently used generally provides better, more understandable
 behavior.  If you boot your laptop at home, you'll connect to your home
 network because that's the most recent network you used that NM can see.
 Instead of having NM appear to prefer some network randomly over another
 just because it has 10% better signal strength, even though you almost
 never connect to that network.

 There are clearly some optimizations we can do, including keeping around
 a connect-count, to determine what networks you use more often, and
 perhaps in combination with the most recently used information, make a
 better choice.

  What is the internal NM decision if one then moves from from near the
  first AP to the other one so that the signal that was weak initially
  then later becomes the stronger signal?

 NM doesn't make this decision at all.  wpa_supplicant and the kernel
 drivers make the decision to roam between APs in the same BSS depending
 on signal strength, error rates, etc.  If you do not lock the connection
 to a specific BSSID, then the roaming decisions are all made in the
 driver and the supplicant.

 wpa_supplicant 0.6.x and earlier have known problems here, and may
 gratuitously roam 

Re: Network Manager reason codes

2011-02-10 Thread Jirka Klimes
On Thursday 10 of February 2011 22:42:49 Byte Soup wrote:
  
  You can find the reason codes in
  
  http://cgit.freedesktop.org/NetworkManager/NetworkManager/tree/include/Ne
  tworkManager.h?id=2dbaab2221c092e1cb1855b14419964b4b8a04fc#n235
 
 Sorry, I dont really understand the code that well, can I assume that the
 enum means we take each line as the next reason code? (see my comments
 below)
 
 typedef enum {
   /* No reason given */
   NM_DEVICE_STATE_REASON_NONE = 0,
 
   /* Unknown error */
   NM_DEVICE_STATE_REASON_UNKNOWN, -- reason code 1?
 
   /* Device is now managed */
   NM_DEVICE_STATE_REASON_NOW_MANAGED, -- reason code 2?
 
 Thanks

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