tests: sigma_dut AP configuration for Hotspot 2.0
Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
This commit is contained in:
parent
ab3ab50757
commit
e7869a664a
1 changed files with 28 additions and 0 deletions
|
@ -2591,3 +2591,31 @@ def run_sigma_dut_hs20_assoc_2(dev, apdev, band, expect_bssid):
|
||||||
|
|
||||||
if "BSSID," + expect_bssid not in res:
|
if "BSSID," + expect_bssid not in res:
|
||||||
raise Exception("Unexpected BSSID: " + res)
|
raise Exception("Unexpected BSSID: " + res)
|
||||||
|
|
||||||
|
def test_sigma_dut_ap_hs20(dev, apdev, params):
|
||||||
|
"""sigma_dut controlled AP with Hotspot 2.0 parameters"""
|
||||||
|
logdir = os.path.join(params['logdir'],
|
||||||
|
"sigma_dut_ap_hs20.sigma-hostapd")
|
||||||
|
with HWSimRadio() as (radio, iface):
|
||||||
|
sigma = start_sigma_dut(iface, hostapd_logdir=logdir, debug=True)
|
||||||
|
try:
|
||||||
|
sigma_dut_cmd_check("ap_reset_default,NAME,AP,program,HS2-R3")
|
||||||
|
sigma_dut_cmd_check("ap_set_wireless,NAME,AP,WLAN_TAG,1,CHANNEL,1,SSID,test-hs20,MODE,11ng")
|
||||||
|
sigma_dut_cmd_check("ap_set_radius,NAME,AP,WLAN_TAG,1,IPADDR,127.0.0.1,PORT,1812,PASSWORD,radius")
|
||||||
|
sigma_dut_cmd_check("ap_set_security,NAME,AP,WLAN_TAG,1,KEYMGNT,WPA2-ENT")
|
||||||
|
sigma_dut_cmd_check("ap_set_hs2,NAME,AP,WLAN_TAG,1,HESSID,02:12:34:56:78:9a,NAI_REALM_LIST,1,OPER_NAME,1")
|
||||||
|
sigma_dut_cmd_check("ap_set_hs2,NAME,AP,WLAN_TAG,1,OSU_SERVER_URI,https://example.com/ https://example.org/,OSU_SSID,test-osu,OSU_METHOD,SOAP,OSU_PROVIDER_LIST,10,OSU_PROVIDER_NAI_LIST,4")
|
||||||
|
sigma_dut_cmd_check("ap_set_hs2,NAME,AP,WLAN_TAG,1,NET_AUTH_TYPE,2")
|
||||||
|
sigma_dut_cmd_check("ap_set_hs2,NAME,AP,WLAN_TAG,1,VENUE_NAME,1")
|
||||||
|
sigma_dut_cmd_check("ap_set_hs2,NAME,AP,WLAN_TAG,1,DOMAIN_LIST,example.com")
|
||||||
|
sigma_dut_cmd_check("ap_set_hs2,NAME,AP,WLAN_TAG,1,OPERATOR_ICON_METADATA,1")
|
||||||
|
sigma_dut_cmd_check("ap_set_wireless,NAME,AP,WLAN_TAG,2,CHANNEL,1,SSID,test-osu,MODE,11ng")
|
||||||
|
sigma_dut_cmd_check("ap_set_security,NAME,AP,WLAN_TAG,2,KEYMGNT,NONE")
|
||||||
|
sigma_dut_cmd_check("ap_config_commit,NAME,AP")
|
||||||
|
|
||||||
|
with open("/tmp/sigma_dut-ap.conf", "r") as f:
|
||||||
|
logger.debug("hostapd.conf from sigma_dut:\n" + f.read())
|
||||||
|
|
||||||
|
sigma_dut_cmd_check("ap_reset_default")
|
||||||
|
finally:
|
||||||
|
stop_sigma_dut(sigma)
|
||||||
|
|
Loading…
Reference in a new issue