Hi everyone, my Arduino devices with MQTT would fail to communicate with my Raspberry Pi which act as a MQTT broker when my modem provided by our ISP fails.
I am using a Hitron CGN3ROG modem provided by our ISP. I use this modem as a router as well. My switch connects to the modem and I have a WAP connect to the switch. My Arduinos connect to the WAP and my Pi connect to the switch.
The modem would fail to have access to Internet and requires a restart (re-plug) once a while. It also fails when the Internet outage happens. When this happens, my Arduino would not be able to communicate with each other using MQTT protocol. My Arduinos are using DHCP assigned ip(by my modem which has router functions) and my Pi uses static IP. When the modem(router) fails, I can use my laptop to access my MQTT broker (Pi) but I won't be able to receive any message from my Arduino. How can I fix it?
Since the MQTT communication happens in local network, whether or not the modem fails, I still want my Arduino to be able to communicate with each other. Would static IP on my Arduino fix this issue? What are the options to fix this issue?