Tuesday 28 September 2010

use iphone to connect the nus network

It's not easy to figure out how to connect to the NUS wireless network through PEAP.

Here are two solutions for the problem:

The first one is by NG, Jun Ping(http://www.comp.nus.edu.sg/~junping/NUS-iPhone-Wifi.htm)

There is a configure file need to download: NUS-Wireless.mobileconfig

Then open the file with a text editor and look for "nusstu\xxxxxxx". Replace it with your NUSNET ID.

Now try to transfer this file to your iphone using ftp,bluetooth or email(as suggest by the author).

Open the file and install the configuration NUS-Wireless.

Then switch the wifi to NUS, and type your password when you are asked to.

At last you should accept a certification, and you now can connect to NUS.

The second solution is provided by Lester Chan

The two solutions are in fact the same. Lester Chan' method would be simpler, that the configuration file is automatically generated, but you need to provide your NUSNET ID to 3rd part server.

Sunday 12 September 2010

binding opencv2.1 and python2.6.6 in mac os x snow leopard

Here is my way to solve the Opencv binding problem in Mac, it is not easy to bind Python and Opencv together, and hope it will help for your own mac. and you better have macports install in your computer.

First, you need to download and install Python(i use python2.6.6). and make sure the python locate at /usr/bin, not /opt/local/bin( you can type " which python"), I suggest not to use the python installed via macports, but from the python.org, or the python locate will be "opt/local/bin", which make the opencv binding fail, also the numpy&scipy lib can't be installed from dmg. And you can check the python locations by typing "type -a python". It is said that you can change the python locate using python_select(which can be installed using macports), but seems it don't work for me, so i just simply type "sudo rm /opt/local/bin/python" to remove it, then the python come to "/urs/bin/python".

Second, you need to download the sourcecode of Opencv2.1 follow http://opencv.willowgarage.com/wiki/Mac_OS_X_OpenCV_Port the second way( don't use the mac port), Use cmake and build, if there are any dependency problem, you can use macports to download the required lib. I am not sure whether numpy for python is required for opencv building, but it only be successful built while i have numpy installed.

Third, after python and opencv are correctly installed, you can find out the "cv.so" in your opencv folder, for me is "/Users/flydreamersu/opencv/lib", then in your python, you can write:
>>> import sys
>>> sys.path.append("/Users/flydreamersu/opencv/lib")
>>> import cv

I think opencv is loaded without error.

Friday 10 September 2010

Enable R/W support of ntfs in Mac Snow Leopard

First, Type diskutil info /Volumes/volume_name in the terminal

Then copy the ntfs volume's UUID

Backup /etc/fstab

Type sudo nano /etc/fstab.

Type UUID=paste_the_uuid_here none ntfs rw or LABEL=volume_name none ntfs rw

Repeat for other NTFS partitions.

Save the file

restart

done