Take the 2-minute tour ×
Android Enthusiasts Stack Exchange is a question and answer site for enthusiasts and power users of the Android operating system. It's 100% free, no registration required.

I have a Wi-Fi solution similar to FON which has an encrypted private home Wi-Fi hotspot and a guest network which is unencrypted and requires one to log in once a day. My problem (or rather, annoyance) is that the phone seems to prefer the unencrypted guest network. I have it enabled because I can use other people's guest networks when I'm roaming about in the city. It would make sense that between an encrypted and unencrypted hotspot, it would be wise to prefer the encrypted one, regardless of signal strength. Is there any way to resolve this?

share|improve this question
add comment

2 Answers

up vote 3 down vote accepted

You could change the guest network to be low priority by editing the supplicant .conf file (probably requires root, or adb use). You can find out what file this is by looking at /etc/wifi/wifi.conf; the file you need is set as the SUPP_CONFIG_FILE property's value. Normally it's /data/wifi/bcm_supp.conf or /data/misc/wifi/wpa_supplicant.conf. You'll see entries like the following in that file:

network={
    ssid="network name"
    someotherproperty="some other value"
    priority=0
}

You want to have priority=0 for the networks you least want to connect to, and a higher priority for networks you do want to connect to. If you just have "don't want" and "want", use 0 and 1. If you have "don't want", "not preferred", "preferred", and "super-preferred", use values 0, 1, 2, and 3 respectively. You get the idea.

share|improve this answer
    
I'm using a Note 3 with Android 4.3. The wpa_supplicant.conf is only filled with general information of Samsung. Did Android/Samsung change the path? –  mgutt Nov 16 '13 at 10:39
add comment

Is your device rooted? If so, you can access the /data/misc/wifi/wpa_supplicant.conf file and set/edit the priority field for each network. I looked around on the market, and I haven't been able to find any apps that will allow you to edit this field in a GUI, or any other way to do it without root. I haven't personally experimented with it either, so I'm not 100% sure how it will work, but it's the only option I've found that looks like it might help you control which network your phone connects to when there are multiple configured networks within range.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.