some refactoring for device parsing in pairing server