迷你看门狗

来自Jack's Lab
(版本间的差异)
跳转到: 导航, 搜索
(获取模块上电运行时间)
(Web Server API)
第22行: 第22行:
  
 
== Web Server API ==
 
== Web Server API ==
 +
 +
=== client info ===
 +
 +
<source lang=bash>
 +
$ curl -X GET http://192.168.1.112/client?command=info                                              {
 +
"Version":{
 +
"hardware":"0.3",
 +
"software":"0.9.3"
 +
},
 +
"Device":{
 +
"product":"Humiture",
 +
"manufacturer":"Espressif Systems"
 +
}
 +
}
 +
</source>
 +
 +
<br><br>
 +
 +
=== client status ===
 +
 +
<source lang=bash>
 +
$ curl -X GET http://192.168.1.112/client?command=status
 +
{
 +
"Status":{
 +
"status":40
 +
}
 +
}
 +
</source>
 +
 +
<br><br>
 +
 +
=== client scan ===
 +
 +
<source lang=bash>
 +
$ curl -X GET "http://192.168.1.112/client?command=scan"
 +
{
 +
"Response":{
 +
"TotalPage":2
 +
}
 +
}
 +
</source>
 +
 +
<br><br>
 +
 +
=== config wifi ===
 +
 +
<source lang=bash>
 +
$ curl -X GET http://192.168.1.112/config?command=wifi
 +
{
 +
"Response":{
 +
"Station":{
 +
"Connect_Station":{
 +
"ssid":"HOME-WIFI",
 +
"password":"xxxxxxxx"
 +
},
 +
"Ipinfo_Station":{
 +
"ip":"192.168.1.112",
 +
"mask":"255.255.255.0",
 +
"gw":"192.168.1.1"
 +
}
 +
},
 +
"Softap":{
 +
"Connect_Softap":{
 +
"authmode":"OPEN",
 +
"channel":11,
 +
"ssid":"ESP_9CCF90",
 +
"password":""
 +
},
 +
"Ipinfo_Softap":{
 +
"ip":"192.168.4.1",
 +
"mask":"255.255.255.0",
 +
"gw":"192.168.4.1"
 +
}
 +
}
 +
}
 +
</source>
 +
 +
<br><br>
 +
 +
=== ===
 +
 +
<source lang=bash>
 +
$
 +
</source>
 +
 +
<br><br>
 +
 +
=== ===
 +
 +
<source lang=bash>
 +
$
 +
</source>
 +
 +
<br><br>
 +
 +
=== ===
 +
 +
<source lang=bash>
 +
$
 +
</source>
 +
 +
<br><br>
 +
 +
=== ===
 +
 +
<source lang=bash>
 +
$
 +
</source>
 +
 +
<br><br>
  
 
=== 恢复出厂设置 ===
 
=== 恢复出厂设置 ===

2014年12月11日 (四) 15:29的版本

目录

1 主控SoC

Tensilica Xtensa LX3 32-bit RISC SOC clocked at 80 MHz


Tensilica-xtensalx3.jpg


  • 32-bit ALU
  • 16, 32 or 64 GPR
  • six special purpose registers
  • 80 base instructions

The Xtensa ISA employs 24-bit instructions with 16-bit narrow encodings for the most common instructions.


Toolchain 支持:



2 Web Server API

2.1 client info

$ curl -X GET http://192.168.1.112/client?command=info                                              {
"Version":{
"hardware":"0.3",
"software":"0.9.3"
},
"Device":{
"product":"Humiture",
"manufacturer":"Espressif Systems"
}
}



2.2 client status

$ curl -X GET http://192.168.1.112/client?command=status
{
"Status":{
"status":40
}
}



2.3 client scan

$ curl -X GET "http://192.168.1.112/client?command=scan"
{
"Response":{
"TotalPage":2
}
}



2.4 config wifi

$ curl -X GET http://192.168.1.112/config?command=wifi
{
"Response":{
"Station":{
"Connect_Station":{
"ssid":"HOME-WIFI",
"password":"xxxxxxxx"
},
"Ipinfo_Station":{
"ip":"192.168.1.112",
"mask":"255.255.255.0",
"gw":"192.168.1.1"
}
},
"Softap":{
"Connect_Softap":{
"authmode":"OPEN",
"channel":11,
"ssid":"ESP_9CCF90",
"password":""
},
"Ipinfo_Softap":{
"ip":"192.168.4.1",
"mask":"255.255.255.0",
"gw":"192.168.4.1"
}
}
}



2.5

$



2.6

$



2.7

$



2.8

$



2.9 恢复出厂设置

$ curl -X POST -H "Content-Type:application/json" -d '{"factory":1}' http://IP/config?command=param



2.10 系统复位

$ curl  -X POST -H "Content-Type:application/json" -d '{"reset":1}' http://IP/config?command=param



2.11 切换AP 和STA 工作模式

$ curl -X POST -H "Content-Type:application/json"  



2.12 获取模块上电运行时间

$ curl -X GET http://IP/config?command=systime



2.13

$ curl -X POST -H "Content-Type:application/json" -d '{"factory":1}' http://IP/config?command=param



2.14

$ curl -X POST -H "Content-Type:application/json" -d '{"factory":1}' http://IP/config?command=param



2.15 串口波特率

$ curl -X POST -H "Content-Type:application/json" -d '{" uartbaud":baudrate}' http://IP/config?command=param

其中baudrate 代表要设置的波特率。 { “response”:{ “systime”:11111 } }



2.16 设置dataserver 端口

$ curl -X POST -H "Content-Type:application/json" -d '{" dataport":port}' http://IP/config?command=param

其中port 代表要设置的端口号



2.17

$ curl -X POST -H "Content-Type:application/json" -d '{"factory":1}' http://IP/config?command=param

























个人工具
名字空间

变换
操作
导航
工具箱