Zit Seng's Blog

A Singaporean's technology and lifestyle blog

NUS Wireless Setup on Nexus One

I figure that anyone who uses a smartphone like the Nexus One is going to have a 3G data plan, so being able to hook onto a wireless network isn’t going to be so important. But anyhow, I thought I’d just make a small little community contribution by sharing how to configure the Nexus One phone (I suppose just about any Android 2.0/2.1 phone will work the same) to connect to the NUS wireless network in, well, NUS. But first, credit goes to the information posted in Answers@Comp. The GUI isn’t enough to get the config done.

Ok. What do you need? For folks who have not rooted your phone, you are out of luck. You will have to. As mentioned, the GUI doesn’t do what is needed. We need to get beneath the hood. So, before you go on, check that:

  • Your phone is rooted.
  • You have the adb tool (from the Android SDK).
  • Your phone has USB Debugging turned on (under Settings, Applications, Development).
  • You are comfortable with “vi”.

So here goes. It’s really quite simple. (I think the difficult part is really in the above.)

  1. Connect to your phone over USB and run the adb shell (adb shell).
  2. Edit the file in /data/misc/wifi/wpa_supplicant.conf and append the text from the block below. Put in your NUSNET userid and password in the identity and password lines. Save the file.
  3. Stop and start wifi.
ap_scan=2
network={
ssid="NUS"
scan_ssid=1
key_mgmt=IEEE8021X
eap=PEAP
auth_alg=OPEN SHARED
identity="<nusnetid>"
password="<password>"
phase2="auth=MSCHAPV2"
priority=2
}

You should be able to connect to the NUS wireless (NUS SSID) network now. This NUS SSID is encrypted so your communication can’t be easily eavesdropped by other wireless users. You have the added benefit of auto-login. (The NUSOPEN SSID requires web-based captive portal logon, and the communication is also unencrypted.)

Update: You may want to add ap_scan=2 at the start of your wpa_supplicant.conf file to connect to hidden NUS SSID.

Update: The NUSNET userid now needs to be in domain\userid format (e.g. nusstf\comabc or nusstu\a01234567) because something got seriously mucked up recently.

11 thoughts on “NUS Wireless Setup on Nexus One

  1. Hey,
    I was hoping to get hold of the Nexus 1, but am not currently on a dataplan. I know that’s not conventional but the dataplan turns out quite pricey for me, (not being a PR/citizen & being below 20). I was totally hoping nexus could connect to NUS network without anything complicated such as the rooting process.. [and i hear that also voids the warranty?]

    do u think it’s a good idea to get the n1 for a nondataplan version? or just shift to a dataplan ?

    thanks

    1. Well, think about what you want to use the Nexus One for. Without data, the Nexus One is just like a normal phone, limited to voice/texting and maybe a couple of other things that you could do with another cheaper phone. Why then, would you want a Nexus One? If it is for userspace app development… okay, but still there are cheaper alternatives to explore.

      So, if you are going to use data, your choices are down to paying for a dataplan, rooting to get NUS PEAP Wifi, or make do with the inconvenience of portal logon on the NUSOPEN Wifi. I’m not sure how much the dataplan costs you, but I think it is mainly about a deposit you have to put upfront, not that the actual dataplan costs are different right? I would go with 3G dataplan. 🙂

  2. The latest 2.1 WiFi config has provisions for 802.11e, so I don’t think rooting is necessary anymore.

  3. Hello, I am now using the moto milestone at NUS, and I found that I can only get access to nusopen wifi, however, it is really annoying to type in my nusnetid/pwd again and again. But the method you introduced did not work well in my android.

    So do you think there are any other avaible way for me to avoid those login-on steps?

    Thanks very much!

      1. Android 2.1! I have found some apps concerning the auto web-login and authentication, but they just don’t work well.

        Thanks for your reply and look forward to your help!

  4. Thanks for your reply! And I found a problem that the wireless network I can find using my milestone is NUSOPEN instead of NUS. So I am wondering whether I can still use your method to config my phone?

    thank you!

    1. Try adding ap_scan=2 at the top of the wpa_supplicant.conf to see if it helps. Reason is that elsewhere in NUS, except in SoC, the NUS SSID is hidden. ComCen is thinking about changing, but seems the change has not been consistently rolled out.

      Try in a SoC area, it should work. 🙂

      1. Ok, I am in engineering faculty and added ap_sacn=2, I still can find NUS ssid, so I think I’d better give up and use the nusopen instead, though I need to login on using browser everytime I want to get access to the internet!

        Thank you so much for your great help!

Leave a Reply to Vic Cancel reply

Your email address will not be published. Required fields are marked *

View Comment Policy