        Serial1.write(0xFF);
        Serial1.write(0xEE);
        break;       
-       }
+     case 8: //begin with ssid
+       Serial1.write(0xE0);
+       Serial1.write(0x10);
+       Serial1.write(1);
+       Serial1.write(6);
+         Serial1.write(0x44); 
+         Serial1.write(0x48); 
+         Serial1.write(0x4C); 
+         Serial1.write(0x61); 
+         Serial1.write(0x62); 
+         Serial1.write(0x73);
+       Serial1.write(0xEE);
+       break;  
+     case 9: //begin with ssid and password
+       Serial1.write(0xE0);
+       Serial1.write(0x11);
+       Serial1.write(2);
+       Serial1.write(6);
+         Serial1.write(0x44); 
+         Serial1.write(0x48); 
+         Serial1.write(0x4C); 
+         Serial1.write(0x61); 
+         Serial1.write(0x62); 
+         Serial1.write(0x73);
+       Serial1.write(0x0C);
+         Serial1.write(0x64); 
+         Serial1.write(0x68); 
+         Serial1.write(0x6C); 
+         Serial1.write(0x61); 
+         Serial1.write(0x62); 
+         Serial1.write(0x73);
+         Serial1.write(0x72); 
+         Serial1.write(0x66); 
+         Serial1.write(0x69); 
+         Serial1.write(0x64); 
+         Serial1.write(0x30); 
+         Serial1.write(0x31);
+  
+       Serial1.write(0xEE);
+
+       break;       
+     }
 
   }
+
+
 void setup() {
   // put your setup code here, to run once:
   Serial1.begin(9600);

       //uint8_t status = (prova[prova.length()-1]);
       //Serial.print(status);
       Serial.println();


       delay(5000); 


  ECRY_idx,
  MAC_ADDR,
  DISCONNECT,
  STATUS,
  BEGIN_SSID,
  BEGIN_SSID_PASS
};

unsigned long _startMillis;
