Network self-organization in the Internet of Things