ac與ap同步分析
阿新 • • 發佈:2017-12-14
serve class psi req password .com urlencode str url
1 ApStatusRequest : ap請求
網關上抓包 : tcpdump -ni br-lan tcp port 8090 -w portal.pcap tcp協議 端口8090 可以分析
ApStatusRequest:new(cjson.decode(json))數據解壓 創建對象
http://192.168.156.1:8090/wacs-mana/status.ac
User-Agent: ac 1.0.0
Host: 192.168.156.1:8090
Content-Type: application/x-www-form-urlencoded
Connection: Keep-Alive
Content-Length: 2099
{
- "gw_id": "28450FE01F32", // SN
- "vendor_id": "ZK",
- "device_type": "S826D0",
- "product_type": "WAP5230",
- "fm_name": "ZK-WAP5230-WAP5120-4.3.0.2468-DEV",
- "soft_ver": "4.3.0.2468",
- "sys_load": 100,
- "status_interval": 2,
- "station_agingtime": 10,
- "timer_reboot": 0,
- "ipaddr_release": 5,
- "auth_server": "10.10.10.248",
- "auth_path": "/",
- "auth_port": 8080,
- "ac_server": "auth.zkgcloud.com",
- "ac_path": "/wacs-mana/",
- "ac_port": 8090,
- "ac_name": "2",
- "ac_outer_ip": "2",
- "ac_bak_hostname": "auth.zkgcloud.com",
- "ac_bak_path": "/wacs-mana/",
- "ac_bak_port": 8090,
- "ac_bak_sync_interval": 30,
- "acdisc_enable": 1,
- "auth_enable": 1,
- "apple_auto_portal": 0,
- "escape_mode_enable": 0,
- "auth_protocol": "cmcc-portal",
- "nas_ip": "1",
- "nas_id": "2",
- "sys_time": 1743,
- "sys_memory": 128692224,
- "sys_memfree": 64143360,
- "work_mode": 0,
- "lan_ip": "192.168.2.1",
- "wan_type": 1,
- "wan_mac": "24:05:0f:e0:1f:35",
- "wan_ip": "192.168.156.138",
- "lan_mac": "24:05:0F:E0:1F:34",
- "kick_threshold": -85,
- "band_select_enable": 1,
- "total_users": 0,
-
-
"radio24g": {
- "channel": 0,
- "turn_on": 1,
- "freq_bandwidth": 1,
- "wireless_mode": 0,
- "tx_power": 27
-
-
"radio5g": {
- "channel": 0,
- "turn_on": 1,
- "freq_bandwidth": 2,
- "wireless_mode": 2,
- "tx_power": 23
-
-
"ssids": [
-
-
{
- "ssid": "zkliulin89898",
- "vlanEnable": 0,
- "vlanId": 0,
- "bssid": "24:05:0f:e0:1f:36",
- "auth_mode": 0,
- "encryption_type": 0,
- "password": "",
- "coding_type": 0,
- "hide_ssid": 0,
- "max_users": -1,
- "download_speed": -1,
- "upload_speed": -1,
- "station_count": 0,
- "station_list": [ ],
- "auth_enable": 1
-
-
{
-
-
"ssids_5g": [
-
-
{
- "ssid": "zk_5g",
- "vlanEnable": 0,
- "vlanId": 0,
- "bssid": "24:05:0f:e0:1f:36",
- "auth_mode": 0,
- "encryption_type": 0,
- "password": "",
- "coding_type": 0,
- "hide_ssid": 0,
- "max_users": -1,
- "download_speed": -1,
- "upload_speed": -1,
- "station_count": 0,
- "station_list": [ ],
- "auth_enable": 1
-
-
{
-
-
"qos": {
- "enable": 0,
- "upload_bw": 128,
- "download_bw": 51200
-
-
"sta_scan": {
- "enable": 0,
- "building_id": "ZK-PROBE-001002",
- "interval": 5,
- "server_ip": "120.76.116.73",
- "server_port": 8100
-
-
"mac_white_black": {
- "mac_black_list_md5": "0",
- "mac_white_list_md5": "0"
}
if useEnable == "1" and useReg == "1" and wacSn ~= devSn then 自動註冊判斷
DBHelper.count("nas_device", {["device_sn = "] = deviceSN}) 數據庫查詢 找到了就是已經添加的數據
DBHelper.insert("nas_device", saveData) 插入到數據庫
local apPara = acMaintService.statusToConfig(apStatusRequest); 參數問題
ac與ap同步分析