From 21d410ca82cfedc7855991b32251f70dc845679f Mon Sep 17 00:00:00 2001 From: Jouni Malinen Date: Tue, 12 Jul 2016 00:14:42 +0300 Subject: [PATCH] tests: GAS/ANQP and Hotspot 2.0 element protocol testing Signed-off-by: Jouni Malinen --- tests/hwsim/test_gas.py | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/tests/hwsim/test_gas.py b/tests/hwsim/test_gas.py index ca44056d7..327f2f807 100644 --- a/tests/hwsim/test_gas.py +++ b/tests/hwsim/test_gas.py @@ -438,6 +438,28 @@ def test_gas_anqp_icon_binary_proto(dev, apdev): send_gas_resp(hapd, resp) expect_gas_result(dev[0], "SUCCESS") +def test_gas_anqp_hs20_proto(dev, apdev): + """GAS/ANQP and Hotspot 2.0 element protocol testing""" + hapd = start_ap(apdev[0]) + bssid = apdev[0]['bssid'] + + dev[0].scan_for_bss(bssid, freq="2412", force_scan=True) + hapd.set("ext_mgmt_frame_handling", "1") + + tests = [ '00', '0100', '0201', '0300', '0400', '0500', '0600', '0700', + '0800', '0900', '0a00', '0b0000000000' ] + for test in tests: + dev[0].request("HS20_ANQP_GET " + bssid + " 3,4") + query = gas_rx(hapd) + gas = parse_gas(query['payload']) + resp = action_response(query) + data = binascii.unhexlify(test) + data = binascii.unhexlify('506f9a11') + data + data = struct.pack('