params['hessid'] = bssid
hostapd.add_ap(apdev[0]['ifname'], params)
- dev[0].scan(freq="2412")
+ dev[0].scan_for_bss(bssid, freq="2412", force_scan=True)
req = dev[0].request("GAS_REQUEST " + bssid + " 00 000102000101")
if "FAIL" in req:
raise Exception("GAS query request rejected")
hostapd.add_ap(apdev[0]['ifname'], params)
# get BSS entry available to allow GAS query
- dev[0].scan(freq="2412")
+ dev[0].scan_for_bss(bssid, freq="2412", force_scan=True)
logger.info("Request concurrent operations")
req = dev[0].request("GAS_REQUEST " + bssid + " 00 000102000101")
params['hessid'] = bssid
hostapd.add_ap(apdev[0]['ifname'], params)
- dev[0].scan(freq="2412")
+ dev[0].scan_for_bss(bssid, freq="2412", force_scan=True)
logger.debug("Start concurrent connect and GAS request")
dev[0].connect("test-gas", key_mgmt="WPA-EAP", eap="TTLS",
hapd = start_ap(apdev[0])
hapd.set("gas_frag_limit", "50")
- dev[0].scan(freq="2412")
+ dev[0].scan_for_bss(apdev[0]['bssid'], freq="2412", force_scan=True)
dev[0].request("FETCH_ANQP")
for i in range(0, 13):
ev = dev[0].wait_event(["RX-ANQP", "RX-HS20-ANQP"], timeout=5)
hapd = start_ap(apdev[0])
hapd.set("gas_comeback_delay", "500")
- dev[0].scan(freq="2412")
+ dev[0].scan_for_bss(apdev[0]['bssid'], freq="2412", force_scan=True)
dev[0].request("FETCH_ANQP")
for i in range(0, 6):
ev = dev[0].wait_event(["RX-ANQP"], timeout=5)
hapd = start_ap(apdev[0])
bssid = apdev[0]['bssid']
- dev[0].scan(freq="2412")
- dev[0].request("ANQP_GET " + bssid + " 258,268,hs20:3,hs20:4")
+ dev[0].scan_for_bss(bssid, freq="2412", force_scan=True)
+ if "OK" not in dev[0].request("ANQP_GET " + bssid + " 258,268,hs20:3,hs20:4"):
+ raise Exception("ANQP_GET command failed")
ev = dev[0].wait_event(["GAS-QUERY-START"], timeout=5)
if ev is None:
if ev is None or "WAN Metrics" not in ev:
raise Exception("Did not receive WAN Metrics")
- dev[0].request("HS20_ANQP_GET " + bssid + " 3,4")
+ if "OK" not in dev[0].request("HS20_ANQP_GET " + bssid + " 3,4"):
+ raise Exception("ANQP_GET command failed")
ev = dev[0].wait_event(["RX-HS20-ANQP"], timeout=1)
if ev is None or "Operator Friendly Name" not in ev:
raise Exception("Unexpected GAS status code")
def anqp_get(dev, bssid, id):
- dev.request("ANQP_GET " + bssid + " " + str(id))
+ if "OK" not in dev.request("ANQP_GET " + bssid + " " + str(id)):
+ raise Exception("ANQP_GET command failed")
ev = dev.wait_event(["GAS-QUERY-START"], timeout=5)
if ev is None:
raise Exception("GAS query start timed out")
hapd = start_ap(apdev[0])
bssid = apdev[0]['bssid']
- dev[0].scan(freq="2412")
+ dev[0].scan_for_bss(bssid, freq="2412", force_scan=True)
hapd.set("ext_mgmt_frame_handling", "1")
anqp_get(dev[0], bssid, 263)
hapd = start_ap(apdev[0])
bssid = apdev[0]['bssid']
- dev[0].scan(freq="2412")
+ dev[0].scan_for_bss(bssid, freq="2412", force_scan=True)
hapd.set("ext_mgmt_frame_handling", "1")
anqp_get(dev[0], bssid, 263)
hapd = start_ap(apdev[0])
bssid = apdev[0]['bssid']
- dev[0].scan(freq="2412")
+ dev[0].scan_for_bss(bssid, freq="2412", force_scan=True)
hapd.set("ext_mgmt_frame_handling", "1")
anqp_get(dev[0], bssid, 263)
hapd = start_ap(apdev[0])
bssid = apdev[0]['bssid']
- dev[0].scan(freq="2412")
+ dev[0].scan_for_bss(bssid, freq="2412", force_scan=True)
hapd.set("ext_mgmt_frame_handling", "1")
anqp_get(dev[0], bssid, 263)
hapd = start_ap(apdev[0])
bssid = apdev[0]['bssid']
- dev[0].scan(freq="2412")
+ dev[0].scan_for_bss(bssid, freq="2412", force_scan=True)
hapd.set("ext_mgmt_frame_handling", "1")
logger.debug("Non-zero status code in comeback response")
hapd = start_ap(apdev[0])
bssid = apdev[0]['bssid']
- dev[0].scan(freq="2412")
+ dev[0].scan_for_bss(bssid, freq="2412", force_scan=True)
hapd.set("ext_mgmt_frame_handling", "1")
query, dialog_token = init_gas(hapd, bssid, dev[0])
params['hessid'] = bssid
hostapd.add_ap(apdev[0]['ifname'], params)
- dev[0].scan(freq="2412")
+ dev[0].scan_for_bss(bssid, freq="2412", force_scan=True)
req = dev[0].request("GAS_REQUEST " + bssid + " 42 000102000101")
if "FAIL" in req:
raise Exception("GAS query request rejected")