Self-management of Machine-to-Machine communications : a bi-layered approach