-
Jakob Olsson authored
i.e. add/del_iface, un/subscribe, dump_beacon and monitor functions
Jakob Olsson authoredi.e. add/del_iface, un/subscribe, dump_beacon and monitor functions
- Function Specification
- Contents
- APIs
- wifi
- Methods
- status
- wifi.ap.<name>
- Methods
- status
- stats
- assoclist
- stations
- disconnect
- monitor_add
- monitor_del
- monitor_get
- subscribe_frame
- unsubscribe_frame
- add_neighbor
- del_neighbor
- list_neighbor
- request_neighbor
- request_transition
- add_vendor_ie
- del_vendor_ie
- dump_beacon
- wifi.radio.<name>
- Methods
- status
- stats
- get
- scan
- scanresults
- autochannel
- wifi.wps
- Methods
- start
- stop
- status
- generate_pin
- show_pin
- validate_pin
- setpin
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' @86000d35
"status":{}
"stats":{}
"assoclist":{}
"stations":{"sta":"String"}
"disconnect":{"sta":"String","reason":"Integer"}
"monitor_add":{"sta":"String"}
"monitor_del":{"sta":"String"}
"monitor_get":{"sta":"String"}
"subscribe_frame":{"type":"Integer","stype":"Integer"}
"unsubscribe_frame":{"type":"Integer","stype":"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"}
"dump_beacon":{}
'wifi.radio.test5' @fac30612
"status":{}
"stats":{}
"get":{"param":"String"}
"scan":{"ssid":"String","bssid":"String","channel":"Integer"}
"scanresults":{"bssid":"String"}
"autochannel":{"interval":"Integer","algo":"Integer","scans":"Integer"}
"add_iface":{"args":"Table","config":"Boolean"}
"del_iface":{"ifname":"String","config":"Boolean"}
'wifi.wps' @76eb99e4
"start":{"ifname":"String","mode":"String","role":"String","pin":"String"}
"stop":{}
"status":{"ifname":"String"}
"generate_pin":{}
"validate_pin":{"pin":"String"}
"showpin":{"ifname":"String"}
"setpin":{"ifname":"String","pin":"String"}
Contents
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 | 1 |
Methods
Methods descriptions of the wifi
object.
status
Exposes wifi radio statistics over ubus.
wifi.ap.<name>
Object for wifi access point interface functionality. One object per access point interface will be published.
'wifi.ap.test5' @86000d35
"status":{}
"stats":{}
"assoclist":{}
"stations":{"sta":"String"}
"disconnect":{"sta":"String","reason":"Integer"}
"monitor_add":{"sta":"String"}
"monitor_del":{"sta":"String"}
"monitor_get":{"sta":"String"}
"subscribe_frame":{"type":"Integer","stype":"Integer"}
"unsubscribe_frame":{"type":"Integer","stype":"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"}
"dump_beacon":{}
Method | Function ID |
---|---|
status | 2 |
stats | 3 |
assoclist | 4 |
stations | 5 |
disconnect | 6 |
monitor_add | 7 |
monitor_del | 8 |
monitor_get | 9 |
subscribe_frame | 10 |
unsubscribe_frame | 11 |
add_neighbor | 12 |
del_neighbor | 13 |
list_neighbor | 14 |
request_neighbor | 15 |
request_transition | 16 |
add_vendor_ie | 17 |
del_vendor_ie | 18 |
dump_beacon | 19 |
Methods
Method descriptions of the wifi.ap.<name>
object.
status
Exposes access point interface statistics over ubus.
stats
Exposes access point interface rx/tx statistics over ubus.
assoclist
Exposes connected wireless clients over ubus.
stations
Exposes client wifi client statistics over ubus.
disconnect
Issue a deauthenticate to a wireles client.
monitor_add
Monitor signal strength of unassociated station.
monitor_del
Stop monitoring signal strength of unassociated station.
monitor_get
Monitor signal strength of unassociated station.
subscribe_frame
Subscribe to 802.11 frames, which the driver/firmware needs to pass up to ubus.
unsubscribe_frame
Unsubscribe to 802.11 frames.
add_neighbor
Add an access point to the neighbor list.
del_neighbor
Delete an access point from the neighbor list
list_neighbor
Prints neighbor access points in the network.
request_neighbor
Triggers an 11k beacon report from an associated station.
request_transition
Triggers an 11k beacon report from an associated station.
add_vendor_ie
Appends vendor specific information element to an 802.11 management frame.
del_vendor_ie
Remove vendor specific information element from an 802.11 management frame.
dump_beacon
Dump beacon frame contents.
wifi.radio.<name>
Object for wifi device functionality. One object per device will be published to ubus.
'wifi.radio.test5' @fac30612
"status":{}
"stats":{}
"get":{"param":"String"}
"scan":{"ssid":"String","bssid":"String","channel":"Integer"}
"scanresults":{"bssid":"String"}
"autochannel":{"interval":"Integer","algo":"Integer","scans":"Integer"}
"add_iface":{"args":"Table","config":"Boolean"}
"del_iface":{"ifname":"String","config":"Boolean"}
Method | Function ID |
---|---|
status | 20 |
stats | 21 |
get | 22 |
scan | 23 |
scanresults | 24 |
autochannel | 25 |
add_iface | 26 |
del_iface | 27 |
Methods
Method descriptions of the wifi.radio.<name>
object.
status
Exposes radio statistics over ubus.
stats
Exposes radio stats over ubus.
get
Exposes temperature of the WiFi card.
scan
Scans the radio for broadcasted SSIDs.
scanresults
Exposes available SSIDs from a radio scan over ubus.
autochannel
Selects a channel for the radio to operate at.
wifi.wps
Object for WiFi Protected Setup functionality.
'wifi.wps' @76eb99e4
"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 | 28 |
stop | 29 |
status | 30 |
generate_pin | 31 |
validate_pin | 32 |
showpin | 33 |
setpin | 34 |
Methods
Descriptions of wifi.wps
methods.
start
Initiates WPS functionality, default uses push button configuration (PBC).
stop
Stops any WPS functionality.
status
Gives current state of the WPS.
generate_pin
Method generating a valid pin for WPS.
show_pin
Shows currently set PIN, if any.
validate_pin
Takes a pin input and shows whether it is a valid PIN or not.
setpin
Takes a pin input and sets it as the active WPS pin for the device.