I have a framework where 3 slave ESP8266 boards send a message using ESP-NOW to a parent ESP8266 board connected to Raspberry Pi 4 model B. This parent MCU has to relay the message to the RPI using MQTT protocol. The protocols are working fine when used individually, but when I try to implement them together, i.e., parent MCU has to receive ESP message and relay using MQTT to RPI, it is not working properly, it is only able to perform both tasks sometimes. Please help me fix this issue.
I have tried to implement the MQTT and ESP-NOW protocols and enable communication from slave ESP8266 boards to parent ESP8266 board connected to the RPI, and from the parent to the RPI. This framework is not working properly.