Closed Bug 736102 Opened 12 years ago Closed 12 years ago

Decide on units for Wifi + MobileConnection signal strength

Categories

(Core :: DOM: Device Interfaces, defect)

ARM
Gonk (Firefox OS)
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla15

People

(Reporter: mrbkap, Assigned: swu)

References

Details

Attachments

(1 file)

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.
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
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).
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.
Hi Blake,

This patch still follows current definition in nsIWifi.idl.
Please advice, thank you.
Attachment #623308 - Flags: review?(mrbkap)
Comment on attachment 623308 [details] [diff] [review]
Patch for signal strength naming change

Perfect, thanks.
Attachment #623308 - Flags: review?(mrbkap) → review+
https://hg.mozilla.org/integration/mozilla-inbound/rev/e9472ce37d84
Status: NEW → RESOLVED
Closed: 12 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
Closed: 12 years ago12 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: