mirror of
https://github.com/kernelkit/infix.git
synced 2026-07-22 01:13:00 +02:00
Wi-Fi: For station add connected BSSID to operational
This commit is contained in:
@@ -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)
|
||||
</code></pre>
|
||||
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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})")
|
||||
|
||||
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user