Commit db8e2e44 authored by Jakob Olsson's avatar Jakob Olsson

add CI pipeline tests

with correct rebase
parent 208be0cf
Pipeline #786 passed with stages
in 1 minute and 44 seconds
......@@ -10,3 +10,10 @@ tags
wifimngr
.configured_*
.pkgdir
*.html
*.gcda
*.gcov
*.gcno
*.log
*.so
*.xml
......@@ -4,7 +4,52 @@ include:
stages:
- static_code_analysis
- unit_test
- functional_test
- api_test
variables:
DEBUG: 'TRUE'
SOURCE_FOLDER: "."
run_api_test:
stage: api_test
image: iopsys/code-analysis:0.7
allow_failure: true
script:
- "./gitlab-ci/setup.sh"
- "./gitlab-ci/functional-api-test.sh"
artifacts:
when: always
reports:
junit: ./report/tap.xml
paths:
- api-test-coverage.html
- api-test-memory-report.xml
run_unit_test:
stage: unit_test
image: iopsys/code-analysis:0.7
allow_failure: true
script:
- "./gitlab-ci/setup.sh"
- "./gitlab-ci/unit-test.sh"
artifacts:
when: always
paths:
- unit-test-coverage.html
run_functional_test:
stage: functional_test
image: iopsys/code-analysis:0.7
allow_failure: true
script:
- "./gitlab-ci/setup.sh"
- "./gitlab-ci/functional-test.sh"
artifacts:
when: always
paths:
- functional-test-coverage.html
CC=gcc # gcc || clang
PROG = wifimngr
OBJS = wifimngr.o wps.o wifimngr_event.o main.o
PROG_CFLAGS = $(CFLAGS) -Wall -fstrict-aliasing
PROG_LDFLAGS = $(LDFLAGS)
PROG_LIBS = -leasy -lwifi-5
PROG_LIBS += -luci -lubus -lubox -ljson-c -lblobmsg_json -lnl-genl-3 -lnl-3
PROG_LIBS = -lwifi-5
PROG_LIBS += -luci -lubus -lubox -ljson-c -lblobmsg_json -lnl-genl-3 -lnl-3 -lgcov -leasy
GCOV = gcov
CODECOVERAGE_SRC = wifimngr.c
%.o: %.c
$(CC) $(PROG_CFLAGS) $(FPIC) -c -o $@ $<
......@@ -32,5 +35,25 @@ files.md5:
wifimngr: $(OBJS)
$(CC) $(PROG_LDFLAGS) -o $@ $^ $(PROG_LIBS)
test: CFLAGS += -fPIC
test: ${OBJS}
${CC} ${LDFLAGS} -shared -o libwifimngr.so ${OBJS} ${LIBS}
unit-test: coverage
make -C test/cmocka unit-test WIFIMNGR_LIB_DIR=$(PWD)
functional-test: coverage
make -C test/cmocka functional-test WIFIMNGR_LIB_DIR=$(PWD)
coverage: CFLAGS += -g -O0 -fprofile-arcs -ftest-coverage
coverage: LDFLAGS += --coverage
coverage: test wifimngr
$(foreach testprog, $(CODECOVERAGE_SRC), $(GCOV) $(testprog);)
clean:
rm -f *.o $(PROG)
rm -f *.o libwifimngr.so $(PROG)
rm -f *.xml *.html
find -name '*.gcda' -exec rm {} -fv \;
find -name '*.gcno' -exec rm {} -fv \;
find -name '*.gcov' -exec rm {} -fv \;
make -C test/cmocka clean
# Wifimngr
Wifimngr implements the wifi data model, publishing the wifi objects over ubus.
In order to remain agnostic the vendor and underlying wifi modules present
in the system, wifimngr uses the easy-soc-libs libwifi APIs to expose supported
methods with its objects.
<!--Wifimngr implements the wifi data model. It prepares the wifi objects and-->
<!--publishes them over ubus, the exposed methods are agnostic to the underlying-->
<!--wifi module present in the system. It uses the easy-soc-libs libwifi APIs to-->
<!--present the APIs over ubus.-->
## Overview
Wifimngr manages three areas of wifi functionality:
1. WiFi Statistics
2. Access Points
3. Radios
4. WiFi Protected Setup (WPS)
### UCI Config
An example UCI wireless configuration file creating one access point interface,
`test5`:
````bash
config wifi-device 'test5'
option channel 'auto'
option hwmode 'auto'
option country 'DE'
option band 'a'
option bandwidth '80'
config wifi-iface
option device 'test5'
option ifname 'test5'
option mode 'ap'
option encryption 'psk2'
````
For more info on the UCI wireless configuration see [link](./docs/api/uci.wireless.md)
### Ubus API
This is a verbose print of all methods published to ubus on a device with one
access point interface `test5`:
````bash
'wifi' @f2f72310
"status":{}
'wifi.ap.test5' @57ac8570
"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' @e662e933
"status":{}
"stats":{}
"get":{"param":"String"}
"scan":{"ssid":"String","bssid":"String","channel":"Integer"}
"scanresults":{"bssid":"String"}
"autochannel":{"interval":"Integer","algo":"Integer","scans":"Integer"}
'wifi.wps' @4eb8cbd8
"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"}
````
For more info on the Ubus API see
[function specification](./docs/functionspec.md) or go directly to the generated
[docs](./docs/ubus.splash.md).
### Wifi Statistics
The `wifi` object publishes gathered radio and interface statistics.
```
'wifi' @f2f72310
"status":{}
```
For info on the `wifi` API see [link](./docs/api/wifi.md#wifi)
### Access Point
An object will be published on ubus for each interface operating as an access
point, managing operations and data for wifi clients, neighbor nodes
and interface statistics.
To parse access point interfaces, wifimngr reads the wireless
configuration file (`/etc/config/wireless`), looking for `wifi-iface` sections,
with the option `mode` specified as `ap`.
```
config wifi-iface
option device 'test5'
option ifname 'test5'
option mode 'ap'
```
Wifimngr will query libwifi to find available API calls for the driver, in order
to dynamically publish available methods to ubus.
```
root@:/opt/work# ubus -v list wifi.ap.test5
'wifi.ap.test5' @a939a75c
"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"}
```
For info on the access point API see [link](./docs/api/wifi.ap.md#wifiapname)
### Radio
Similarily to access point interfaces, wifimngr will publish one object per
available radio, parsed from the wireless configuration, by `wifi-device`
sections. The methods are added dynamically by quering for supported API calls
from libwifi.
```
config wifi-device 'test5'
option channel 'auto'
option hwmode 'auto'
option country 'DE'
option band 'a'
option bandwidth '80'
```
The radio object manages radio data and statistics, channel selection and
wifi scan operations.
```
root@:/opt/work# ubus -v list wifi.radio.test5
'wifi.radio.test5' @fa7d185d
"status":{}
"stats":{}
"get":{"param":"String"}
"scan":{"ssid":"String","bssid":"String","channel":"Integer"}
"scanresults":{"bssid":"String"}
"autochannel":{"interval":"Integer","algo":"Integer","scans":"Integer"}
```
For info on the radio API see [link](./docs/api/wifi.radio.md#wifiradioname)
### Wifi Protected Setup
Lastly, wifimngr exposes WPS functionality to ubus.
The configuration is read from the `/etc/config/wireless`. To enable WPS the
`wps` option has to be set to `1`.
```
config wifi-iface
option wps '1'
```
To see more configuration options see [link](./docs/api/uci.wireless.md),
under the `wifi-iface` section.
```
root@:/opt/work# ubus -v list wifi.wps
'wifi.wps' @78c52f3b
"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"}
```
For info on the WPS API see [link](./docs/api/wifi.wps.md#wifiwps)
## Tests
This section will give a brief overview of the tests for wifimngr, for a more
detailed report see [test specification](./docs/testspec.md)
To test wifimngr, the scope of the tests has to be clearly defined, as wifimngr
is heavily dependent on libwifi:
1. Verify linkage between wifimngr and libwifi APIs
2. Verify that the wifi structures are correctly prepared and return data is
used correctly by wifimngr
3. Verify that API calls successfully reach libwifi and if passed input is of
correct format
As the test environment runs in a ubuntu 16.04 docker environment, with little
possibility to prepare wifi drivers and kernel version, the easy-soc-libs had to
be extended to support APIs to run on a test platform, returning dummy data for
getters, and for setters, logging that the call made with timestamp and
arguments.
To ensure full coverage, the getters are tested by the ubus-api-validation tool,
using json-schemas to validate accurate output. The setters are tested by cmocka
tests, creating a libwifimngr.so shared library, invoking its ubus API
functions directly, verifying that the call went through, and that the arguments
were passed correctly, by parsing the test log file found at `/tmp/test.log`.
Additionally, the cmocka tests verify that netlink event callbacks are
registered and invoked.
## Dependencies ##
To successfully build wifimngr, the following libraries are needed:
| Dependency | Link | License |
| ----------------- | ---------------------------------------------------------------- | -------------- |
| libuci | https://git.openwrt.org/project/uci.git | LGPL 2.1 |
| libubox | https://git.openwrt.org/project/libubox.git | BSD |
| libubus | https://git.openwrt.org/project/ubus.git | LGPL 2.1 |
| libjson-c | https://s3.amazonaws.com/json-c_releases | MIT |
| libwifi | https://dev.iopsys.eu/iopsys/easy-soc-libs/tree/devel/libwifi | GNU GPL2 |
| libnl3 | | |
| libblobmsg_json | | |
| libnl-genl | | |
Additionally, in order to build with the tests, the following libraries are needed:
| Dependency | Link | License |
| ------------------------- | --------------------------------------------------------- | ------------- |
| libjson-schema-validator | https://github.com/pboettch/json-schema-validator | LGPL 2.1 |
| libjson-validator | https://dev.iopsys.eu/iopsys/json-schema-validator | |
| libjson-editor | https://dev.iopsys.eu/iopsys/json-editor | |
<tbody><tr><td colspan="2"><div class="td_head">wireless</div><table style="width:100%"><tbody><tr><td><div class="td_head">section</div></td><td><div class="td_head">description</div></td><td><div class="td_head">multi</div></td><td><div class="td_head">options</div></td></tr><tr><td class="td_row_even"><div class="td_row_even">wifi-device</div></td><td class="td_row_even"><div class="td_row_even">Wifi Device Settings</div></td><td class="td_row_even"><div class="td_row_even">true</div></td><td class="td_row_even"><table style="width:100%"><tbody><tr><td><div class="td_head">name</div></td><td><div class="td_head">type</div></td><td><div class="td_head">required</div></td><td><div class="td_head">default</div></td><td><div class="td_head">description</div></td></tr><tr><td class="td_row_even"><div class="td_row_even">channel</div></td><td class="td_row_even"><div class="td_row_even">integer or “auto”</div></td><td class="td_row_even"><div class="td_row_even">yes</div></td><td class="td_row_even"><div class="td_row_even">auto</div></td><td class="td_row_even"><div class="td_row_even">Specifies the wireless channel to use. “auto” defaults to the lowest available channel.</div></td></tr><tr><td class="td_row_odd"><div class="td_row_odd">hwmode</div></td><td class="td_row_odd"><div class="td_row_odd">string</div></td><td class="td_row_odd"><div class="td_row_odd">&nbsp;</div></td><td class="td_row_odd"><table style="width:100%"></table></td><td class="td_row_odd"><div class="td_row_odd">Selects the wireless protocol to use, possible values are 11b, 11g, and 11a. Note that 11ng and 11na are not available options.</div></td></tr><tr><td class="td_row_even"><div class="td_row_even">country</div></td><td class="td_row_even"><div class="td_row_even">varies</div></td><td class="td_row_even"><div class="td_row_even">&nbsp;</div></td><td class="td_row_even"><table style="width:100%"></table></td><td class="td_row_even"><div class="td_row_even">Specifies the country code, affects the available channels and transmission powers. For type broadcom a two letter country code is used (EN or DE). The madwifi driver expects a numeric code.</div></td></tr><tr><td class="td_row_odd"><div class="td_row_odd">band</div></td><td class="td_row_odd"><div class="td_row_odd">string</div></td><td class="td_row_odd"><div class="td_row_odd">&nbsp;</div></td><td class="td_row_odd"><table style="width:100%"></table></td><td class="td_row_odd"><div class="td_row_odd">Whether radio operates at 2.4GHz or 5GHz.</div></td></tr><tr><td class="td_row_even"><div class="td_row_even">bandwidth</div></td><td class="td_row_even"><div class="td_row_even">integer</div></td><td class="td_row_even"><div class="td_row_even">&nbsp;</div></td><td class="td_row_even"><div class="td_row_even">80</div></td><td class="td_row_even"><div class="td_row_even">Frequency at which the radio operates.</div></td></tr></tbody></table></td></tr><tr><td class="td_row_odd"><div class="td_row_odd">wifi-iface</div></td><td class="td_row_odd"><div class="td_row_odd">Wifi Interface Settings</div></td><td class="td_row_odd"><div class="td_row_odd">true</div></td><td class="td_row_odd"><table style="width:100%"><tbody><tr><td><div class="td_head">name</div></td><td><div class="td_head">type</div></td><td><div class="td_head">required</div></td><td><div class="td_head">default</div></td><td><div class="td_head">description</div></td></tr><tr><td class="td_row_even"><div class="td_row_even">device</div></td><td class="td_row_even"><div class="td_row_even">string</div></td><td class="td_row_even"><div class="td_row_even">yes</div></td><td class="td_row_even"><div class="td_row_even">(first device id)</div></td><td class="td_row_even"><div class="td_row_even">Specifies the used wireless adapter, must refer to one of the defined wifi-device sections</div></td></tr><tr><td class="td_row_odd"><div class="td_row_odd">ifname</div></td><td class="td_row_odd"><div class="td_row_odd">string</div></td><td class="td_row_odd"><div class="td_row_odd">no</div></td><td class="td_row_odd"><div class="td_row_odd">(driver default)</div></td><td class="td_row_odd"><div class="td_row_odd">Specifies a custom name for the Wi-Fi interface, which is otherwise automatically named.</div></td></tr><tr><td class="td_row_even"><div class="td_row_even">mode</div></td><td class="td_row_even"><div class="td_row_even">string</div></td><td class="td_row_even"><div class="td_row_even">yes</div></td><td class="td_row_even"><div class="td_row_even">ap</div></td><td class="td_row_even"><div class="td_row_even">Selects the operation mode of the wireless network interface controller. Possible values are ap, sta, adhoc, wds, monitor, mesh</div></td></tr><tr><td class="td_row_odd"><div class="td_row_odd">encryption</div></td><td class="td_row_odd"><div class="td_row_odd">string</div></td><td class="td_row_odd"><div class="td_row_odd">&nbsp;</div></td><td class="td_row_odd"><table style="width:100%"></table></td><td class="td_row_odd"><div class="td_row_odd">Wireless encryption method. Possible values are: none, wep, psk, psk2. For WEP station mode the default is “open system” authentication. Use wep+shared or wep+open to force a specific mode.</div></td></tr></tbody></table></td></tr></tbody></table></td></tr></tbody>
\ No newline at end of file
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
# 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)
This diff is collapsed.
# Ubus Generated APIs
* [WiFi](./api/wifi.md)
* [Access Point](./api/wifi.ap.md)
* [Radio](./api/wifi.radio.md)
* [WiFi Protected Setup](./api/wifi.wps.md)