From M2M to the Internet of Things