新手上路
- 积分
- 42
- 金钱
- 42
- 注册时间
- 2015-9-12
- 在线时间
- 1 小时
|
5金钱
看到别人有一个产品,里面貌似嵌入了一个ASP的服务器,仔细抓包看了里面数据,好奇这个方案需要了解什么知识才能完成!想以后实现类似的项目!!!下面是一些抓包的数据,求能看懂的大神讲解一下, 谢谢!!
抓包数据--》
PC请求:
POST /password.asp HTTP/1.1
Host: 192.168.2.234
Connection: keep-alive
Content-Length: 22
Cache-Control: no-cache
Origin: file://
If-Modified-Since: 0
User-Agent: Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/29.0.1547.31 Safari/537.36
Content-Type: text/xml
Accept: */*
Accept-Encoding: gzip,deflate
Accept-Language: en-us,en
XXXX=0000&end=END
设备回复:
HTTP/1.1 200 OK
Server: XXXWebserver
Content-type: text/plain
Connection: close
Content-Length: 14
password=pw_ok
PC请求:
GET /config.xml HTTP/1.1
Host: 192.168.2.234
Connection: keep-alive
Cache-Control: no-cache
If-Modified-Since: 0
User-Agent: Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/29.0.1547.31 Safari/537.36
Content-Type: text/xml
Accept: */*
Accept-Encoding: gzip,deflate
Accept-Language: en-us,en
设备回复:
HTTP/1.1 200 OK
Server: LightWebserver
Content-type: text/xml
Connection: close
Content-Length: 1518
<?xml version="1.0" encoding="UTF-8"?>
<!----->
<root>
<config>
<devName>XXX</devName>
<projectName>NEX Lighting Control</projectName>
.........
|
最佳答案
查看完整内容[请看2#楼]
回复【4楼】yangyiguoit:
---------------------------------
先按照xml格式写网页,转换成二进制写入flash中,服务器接收到请求后,查表确定回复网页,然后将二进制网页发回去就行了。
这网页是提前写好的,放在sd卡,spi_flash或者内部flash都可以, 解析是客户端处理的。
了解这个,比较管用的书
1. http权威指南
2. 嵌入式网络那些事(lwip+ucos)
3. TCP/IP详解
3. html语言(自己找,我是在 ...
|