[PATCH 1/5] gsupplicant: added api support for wps pin support detection

2011-09-08 Thread Tomasz Bursztyka
---
 gsupplicant/gsupplicant.h |1 +
 gsupplicant/supplicant.c  |   11 +++
 2 files changed, 12 insertions(+), 0 deletions(-)

diff --git a/gsupplicant/gsupplicant.h b/gsupplicant/gsupplicant.h
index 27a8b30..01e073a 100644
--- a/gsupplicant/gsupplicant.h
+++ b/gsupplicant/gsupplicant.h
@@ -204,6 +204,7 @@ dbus_int16_t 
g_supplicant_network_get_signal(GSupplicantNetwork *network);
 dbus_bool_t g_supplicant_network_get_wps(GSupplicantNetwork *network);
 dbus_bool_t g_supplicant_network_is_wps_active(GSupplicantNetwork *network);
 dbus_bool_t g_supplicant_network_is_wps_pbc(GSupplicantNetwork *network);
+dbus_bool_t g_supplicant_network_is_wps_pin(GSupplicantNetwork *network);
 dbus_bool_t g_supplicant_network_is_wps_advertizing(GSupplicantNetwork 
*network);
 
 struct _GSupplicantCallbacks {
diff --git a/gsupplicant/supplicant.c b/gsupplicant/supplicant.c
index 28522c9..b1506ef 100644
--- a/gsupplicant/supplicant.c
+++ b/gsupplicant/supplicant.c
@@ -814,6 +814,17 @@ dbus_bool_t 
g_supplicant_network_is_wps_pbc(GSupplicantNetwork *network)
return FALSE;
 }
 
+dbus_bool_t g_supplicant_network_is_wps_pin(GSupplicantNetwork *network)
+{
+   if (network == NULL)
+   return FALSE;
+
+   if (network-wps_capabilities  G_SUPPLICANT_WPS_PIN)
+   return TRUE;
+
+   return FALSE;
+}
+
 dbus_bool_t g_supplicant_network_is_wps_advertizing(GSupplicantNetwork 
*network)
 {
if (network == NULL)
-- 
1.7.3.4

___
connman mailing list
connman@connman.net
http://lists.connman.net/listinfo/connman


[PATCH 0/5] WPS pin/pbc differentiation proposal in agent api - version 1

2011-09-08 Thread Tomasz Bursztyka
Hi,

Here is a quick proposal following the previous patch-set called Automatic 
usage of WPS when relevant - version 1 I sent earlier.
The point here is to know which wps method is available while requesting an 
input through agent api: push button (pbc) and/or pin?
I did not wanted to break too much how WPS field has been build, so I added a 
Notice argument.
This is a proposal, so if it's not relevant and/or if it could be improved 
another way, that's fine ;)

Patch-set add support for network wps method differentiation and then improves 
the agent api according to the 
proposal, as well as its documentation.

Please review,

Tomasz Bursztyka (5):
  gsupplicant: added api support for wps pin support detection
  network: adding the support for wps method differentiation, pbc or
pin
  wifi: adding support for wps method setting in network
  doc: added notice argument to fin tune the details about wps
  agent: added notice argument support for wps

 doc/agent-api.txt |   10 --
 gsupplicant/gsupplicant.h |1 +
 gsupplicant/supplicant.c  |   11 +++
 plugins/wifi.c|5 +
 src/agent.c   |   21 +
 src/network.c |   10 ++
 6 files changed, 56 insertions(+), 2 deletions(-)

-- 
1.7.3.4

___
connman mailing list
connman@connman.net
http://lists.connman.net/listinfo/connman


[PATCH 2/5] network: adding the support for wps method differentiation, pbc or pin

2011-09-08 Thread Tomasz Bursztyka
---
 src/network.c |   10 ++
 1 files changed, 10 insertions(+), 0 deletions(-)

diff --git a/src/network.c b/src/network.c
index d360282..c5bba98 100644
--- a/src/network.c
+++ b/src/network.c
@@ -72,6 +72,8 @@ struct connman_network {
char *phase2_auth;
connman_bool_t wps;
connman_bool_t use_wps;
+   connman_bool_t wps_pbc;
+   connman_bool_t wps_pin;
char *pin_wps;
} wifi;
 
@@ -1653,6 +1655,10 @@ int connman_network_set_bool(struct connman_network 
*network,
network-wifi.wps = value;
else if (g_strcmp0(key, WiFi.UseWPS) == 0)
network-wifi.use_wps = value;
+   else if (g_strcmp0(key, WiFi.WPSPbc) == 0)
+   network-wifi.wps_pbc = value;
+   else if (g_strcmp0(key, WiFi.WPSPin) == 0)
+   network-wifi.wps_pin = value;
 
return -EINVAL;
 }
@@ -1675,6 +1681,10 @@ connman_bool_t connman_network_get_bool(struct 
connman_network *network,
return network-wifi.wps;
else if (g_str_equal(key, WiFi.UseWPS) == TRUE)
return network-wifi.use_wps;
+   else if (g_str_equal(key, WiFi.WPSPbc) == TRUE)
+   return network-wifi.wps_pbc;
+   else if (g_str_equal(key, WiFi.WPSPin) == TRUE)
+   return network-wifi.wps_pin;
 
return FALSE;
 }
-- 
1.7.3.4

___
connman mailing list
connman@connman.net
http://lists.connman.net/listinfo/connman


[PATCH 3/5] wifi: adding support for wps method setting in network

2011-09-08 Thread Tomasz Bursztyka
---
 plugins/wifi.c |5 +
 1 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/plugins/wifi.c b/plugins/wifi.c
index 93e3b29..62afbe3 100644
--- a/plugins/wifi.c
+++ b/plugins/wifi.c
@@ -793,6 +793,7 @@ static void network_added(GSupplicantNetwork 
*supplicant_network)
unsigned int ssid_len;
connman_bool_t wps;
connman_bool_t wps_pbc;
+   connman_bool_t wps_pin;
connman_bool_t wps_ready;
connman_bool_t wps_advertizing;
 
@@ -807,6 +808,7 @@ static void network_added(GSupplicantNetwork 
*supplicant_network)
 
wps = g_supplicant_network_get_wps(supplicant_network);
wps_pbc = g_supplicant_network_is_wps_pbc(supplicant_network);
+   wps_pin = g_supplicant_network_is_wps_pin(supplicant_network);
wps_ready = g_supplicant_network_is_wps_active(supplicant_network);
wps_advertizing = g_supplicant_network_is_wps_advertizing(
supplicant_network);
@@ -842,7 +844,10 @@ static void network_added(GSupplicantNetwork 
*supplicant_network)
connman_network_set_string(network, WiFi.Security, security);
connman_network_set_strength(network,
calculate_strength(supplicant_network));
+
connman_network_set_bool(network, WiFi.WPS, wps);
+   connman_network_set_bool(network, WiFi.WPSPbc, wps_pbc);
+   connman_network_set_bool(network, WiFi.WPSPin, wps_pin);
 
if (wps == TRUE) {
/* Is AP advertizing for WPS association?
-- 
1.7.3.4

___
connman mailing list
connman@connman.net
http://lists.connman.net/listinfo/connman


[PATCH 5/5] agent: added notice argument support for wps

2011-09-08 Thread Tomasz Bursztyka
---
 src/agent.c |   21 +
 1 files changed, 21 insertions(+), 0 deletions(-)

diff --git a/src/agent.c b/src/agent.c
index 56217ef..c4b0966 100644
--- a/src/agent.c
+++ b/src/agent.c
@@ -248,13 +248,34 @@ static void 
request_input_append_passphrase(DBusMessageIter *iter,
 
 static void request_input_append_wps(DBusMessageIter *iter, void *user_data)
 {
+   struct connman_service *service = user_data;
+   struct connman_network *network;
const char *str = wpspin;
+   char *notice = NULL;
 
connman_dbus_dict_append_basic(iter, Type,
DBUS_TYPE_STRING, str);
str = alternate;
connman_dbus_dict_append_basic(iter, Requirement,
DBUS_TYPE_STRING, str);
+
+   network = __connman_service_get_network(service);
+   if (network == NULL) /* Should not happen though */
+   return;
+
+   if (connman_network_get_bool(network, WPSPbc) == TRUE)
+   notice = pbc;
+   if (connman_network_get_bool(network, WPSPin) == TRUE) {
+   if (notice == NULL)
+   notice = pin;
+   else
+   notice = pbc,pin;
+   }
+
+   if (notice != NULL)
+   connman_dbus_dict_append_basic(iter, Notice,
+   DBUS_TYPE_STRING, notice);
+
 }
 
 int __connman_agent_request_input(struct connman_service *service,
-- 
1.7.3.4

___
connman mailing list
connman@connman.net
http://lists.connman.net/listinfo/connman


Queries Related to Connman and Session Management

2011-09-08 Thread Lewis Terence
Hello all,

I am new to connman mailing list. For the better understanding of
connman, i tested it with the python scripts which are available in
the test folder. I have few question regarding connman, test-scripts
and session management.

1) There is a latest release of connman-0.77. Which is more stable -
connman-0.76 or connman-0.77, with respect to wifi functionality.
2) For creating a session in manager-api.txt, it is mentioned that :
every application should atleast create one session to inform
about its requirements and purpose
 Which application does it means? Because, if i open a
Firefox(application), then there is no session created by it. Can
anyone please give example of  what type of application is this?
3) There is a Unit Test Framework in unit folder for test session.
How to test that?
4) Also, there is a Python Script : test-session , which requires an
application path.
   As mentioned in link,
http://lists.connman.net/pipermail/connman/2011-April/004518.html;,
at application path, it is provided with a /foo.
   What and where is this foo application?
5) In session-api.txt, there is a net.connman.Notification interface,
with two methods. One of which is -
   Update : what exactly it does?
On every session creation this method is called once to
inform about the current settings. To whom it inform? I mean where it
updates the settings?

Thanks and Regards
Lewis
___
connman mailing list
connman@connman.net
http://lists.connman.net/listinfo/connman


RE: Queries Related to Connman and Session Management

2011-09-08 Thread Zheng, Jeff

Hi Lewis,

I'm tester for connman and below are my humble opinions.
 
 Hello all,
 
 I am new to connman mailing list. For the better understanding of
 connman, i tested it with the python scripts which are available in
 the test folder. I have few question regarding connman, test-scripts
 and session management.
 
 1) There is a latest release of connman-0.77. Which is more stable -
 connman-0.76 or connman-0.77, with respect to wifi functionality.
 2) For creating a session in manager-api.txt, it is mentioned that :
 every application should atleast create one session to inform
 about its requirements and purpose
  Which application does it means? Because, if i open a
 Firefox(application), then there is no session created by it. Can
 anyone please give example of  what type of application is this?

Firefox needs call connman session API to support connman session.

 3) There is a Unit Test Framework in unit folder for test session.
 How to test that?
 4) Also, there is a Python Script : test-session , which requires an
 application path.
As mentioned in link,
 http://lists.connman.net/pipermail/connman/2011-April/004518.html;,
 at application path, it is provided with a /foo.
What and where is this foo application?
 5) In session-api.txt, there is a net.connman.Notification interface,
 with two methods. One of which is -
Update : what exactly it does?
 On every session creation this method is called once to
 inform about the current settings. To whom it inform? I mean where it
 updates the settings?

I think a test example might help. 
# Run following commands in 1st console
1. test-session enable # Enable session mode, this will disconnect all networks
2. test-session run /foo # The test-session application will use /foo as 
application path
# run following connmands in 2nd console
3. test-session create /foo # Create a session in test-session application at 
step 2, you will see initial session property values in console 1 through 
net.connman.Notification.Update.
4. test-session connect /foo # Connect to a service, you will see IPv4 updated 
in console 1.

 
 Thanks and Regards
 Lewis
 ___
 connman mailing list
 connman@connman.net
 http://lists.connman.net/listinfo/connman
___
connman mailing list
connman@connman.net
http://lists.connman.net/listinfo/connman


Connman upstream test result _ 20110909

2011-09-08 Thread 李霞
Hi all,

 

This is test report for Connman-0.77.35.g66d7e91-1.2.i586. In this

testing, we ran 212 cases. 185 cases passed and 11 cases failed because

of known/new bug. The pass rate is 87%. We found 2 new bugs,reopen 1 bug 

and verify 3 bugs. In this commit we found the bug that Bluetooth hci0 is 

down after booting up system also exists.

 

New bugs

===

22926 - Only gateway exists after restart connmand with ethernet connected.

https://bugs.meego.com/show_bug.cgi?id=22926

 

22927 - Can not surf internet after setting static IP for ethernet.

https://bugs.meego.com/show_bug.cgi?id=22927

 

 

Re-open bugs:

===

18219 - No gateway exist sometimes when wifi connection created

https://bugs.meego.com/show_bug.cgi?id=18219

 

 

Verified bugs:

===

22593 - Sometimes errors occurred when set offlinemode.

https://bugs.meego.com/show_bug.cgi?id=22593

 

22614 - wlan0 can't automatically connect when the offline mode is off.

https://bugs.meego.com/show_bug.cgi?id=22614

 

22863 - DBusException when set-address for IPv6 in 3G network.

https://bugs.meego.com/show_bug.cgi?id=22863

 

 

===

Testing Environment

==

Hardware:  netbook Eeepc 1005PE / Cedar Trail /  Ocktrail Green Ridge

Image:  meego-netbook-ia32-1.2.0 /
meego-tablet-ia32-oaktrail-1.2.0.90.12.20110809.2  

ConnMan:  connman-0.77.35.g66d7e91-1.2.i586

Ofono:  ofono-0.53.184.g059a5c8-1.2.i586 

3G:  Unicom Sim card/HuaWei e180

BT:   Palm Pre/AnyCom AP/CSR dongle (disable the onboard BT device)

Wireless AP:netgear WNR2000/dlink

 

Test Execution Summary

==

Category Total PASS  FAIL  N/A   Comments

WiFi 70 67 3 22542 22844

bt   1414block by 22809   

3G   15 15   

ethernet 14 14   

Advance  23 20 2122756 22865

status   35 28 6111860 13407 18743 20745 22745 

API  41 41

Total21218511   16

 

Bug referred here is bug at bugs.meego.com, for example, bug #22926 refer to
http://bugs.meego.com/show_bug.cgi?id=22926

For detailed test results, please see attached files

 

 

 

 

---
Confidentiality Notice: The information contained in this e-mail and any 
accompanying attachment(s) 
is intended only for the use of the intended recipient and may be confidential 
and/or privileged of 
Neusoft Corporation, its subsidiaries and/or its affiliates. If any reader of 
this communication is 
not the intended recipient, unauthorized use, forwarding, printing,  storing, 
disclosure or copying 
is strictly prohibited, and may be unlawful.If you have received this 
communication in error,please 
immediately notify the sender by return e-mail, and delete the original message 
and all copies from 
your system. Thank you. 
---
FEAGroup  Feature   Score Comments
--
WiFI  
  EAP-Not Test 
  Network-sel   Good
  Wpa-suplicant D-BUS   Good
  Manual switch connect Good  
  connect to Broadcast AP   Good  
  connect to Hidden AP  Good
  Hidden Group AP   Good

WiFiFeature   
  WEP 40/128-bit keyGood
  WiFi Protected Setup pairing (WPS)Good
  WEP 128-bit passphraseGood
  WPA personal  Good
  WPA2 personal Good 
  Open system   Good
  Shared KeyGood
  Remember passwd   Good
  forgot password   Good  Bug 22844 
  
  AP security detectGood  
  auto del non-exist AP Good
VPN
  -  -Not Test   
 
OpenVPN
  -  -Not Test

Status  
  coexist   Good  
  State Good  Bug 22926
  DeviceGood
  Info