Skip to content
Snippets Groups Projects
wifi.ap.md 64 KiB
Newer Older
  • Learn to ignore specific revisions
  • Jakob Olsson's avatar
    Jakob Olsson committed
    # wifi.ap.<name> Schema
    
    ```
    https://www.iopsys.eu/wifi.ap.json
    ```
    
    | Custom Properties | Additional Properties |
    | ----------------- | --------------------- |
    | Forbidden         | Forbidden             |
    
    # wifi.ap.<name>
    
    | List of Methods                           |
    | ----------------------------------------- |
    | [add_neighbor](#add_neighbor)             | Method | wifi.ap.<name> (this schema) |
    | [add_vendor_ie](#add_vendor_ie)           | Method | wifi.ap.<name> (this schema) |
    | [assoclist](#assoclist)                   | Method | wifi.ap.<name> (this schema) |
    | [del_neighbor](#del_neighbor)             | Method | wifi.ap.<name> (this schema) |
    | [del_vendor_ie](#del_vendor_ie)           | Method | wifi.ap.<name> (this schema) |
    | [disconnect](#disconnect)                 | Method | wifi.ap.<name> (this schema) |
    
    | [dump_beacon](#dump_beacon)               | Method | wifi.ap.<name> (this schema) |
    
    Jakob Olsson's avatar
    Jakob Olsson committed
    | [list_neighbor](#list_neighbor)           | Method | wifi.ap.<name> (this schema) |
    
    | [monitor_add](#monitor_add)               | Method | wifi.ap.<name> (this schema) |
    | [monitor_del](#monitor_del)               | Method | wifi.ap.<name> (this schema) |
    | [monitor_get](#monitor_get)               | Method | wifi.ap.<name> (this schema) |
    
    Jakob Olsson's avatar
    Jakob Olsson committed
    | [request_neighbor](#request_neighbor)     | Method | wifi.ap.<name> (this schema) |
    | [request_transition](#request_transition) | Method | wifi.ap.<name> (this schema) |
    | [stations](#stations)                     | Method | wifi.ap.<name> (this schema) |
    | [stats](#stats)                           | Method | wifi.ap.<name> (this schema) |
    | [status](#status)                         | Method | wifi.ap.<name> (this schema) |
    
    ## add_neighbor
    
    `add_neighbor`
    
    - type: `Method`
    
    ### add_neighbor Type
    
    `object` with following properties:
    
    | Property | Type   | Required |
    | -------- | ------ | -------- |
    | `input`  | object | Optional |
    | `output` | object | Optional |
    
    #### input
    
    `input`
    
    - is optional
    - type: `object`
    
    ##### input Type
    
    `object` with following properties:
    
    | Property     | Type    | Required     |
    | ------------ | ------- | ------------ |
    | `bssid`      | string  | **Required** |
    | `bssid_info` | string  | **Required** |
    | `channel`    | oneOf   | **Required** |
    | `phy`        | integer | **Required** |
    | `reg`        | integer | **Required** |
    
    #### bssid
    
    ##### MAC Address
    
    `bssid`
    
    - is **required**
    - type: reference
    
    ##### bssid Type
    
    `string`
    
    - minimum length: 17 characters
    - maximum length: 17 characters All instances must conform to this regular expression (test examples
      [here](<https://regexr.com/?expression=%5E(%5B0-9a-fA-F%5D%5B0-9a-fA-F%5D%3A)%7B5%7D%5B0-9a-fA-F%5D%5B0-9a-fA-F%5D%24>)):
    
    ```regex
    ^([0-9a-fA-F][0-9a-fA-F]:){5}[0-9a-fA-F][0-9a-fA-F]$
    ```
    
    #### bssid_info
    
    `bssid_info`
    
    - is **required**
    - type: `string`
    
    ##### bssid_info Type
    
    `string`
    
    #### channel
    
    `channel`
    
    - is **required**
    - type: complex
    
    ##### channel Type
    
    **One** of the following _conditions_ need to be fulfilled.
    
    #### Condition 1
    
    `integer`
    
    - minimum value: `1`
    - maximum value: `14`
    
    #### Condition 2
    
    `integer`
    
    - minimum value: `32`
    - maximum value: `200`
    
    #### phy
    
    `phy`
    
    - is **required**
    - type: `integer`
    
    ##### phy Type
    
    `integer`
    
    - minimum value: `0`
    
    #### reg
    
    `reg`
    
    - is **required**
    - type: `integer`
    
    ##### reg Type
    
    `integer`
    
    - minimum value: `0`
    
    ### Ubus CLI Example
    
    ```
    
    ubus call wifi.ap.<name> add_neighbor {"bssid":"33:fa:Dc:E4:eB:00","channel":57,"bssid_info":"sed","reg":32891575,"phy":46674216}
    
    Jakob Olsson's avatar
    Jakob Olsson committed
    ```
    
    ### JSONRPC Example
    
    ```json
    {
      "jsonrpc": "2.0",
      "id": 0,
      "method": "call",
      "params": [
        "<SID>",
        "wifi.ap.<name>",
        "add_neighbor",
    
        { "bssid": "33:fa:Dc:E4:eB:00", "channel": 57, "bssid_info": "sed", "reg": 32891575, "phy": 46674216 }
    
    Jakob Olsson's avatar
    Jakob Olsson committed
      ]
    }
    ```
    
    #### output
    
    `output`
    
    - is optional
    - type: `object`
    
    ##### output Type
    
    `object` with following properties:
    
    | Property | Type | Required |
    | -------- | ---- | -------- |
    | None     | None | None     |
    
    ### Output Example
    
    ```json
    {}
    ```
    
    ## add_vendor_ie
    
    `add_vendor_ie`
    
    - type: `Method`
    
    ### add_vendor_ie Type
    
    `object` with following properties:
    
    | Property | Type   | Required |
    | -------- | ------ | -------- |
    | `input`  | object | Optional |
    | `output` | object | Optional |
    
    #### input
    
    `input`
    
    - is optional
    - type: `object`
    
    ##### input Type
    
    `object` with following properties:
    
    | Property | Type    | Required     |
    | -------- | ------- | ------------ |
    | `data`   | string  | **Required** |
    | `mgmt`   | integer | **Required** |
    | `oui`    | string  | **Required** |
    
    #### data
    
    ##### Hex String
    
    `data`
    
    - is **required**
    - type: reference
    
    ##### data Type
    
    `string`
    
    All instances must conform to this regular expression (test examples
    [here](https://regexr.com/?expression=%5E%5B0-9a-fA-F%5D%2B)):
    
    ```regex
    ^[0-9a-fA-F]+
    ```
    
    #### mgmt
    
    `mgmt`
    
    - is **required**
    - type: `integer`
    
    ##### mgmt Type
    
    `integer`
    
    #### oui
    
    ##### Three byte oui
    
    `oui`
    
    - is **required**
    - type: reference
    
    ##### oui Type
    
    `string`
    
    - minimum length: 9 characters
    - maximum length: 9 characters All instances must conform to this regular expression (test examples
      [here](<https://regexr.com/?expression=%5E(%5B0-9a-fA-F%5D%5B0-9a-fA-F%5D)%7B3%7D%24>)):
    
    ```regex
    ^([0-9a-fA-F][0-9a-fA-F]){3}$
    ```
    
    ### Ubus CLI Example
    
    ```
    
    ubus call wifi.ap.<name> add_vendor_ie {"mgmt":47091704,"oui":"74C3a11Dc","data":"cC63FfB"}
    
    Jakob Olsson's avatar
    Jakob Olsson committed
    ```
    
    ### JSONRPC Example
    
    ```json
    {
      "jsonrpc": "2.0",
      "id": 0,
      "method": "call",
    
      "params": ["<SID>", "wifi.ap.<name>", "add_vendor_ie", { "mgmt": 47091704, "oui": "74C3a11Dc", "data": "cC63FfB" }]
    
    Jakob Olsson's avatar
    Jakob Olsson committed
    }
    ```
    
    #### output
    
    `output`
    
    - is optional
    - type: `object`
    
    ##### output Type
    
    `object` with following properties:
    
    | Property | Type | Required |
    | -------- | ---- | -------- |
    | None     | None | None     |
    
    ### Output Example
    
    ```json
    {}
    ```
    
    ## assoclist
    
    `assoclist`
    
    - type: `Method`
    
    ### assoclist Type
    
    `object` with following properties:
    
    | Property | Type   | Required |
    | -------- | ------ | -------- |
    | `input`  | object | Optional |
    | `output` | object | Optional |
    
    #### input
    
    `input`
    
    - is optional
    - type: `object`
    
    ##### input Type
    
    `object` with following properties:
    
    | Property | Type | Required |
    | -------- | ---- | -------- |
    | None     | None | None     |
    
    ### Ubus CLI Example
    
    ```
    ubus call wifi.ap.<name> assoclist {}
    ```
    
    ### JSONRPC Example
    
    ```json
    { "jsonrpc": "2.0", "id": 0, "method": "call", "params": ["<SID>", "wifi.ap.<name>", "assoclist", {}] }
    ```
    
    #### output
    
    `output`
    
    - is optional
    - type: `object`
    
    ##### output Type
    
    `object` with following properties:
    
    | Property    | Type  | Required     |
    | ----------- | ----- | ------------ |
    | `assoclist` | array | **Required** |
    
    #### assoclist
    
    `assoclist`
    
    - is **required**
    - type: `object[]`
    
    ##### assoclist Type
    
    Array type: `object[]`
    
    All items must be of the type: `object` with following properties:
    
    | Property  | Type   | Required     |
    | --------- | ------ | ------------ |
    | `macaddr` | string | **Required** |
    | `wdev`    | string | **Required** |
    
    #### macaddr
    
    ##### MAC Address
    
    `macaddr`
    
    - is **required**
    - type: reference
    
    ##### macaddr Type
    
    `string`
    
    - minimum length: 17 characters
    - maximum length: 17 characters All instances must conform to this regular expression (test examples
      [here](<https://regexr.com/?expression=%5E(%5B0-9a-fA-F%5D%5B0-9a-fA-F%5D%3A)%7B5%7D%5B0-9a-fA-F%5D%5B0-9a-fA-F%5D%24>)):
    
    ```regex
    ^([0-9a-fA-F][0-9a-fA-F]:){5}[0-9a-fA-F][0-9a-fA-F]$
    ```
    
    #### wdev
    
    ##### Interface
    
    `wdev`
    
    - is **required**
    - type: reference
    
    ##### wdev Type
    
    `string`
    
    - minimum length: 1 characters
    - maximum length: 16 characters
    
    ### Output Example
    
    ```json
    
    { "assoclist": [{ "wdev": "culpa", "macaddr": "Ee:21:45:20:43:2A" }] }
    
    Jakob Olsson's avatar
    Jakob Olsson committed
    ```
    
    ## del_neighbor
    
    `del_neighbor`
    
    - type: `Method`
    
    ### del_neighbor Type
    
    `object` with following properties:
    
    | Property | Type   | Required |
    | -------- | ------ | -------- |
    | `input`  | object | Optional |
    | `output` | object | Optional |
    
    #### input
    
    `input`
    
    - is optional
    - type: `object`
    
    ##### input Type
    
    `object` with following properties:
    
    | Property | Type   | Required     |
    | -------- | ------ | ------------ |
    | `bssid`  | string | **Required** |
    
    #### bssid
    
    ##### MAC Address
    
    `bssid`
    
    - is **required**
    - type: reference
    
    ##### bssid Type
    
    `string`
    
    - minimum length: 17 characters
    - maximum length: 17 characters All instances must conform to this regular expression (test examples
      [here](<https://regexr.com/?expression=%5E(%5B0-9a-fA-F%5D%5B0-9a-fA-F%5D%3A)%7B5%7D%5B0-9a-fA-F%5D%5B0-9a-fA-F%5D%24>)):
    
    ```regex
    ^([0-9a-fA-F][0-9a-fA-F]:){5}[0-9a-fA-F][0-9a-fA-F]$
    ```
    
    ### Ubus CLI Example
    
    ```
    
    ubus call wifi.ap.<name> del_neighbor {"bssid":"ca:dC:0b:0a:c8:6c"}
    
    Jakob Olsson's avatar
    Jakob Olsson committed
    ```
    
    ### JSONRPC Example
    
    ```json
    {
      "jsonrpc": "2.0",
      "id": 0,
      "method": "call",
    
      "params": ["<SID>", "wifi.ap.<name>", "del_neighbor", { "bssid": "ca:dC:0b:0a:c8:6c" }]
    
    Jakob Olsson's avatar
    Jakob Olsson committed
    }
    ```
    
    #### output
    
    `output`
    
    - is optional
    - type: `object`
    
    ##### output Type
    
    `object` with following properties:
    
    | Property | Type | Required |
    | -------- | ---- | -------- |
    | None     | None | None     |
    
    ### Output Example
    
    ```json
    {}
    ```
    
    ## del_vendor_ie
    
    `del_vendor_ie`
    
    - type: `Method`
    
    ### del_vendor_ie Type
    
    `object` with following properties:
    
    | Property | Type   | Required |
    | -------- | ------ | -------- |
    | `intput` | object | Optional |
    | `output` | object | Optional |
    
    #### intput
    
    `intput`
    
    - is optional
    - type: `object`
    
    ##### intput Type
    
    `object` with following properties:
    
    | Property | Type    | Required     |
    | -------- | ------- | ------------ |
    | `data`   | string  | **Required** |
    | `mgmt`   | integer | **Required** |
    | `oui`    | string  | **Required** |
    
    #### data
    
    ##### Hex String
    
    `data`
    
    - is **required**
    - type: reference
    
    ##### data Type
    
    `string`
    
    All instances must conform to this regular expression (test examples
    [here](https://regexr.com/?expression=%5E%5B0-9a-fA-F%5D%2B)):
    
    ```regex
    ^[0-9a-fA-F]+
    ```
    
    #### mgmt
    
    `mgmt`
    
    - is **required**
    - type: `integer`
    
    ##### mgmt Type
    
    `integer`
    
    #### oui
    
    ##### Three byte oui
    
    `oui`
    
    - is **required**
    - type: reference
    
    ##### oui Type
    
    `string`
    
    - minimum length: 9 characters
    - maximum length: 9 characters All instances must conform to this regular expression (test examples
      [here](<https://regexr.com/?expression=%5E(%5B0-9a-fA-F%5D%5B0-9a-fA-F%5D)%7B3%7D%24>)):
    
    ```regex
    ^([0-9a-fA-F][0-9a-fA-F]){3}$
    ```
    
    #### output
    
    `output`
    
    - is optional
    - type: `object`
    
    ##### output Type
    
    `object` with following properties:
    
    | Property | Type | Required |
    | -------- | ---- | -------- |
    | None     | None | None     |
    
    ### Output Example
    
    ```json
    {}
    ```
    
    ## disconnect
    
    `disconnect`
    
    - type: `Method`
    
    ### disconnect Type
    
    `object` with following properties:
    
    | Property | Type   | Required |
    | -------- | ------ | -------- |
    | `input`  | object | Optional |
    | `output` | object | Optional |
    
    #### input
    
    `input`
    
    - is optional
    - type: `object`
    
    ##### input Type
    
    `object` with following properties:
    
    | Property | Type   | Required     |
    | -------- | ------ | ------------ |
    | `sta`    | string | **Required** |
    
    #### sta
    
    ##### MAC Address
    
    `sta`
    
    - is **required**
    - type: reference
    
    ##### sta Type
    
    `string`
    
    - minimum length: 17 characters
    - maximum length: 17 characters All instances must conform to this regular expression (test examples
      [here](<https://regexr.com/?expression=%5E(%5B0-9a-fA-F%5D%5B0-9a-fA-F%5D%3A)%7B5%7D%5B0-9a-fA-F%5D%5B0-9a-fA-F%5D%24>)):
    
    ```regex
    ^([0-9a-fA-F][0-9a-fA-F]:){5}[0-9a-fA-F][0-9a-fA-F]$
    ```
    
    ### Ubus CLI Example
    
    ```
    
    ubus call wifi.ap.<name> disconnect {"sta":"Ef:5C:15:AF:63:Fb"}
    
    Jakob Olsson's avatar
    Jakob Olsson committed
    ```
    
    ### JSONRPC Example
    
    ```json
    {
      "jsonrpc": "2.0",
      "id": 0,
      "method": "call",
    
      "params": ["<SID>", "wifi.ap.<name>", "disconnect", { "sta": "Ef:5C:15:AF:63:Fb" }]
    
    Jakob Olsson's avatar
    Jakob Olsson committed
    }
    ```
    
    #### output
    
    `output`
    
    - is optional
    - type: `object`
    
    ##### output Type
    
    `object` with following properties:
    
    | Property | Type | Required |
    | -------- | ---- | -------- |
    | None     | None | None     |
    
    ### Output Example
    
    ```json
    {}
    ```
    
    
    ## dump_beacon
    
    `dump_beacon`
    
    - type: `Method`
    
    ### dump_beacon Type
    
    `object` with following properties:
    
    | Property | Type   | Required |
    | -------- | ------ | -------- |
    | `input`  | object | Optional |
    | `output` | object | Optional |
    
    #### input
    
    `input`
    
    - is optional
    - type: `object`
    
    ##### input Type
    
    `object` with following properties:
    
    | Property | Type | Required |
    | -------- | ---- | -------- |
    | None     | None | None     |
    
    ### Ubus CLI Example
    
    ```
    ubus call wifi.ap.<name> dump_beacon {}
    ```
    
    ### JSONRPC Example
    
    ```json
    { "jsonrpc": "2.0", "id": 0, "method": "call", "params": ["<SID>", "wifi.ap.<name>", "dump_beacon", {}] }
    ```
    
    #### output
    
    `output`
    
    - is optional
    - type: `object`
    
    ##### output Type
    
    `object` with following properties:
    
    | Property     | Type  | Required     |
    | ------------ | ----- | ------------ |
    | `beacon-ies` | array | **Required** |
    
    #### beacon-ies
    
    `beacon-ies`
    
    - is **required**
    - type: `string[]`
    
    ##### beacon-ies Type
    
    Array type: `string[]`
    
    All items must be of the type: `string`
    
    All instances must conform to this regular expression (test examples
    [here](https://regexr.com/?expression=%5E%5B0-9a-fA-F%5D%2B%24)):
    
    ```regex
    ^[0-9a-fA-F]+$
    ```
    
    ### Output Example
    
    ```json
    { "beacon-ies": ["dBd", "2BC8d", "74dFac", "8Ee30fE186"] }
    ```
    
    
    Jakob Olsson's avatar
    Jakob Olsson committed
    ## list_neighbor
    
    `list_neighbor`
    
    - type: `Method`
    
    ### list_neighbor Type
    
    `object` with following properties:
    
    | Property | Type   | Required |
    | -------- | ------ | -------- |
    | `input`  | object | Optional |
    | `output` | object | Optional |
    
    #### input
    
    `input`
    
    - is optional
    - type: `object`
    
    ##### input Type
    
    `object` with following properties:
    
    | Property | Type   | Required |
    | -------- | ------ | -------- |
    | `client` | string | Optional |
    | `ssid`   | string | Optional |
    
    #### client
    
    ##### MAC Address
    
    `client`
    
    - is optional
    - type: reference
    
    ##### client Type
    
    `string`
    
    - minimum length: 17 characters
    - maximum length: 17 characters All instances must conform to this regular expression (test examples
      [here](<https://regexr.com/?expression=%5E(%5B0-9a-fA-F%5D%5B0-9a-fA-F%5D%3A)%7B5%7D%5B0-9a-fA-F%5D%5B0-9a-fA-F%5D%24>)):
    
    ```regex
    ^([0-9a-fA-F][0-9a-fA-F]:){5}[0-9a-fA-F][0-9a-fA-F]$
    ```
    
    #### ssid
    
    ##### SSID
    
    `ssid`
    
    - is optional
    - type: reference
    
    ##### ssid Type
    
    `string`
    
    - maximum length: 32 characters
    
    ### Ubus CLI Example
    
    ```
    
    ubus call wifi.ap.<name> list_neighbor {"ssid":"ut","client":"3E:5A:Eb:a2:ED:ab"}
    
    Jakob Olsson's avatar
    Jakob Olsson committed
    ```
    
    ### JSONRPC Example
    
    ```json
    {
      "jsonrpc": "2.0",
      "id": 0,
      "method": "call",
    
      "params": ["<SID>", "wifi.ap.<name>", "list_neighbor", { "ssid": "ut", "client": "3E:5A:Eb:a2:ED:ab" }]
    
    Jakob Olsson's avatar
    Jakob Olsson committed
    }
    ```
    
    #### output
    
    `output`
    
    - is optional
    - type: `object`
    
    ##### output Type
    
    `object` with following properties:
    
    | Property | Type | Required |
    | -------- | ---- | -------- |
    | None     | None | None     |
    
    ### Output Example
    
    ```json
    
    Jakob Olsson's avatar
    Jakob Olsson committed
    
    - type: `Method`
    
    
    ### monitor_add Type
    
    `object` with following properties:
    
    | Property | Type   | Required |
    | -------- | ------ | -------- |
    | `intput` | object | Optional |
    | `output` | object | Optional |
    
    #### intput
    
    `intput`
    
    - is optional
    - type: `object`
    
    ##### intput Type
    
    `object` with following properties:
    
    | Property | Type    | Required     |
    | -------- | ------- | ------------ |
    | `get`    | integer | Optional     |
    | `sta`    | string  | **Required** |
    
    #### get
    
    `get`
    
    - is optional
    - type: `integer`
    
    ##### get Type
    
    `integer`
    
    #### sta
    
    ##### MAC Address
    
    `sta`
    
    - is **required**
    - type: reference
    
    ##### sta Type
    
    `string`
    
    - minimum length: 17 characters
    - maximum length: 17 characters All instances must conform to this regular expression (test examples
      [here](<https://regexr.com/?expression=%5E(%5B0-9a-fA-F%5D%5B0-9a-fA-F%5D%3A)%7B5%7D%5B0-9a-fA-F%5D%5B0-9a-fA-F%5D%24>)):
    
    ```regex
    ^([0-9a-fA-F][0-9a-fA-F]:){5}[0-9a-fA-F][0-9a-fA-F]$
    ```
    
    #### output
    
    `output`
    
    - is optional
    - type: `object`
    
    ##### output Type
    
    `object` with following properties:
    
    | Property | Type | Required |
    | -------- | ---- | -------- |
    | None     | None | None     |
    
    ### Output Example
    
    ```json
    {}
    ```
    
    ## monitor_del
    
    `monitor_del`
    
    - type: `Method`
    
    ### monitor_del Type
    
    `object` with following properties:
    
    | Property | Type   | Required |
    | -------- | ------ | -------- |
    | `intput` | object | Optional |
    | `output` | object | Optional |