tests: HS20_ICON_REQUEST
Signed-off-by: Jouni Malinen <j@w1.fi>
This commit is contained in:
parent
6d6f3c0926
commit
d2fb8b8675
1 changed files with 17 additions and 0 deletions
|
@ -1814,8 +1814,11 @@ def test_ap_hs20_fetch_osu(dev, apdev):
|
||||||
except:
|
except:
|
||||||
pass
|
pass
|
||||||
try:
|
try:
|
||||||
|
dev[1].scan(freq="2412")
|
||||||
dev[0].request("SET osu_dir " + dir)
|
dev[0].request("SET osu_dir " + dir)
|
||||||
dev[0].request("FETCH_OSU")
|
dev[0].request("FETCH_OSU")
|
||||||
|
if "OK" not in dev[1].request("HS20_ICON_REQUEST " + bssid + " w1fi_logo"):
|
||||||
|
raise Exception("HS20_ICON_REQUEST failed")
|
||||||
icons = 0
|
icons = 0
|
||||||
while True:
|
while True:
|
||||||
ev = dev[0].wait_event(["OSU provider fetch completed",
|
ev = dev[0].wait_event(["OSU provider fetch completed",
|
||||||
|
@ -1844,3 +1847,17 @@ def test_ap_hs20_fetch_osu(dev, apdev):
|
||||||
|
|
||||||
if icons != 2:
|
if icons != 2:
|
||||||
raise Exception("Unexpected number of icons fetched")
|
raise Exception("Unexpected number of icons fetched")
|
||||||
|
|
||||||
|
ev = dev[1].wait_event(["GAS-QUERY-START"], timeout=5)
|
||||||
|
if ev is None:
|
||||||
|
raise Exception("Timeout on GAS-QUERY-DONE")
|
||||||
|
ev = dev[1].wait_event(["GAS-QUERY-DONE"], timeout=5)
|
||||||
|
if ev is None:
|
||||||
|
raise Exception("Timeout on GAS-QUERY-DONE")
|
||||||
|
if "freq=2412 status_code=0 result=SUCCESS" not in ev:
|
||||||
|
raise Exception("Unexpected GAS-QUERY-DONE: " + ev)
|
||||||
|
ev = dev[1].wait_event(["RX-HS20-ANQP"], timeout=15)
|
||||||
|
if ev is None:
|
||||||
|
raise Exception("Timeout on icon fetch")
|
||||||
|
if "Icon Binary File" not in ev:
|
||||||
|
raise Exception("Unexpected ANQP element")
|
||||||
|
|
Loading…
Reference in a new issue