Add method to recognize type of device

@confucious - review