-
Notifications
You must be signed in to change notification settings - Fork 0
HTTP API
Alessandro D'Alterio edited this page Nov 25, 2025
·
5 revisions
Master board use an http server for UI, this is a list of API call:
Returns a JSON string with information and status for master and slaves
{
"master": {
"chip": {
"model": 9,
"cores": 2,
"revision": 2,
"features": 18
},
"ram": {
"total_internal": 375291,
"free_internal": 180971,
"largest_contig": 110592,
"spiram_size": 8367528
},
"modules": {
"spi": true,
"netif": true,
"wifi_init": true,
"wifi_started": true,
"bluetooth": false
},
"wifi": {
"ap_ssid": "espDragonFruit",
"ap_password": "espDragonFruit",
"ap_channel": 1,
"mode": 3
}
},
"slave1": {
"chip": {
"model": 1,
"cores": 2,
"revision": 101,
"features": 50
},
"ram": {
"total_internal": 321276,
"free_internal": 188664,
"largest_contig": 110592,
"spiram_size": 0
},
"modules": {
"spi": true,
"netif": true,
"wifi_init": true,
"wifi_started": true,
"bluetooth": false
},
"wifi": {
"ap_ssid": "",
"ap_password": "",
"ap_channel": 0,
"mode": 1
}
},
"slave2": {
"chip": {
"model": 23,
"cores": 1,
"revision": 100,
"features": 82
},
"ram": {
"total_internal": 321599,
"free_internal": 160791,
"largest_contig": 155648,
"spiram_size": 4174384
},
"modules": {
"spi": true,
"netif": true,
"wifi_init": true,
"wifi_started": true,
"bluetooth": false
},
"wifi": {
"ap_ssid": "",
"ap_password": "",
"ap_channel": 0,
"mode": 1
}
},
"slave3": {
"chip": {
"model": 9,
"cores": 2,
"revision": 2,
"features": 18
},
"ram": {
"total_internal": 380171,
"free_internal": 213991,
"largest_contig": 188416,
"spiram_size": 8374040
},
"modules": {
"spi": true,
"netif": true,
"wifi_init": true,
"wifi_started": true,
"bluetooth": false
},
"wifi": {
"ap_ssid": "",
"ap_password": "",
"ap_channel": 0,
"mode": 1
}
}
}
Start wifi scan on master or slave
{
"device": "master", //slave1, slave2, slave3
"scantime": 200,
"channel": 0,
"passive": false
}
When scan start succefully we should get this response
{"status":"started"}
Get the scan status or results
/api/wifi_scan?device=master //slave1, slave2, slave3
State can be "idle", "scanning" or "done"
{
"state": "done",
"error": 0,
"ap_num": 1,
"results": [
{
"ssid": "espDragonFruit",
"rssi": -3,
"primary_channel": 1,
"secondary_channel": 1,
"bssid": "D0:CF:13:25:75:31",
"authmode": "WPA2-PSK",
"pairwise_cipher": "CCMP",
"group_cipher": "CCMP",
"wps": false,
"phy_11b": 1,
"phy_11g": 1,
"phy_11n": 1,
"phy_11a": 0,
"phy_11ac": 0,
"phy_11ax": 0,
"phy_lr": 0,
"ant": 0,
"ftm_responder": 0,
"ftm_initiator": 0,
"country_code": "CN ",
"schan": 1,
"nchan": 13,
"max_tx_power": 20,
"policy": 0,
"wifi_5g_channel_mask": 0
}
]
}