Machine-to-Machine (M2M) and IoT: the differences and optimal application scenarios