--- orig/main.c
+++ mod/main.c
@@ -31,15 +31,17 @@
 // please modify the following two lines. mac and ip have to be unique
 // in your local area network. You can not have the same numbers in
 // two devices:
-static uint8_t mymac[6] = {0x54,0x55,0x58,0x10,0x00,0x29};
+//static uint8_t mymac[6] = {0x54,0x55,0x58,0x10,0x00,0x29};
+static uint8_t mymac[6] = {0x54,0x55,0x58,0x10,0x00,0x2a};
 // how did I get the mac addr? Translate the first 3 numbers into ascii is: TUX
-static uint8_t myip[4] = {10,0,0,29};
+static uint8_t myip[4] = {192,168,1,19};
 //static uint8_t myip[4] = {192,168,255,100};
-static char password[]="secret"; // the password string (only a-z,0-9,_ characters)
+static char password[]="fugafu"; // the password string (only a-z,0-9,_ characters)
+static char okurl[]="/ok.html";
 // -- no need to change anything below this line
 //
 // listen port for tcp/www:
-#define MYWWWPORT 80
+#define MYWWWPORT 8080
 //
 // listen port for udp
 #define MYUDPPORT 1200
@@ -78,6 +80,7 @@
 //                /password/?s=1 HTTP/1.....
 //                /password/?s=0 HTTP/1.....
 //                /password HTTP/1.....
+//                /password/ok.html HTTP/1.....
 int8_t analyse_get_url(char *str)
 {
         uint8_t loop=15;
@@ -108,6 +111,9 @@
                 str++;
                 loop--; // do not loop too long
         }
+        if (strncmp(okurl,str,strlen(okurl))==0){
+                return(3);
+        }
         // str is now something like password?sw=1 or just end of url
         if (find_key_val(str,gStrbuf,5,"sw")){
                 if (gStrbuf[0]=='0'){
@@ -129,6 +135,7 @@
 // to redirect
 // type =0  : http://tuxgraphics.org/c.ico    favicon.ico file
 // type =1  : /password/
+// type =2  : /password/ok.html
 uint16_t moved_perm(uint8_t *buf,uint8_t type)
 {
         uint16_t plen;
@@ -137,6 +144,10 @@
                 plen=fill_tcp_data_p(buf,plen,PSTR("/"));
                 plen=fill_tcp_data(buf,plen,password);
                 plen=fill_tcp_data_p(buf,plen,PSTR("/"));
+        }else if (type==2){
+                plen=fill_tcp_data_p(buf,plen,PSTR("/"));
+                plen=fill_tcp_data(buf,plen,password);
+                plen=fill_tcp_data(buf,plen,okurl);
         }else{
                 plen=fill_tcp_data_p(buf,plen,PSTR("http://tuxgraphics.org/c.ico"));
                 //plen=fill_tcp_data_p(buf,plen,PSTR("http://tuxgraphics.org/ico/print.ico"));
@@ -152,20 +163,30 @@
 {
         uint16_t plen;
         plen=http200ok();
-        plen=fill_tcp_data_p(buf,plen,PSTR("<h2>Eth remote switch</h2>\n<pre> "));
+        plen=fill_tcp_data_p(buf,plen,PSTR("<h2>Hogehoge interface</h2>\n<pre> "));
         //plen=fill_tcp_data_p(buf,plen,PSTR("<h2>printer switch</h2>\n<pre> "));
         if (on){
                 plen=fill_tcp_data_p(buf,plen,PSTR(" <font color=#00FF00>ON</font>"));
                 plen=fill_tcp_data_p(buf,plen,PSTR(" <a href=\"./?sw=0\">[switch off]</a>\n"));
         }else{
-                plen=fill_tcp_data_p(buf,plen,PSTR("OFF"));
-                plen=fill_tcp_data_p(buf,plen,PSTR(" <a href=\"./?sw=1\">[switch on]</a>\n"));
+                plen=fill_tcp_data_p(buf,plen,PSTR(" <a href=\"./?sw=1\">[start,restart]</a>\n"));
         }
-        plen=fill_tcp_data_p(buf,plen,PSTR("\n<a href=\".\">[refresh status]</a>\n"));
-        plen=fill_tcp_data_p(buf,plen,PSTR("</pre><hr>tuxgraphics.org\n"));
+        plen=fill_tcp_data_p(buf,plen,PSTR("</pre><hr>\n"));
+        plen=fill_tcp_data_p(buf,plen,PSTR("Funyafunya will take about 1 minute.\n"));
         return(plen);
 }
 
+uint16_t print_okpage(uint8_t *buf)
+{
+        uint16_t plen;
+        plen=http200ok();
+        plen=fill_tcp_data_p(buf,plen,PSTR("<h2>Operation accepted.</h2>\n<pre> "));
+        plen=fill_tcp_data_p(buf,plen,PSTR(" <font color=#00FF00>"));
+        plen=fill_tcp_data_p(buf,plen,PSTR(" <a href=\"./\">[OK]</a>\n"));
+        plen=fill_tcp_data_p(buf,plen,PSTR("</font></pre><hr>\n"));
+        plen=fill_tcp_data_p(buf,plen,PSTR("Funyafunya will take about 1 minute.\n"));
+        return(plen);
+}
 
 int main(void){
 
@@ -250,6 +271,11 @@
                 if (cmd==1){
                         LEDON;
                         PORTD|= (1<<PORTD7);// transistor on
+                        _delay_ms(500);
+                        LEDOFF;
+                        PORTD &= ~(1<<PORTD7);// transistor off
+                        plen=moved_perm(buf,2);
+                        goto SENDTCP;
                 }
                 if (cmd==0){
                         LEDOFF;
@@ -265,6 +291,11 @@
                         plen=moved_perm(buf,1);
                         goto SENDTCP;
                 }
+                if (cmd==3){
+                        //ok.html
+                        plen=print_okpage(buf);
+                        goto SENDTCP;
+                }
                 // if (cmd==-2) or any other value
                 // just display the status:
                 plen=print_webpage(buf,(PORTD & (1<<PORTD7)));
