Closed Bug 829013 Opened 11 years ago Closed 6 years ago

Running FTU wipes details stored about currently seen networks

Categories

(Firefox OS Graveyard :: Gaia::First Time Experience, defect)

x86_64
Linux
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED WONTFIX

People

(Reporter: julienw, Unassigned)

References

Details

(Whiteboard: [systemsfe])

Before, using reset-gaia would keep the Wi-Fi informations, which was very handy during development.

Now, reset-gaia wipes also this information.

Is it possible to make it work like before ?
Hey Dave, do you know what I would need to do to fix this? / or who would know?
Flags: needinfo?(dhylands)
The wifi information is stored in the /data/misc/wifi/wpa_supplicant.conf file.

So you would need to preserve that file.
Flags: needinfo?(dhylands)
So that file is preserved, but it seems like the last / current network gets deleted after a make reset-gaia

... Connected to wifi

$ adb shell cat /data/misc/wifi/wpa_supplicant.conf
ctrl_interface=wlan0
disable_scan_offload=1
update_config=1
p2p_disabled=1
p2p_no_group_iface=1

network={
        ssid="FirefoxHotspot"
        psk="asdfghjkl"
        key_mgmt=WPA-PSK
}

network={
        ssid="Pimms Good"
        psk="pimmsgood"
        key_mgmt=WPA-PSK
        priority=1
}

network={
        ssid="MaterDei"
        key_mgmt=NONE
        priority=2
}

network={
        ssid="FASTWEB-1-Uw6ZBNDcoQmV"
        psk="0696048022"
        key_mgmt=WPA-PSK
        priority=3
}

$ DEVICE_DEBUG=1 make reset-gaia
.... lots of logs

$ adb shell cat /data/misc/wifi/wpa_supplicant.conf
ctrl_interface=wlan0
disable_scan_offload=1
update_config=1
p2p_disabled=1
p2p_no_group_iface=1

network={
	ssid="FirefoxHotspot"
	psk="asdfghjkl"
	key_mgmt=WPA-PSK
}

network={
	ssid="Pimms Good"
	psk="pimmsgood"
	key_mgmt=WPA-PSK
	priority=1
}

network={
	ssid="MaterDei"
	key_mgmt=NONE
	priority=2
}

Fairly confusing, any idea dave? looking around now
Flags: needinfo?(dhylands)
I was connected to FASTWEB-1-Uw6ZBNDcoQmV for the above comment
So I pulled a wpa_supplicant that had all 4 hotspots, I rearranged it from https://gist.github.com/daleharvey/12729e8879902d37df33/c9ed0adfc039cf7c970ffff957d18e08cc0fa8cd to https://gist.github.com/daleharvey/12729e8879902d37df33/72a11407629514a5fd5838dbad428aacaa3e0964

The other wifi points kept their new order, the one I was connected to (fastweb) was still deleted
I'm not familiar with the wifi code, so I don't know why it would be deleting an entry.

I just know that it uses that file, an when I do my local builds, I prime my wpa_supplicant.conf file so that when I do a full flash, it already knows about my local access points.
Flags: needinfo?(dhylands)
Summary: make reset-gaia reset Wi-Fi information → Running FTU wipes details stored about currently seen networks
Changed the summary, so NOFTU=1 will persist the wifi information during a reset-gaia, launching the FTU at any point (whether after reset-gaia or from the developer menu), will wipe the details of the currently visible networks. 

It may be done for a reason, I cant think of anyone and having people not having to remember flags or type in passwords all the time would be nice
Component: Gaia → Gaia::First Time Experience
Hey Dale,

When FTU starts, the current network is deleted. Take a look:

https://github.com/mozilla-b2g/gaia/blob/master/apps/ftu/js/wifi.js#L23-L26

Maybe, it is the cause because of that the wifi information is not persisted. What's your thought?
Flags: needinfo?(dale)
Manual, yeh its definitely because of that, I think its probably worth revisiting why the wifi network is cleared because its extremely fustrating for developers (or users) who have to retype wifi passwords every time the ftu runs
Flags: needinfo?(dale)
Whiteboard: [Flatfish][TCP][systemsfe]
Vivien, it looks like this behavior was introduced in connection with the Facebook imports functionality, in https://github.com/mozilla-b2g/gaia/commit/4eff0de923c662b1b1f8548a67e94446ea2fad5f - do you know the rationale and what the impact of removing it would be? I would like to start moving the FTU out of its special-first-run-only "role" and allow it to be run at any time. This is one of the bugs that prevents that.
Flags: needinfo?(21)
(In reply to Sam Foster [:sfoster] from comment #11)
> Vivien, it looks like this behavior was introduced in connection with the
> Facebook imports functionality, in
> https://github.com/mozilla-b2g/gaia/commit/
> 4eff0de923c662b1b1f8548a67e94446ea2fad5f - do you know the rationale and
> what the impact of removing it would be? I would like to start moving the
> FTU out of its special-first-run-only "role" and allow it to be run at any
> time. This is one of the bugs that prevents that.

:mancas, do you know? I could just remove the line and land it and see who shouts :) but I would like to get some background on why the change was made if possible.
Flags: needinfo?(21) → needinfo?(b.mcb)
Removing tablet whiteboard tags as this affects all devices.
Whiteboard: [Flatfish][TCP][systemsfe] → [systemsfe]
I agree with you Sam. We should have information about why these changes were made. However, I'm not the right person to help you.

Although I've noticed that Alive commented on the original path, about the lines that forget the current wifi network.

You can see the comment in the outdated diff https://github.com/mozilla-b2g/gaia/pull/7230

He said: Vincent Chang is here in Berlin, let's need info f2f from him.

So we should try to ask him or Vicent for information.
Flags: needinfo?(b.mcb) → needinfo?(alive)
> Although I've noticed that Alive commented on the original path, about the
> lines that forget the current wifi network.
> 
> You can see the comment in the outdated diff
> https://github.com/mozilla-b2g/gaia/pull/7230

Ah ha, yes. Looks like this was a TODO that never got done? If I understand this right, we rely on WifiManager.api.onstatuschange to get called to establish state, and if we are already connected we don't init properly?
Huh, an old comment comes back to me..

AFAIK, platform would keep the connected wifi information unless the platform is flashed.
i.e., make reset-gaia -> go to FTU:Wifi page and connect one of them -> make reset-gaia again -> the ever-connected AP will be connected again automatically.

For Vincent, I think I had checked this behavior to him.

The code changed in FTU forgot the connected wifi network which does not sound sane to me so I guess that's why I comment but I didn't track this issue after that..sorry about saying so. Please help to fix it and acquire wifi guys help if you need more information.
Flags: needinfo?(alive)
No longer blocks: dale-being-happy
Firefox OS is not being worked on
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.