这几天我一直没在流明方面冒泡哈,原因很多,工作忙,晚上有人找修电脑地,还有人找干活地,一直没倒出功夫来哈,就算倒出功夫来也是一头雾水,为什么UIP条目不少啊,你看看一行两行,差不多上千行了,但我这几天学习过来学习过去发现一个可以实现的方法,于是我就在例程基础上改了一下,大家一起学习哈!!!
书归正转!
自从上次实现了远程控制,我就想自己做个网页控制自己的东东,嘿嘿!!!
可是,这就得用到一个软件DREAMWEAVER 3.0
为什么要用3.0,我觉得好用,方便,实在
本想直接用HTML那种格式如:
//*****************************************************************************
//
// Default Web Page - allocated in three segments to allow easy update of a
// counter that is incremented each time the page is sent.
//
//*****************************************************************************
static const char page_not_found[] =
"HTTP/1.0 404 OK\r\n"
"Server: TCP/IP (http://www.NUAA.COM/TCP/IP/)\r\n"
"Content-type: text/html\r\n\r\n"
"<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.NUAA.COM\">"
"<html>"
"<head>"
"<title>;Page Not Found!</title>"
"</head>"
"<body>"
"Page Not Found!"
"</body>"
"</html>";
这是UIP例程中的那种
但作了些实验觉得不好,为什么呢,我设计的按钮是那种地,它就给我显示一个方格子,娘地,为这事我搞了好几天
最后决定用数组那种,这又引出了个软件WINHEX,我呆会把它打包上传,我也做个记号,大家也方便哈。
我先用 DREAMWEAVER
做了个网页
然后用WINHEX取数,然后把取来的数据变成数组,考到
//*****************************************************************************
//
// Default Web Page - allocated in three segments to allow easy update of a
// counter that is incremented each time the page is sent.
//
//*****************************************************************************
static const char default_page_buf1of3[] = {
0x3C,0x68,0x74,0x6D,0x6C,0x3E,0x0D,0x0A,0x3C,0x68,
0x65,0x61,0x64,0x3E,0x0D,0x0A,0x3C,0x74,0x69,0x74,
0x6C,0x65,0x3E,0xCE,0xDE,0xB1,0xEA,0xCC,0xE2,0xCE,
0xC4,0xB5,0xB5,0x3C,0x2F,0x74,0x69,0x74,0x6C,0x65,
0x3E,0x0D,0x0A,0x3C,0x6D,0x65,0x74,0x61,0x20,0x68,
0x74,0x74,0x70,0x2D,0x65,0x71,0x75,0x69,0x76,0x3D,
0x22,0x43,0x6F,0x6E,0x74,0x65,0x6E,0x74,0x2D,0x54,
0x79,0x70,0x65,0x22,0x20,0x63,0x6F,0x6E,0x74,0x65,
0x6E,0x74,0x3D,0x22,0x74,0x65,0x78,0x74,0x2F,0x68,
0x74,0x6D,0x6C,0x3B,0x20,0x63,0x68,0x61,0x72,0x73,
0x65,0x74,0x3D,0x67,0x62,0x32,0x33,0x31,0x32,0x22,
0x3E,0x0D,0x0A,0x3C,0x2F,0x68,0x65,0x61,0x64,0x3E,
0x0D,0x0A,0x0D,0x0A,0x3C,0x62,0x6F,0x64,0x79,0x20,
0x62,0x67,0x63,0x6F,0x6C,0x6F,0x72,0x3D,0x22,0x23,
0x46,0x46,0x46,0x46,0x46,0x46,0x22,0x3E,0x0D,0x0A,
0x3C,0x66,0x6F,0x72,0x6D,0x20,0x6D,0x65,0x74,0x68,
0x6F,0x64,0x3D,0x22,0x70,0x6F,0x73,0x74,0x22,0x20,
0x61,0x63,0x74,0x69,0x6F,0x6E,0x3D,0x22,0x22,0x3E,
0x0D,0x0A,0x20,0x20,0x3C,0x70,0x3E,0x3C,0x66,0x6F,
0x6E,0x74,0x20,0x73,0x69,0x7A,0x65,0x3D,0x22,0x35,
0x22,0x20,0x63,0x6F,0x6C,0x6F,0x72,0x3D,0x22,0x23,
0x30,0x30,0x30,0x30,0x46,0x46,0x22,0x3E,0x4C,0x45,
0x44,0xB7,0xB4,0xD7,0xAA,0xD1,0xDD,0xCA,0xBE,0x3C,
0x2F,0x66,0x6F,0x6E,0x74,0x3E,0x3C,0x2F,0x70,0x3E,
0x0D,0x0A,0x20,0x20,0x3C,0x70,0x3E,0x0D,0x0A,0x20,
0x20,0x20,0x20,0x3C,0x69,0x6E,0x70,0x75,0x74,0x20,
0x74,0x79,0x70,0x65,0x3D,0x22,0x73,0x75,0x62,0x6D,
0x69,0x74,0x22,0x20,0x6E,0x61,0x6D,0x65,0x3D,0x22,
0x53,0x75,0x62,0x6D,0x69,0x74,0x22,0x20,0x76,0x61,
0x6C,0x75,0x65,0x3D,0x22,0xB7,0xA2,0xCB,0xCD,0x22,
0x3E,0x0D,0x0A,0x20,0x20,0x3C,0x2F,0x70,0x3E,0x0D,
0x0A,0x3C,0x2F,0x66,0x6F,0x72,0x6D,0x3E,0x0D,0x0A,
0x3C,0x70,0x3E,0x26,0x6E,0x62,0x73,0x70,0x3B,0x3C,
0x2F,0x70,0x3E,0x0D,0x0A,0x3C,0x70,0x20,0x61,0x6C,
0x69,0x67,0x6E,0x3D,0x22,0x63,0x65,0x6E,0x74,0x65,
0x72,0x22,0x3E,0x55,0x49,0x50,0xD4,0xB6,0xB3,0xCC,
0xBF,0xD8,0xD6,0xC6,0xCD,0xF8,0xD2,0xB3,0x3C,0x2F,
0x70,0x3E,0x0D,0x0A,0x3C,0x70,0x3E,0x26,0x6E,0x62,
0x73,0x70,0x3B,0x3C,0x2F,0x70,0x3E,0x0D,0x0A,0x3C,
0x70,0x20,0x61,0x6C,0x69,0x67,0x6E,0x3D,0x22,0x63,
0x65,0x6E,0x74,0x65,0x72,0x22,0x3E,0x20,0x3C,0x66,
0x6F,0x6E,0x74,0x20,0x63,0x6F,0x6C,0x6F,0x72,0x3D,
0x22,0x23,0x30,0x30,0x43,0x43,0x46,0x46,0x22,0x3E,
0x3C,0x61,0x20,0x68,0x72,0x65,0x66,0x3D,0x22,0x68,
0x74,0x74,0x70,0x3A,0x2F,0x2F,0x73,0x74,0x6F,0x72,
0x65,0x2E,0x74,0x61,0x6F,0x62,0x61,0x6F,0x2E,0x63,
0x6F,0x6D,0x2F,0x73,0x68,0x6F,0x70,0x2F,0x76,0x69,
0x65,0x77,0x5F,0x73,0x68,0x6F,0x70,0x2E,0x68,0x74,
0x6D,0x3F,0x61,0x73,0x6B,0x65,0x72,0x3D,0x77,0x61,
0x6E,0x67,0x77,0x61,0x6E,0x67,0x26,0x61,0x6D,0x70,
0x3B,0x73,0x68,0x6F,0x70,0x5F,0x6E,0x69,0x63,0x6B,
0x3D,0x64,0x64,0x6C,0x6C,0x78,0x78,0x72,0x72,0x22,
0x3E,0xD6,0xC7,0xC1,0xD6,0xCC,0xD4,0xB1,0xA6,0xC8,
0xFD,0xB5,0xEA,0xC9,0xE8,0xBC,0xC6,0x3C,0x2F,0x61,
0x3E,0x3C,0x2F,0x66,0x6F,0x6E,0x74,0x3E,0x3C,0x2F,
0x70,0x3E,0x0D,0x0A,0x3C,0x70,0x20,0x61,0x6C,0x69,
0x67,0x6E,0x3D,0x22,0x63,0x65,0x6E,0x74,0x65,0x72,
0x22,0x3E,0xB1,0xBE,0xB5,0xEA,0xD3,0xD0,0xD0,0xED,
0xB6,0xE0,0xC4,0xA3,0xBF,0xE9,0xBF,0xC9,0xD6,0xB1,
0xBD,0xD3,0xBF,0xAA,0xB7,0xA2,0xB6,0xAB,0xB6,0xAB,
0xA3,0xA1,0xBB,0xB6,0xD3,0xAD,0xB9,0xE2,0xC1,0xD9,
0xA3,0xA1,0x3C,0x2F,0x70,0x3E,0x0D,0x0A,0x3C,0x70,
0x3E,0x26,0x6E,0x62,0x73,0x70,0x3B,0x3C,0x2F,0x70,
0x3E,0x0D,0x0A,0x3C,0x70,0x3E,0x26,0x6E,0x62,0x73,
0x70,0x3B,0x20,0x3C,0x2F,0x70,0x3E,0x0D,0x0A,0x3C,
0x2F,0x62,0x6F,0x64,0x79,0x3E,0x0D,0x0A,0x3C,0x2F,
0x68,0x74,0x6D,0x6C,0x3E,0x0D,0x0A};
然后再修改下程序,让程序判断有无POS这三个字母
//
// If it isn't a GET, we abort the connection.
//
//uip_abort();
ppp=&BUF_APPDATA[0];
for(i=0;i<100;i++)
{
if((*(ppp+i)==0x50)&&(*(ppp+i+1)==0x4F)&&(*(ppp+i+2)==0x53))
{
if(timestimes==0)
{
timestimes=1;
LEDON();
}
else
{
timestimes=0;
LEDOFF();
}
i=0;
goto jump;
}
//else
// break;
}
return;
}
最后的效果是,每当我按下发送键一下
灯就反转一次,亮变灭灭变亮!!!
就这样我实现了我的预定目标,但这个代价也大近半个月哈,现在拿出分享,请大家不要忘记挖井人哈
好了,我现传东东哈
首先:例程:下到板子,在IE键入192.168.1.12就行
lm3s8962 uip.zip
(2.37 MB, 下载次数: 353)
WINHEX
WinHex-v15.1sr-8H.rar
(1.17 MB, 下载次数: 219)
[
本帖最后由 ddllxxrr 于 2010-12-10 21:49 编辑 ]