   sprintf(addr, "%02x:%02x:%02x:%02x:%02x:%02x", data[offset+0], data[offset+1], data[offset+2], data[offset+3], data[offset+4], data[offset+5]);
 }
 
+#define CHANNEL_HOP_INTERVAL_MS   1000
+static os_timer_t channelHop_timer;
+
+/**
+ * Callback for channel hoping
+ */
+void channelHop()
+{
+  // hoping channels 1-14
+  uint8 new_channel = wifi_get_channel() + 1;
+  if (new_channel > 14)
+    new_channel = 1;
+  wifi_set_channel(new_channel);
+}
+
 #define DISABLE 0
 #define ENABLE  1
 

  delay(10);
  wifi_promiscuous_enable(ENABLE);

}

void loop() {}

  Serial.print("RSSI: ");
  Serial.print(snifferPacket->rx_ctrl.rssi, DEC);

  Serial.print(" Ch: ");
  Serial.print(wifi_get_channel());

  char addr[] = "00:00:00:00:00:00";
  getMAC(addr, snifferPacket->data, 10);
  Serial.print(" Peer MAC: ");
