Art-of-WiFi / UniFi-API-browser

Tool to browse data exposed by Ubiquiti's UniFi Controller API
MIT License
1.09k stars 150 forks source link

Channel Station Information (CSI) extraction #40

Closed bobscyes closed 6 years ago

bobscyes commented 7 years ago

May I get Wifi AP CSI from the UniFi-API-browser? Thank you.

malle-pietje commented 7 years ago

I am not sure whether Channel State Information is actually available anywhere in the UniFi controller. Since it's a metric that is determined per station I would guess it's available in the connected station/client object. Here's a sanitized example of such an object from a 5.5.20 controller:

    {
        "_id": "5954d24d023456b45fdfb813",
        "_is_guest_by_uap": false,
        "_is_guest_by_ugw": false,
        "_is_guest_by_usw": false,
        "_last_seen_by_uap": 1502950845,
        "_last_seen_by_ugw": 1502950688,
        "_last_seen_by_usw": 1502950839,
        "_uptime_by_uap": 30891,
        "_uptime_by_ugw": 63,
        "_uptime_by_usw": 62647,
        "ap_mac": "44:d9:e7:11:33:55",
        "assoc_time": 1502903765,
        "bssid": "56:d9:e7:22:33:44",
        "bytes-r": 1,
        "ccq": 333,
        "channel": 52,
        "essid": "my_wifi",
        "first_seen": 1498731085,
        "gw_mac": "44:d9:e7:00:00:00",
        "hostname": "iPhone-van-Malle-Pietje",
        "idletime": 67,
        "ip": "192.168.0.167",
        "is_guest": false,
        "is_wired": false,
        "last_seen": 1502950845,
        "latest_assoc_time": 1502950625,
        "mac": "bc:a9:20:bb:22:11",
        "network": "LAN",
        "network_id": "558c39fee4b05333332a8bae",
        "noise": -101,
        "oui": "Apple",
        "powersave_enabled": true,
        "qos_policy_applied": true,
        "radio": "na",
        "radio_proto": "ac",
        "roam_count": 1,
        "rssi": 40,
        "rx_bytes": 1384686,
        "rx_bytes-r": 0,
        "rx_packets": 13606,
        "rx_rate": 200000,
        "signal": -61,
        "site_id": "558c39fee4b05888832a8bab",
        "sw_depth": 2,
        "sw_mac": "44:d9:e7:66:77:88",
        "sw_port": 14,
        "tx_bytes": 4383760,
        "tx_bytes-r": 0,
        "tx_packets": 9134,
        "tx_power": 34,
        "tx_rate": 200000,
        "uptime": 47080,
        "user_id": "5954d29999f2e3b45fdfb813",
        "vlan": 0
    }

Closest metric would be CCQ but I have not yet discovered how that is exactly determined.

malle-pietje commented 7 years ago

On an extra note: the upcoming UniFi AC-SHD Access Point which is currently available from the Beta store, has a third dedicated radio which will offer some cool feature to analyse airtime: https://drive.google.com/file/d/0BxwDbmdpRBvlcnd1M3hfV0dLNms/view

More info on the AC-SHD can be found in the Beta section of the forum here: https://community.ubnt.com/t5/UniFi-Wireless-Beta/bd-p/UniFi_Beta