Code for electric imp as M2M device.