Nikola Mitrović, Milan Đorđević, Sandra Veljković, Danijel Danković

DOI Number
First page
Last page


This paper gives insight on the WebSocket communication method
in Internet of Things system, where the hardware part of the system is based on ESP32 microcontroller. Method of implementation is discussed and the reliability of the real-time data transfer in Wi-Fi networks is tested and compared with the long-polling method. Special circuit is designed with the goal to stress the hardware part of the system and the client-server communication link in order to enable proper comparison of data transfer methods. For the comprehensive testing of the real-time data ow, a web server application is designed and used to visualize received data. Impact of RSSI on transfer methods is discussed as well. Eciency of the WebSocket method is discussed and then compared to the long-polling method.


nternet of Things, WebSockets, ESP32, JavaScript, Espruino

Full Text:



N. Mitrovic, M. Ðordjevic, S. Veljkovic, and D. Dankovic, Implementation of WebSockets in ESP32 based IoT Systems, in 2021 15th International Conference on Advanced Technologies, Systems and Services in Telecommunications

(TELSIKS), Oct. 2021, pp. 261-264.

D. Evans, The Internet of Things: How the Next Evolution of the Internet is Changing Everything, Cisco Internet Business Solutions Group (IBSG), Apr. 2011.

H. M. Al-Kadhim and H. S. Al-Raweshidy, Energy Efficient and Reliable Transport of Data in Cloud-Based IoT, IEEE Access, vol. 7, pp. 64 641-64 650, 2019.

M. B. Yassein, M. Q. Shatnawi, and D. Al-zoubi, Application layer protocols for the Internet of Things: A survey, in 2016 International Conference on Engineering & MIS (ICEMIS), Sep. 2016, pp. 14.

M. Ðordjevic, B. Jovicic, S. Markovic, V. Paunovic, and D. Dankovic, A smart data logger system based on sensor and Internet of Things technology as part of the smart faculty, J. Ambient Intell. Smart Environ., vol. 12, no. 4, pp. 359373, Jan. 2020.

D. Dankovic and M. Ðordjevic, A review of real time smart systems developed at University of Nis, Facta Univ. - Ser. Electron. Energ., vol. 33, no. 4, pp. 669686, 2020.

I. Fette, A. Melnikov, The WebSocket Protocol, December 2011.

A. Maier, A. Sharp, and Y. Vagapov, Comparative analysis and practical implementation of the ESP32 microcontroller module for the internet of things, in 2017 Internet Technologies and Applications (ITA), Sep. 2017, pp. 143148.

M. Babiuch, P. Foltýnek, and P. Smutný, Using the ESP32 Microcontroller for Data Processing, in 2019 20th International Carpathian Control Conference (ICCC), May 2019, pp. 16.

N. Mitrovic, M. Ðordjevic, S. Veljkovic, and D. Dankovic, Testing the eficiency of Wi-Fi data transmission in ESP-based IoT systems, E-business technologies conference proceedings, vol. 1, no. 1, pp. 172176, Sep. 2021.

V. Tyagi, N. Rawat, and M. Ram, Reliability modelling and sensitivity analysis of IoT based ood alerting system, Journal of Quality in Maintenance Engineering, vol. 27, no. 2, pp. 292307, Jan. 2020.

B. Soewito, Christian, F. E. Gunawan, Diana, and I. G. P. Kusuma, Websocket to Support Real Time Smart Home Applications, Procedia Comput Sci, vol. 157, pp. 560566, Jan. 2019.

E. N. Zivanovic, Inuence of combined gas and vacuum breakdown mechanisms on memory effect in nitrogen, Vacuum, vol. 107, pp. 6267, Sep. 2014.

K. Ma and R. Sun, Introducing WebSocket-Based Real-Time Monitoring System for Remote Intelligent Buildings, Int J Distrib Sens N, vol. 9, no. 12, p. 867693, Dec. 2013.

V. Karagiannis, P. Chatzimisios, F. Vázquez-Gallego, and J. Alonso-Zárate, A Survey on Application Layer Protocols for the Internet of Things, Transaction on IoT and Cloud Computing, vol. 1, no. 1, Jan. 2015

J. Linggarjati, Design and Prototyping of Temperature Monitoring System for Hydraulic Cylinder in Heavy Equipment using ESP32 with data logging and WiFi Connectivity, IOP Conference Series: Earth and Environmental Science, vol. 998, no. 1, p. 012042, Feb. 2022.

L. Mastilak, M. Galinski, I. Kotuliak, and M. Ries, Improved Smart Gate-way in IoT, in 2018 16th International Conference on Emerging eLearning Technologies and Applications (ICETA), Nov. 2018, pp. 349-354.

J. Mesquita, D. Guimarães, C. Pereira, F. Santos, and L. Almeida, Assessing the ESP8266 WiFi module for the Internet of Things, in 2018 IEEE 23rd International Conference on Emerging Technologies and Factory Automation (ETFA), vol. 1, Sep. 2018, pp. 784-791.

T. M. Behera and S. K. Mohapatra, Improving Network Lifetime by Minimizing Energy Hole Problem in WSN for the Application of IoT, Facta Univ. Ser. Electron. Energ., vol. 31, no. 2, pp. 267-277, Feb. 2018.

N. Mitrovic, S. Veljkovic, Z. Prijic, and D. Dankovic, Comparison of the performance of the different GPS receivers in practical applications, in 2022 IEEE Zooming Innovation in Consumer Technologies Conference (ZINC), May 2022, pp. 11-16.

N. Mitrovic, M. Ðordjevic, S. Veljkovic, and D. Dankovic, NFC enabled Wi-Fi managging system for ESP32 based IoT system, E-business technologies conference proceedings, vol. 2, no. 1, pp. 57-60, Jun. 2022.

Node.js Available at:

ESP32-WROOM2 datasheet. Available at:

Espruino tool. Available at:

XNucleo development board datasheet, 2014. Available at:

PulseView tool. Available at:

R. Rosli, M. Habaebi, and M. Islam, On the analysis of received signal strength indicator from ESP8266, Bulletin of Electrical Engineering and Informatics, vol. 8, no. 3, pp. 933-940, Sep. 2019.


  • There are currently no refbacks.

ISSN: 0353-3670 (Print)

ISSN: 2217-5997 (Online)

COBISS.SR-ID 12826626