The default bug view has changed. See this FAQ.

Decide on units for Wifi + MobileConnection signal strength

RESOLVED FIXED in mozilla15

Status

()

Core
DOM: Device Interfaces
RESOLVED FIXED
5 years ago
5 years ago

People

(Reporter: mrbkap, Assigned: swu)

Tracking

(Blocks: 1 bug)

Trunk
mozilla15
ARM
Gonk (Firefox OS)
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

(Reporter)

Description

5 years ago
In bug 732982, cjones asked that the signal strength be given in dB (currently easy to do since that's what wpa_supplicant exposes). Right now, we expose a percentage (0-100). We need to decide what to expose.

One idea that cjones mentioned was to always expose a [0,1] normalized relative strength along with the dB, if available. I don't have strong feelings either way, though it seemed to me that the usefulness of dB was limited in most of the cases where we'd be giving this information out. My plan is to raise this question on the webapi list.
Going to the list is a great idea.
In WebMobileConnection (bug 729173, https://wiki.mozilla.org/WebAPI/WebMobileConnection), we're planning on exposing both the raw dBm (signalStrengthDbm) and a [0, 1] linearized value between (signalStrength). I propose doing the same for Wifi.
Um, sold! ;)
(Reporter)

Comment 4

5 years ago
Shian-Yow, would you be willing to write a patch for this?

You'll have to change the ScanResult function to add a signalStrengthDbm property that is the re-adjusted dBm passed in (that is, subtract 256 if the signal strength is greater than 0) and rename signal -> signalStrength.

At the same time, you should probably make the names on the rssi connectionInfo match, so renaming relSignalStrength to signalStrength and renaming signalStrength to signalStrengthDbm. You'll then need to make similar renamings in DOMWifiManager.js as well. Finally, you'll need to rename the properties in nsIWifi.idl.
Assignee: nobody → swu
MobileConnection currently mirrors Wifi's convention, so if we change that, we should change it there, too.
Summary: Wifi: Decide on units for signal strength → Decide on units for Wifi + MobileConnection signal strength
See https://mxr.mozilla.org/mozilla-central/source/dom/network/interfaces/nsIDOMMobileConnection.idl
Blocks: 729173
(Reporter)

Comment 7

5 years ago
Oops. So in that case, all that needs to happen is the first paragraph of comment 4 (with the proper renaming with signal -> relSignalStrength and adding a new signalStrength name).
(Assignee)

Comment 8

5 years ago
Yes, I'll take it, and thanks for these information. :)

(In reply to Blake Kaplan (:mrbkap) from comment #4)
> Shian-Yow, would you be willing to write a patch for this?
> 
> You'll have to change the ScanResult function to add a signalStrengthDbm
> property that is the re-adjusted dBm passed in (that is, subtract 256 if the
> signal strength is greater than 0) and rename signal -> signalStrength.
> 
> At the same time, you should probably make the names on the rssi
> connectionInfo match, so renaming relSignalStrength to signalStrength and
> renaming signalStrength to signalStrengthDbm. You'll then need to make
> similar renamings in DOMWifiManager.js as well. Finally, you'll need to
> rename the properties in nsIWifi.idl.
(Assignee)

Comment 9

5 years ago
Created attachment 623308 [details] [diff] [review]
Patch for signal strength naming change

Hi Blake,

This patch still follows current definition in nsIWifi.idl.
Please advice, thank you.
Attachment #623308 - Flags: review?(mrbkap)
(Reporter)

Comment 10

5 years ago
Comment on attachment 623308 [details] [diff] [review]
Patch for signal strength naming change

Perfect, thanks.
Attachment #623308 - Flags: review?(mrbkap) → review+
Keywords: checkin-needed
https://hg.mozilla.org/integration/mozilla-inbound/rev/e9472ce37d84
Status: NEW → RESOLVED
Last Resolved: 5 years ago
Keywords: checkin-needed
OS: Linux → Gonk
Hardware: x86_64 → ARM
Resolution: --- → FIXED
Target Milestone: --- → mozilla15
Version: unspecified → Trunk
Uh, I landed on inbound...
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
https://hg.mozilla.org/mozilla-central/rev/e9472ce37d84
Status: REOPENED → RESOLVED
Last Resolved: 5 years ago5 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.