Last Comment Bug 736102 - Decide on units for Wifi + MobileConnection signal strength
: Decide on units for Wifi + MobileConnection signal strength
Status: RESOLVED FIXED
:
Product: Core
Classification: Components
Component: DOM: Device Interfaces (show other bugs)
: Trunk
: ARM Gonk (Firefox OS)
: -- normal (vote)
: mozilla15
Assigned To: Shian-Yow Wu [:swu]
:
: Andrew Overholt [:overholt]
Mentors:
Depends on:
Blocks: b2g-wifi webmobileconnection
  Show dependency treegraph
 
Reported: 2012-03-15 08:31 PDT by Blake Kaplan (:mrbkap)
Modified: 2012-06-02 12:10 PDT (History)
7 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
Patch for signal strength naming change (1.16 KB, patch)
2012-05-11 14:38 PDT, Shian-Yow Wu [:swu]
mrbkap: review+
Details | Diff | Splinter Review

Description Blake Kaplan (:mrbkap) 2012-03-15 08:31:22 PDT
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.
Comment 1 Chris Jones [:cjones] inactive; ni?/f?/r? if you need me 2012-03-15 11:45:28 PDT
Going to the list is a great idea.
Comment 2 Philipp von Weitershausen [:philikon] 2012-03-15 14:11:14 PDT
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.
Comment 3 Chris Jones [:cjones] inactive; ni?/f?/r? if you need me 2012-03-15 19:04:34 PDT
Um, sold! ;)
Comment 4 Blake Kaplan (:mrbkap) 2012-05-10 07:16:19 PDT
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.
Comment 5 Philipp von Weitershausen [:philikon] 2012-05-10 09:59:20 PDT
MobileConnection currently mirrors Wifi's convention, so if we change that, we should change it there, too.
Comment 7 Blake Kaplan (:mrbkap) 2012-05-10 10:13:22 PDT
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).
Comment 8 Shian-Yow Wu [:swu] 2012-05-10 10:23:31 PDT
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.
Comment 9 Shian-Yow Wu [:swu] 2012-05-11 14:38:46 PDT
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.
Comment 10 Blake Kaplan (:mrbkap) 2012-05-14 07:25:16 PDT
Comment on attachment 623308 [details] [diff] [review]
Patch for signal strength naming change

Perfect, thanks.
Comment 11 Philipp von Weitershausen [:philikon] 2012-06-01 14:12:22 PDT
https://hg.mozilla.org/integration/mozilla-inbound/rev/e9472ce37d84
Comment 12 Philipp von Weitershausen [:philikon] 2012-06-01 14:14:22 PDT
Uh, I landed on inbound...

Note You need to log in before you can comment on or make changes to this bug.