迷你看门狗

来自Jack's Lab
(版本间的差异)
跳转到: 导航, 搜索
(Web Server API)
(Web Server API)
第144行: 第144行:
 
$ curl -X POST http://192.168.1.112/config?command=sleep
 
$ curl -X POST http://192.168.1.112/config?command=sleep
  
</source>
 
 
<br><br>
 
 
=== config reboot ===
 
 
<source lang=bash>
 
$
 
 
</source>
 
</source>
  
第192行: 第184行:
 
<source lang=bash>
 
<source lang=bash>
 
$ curl  -X POST -H "Content-Type:application/json" -d '{"reset":1}' http://IP/config?command=param
 
$ curl  -X POST -H "Content-Type:application/json" -d '{"reset":1}' http://IP/config?command=param
</source>
 
 
<br><br>
 
 
=== 切换AP 和STA 工作模式 ===
 
 
<source lang=bash>
 
$ curl -X POST -H "Content-Type:application/json" 
 
 
</source>
 
</source>
  
第208行: 第192行:
 
<source lang=bash>
 
<source lang=bash>
 
$ curl -X GET http://IP/config?command=systime
 
$ curl -X GET http://IP/config?command=systime
</source>
 
 
<br><br>
 
 
=== ===
 
 
<source lang=bash>
 
$ curl -X POST -H "Content-Type:application/json" -d '{"factory":1}' http://IP/config?command=param
 
</source>
 
 
<br><br>
 
 
=== ===
 
 
<source lang=bash>
 
$ curl -X POST -H "Content-Type:application/json" -d '{"factory":1}' http://IP/config?command=param
 
 
</source>
 
</source>
  
第252行: 第220行:
  
 
<br><br>
 
<br><br>
 
=== ===
 
 
<source lang=bash>
 
$ curl -X POST -H "Content-Type:application/json" -d '{"factory":1}' http://IP/config?command=param
 
</source>
 
 
 
<br><br>
 
<br><br>
 
<br><br>
 
<br><br>

2014年12月11日 (四) 16:31的版本

目录

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 config switch

$ curl -X GET http://192.168.1.112/config?command=switch
{
"Response":{
"status":0
}
}



2.6 config light

$ curl -X GET http://192.168.1.112/config?command=light
{
"freq":0,
"rgb":{
"red":0,
"green":0,
"blue":0
}
}



2.7 config reboot

$ curl -X GET http://192.168.1.112/config?command=reboot



2.8 config sleep

$ curl -X POST http://192.168.1.112/config?command=sleep



2.9

$



2.10

$



2.11

$



2.12 恢复出厂设置

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



2.13 系统复位

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



2.14 获取模块上电运行时间

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



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 代表要设置的端口号



























个人工具
名字空间

变换
操作
导航
工具箱