        if (pinreport[i] == 0 && pineepromstate[i]==1)
          {
       //
-         server.write( getstatus() );
+         server.write( getstatus( iststmode ? GETSTAT|TSTMODE : GETSTAT ) );
          pinreport[i] = 1;
          }
       }

         if (cmd & GETSTAT)
            {
         //
            server.write(cmd & getstatus());
            }
         }
}

const int TSTMODE = 16;
const int DORESET = 32;
const int GETSTAT = 64;

const unsigned long MAX_UNSIGNED_LONG = 4294967295;
const unsigned long TSTLEN = 5*60*1000;
unsigned long tstbgn = 0;
boolean iststmode = false;

//
EthernetServer server(2323);
