The wifi function doesn't work if the wifi setttings is disabled after rebooting the device.

RESOLVED FIXED

Status

Firefox OS
General
RESOLVED FIXED
6 years ago
6 years ago

People

(Reporter: vchang, Assigned: mrbkap)

Tracking

unspecified
ARM
Gonk (Firefox OS)

Firefox Tracking Flags

(blocking-basecamp:+)

Details

Attachments

(1 attachment, 1 obsolete attachment)

Test Procedure, 
1. Turn off the wifi in the settings. 
2. reboot the device. 
3. Try to turn on the wifi in the settings.
The result:  
Keep on seeing the "Searching..." in Available Networks. 

The root cause: 
I found that WifiWorker will enable the wifi by calling WifiManager.setWifiEnabled function in constructor function. However, it is turned off because wifi is disabled in settings. So manager.state will be set to DISCONNECTED state. However, the connectToSupplicant function will only be called when manager.state is in UNINITIALIZED state when calling manager.start function.
(Reporter)

Comment 1

6 years ago
Created attachment 648609 [details] [diff] [review]
WIP
Attachment #648609 - Flags: feedback?(mrbkap)

Updated

6 years ago
Blocks: 717123
blocking-basecamp: --- → ?
(Reporter)

Updated

6 years ago
Assignee: nobody → vchang

Updated

6 years ago
blocking-basecamp: ? → +
Comment on attachment 648609 [details] [diff] [review]
WIP

This feels wrong to me. It feels like there should be an approach here that actually fixes the logic somewhere, rather than avoiding the situation entirely.

I think I have a patch on my other computer that fixes this. I'll attach it in a few minutes.
Attachment #648609 - Flags: feedback?(mrbkap) → feedback-
Created attachment 649922 [details] [diff] [review]
Possible fix?

Vincent, can you try this and see if it fixes things for you?
Attachment #648609 - Attachment is obsolete: true
Attachment #649922 - Flags: feedback?(vchang)
(Reporter)

Comment 4

6 years ago
(In reply to Blake Kaplan (:mrbkap) from comment #3)
> Created attachment 649922 [details] [diff] [review]
> Possible fix?
> 
> Vincent, can you try this and see if it fixes things for you?

I have verified this patch. It works fine for me.
(Reporter)

Updated

6 years ago
Attachment #649922 - Flags: feedback?(vchang) → feedback+
(Reporter)

Comment 5

6 years ago
(In reply to Blake Kaplan (:mrbkap) from comment #2)
> Comment on attachment 648609 [details] [diff] [review]
> WIP
> 
> This feels wrong to me. It feels like there should be an approach here that
> actually fixes the logic somewhere, rather than avoiding the situation
> entirely.
> 
> I think I have a patch on my other computer that fixes this. I'll attach it
> in a few minutes.

Do we still need to call WifiManager.setWifiEnabled in the beginning ?
https://hg.mozilla.org/mozilla-central/rev/8afba7332d77

For comment 5, I don't think we do anymore, but we can leave it for now, since bug 729877 should land sometime soon.
Assignee: vchang → mrbkap
Status: NEW → RESOLVED
Last Resolved: 6 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.