New algo to detect device type