Firmware: Gm220-s

int main() while (1) // simplified traffic check – implement real rate calc long rx1, tx1, rx2, tx2; FILE *f = fopen("/proc/net/dev", "r"); // ... parsing code ... fclose(f); sleep(1); // ... compare rates ... if (rate > 1000000) led_blink(3); sleep(1);

void led_blink(int times) for (int i = 0; i < times; i++) system("echo 1 > " LED_PATH); usleep(100000); system("echo 0 > " LED_PATH); usleep(100000); Firmware Gm220-s

stop() killall traffic-led

#include <stdio.h> #include <unistd.h> #include <string.h> #define LED_PATH "/sys/class/leds/gpon:green:net/brightness" int main() while (1) // simplified traffic check

define Package/traffic-led SECTION:=utils CATEGORY:=Utilities TITLE:=Flash LED on high network traffic DEPENDS:=+libubox +libubus endef FILE *f = fopen("/proc/net/dev"

include $(INCLUDE_DIR)/package.mk