The "@mozilla.org/wifi/monitor;1" component does not work - no APs are reported, even when the OS sees them.

REOPENED
Unassigned

Status

()

REOPENED
8 years ago
2 years ago

People

(Reporter: ondras, Unassigned)

Tracking

Trunk
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

(Reporter)

Description

8 years ago
User-Agent:       Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.13) Gecko/20101206 Ubuntu/10.10 (maverick) Firefox/3.6.13
Build Identifier: 

The "@mozilla.org/wifi/monitor;1" component does not work properly. No access points are reported (empty array), although the machine can clearly see them. 

This might be specific to OS version, will try to confirm later.

Reproducible: Always

Steps to Reproduce:
call the "startWatching" method on instance of nsIWifimonitor


Actual Results:  
the onChange handler is called once, with an empty array as an argument



This corresponds to code executed within extension chrome. The behavior is the same when trying the code at https://developer.mozilla.org/En/Monitoring_WiFi_access_points (the sample site has the UniversalXPConnect permission).

navigator.geolocation works (returns relatively good approximation). My OS (64bit Kubuntu Maverick) sees many APs (checked with NetworkManager and "iwlist wlan0 scan").
(Reporter)

Comment 1

8 years ago
Forgot to mention that this behavior happens on FF4b11.
Version: unspecified → Trunk
I've attached the testcase you were referring to.  Can you please confirm what results you get with:

* Firefox 3.6.13
* Firefox 4.0b10
* Firefox 4.0b11
* Firefox 4.0b12pre

Thanks
(Reporter)

Comment 4

8 years ago
Results with 3.6.13:

- Ubuntu Maverick 64bit: only one AP found (the one currently used; many APs visible by the OS), only one onChange callback execution during page lifetime. Reloading page shows varying signal levels.

- Windows 7 64bit: many APs found, only one onChange callback execution during page lifetime. Reloading page shows the SAME (!!) signal levels, all the time. Signal levels change only when the wireless device is turned off and on again.

Results with 4.0b11:

- Kubuntu Maverick 64bit: no APs found (OS sees many of them).


Will continue testing.
(Reporter)

Comment 5

8 years ago
Results with 4.0b11:

- Windows 7 64bit: the same as 3.6.13; many APs found, onChange executed only once, page reload does not change signl levels.
OS: Linux → All
cc'ing Doug Turner as he's somewhat familiar with the Geolocation code.

Doug, if you're not the right person to assist on this bug, please cc someone who might be able to help.  I'm guessing this is more of an API level bug.

I defer to you, Doug.

Updated

7 years ago
Status: UNCONFIRMED → NEW
Ever confirmed: true

Comment 7

3 years ago
This is likely still true. The wifi network scanning code isn't the most robust or well tested.
Hardware: x86_64 → All

Comment 8

3 years ago
ni myself to fire up a windows VM and try this case. I don't have wifi scanning working in my linux vm.
Flags: needinfo?(gkeeley)

Comment 9

3 years ago
No longer have a license for Windows VM to check this, gah.
Telemetry for geolocation on Windows isn't showing any problems in terms of Wifi scanning, although the report on Windows is that the APs are not changing when they should, so I suppose that won't show on telemetry.
Flags: needinfo?(garvankeeley+bmo)
Marking as WFM.  ondra zara, if you can still reproduce, happy to debug with you.
Status: NEW → RESOLVED
Last Resolved: 2 years ago
Resolution: --- → WORKSFORME
(Reporter)

Comment 11

2 years ago
This is still broken, Ubuntu, Firefox 49. The only thing that happens after `startWatching` is the `onError` callback being executed with "2147500037" as its argument (NS_ERROR_FAILURE).
(Reporter)

Updated

2 years ago
Status: RESOLVED → REOPENED
Resolution: WORKSFORME → ---
You need to log in before you can comment on or make changes to this bug.