 static void check_network() {
   if (millis() - g_check_net_ms > 20000) {
     if (!g_mqtt_client.connected()) {
-      Serial.println("mqtt connection failed, reset gprs");
+      Serial.println("mqtt connection failed, try reconnect");
       LGPS.powerOff();
       sync_buzzer(2000);
-      g_status = STATUS_INIT_GPRS;
+      g_status = STATUS_INIT_YUNBA;
     } else {
       Serial.println("mqtt connection is ok");
     }

  uint8_t buf[256];
  bool rc = false;
  LGPRSClient net_client;
  while (0 == net_client.connect("tick-t.yunba.io", 9977)) {
    Serial.println("reconnect tick");
    delay(500);
  }

  String data = "{\"a\":\"" + String(appkey) + "\",\"n\":\"1\",\"v\":\"v1.0\",\"o\":\"1\"}";

#include <ArduinoJson.h>
#include <LGPRS.h>
#include <LGPRSClient.h>
#include <LBattery.h>
#include <LGPS.h>
#define MQTT_BUFFER_SIZE 256
#include <MQTTClient.h>

#define JSON_BUF_SIZE 256

#define PIN_MOTOR 0
#define PIN_LOCK_STATUS 5
