http://mbed.org/users/gsfan/code/GSwifi/#3b819ba34c6c