       check_need_report();
       handle_report();
       check_network();
+      handle_led();
       break;
     default:
       Serial.println("unknown status: " + g_status);

  EEPROM.write(3, *((uint8_t *)&cnt + 3));
}

void setup() {
  // put your setup code here, to run once:
  Serial.begin(9600);
  Serial.println("setup...");

  init_reset_cnt();
  g_status = STATUS_INIT_GPRS;

static unsigned long g_last_report_ms = 0;

static unsigned long g_check_net_ms = 0;

static unsigned long g_last_led_ms = 0;
static long g_led_interval = 1000;
static int g_led_state = LOW;
static int g_led_fast = 0;

static bool get_ip_port(const char *url, char *ip, uint16_t *port) {
  char *p = strstr(url, "tcp://");
