-2

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.

  • How is the Central ESP-Now controller communicate with the RPI? via WiFi or via Serial? – hcheung Aug 15 '23 at 11:32
  • 1
    Just FYI. ESP8266 can't have WiFi and ESP-NOW operate simultaneously, if that's what you are doing, you have two options: 1) Change the Central Controller from ESP8266 to a ESP32. 2) Have Central Controller to communicate with RPI via serial interface if it is possible. – hcheung Aug 15 '23 at 11:37
  • Thanks for the quick response guys! So I was able to resolve the issue. WiFi and ESP-NOW are able to operate simultaneously or async but with very low latency. All I had to do was change the channel of my WiFi to the channel on which ESP-NOW is communicating, which is channel 1. This helped me process both ESP-NOW and send MQTT messages at or almost at the same time. – Arun Dharavath Aug 24 '23 at 16:13

0 Answers0