i'm Working on a embedded Linux system. I need to connect to new WiFi when the existing WiFi disconnects. I can use a loop with a fixed sleep time and see if the wifi is connected or not, but it seems inefficient. Can anyone suggest a way that wpa_cli can be started as a daemon that fires an event when WiFi is disconnected.
Thanks in advance. Sundeep.