mirror of
https://git.kernel.org/pub/scm/network/wireless/iwd.git
synced 2024-12-26 09:32:34 +01:00
auto-t: hostapd.py: add 'bssid' property
This gets the APs BSSID, bypassing the need to use hwsim for obtaining this address.
This commit is contained in:
parent
7321705e90
commit
80123efabd
@ -234,3 +234,13 @@ class HostapdCLI:
|
||||
'''
|
||||
cmd = self.cmdline + ['req_beacon', addr, request]
|
||||
ctx.start_process(cmd, wait=True)
|
||||
|
||||
@property
|
||||
def bssid(self):
|
||||
cmd = self.cmdline + ['status']
|
||||
status = ctx.start_process(cmd, wait=True, need_out=True).out
|
||||
status = status.split('\n')
|
||||
|
||||
bssid = [x for x in status if x.startswith('bssid')]
|
||||
bssid = bssid[0].split('=')
|
||||
return bssid[1]
|
||||
|
Loading…
Reference in New Issue
Block a user