• Skip to main content
  • Select language
  • Skip to search
MDN Web Docs
  • Technologies
    • HTML
    • CSS
    • JavaScript
    • Graphics
    • HTTP
    • APIs / DOM
    • WebExtensions
    • MathML
  • References & Guides
    • Learn web development
    • Tutorials
    • References
    • Developer Guides
    • Accessibility
    • Game development
    • ...more docs
B2G OS
  1. MDN
  2. Archive of obsolete content
  3. B2G OS
  4. B2G OS APIs
  5. WifiManager
  6. WifiManager.getNetworks()

WifiManager.getNetworks()

In This Article
  1. Summary
  2. Syntax
    1. Returns
  3. Specification
  4. See also

This API is available on Firefox OS for internal applications only.

Summary

The getNetworks method is used to retrieve the whole list of available WiFi networks surrounding the device.

Syntax

var request = navigator.mozWifiManager.getNetworks();

Returns

It returns a DOMRequest to handle the success or error of the operation. If the operation is successful, the request's result is an Array of Network object.

Network

Those objects are regular JavaScript objects with the following properties:

ssid Read only
A string representing the ssid of the network.
bssid Read only
A string representing the bssid of the network.
capabilities Read only
An array of strings representing the special abilities of the network (currently, only WPS is supported).
security Read only
An array of strings representing the security model of the network (currently supports WEP, WPA-PSK, and WPA-EAP).
signalStrength Read only
A number indicating the absolute strength of the signal in dBm.
relSignalStrength Read only
A number in the range [0,100] indicating the relative strength of the signal.
connected  Read only
A boolean indicating if the device is connected to that network.
known Read only
A boolean indicating if the network is already known by the device (it has been used already).

Specification

Not part of any specification.

See also

  • WifiManager
  • MozWifiStatusChangeEvent
  • The WifI Information API

Document Tags and Contributors

Tags: 
  • API
  • B2G
  • Firefox OS
  • Method
  • Non-standard
  • Reference
  • WiFi
 Contributors to this page: chrisdavidmills, teoli, kscarfone, Jeremie
 Last updated by: chrisdavidmills, Feb 27, 2017, 2:08:15 AM
See also
  1. WiFi Information API
  2. Archive
  3. Events
    1. statuschange
    2. connectioninfoupdate
  4. Related pages for WiFi Information API
    1. MozWifiCapabilities
    2. MozWifiConnection
    3. MozWifiConnectionInfo
    4. MozWifiConnectionInfoEvent
    5. MozWifiManager
    6. MozWifiNetwork
    7. MozWifiStationChangeEvent
    8. MozWifiStatusChangeEvent
    9. WifiManager