-
Notifications
You must be signed in to change notification settings - Fork 0
/
example.py
57 lines (34 loc) · 1.1 KB
/
example.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
import time
from utils import *
from constant import *
from pprint import pprint
from client import RE315Client
client = RE315Client(base_url="http://192.168.0.3/", password="passwordhere")
assert client.authenticate(), "Auth Fail"
# Turn on and off LED :))
# status = True
# while True:
# client.enableLED(status)
# status = not status
client.startNetworkScan()
while (not client.isScanFinished()):
time.sleep(0.5)
print("Scanning...")
print("Scan Finish!")
pprint(client.getScanResult())
# extender2g, extender5g = client.queryData(
# dataBlocks = [
# DataBlock(dataID=DataID.MBSSID_MAIN, layer="1,1,0"), # see constant.py
# DataBlock(dataID=DataID.MBSSID_MAIN, layer="2,1,0")
# ]
# )
# pprint(toDict(extender2g))
# pprint(toDict(extender5g))
pprint(client.getClients())
# pprint(client.getExtenderInfo(2)) # get 2Ghz extender info
pprint(client.getRootAPRSSI(5)) # get 5GHz signal
# print(client.communicate(code=TDDP_READ, data=f"{DataID.DEVICE}|1,0,0"))
# =
# pprint(
# toDict(client.queryData(dataBlocks=[DataBlock(dataID=DataID.DEVICE)])[0])
# )