dev[1].p2p_stop_find()
wpas.p2p_stop_find()
+def test_discovery_long_listen2(dev):
+ """Long P2P_LISTEN longer than remain-on-channel time"""
+ with HWSimRadio(use_p2p_device=True) as (radio, iface):
+ wpas = WpaSupplicant(global_iface='/tmp/wpas-wlan5')
+ wpas.interface_add(iface)
+ addr = wpas.p2p_dev_addr()
+ wpas.request("P2P_LISTEN 15")
+
+ # Wait for remain maximum remain-on-channel time to pass
+ time.sleep(7)
+
+ if not dev[0].discover_peer(addr):
+ raise Exception("Device discovery timed out")
+ dev[0].p2p_stop_find()
+ wpas.p2p_stop_find()
+
def pd_test(dev, addr):
if not dev.discover_peer(addr, freq=2412):
raise Exception("Device discovery timed out")