+ size_t testLen = minLength;
+
+ // only run these tests if device is online
+ if (getDeviceData) {
+
+ // only run if graphbuffer is just noise as it should be for hitag/cotag
+ if (graphJustNoise(GraphBuffer, testLen)) {
+
+ if (CheckChipset(getDeviceData) )
+ return 1;
+
+ ans=CmdLFHitagReader("26");
+ if (ans==0)
+ return 1;
+
+ ans=CmdCOTAGRead("");
+ if (ans>0){
+ PrintAndLog("\nValid COTAG ID Found!");
+ return 1;
+ }
+ PrintAndLog("Signal looks just like noise. Quitting.");
+ return 0;
+ }
+ }
+
+ // identify chipset
+ CheckChipset(getDeviceData);
+