Newer
Older
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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
# Function Specification
The scope of wifimngr is to expose the libwifi APIs over ubus.
```
root@dc667cfd1b01:/builds/iopsys/wifimngr# ubus -v list
'wifi' @0af621bb
"status":{}
'wifi.ap.test5' @45e2e3f3
"status":{}
"stats":{}
"assoclist":{}
"stations":{"sta":"String"}
"disconnect":{"sta":"String"}
"monitor":{"sta":"String","get":"Integer"}
"add_neighbor":{"bssid":"String","channel":"Integer","bssid_info":"String","reg":"Integer","phy":"Integer"}
"del_neighbor":{"bssid":"String"}
"list_neighbor":{"ssid":"String","client":"String"}
"request_neighbor":{"ssid":"String","client":"String"}
"request_transition":{"client":"String","bssid":"Array","timeout":"Integer"}
"add_vendor_ie":{"mgmt":"Integer","oui":"String","data":"String"}
"del_vendor_ie":{"mgmt":"Integer","oui":"String","data":"String"}
'wifi.radio.test5' @0806532f
"status":{}
"stats":{}
"get":{"param":"String"}
"scan":{"ssid":"String","bssid":"String","channel":"Integer"}
"scanresults":{"bssid":"String"}
"autochannel":{"interval":"Integer","algo":"Integer","scans":"Integer"}
'wifi.wps' @e5b4e9d9
"start":{"vif":"String","mode":"String","role":"String","pin":"String"}
"stop":{}
"status":{"vif":"String"}
"generate_pin":{}
"validate_pin":{"pin":"String"}
"showpin":{"vif":"String"}
"setpin":{"vif":"String","pin":"String"}
```
# Contents
* [wifi](#wifi)
* [wifi.ap.\<name\>](#wifiapname)
* [wifi.radio.\<name\>](#wifiradioname)
* [wifi.wps](#wifiwps)
## APIs
Wifimngr publishes four different types objects, `wifi`, `wifi.ap.<name>`,
`wifi.radio.<name>` and `wifi.wps`.
### wifi
An object that publishes wifi radio and interface information.
| Method | Function ID |
| :--- | :--- |
| [status](#status) | 1 |
#### Methods
Methods descriptions of the `wifi` object.
##### status
Exposes wifi radio statistics over ubus.
* [status documentation](./api/wifi.md#status)
### wifi.ap.\<name\>
Object for wifi access point interface functionality. One object per access
point interface will be published.
````bash
"status":{}
"stats":{}
"assoclist":{}
"stations":{"sta":"String"}
"disconnect":{"sta":"String"}
"monitor":{"sta":"String","get":"Integer"}
"add_neighbor":{"bssid":"String","channel":"Integer","bssid_info":"String","reg":"Integer","phy":"Integer"}
"del_neighbor":{"bssid":"String"}
"list_neighbor":{"ssid":"String","client":"String"}
"request_neighbor":{"ssid":"String","client":"String"}
"request_transition":{"client":"String","bssid":"Array","timeout":"Integer"}
"add_vendor_ie":{"mgmt":"Integer","oui":"String","data":"String"}
"del_vendor_ie":{"mgmt":"Integer","oui":"String","data":"String"}
````
| Method |Function ID |
| :--- | :--- |
| [status](#status-1) | 2 |
| [stats](#stats) | 3 |
| [assoclist](#assoclist) | 4 |
| [stations](#stations) | 5 |
| [disconnect](#disconnect) | 6 |
| [monitor](#monitor) | 7 |
| [add_neighbor](#add_neighbor) | 8 |
| [del_neighbor](#del_neighbor) | 9 |
| [list_neighbor](#list_neighbor) | 10 |
| [request_neighbor](#request_neighbor) | 11 |
| [request_transition](#request_transition) | 12 |
| [add_vendor_ie](#add_vendor_ie) | 13 |
| [del_vendor_ie](#del_vendor_ie) | 14 |
#### Methods
Method descriptions of the `wifi.ap.<name>` object.
##### status
Exposes access point interface statistics over ubus.
* [status documentation](./api/wifi.ap.md#status)
##### stats
Exposes access point interface rx/tx statistics over ubus.
* [stats documentation](./api/wifi.ap.md#stats)
##### assoclist
Exposes connected wireless clients over ubus.
* [assoclist documentation](./api/wifi.ap.md#assoclist)
##### stations
Exposes client wifi client statistics over ubus.
* [stations documentation](./api/wifi.ap.md#stations)
##### disconnect
Issue a deauthenticate to a wireles client.
* [disconnect documentation](./api/wifi.ap.md#disconnect)
##### monitor
Monitor signal strength of unassociated station.
* [monitor documentation](./api/wifi.ap.md#monitor)
##### add_neighbor
Add an access point to the neighbor list.
* [add_neighbor documentation](./api/wifi.ap.md#add_neighbor)
##### del_neighbor
Delete an access point from the neighbor list
* [del_neighbor documentation](./api/wifi.ap.md#del_neighbor)
##### list_neighbor
Prints neighbor access points in the network.
* [list_neighbor documentation](./api/wifi.ap.md#list_neighbor)
##### request_neighbor
Triggers an 11k beacon report from an associated station.
* [request_neighbor documentation](./api/wifi.ap.md#request_neighbor)
##### request_transition
Triggers an 11k beacon report from an associated station.
* [request_transition documentation](./api/wifi.ap.md#request_transition)
##### add_vendor_ie
Appends vendor specific information element to an 802.11 management frame.
* [add_vendor_ie documentation](./api/wifi.ap.md#add_vendor_ie)
##### del_vendor_ie
Remove vendor specific information element from an 802.11 management frame.
* [del_vendor_ie documentation](./api/wifi.ap.md#del_vendor_ie)
### wifi.radio.\<name\>
Object for wifi device functionality. One object per device will be published to
ubus.
````bash
'wifi.radio.test5' @0806532f
"status":{}
"stats":{}
"get":{"param":"String"}
"scan":{"ssid":"String","bssid":"String","channel":"Integer"}
"scanresults":{"bssid":"String"}
"autochannel":{"interval":"Integer","algo":"Integer","scans":"Integer"}
````
| Method | Function ID |
| :--- | :--- |
| [status](#status-2) | 15 |
| [stats](#stats-1) | 16 |
| [get](#get) | 17 |
| [scan](#scan) | 18 |
| [scanresults](#scanresults) | 19 |
| [autochannel](#autochannel) | 20 |
#### Methods
Method descriptions of the `wifi.radio.<name>` object.
##### status
Exposes radio statistics over ubus.
* [status documentation](./api/wifi.radio.md#status)
##### stats
Exposes radio stats over ubus.
* [stats documentation](./api/wifi.radio.md#stats)
##### get
Exposes temperature of the WiFi card.
* [get documentation](./api/wifi.radio.md#get)
##### scan
Scans the radio for broadcasted SSIDs.
* [scan documentation](./api/wifi.radio.md#scan)
##### scanresults
Exposes available SSIDs from a radio scan over ubus.
* [scanresults documentation](./api/wifi.radio.md#scanresults)
##### autochannel
Selects a channel for the radio to operate at.
* [autochannel documentation](./api/wifi.radio.md#autochannel)
### wifi.wps
Object for WiFi Protected Setup functionality.
````bash
"start":{"vif":"String","mode":"String","role":"String","pin":"String"}
"stop":{}
"status":{"vif":"String"}
"generate_pin":{}
"validate_pin":{"pin":"String"}
"showpin":{"vif":"String"}
"setpin":{"vif":"String","pin":"String"}
````
| Method | Function ID |
| :--- | :--- |
| [start](#start) | 21 |
| [stop](#stop) | 22 |
| [status](#status-3) | 23 |
| [generate_pin](#generate_pin) | 24 |
| [validate_pin](#show_pin) | 25 |
| [showpin](#validate_pin) | 26 |
| [setpin](#setpin) | 27 |
#### Methods
Descriptions of `wifi.wps` methods.
##### start
Initiates WPS functionality, default uses push button configuration (PBC).
* [start documentation](./api/wifi.wps.md#start)
##### stop
Stops any WPS functionality.
* [stop documentation](./api/wifi.wps.md#stop)
##### status
Gives current state of the WPS.
* [status documentation](./api/wifi.wps.md#status)
##### generate_pin
Method generating a valid pin for WPS.
* [generate_pin documentation](./api/wifi.wps.md#generate_pin)
##### show_pin
Shows currently set PIN, if any.
* [showpin documentation](./api/wifi.wps.md#showpin)
##### validate_pin
Takes a pin input and shows whether it is a valid PIN or not.
* [validate_pin documentation](./api/wifi.wps.md#validate_pin)
##### setpin
Takes a pin input and sets it as the active WPS pin for the device.
* [setpin documentation](./api/wifi.wps.md#setpin)