common: added DeviceQuery() function