http://mbed.org/users/samux/code/WiflyInterface/#6ffb0aeb3972