diff --git a/doc/wifi.md b/doc/wifi.md index 01fad606..62b9929e 100644 --- a/doc/wifi.md +++ b/doc/wifi.md @@ -304,6 +304,7 @@ in-octets : 148388 out-octets : 24555 mode : station ssid : MyNetwork +bssid : b4:fb:e4:17:b6:a7 signal : -45 dBm (good) rx bitrate : 72.2 Mbps tx bitrate : 86.6 Mbps @@ -319,6 +320,11 @@ In the CLI, signal strength is reported as: excellent, good, fair or bad. For precise signal strength values in dBm, use NETCONF or RESTCONF to access the `signal-strength` leaf in the operational datastore. +When connected, `bssid` shows the MAC address of the access point the +station is associated to. It appears only while connected. When several +access points share one SSID (a roaming network), the `bssid` is what +tells them apart, and it changes as the station roams between them. + ## Passphrase Requirements To ensure your connection is secure and compatible with all network @@ -378,6 +384,7 @@ operational status : up physical address : f0:09:0d:36:5f:86 mode : station ssid : MyHomeNetwork +bssid : b4:fb:e4:17:b6:a7 signal : -52 dBm (good) diff --git a/src/confd/yang/confd/infix-if-wifi.yang b/src/confd/yang/confd/infix-if-wifi.yang index 781745f4..4f037e54 100644 --- a/src/confd/yang/confd/infix-if-wifi.yang +++ b/src/confd/yang/confd/infix-if-wifi.yang @@ -48,6 +48,13 @@ submodule infix-if-wifi { - Security: WPA2/WPA3 with keystore integration - Operational state: Connection status, RSSI, client lists"; + revision 2026-07-01 { + description + "Add station 'bssid' operational leaf: the BSSID the station is + currently associated to, to tell roaming-ESS access points apart."; + reference "internal"; + } + revision 2026-03-06 { description "Adding mesh support and roaming. @@ -239,6 +246,18 @@ submodule infix-if-wifi { /* Operational state */ + leaf bssid { + config false; + type yang:mac-address; + description + "BSSID (MAC address) of the access point the station is + currently associated to. + + Only present while connected. With several access points + sharing one SSID (a roaming ESS), this identifies which one + the station is on."; + } + leaf signal-strength { config false; type int16; diff --git a/src/confd/yang/confd/infix-if-wifi@2025-12-17.yang b/src/confd/yang/confd/infix-if-wifi@2026-07-01.yang similarity index 100% rename from src/confd/yang/confd/infix-if-wifi@2025-12-17.yang rename to src/confd/yang/confd/infix-if-wifi@2026-07-01.yang diff --git a/src/statd/python/cli_pretty/cli_pretty.py b/src/statd/python/cli_pretty/cli_pretty.py index b4c5b34e..0b820fb1 100755 --- a/src/statd/python/cli_pretty/cli_pretty.py +++ b/src/statd/python/cli_pretty/cli_pretty.py @@ -1762,8 +1762,11 @@ class Iface: station = self.wifi.get('station', {}) signal = station.get('signal-strength') ssid = station.get('ssid', "----") + bssid = station.get('bssid') print(f"{'mode':<{19}}: {mode}") print(f"{'ssid':<{19}}: {ssid}") + if bssid is not None: + print(f"{'bssid':<{19}}: {bssid}") if signal is not None: signal_status = signal_to_status(signal) print(f"{'signal':<{19}}: {signal} dBm ({signal_status})") diff --git a/src/statd/python/yanger/ietf_interfaces/wifi.py b/src/statd/python/yanger/ietf_interfaces/wifi.py index e4d80942..5e1dee1d 100644 --- a/src/statd/python/yanger/ietf_interfaces/wifi.py +++ b/src/statd/python/yanger/ietf_interfaces/wifi.py @@ -83,6 +83,8 @@ def wifi_station(ifname): if link.get('connected'): if link.get('ssid'): station_data['ssid'] = link['ssid'] + if link.get('bssid'): + station_data['bssid'] = link['bssid'] if link.get('signal-strength') is not None: station_data['signal-strength'] = link['signal-strength'] if link.get('rx-speed') is not None: