IoT (Internet of things) devices have become integral parts of our everyday life to function especially in smart homes/offices/cities. However, their huge varieties and scales make it hard to manage the security and the quality of services of IoT networks with generic policies. Furthermore, IoT devices owned by employees can unknowingly endanger the security and integrity of the network from other IoT entities they are connected to. Fortunately, IoT devices of the same type tend to have similar vulnerabilities making attack prevention more manageable. Thus, identifying the device types is crucial for IoT security. This paper presents an approach to building a classifier to identify different types of IoT devices using various machine learning techniques. While most existing empirical studies use network traffic data, we use communication protocol data. The paper describes the data collection/treatment, the experiments using four machine learning techniques and compares our proposed approach with an existing work based on the Jaccard similarity measure. The results show that both approaches have competitive accuracy of up to 99% but the Jaccard approach does not scale well (e.g., about 1000 times more than the training time of our approach).