code for calbritaing all devices and collecting complete data