The expansion of Internet of Things (IoT) networks has led to several communication protocols being utilized, causing interoperability problems between heterogeneous devices. Popular communication protocols like MQTT, BLE, and SPI have been used in IoT; however, no direct interoperability between the protocols was provided. In this paper, an architecture for developing an IoT gateway utilizing a resource-constrained PIC18F4520 microcontroller along with the ESP32 wireless module that serves as an interconnector of three pairs of protocols - MQTT and BLE, SPI and MQTT, and BLE and SPI, is proposed. With the resource constraints of the PIC18F4520 microcontroller consisting of 1.5 KB of RAM and 32 KB Flash, a firmware system with interrupt-based UART communication, small-size ring buffers, and Flash-based command storage is created. To protect the PIC18F4520 microcontroller running on a 5 V power source from potential damage, a TXS0102 bi-directional voltage level shifter was included to provide a reliable communication link between the 5 V PIC18F4520 microcontroller and 3.3 V ESP32 wireless module. All three protocol pairs were successfully implemented with a maximum of only 54% memory usage.
Korane et al. (Sat,) studied this question.