Closed Bug 787552 Opened 12 years ago Closed 12 years ago

B2G Wifi: Add APIs to get the MAC address and current IP address

Categories

(Core :: DOM: Device Interfaces, defect)

ARM
Gonk (Firefox OS)
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla18
blocking-basecamp -

People

(Reporter: mrbkap, Assigned: mrbkap)

References

Details

(Whiteboard: [LOE:S])

Attachments

(1 file)

Kaze asked the other day for APIs to get the MAC address and the current IP address if we're connected. We'll need: interface nsIDOMWifiManager { readonly attribute DOMString macAddress; }; interface nsIDOMMozWifiConnectionInfoEvent { readonly attribute DOMString ipAddress; };
I think Kaze told me that these were P2s for him.
blocking-basecamp: + → ?
I confirm I could live without knowing the MAC address of my device. Nice to have, though.
Based on comments 1 and 2, not blocking Basecamp.
blocking-basecamp: ? → -
Attached patch Proposed fix (deleted) — Splinter Review
This seems to do the trick.
Assignee: nobody → mrbkap
Status: NEW → ASSIGNED
Attachment #662710 - Flags: review?
Attachment #662710 - Flags: feedback?(kaze)
Attachment #662710 - Flags: review? → review?(vchang)
Comment on attachment 662710 [details] [diff] [review] Proposed fix Review of attachment 662710 [details] [diff] [review]: ----------------------------------------------------------------- ::: dom/wifi/WifiWorker.js @@ +1501,4 @@ > WifiManager.enabled = true; > self._updateWifiSetting(true); > WifiManager.getMacAddress(function (mac) { > + self.macAddress = mac; Do we need the mac address information when wifi is disabled during device start-up ? Android also doesn't show mac address in this case ?
Attachment #662710 - Flags: review?(vchang) → review+
(In reply to Vincent Chang from comment #5) > Do we need the mac address information when wifi is disabled during device > start-up ? > Android also doesn't show mac address in this case ? Good questions! Android shows the MAC address as "not available" until wifi is turned on (and then it remembers it afterwards). So, I think the current behavior should be OK.
The front-end is ready… and waiting: https://github.com/mozilla-b2g/gaia/pull/5267 Asking for check-in.
Keywords: checkin-needed
Attachment #662710 - Flags: feedback?(kaze)
Attachment #662710 - Flags: feedback+
Attachment #662710 - Flags: checkin+
Status: ASSIGNED → RESOLVED
Closed: 12 years ago
Flags: in-testsuite?
Resolution: --- → FIXED
Target Milestone: --- → mozilla18
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: