Updated WiFi scan results sample to match settings-daemon output. 44/10144/1
authorOssama Othman <ossama.othman@intel.com>
Fri, 20 Sep 2013 05:33:56 +0000 (22:33 -0700)
committerOssama Othman <ossama.othman@intel.com>
Fri, 20 Sep 2013 05:33:56 +0000 (22:33 -0700)
Change-Id: I14fb1390b3e42bbc07ffb8f8749d89a53418ceaf
Signed-off-by: Ossama Othman <ossama.othman@intel.com>
js/websocket.js

index 0738362..120e32d 100644 (file)
@@ -258,21 +258,80 @@ var wsAPI = (function() {
                                     fireEvent(WS_EVENT_TYPE.WIFI, 'enabled', false);
                                 }
                             } else if (msg.name === 'scan') {
-                                var results = {
-                                    'access_points': [{
-                                        'ssid': 'Access Point 1',
-                                        'connected': true
-                                    }, {
-                                        'ssid': 'Access Point 2',
-                                        'connected': false
-                                    }, {
-                                        'ssid': 'Access Point 3',
-                                        'connected': false
-                                    }, {
-                                        'ssid': 'Access Point 4',
-                                        'connected': false
-                                    }]
-                                }
+                               var results = {
+                                   "services" : [
+                                       [
+                                           "/net/connman/service/ethernet_0010f32f5a70_cable",
+                                           {
+                                           }
+                                       ],
+                                       [
+                                           "/net/connman/service/wifi_c8f733acdf96_3558364737_managed_psk",
+                                           {
+                                           }
+                                       ],
+                                       [
+                                           "/net/connman/service/wifi_c8f733acdf96_446f75636865626167_managed_psk",
+                                           {
+                                               "Type" : "wifi",
+                                               "Security" : [
+                                                   "psk"
+                                               ],
+                                               "State" : "idle",
+                                               "Strength" : 50,
+                                               "Favorite" : false,
+                                               "Immutable" : false,
+                                               "AutoConnect" : false,
+                                               "Name" : "Foo",
+                                               "BSSID" : "21:ef:30:b9:ad:86",
+                                               "MaxRate" : 54000000,
+                                               "Frequency" : 2417,
+                                               "EncryptionMode" : "aes",
+                                               "Ethernet" : {
+                                                   "Method" : "auto",
+                                                   "Interface" : "wlp1s0",
+                                                   "Address" : "E8:F2:33:AC:DF:96",
+                                                   "MTU" : 1500
+                                               },
+                                               "IPv4" : {
+                                               },
+                                               "IPv4.Configuration" : {
+                                                   "Method" : "dhcp"
+                                               },
+                                               "IPv6" : {
+                                               },
+                                               "IPv6.Configuration" : {
+                                                   "Method" : "auto",
+                                                   "Privacy" : "disabled"
+                                               },
+                                               "Nameservers" : [
+                                               ],
+                                               "Nameservers.Configuration" : [
+                                               ],
+                                               "Timeservers" : [
+                                               ],
+                                               "Timeservers.Configuration" : [
+                                               ],
+                                               "Domains" : [
+                                               ],
+                                               "Domains.Configuration" : [
+                                               ],
+                                               "Proxy" : {
+                                               },
+                                               "Proxy.Configuration" : {
+                                               },
+                                               "Provider" : {
+                                               }
+                                           }
+                                       ],
+                                       [
+                                           "/net/connman/service/wifi_c8f733acdf96_536563757265446f75636865626167_managed_psk",
+                                           {
+                                           }
+                                       ]
+                                   ]
+                               }
+
                                 replyMsg = JSON.stringify(results);
                                 /* simulate scan behavior */
                                 replyDelay = 2000;