本文整理汇总了Python中test_p2p_grpform.remove_group函数的典型用法代码示例。如果您正苦于以下问题:Python remove_group函数的具体用法?Python remove_group怎么用?Python remove_group使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了remove_group函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Python代码示例。
示例1: test_p2ps_connect_p2ps_method_nonautoaccept
def test_p2ps_connect_p2ps_method_nonautoaccept(dev):
"""P2PS connect for non-auto-accept and P2PS config method"""
addr0 = dev[0].p2p_dev_addr()
addr1 = dev[1].p2p_dev_addr()
p2ps_advertise(r_dev=dev[0], r_role='0', svc_name='org.wi-fi.wfds.send.rx',
srv_info='I can receive files upto size 2 GB')
ev_list = p2ps_nonexact_seek(i_dev=dev[1], r_dev=dev[0],
svc_name='org.wi-fi.wfds.send*',
srv_info='2 GB')
adv_id = ev_list[0].split(" ")[0]
if "OK" not in dev[1].global_request("P2P_ASP_PROVISION " + addr0 + " adv_id=" + str(adv_id) + " adv_mac=" + addr0 + " session=1 session_mac=" + addr1 + " info='' method=1000"):
raise Exception("Failed to request provisioning on seeker")
ev0 = dev[0].wait_global_event(["P2PS-PROV-START"], timeout=10)
if ev0 is None:
raise Exception("P2PS-PROV-START timeout on advertiser side")
ev1 = dev[1].wait_global_event(["P2P-PROV-DISC-FAILURE"], timeout=15)
if ev1 is None:
raise Exception("Provisioning deferred timeout on seeker side")
dev[1].p2p_listen()
if "OK" not in dev[0].global_request("P2P_ASP_PROVISION_RESP " + addr1 + " adv_id=" + str(adv_id) + " adv_mac=" + addr0 + " session=1 session_mac=" + addr1 + " status=12"):
raise Exception("Failed to send deferred acceptance from advertizer")
ev1 = dev[1].wait_global_event(["P2PS-PROV-DONE"], timeout=15)
if ev1 is None:
raise Exception("Failed to receive deferred acceptance at seeker")
p2p_connect_p2ps_method(i_dev=dev[1], r_dev=dev[0], autoaccept=False)
ev0 = dev[0].global_request("P2P_SERVICE_DEL asp " + str(adv_id))
if ev0 is None:
raise Exception("Unable to remove the advertisement instance")
remove_group(dev[0], dev[1])
开发者ID:Hansenq,项目名称:wifi-goes-to-town,代码行数:30,代码来源:test_p2ps.py
示例2: test_connect_cmd_concurrent_grpform_while_connecting
def test_connect_cmd_concurrent_grpform_while_connecting(dev, apdev):
"""Concurrent P2P group formation while connecting to an AP using cfg80211 connect command"""
logger.info("Start connection to an infrastructure AP")
hapd = hostapd.add_ap(apdev[0]['ifname'], { "ssid": "test-open" })
wpas = WpaSupplicant(global_iface='/tmp/wpas-wlan5')
wpas.interface_add("wlan5", drv_params="force_connect_cmd=1")
wpas.connect("test-open", key_mgmt="NONE", wait_connect=False)
wpas.dump_monitor()
logger.info("Form a P2P group while connecting to an AP")
wpas.request("SET p2p_no_group_iface 0")
[i_res, r_res] = go_neg_pin_authorized(i_dev=dev[0], i_freq=2412,
r_dev=wpas, r_freq=2412)
check_grpform_results(i_res, r_res)
remove_group(dev[0], wpas)
wpas.dump_monitor()
logger.info("Confirm AP connection after P2P group removal")
hwsim_utils.test_connectivity(wpas, hapd)
wpas.request("DISCONNECT")
wpas.wait_disconnected()
wpas.dump_monitor()
开发者ID:PavanKulk,项目名称:codebase,代码行数:25,代码来源:test_connect_cmd.py
示例3: test_p2ps_connect_display_method_nonautoaccept
def test_p2ps_connect_display_method_nonautoaccept(dev):
"""P2PS connection with non-auto-accept and seeker having display method"""
addr0 = dev[0].p2p_dev_addr()
addr1 = dev[1].p2p_dev_addr()
p2ps_advertise(r_dev=dev[0], r_role='0', svc_name='org.wi-fi.wfds.send.rx',
srv_info='I can receive files upto size 2 GB')
ev_list = p2ps_nonexact_seek(i_dev=dev[1], r_dev=dev[0],
svc_name='org.wi-fi.wfds*', srv_info='2 GB')
adv_id = ev_list[0].split(" ")[0]
if "OK" not in dev[1].global_request("P2P_ASP_PROVISION " + addr0 + " adv_id=" + str(adv_id) + " adv_mac=" + addr0 + " session=1 session_mac=" + addr1 + " info='' method=100"): # keypad method on seeker side
raise Exception("Failed to request provisioning on seeker")
pin = p2ps_provision_display_method(i_dev=dev[1], r_dev=dev[0],
autoaccept=False,
initiator_or_responder='initiator')
dev[1].p2p_listen()
if "OK" not in dev[0].global_request("P2P_ASP_PROVISION_RESP " + addr1 + " adv_id=" + str(adv_id) + " adv_mac=" + addr0 + " session=1 session_mac=" + addr1 + " status=12"):
raise Exception("Failed to send deferred acceptance from advertiser")
p2ps_provision_keypad_method(i_dev=dev[1], r_dev=dev[0], autoaccept=False,
initiator_or_responder='responder')
p2ps_connect_pin(pin, i_dev=dev[0], r_dev=dev[1], initiator_method="keypad")
ev0 = dev[0].global_request("P2P_SERVICE_DEL asp " + str(adv_id))
if ev0 is None:
raise Exception("Unable to remove the advertisement instance")
remove_group(dev[0], dev[1])
开发者ID:Hansenq,项目名称:wifi-goes-to-town,代码行数:26,代码来源:test_p2ps.py
示例4: test_p2p_device_grpform
def test_p2p_device_grpform(dev, apdev):
"""P2P group formation with driver using cfg80211 P2P Device"""
with HWSimRadio(use_p2p_device=True) as (radio, iface):
wpas = WpaSupplicant(global_iface='/tmp/wpas-wlan5')
wpas.interface_add(iface)
[i_res, r_res] = go_neg_pin_authorized(i_dev=dev[0], i_intent=15,
r_dev=wpas, r_intent=0)
check_grpform_results(i_res, r_res)
wpas.dump_monitor()
remove_group(dev[0], wpas)
wpas.dump_monitor()
res = wpas.global_request("IFNAME=p2p-dev-" + iface + " STATUS-DRIVER")
lines = res.splitlines()
found = False
for l in lines:
try:
[name,value] = l.split('=', 1)
if name == "wdev_id":
found = True
break
except ValueError:
pass
if not found:
raise Exception("wdev_id not found")
开发者ID:PavanKulk,项目名称:codebase,代码行数:25,代码来源:test_p2p_device.py
示例5: test_p2p_device_grpform2
def test_p2p_device_grpform2(dev, apdev):
"""P2P group formation with driver using cfg80211 P2P Device (reverse)"""
wpas = WpaSupplicant(global_iface='/tmp/wpas-wlan5')
wpas.interface_add("wlan5")
[i_res, r_res] = go_neg_pin_authorized(i_dev=wpas, i_intent=15,
r_dev=dev[0], r_intent=0)
check_grpform_results(i_res, r_res)
remove_group(wpas, dev[0])
开发者ID:AlejandroAbad,项目名称:hostap,代码行数:8,代码来源:test_p2p_device.py
示例6: test_p2ps_go_probe
def test_p2ps_go_probe(dev):
"""P2PS GO discoverability on operating channel"""
p2ps_connect_adv_go_pin_method(dev, keep_group=True)
[adv_id, rcvd_svc_name] = p2ps_exact_seek(i_dev=dev[2], r_dev=dev[0],
svc_name='org.wi-fi.wfds.send.rx',
single_peer_expected=False)
dev[0].global_request("P2P_SERVICE_DEL asp " + str(adv_id))
remove_group(dev[0], dev[1])
开发者ID:cococorp,项目名称:hostap,代码行数:8,代码来源:test_p2ps.py
示例7: test_offchannel_tx_roc_grpform2
def test_offchannel_tx_roc_grpform2(dev, apdev):
"""P2P group formation(2) using cfg80211 remain-on-channel for offchannel TX"""
wpas = WpaSupplicant(global_iface='/tmp/wpas-wlan5')
wpas.interface_add("wlan5", drv_params="no_offchannel_tx=1")
[i_res, r_res] = go_neg_pin_authorized(i_dev=wpas, i_freq=2412,
r_dev=dev[0], r_freq=2412)
check_grpform_results(i_res, r_res)
remove_group(dev[0], wpas)
开发者ID:Hansenq,项目名称:wifi-goes-to-town,代码行数:9,代码来源:test_offchannel_tx.py
示例8: test_p2p_device_grpform
def test_p2p_device_grpform(dev, apdev):
"""P2P group formation with driver using cfg80211 P2P Device"""
with HWSimRadio(use_p2p_device=True) as (radio, iface):
wpas = WpaSupplicant(global_iface='/tmp/wpas-wlan5')
wpas.interface_add(iface)
[i_res, r_res] = go_neg_pin_authorized(i_dev=dev[0], i_intent=15,
r_dev=wpas, r_intent=0)
check_grpform_results(i_res, r_res)
remove_group(dev[0], wpas)
开发者ID:aelarabawy,项目名称:hostap,代码行数:9,代码来源:test_p2p_device.py
示例9: test_p2ps_connect_adv_go_persistent
def test_p2ps_connect_adv_go_persistent(dev):
"""P2PS auto-accept connection with advertisement as GO and having persistent group"""
addr0 = dev[0].p2p_dev_addr()
addr1 = dev[1].p2p_dev_addr()
go_neg_pin_authorized_persistent(i_dev=dev[0], i_intent=15,
r_dev=dev[1], r_intent=0)
dev[0].remove_group()
dev[1].wait_go_ending_session()
p2ps_advertise(r_dev=dev[0], r_role='4', svc_name='org.wi-fi.wfds.send.rx',
srv_info='I can receive files upto size 2 GB')
[adv_id, rcvd_svc_name] = p2ps_exact_seek(i_dev=dev[1], r_dev=dev[0],
svc_name='org.wi-fi.wfds.send.rx',
srv_info='2 GB')
if "OK" not in dev[1].global_request("P2P_ASP_PROVISION " + addr0 + " adv_id=" + str(adv_id) + " adv_mac=" + addr0 + " session=1 session_mac=" + addr1 + " info='' method=1000"):
raise Exception("Failed to request provisioning on seeker")
ev0 = dev[0].wait_global_event(["P2PS-PROV-DONE"], timeout=10)
if ev0 is None:
raise Exception("Timed out while waiting for prov done on advertizer")
if "persist=" not in ev0:
raise Exception("Advertiser did not indicate persistent group")
id0 = ev0.split("persist=")[1].split(" ")[0]
if "OK" not in dev[0].global_request("P2P_GROUP_ADD persistent=" + id0 + " freq=2412"):
raise Exception("Could not re-start persistent group")
ev0 = dev[0].wait_global_event(["P2P-GROUP-STARTED"], timeout=10)
if ev0 is None:
raise Exception("P2P-GROUP-STARTED timeout on advertiser side")
dev[0].group_form_result(ev0)
ev1 = dev[1].wait_global_event(["P2PS-PROV-DONE"], timeout=10)
if ev1 is None:
raise Exception("P2PS-PROV-DONE timeout on seeker side")
if "persist=" not in ev1:
raise Exception("Seeker did not indicate persistent group")
id1 = ev1.split("persist=")[1].split(" ")[0]
if "OK" not in dev[1].global_request("P2P_GROUP_ADD persistent=" + id1 + " freq=2412"):
raise Exception("Could not re-start persistent group")
ev1 = dev[1].wait_global_event(["P2P-GROUP-STARTED"], timeout=15)
if ev1 is None:
raise Exception("P2P-GROUP-STARTED timeout on seeker side")
dev[1].group_form_result(ev1)
ev0 = dev[0].wait_global_event(["AP-STA-CONNECTED"], timeout=15)
if ev0 is None:
raise Exception("AP-STA-CONNECTED timeout on advertiser side")
ev0 = dev[0].global_request("P2P_SERVICE_DEL asp " + str(adv_id))
if ev0 is None:
raise Exception("Unable to remove the advertisement instance")
remove_group(dev[0], dev[1])
开发者ID:NS-K,项目名称:hostapd,代码行数:54,代码来源:test_p2ps.py
示例10: test_p2ps_connect_adv_client_pin_method
def test_p2ps_connect_adv_client_pin_method(dev):
"""P2PS advertiser as client with keypad config method on seeker side and auto-accept"""
addr0 = dev[0].p2p_dev_addr()
addr1 = dev[1].p2p_dev_addr()
dev[0].flush_scan_cache()
p2ps_advertise(r_dev=dev[0], r_role='2', svc_name='org.wi-fi.wfds.send.rx',
srv_info='I can receive files upto size 2 GB')
[adv_id, rcvd_svc_name] = p2ps_exact_seek(i_dev=dev[1], r_dev=dev[0],
svc_name='org.wi-fi.wfds.send.rx',
srv_info='2 GB')
if "OK" not in dev[1].global_request("P2P_ASP_PROVISION " + addr0 + " adv_id=" + str(adv_id) + " adv_mac=" + addr0 + " session=1 session_mac=" + addr1 + " info='' method=8"): # keypad method on seeker side
raise Exception("Failed to request provisioning on seeker")
seek_prov_ev = p2ps_provision_keypad_method(i_dev=dev[1], r_dev=dev[0],
autoaccept=True,
initiator_or_responder='initiator')
adv_prov = dev[0].wait_global_event(["P2PS-PROV-DONE"], timeout=10)
if adv_prov is None:
raise Exception("Prov failed on advertiser")
adv_conncap = adv_prov.split("conncap=")[1].split(" ")[0]
if adv_conncap == "2":
logger.info("Advertiser is Client")
adv_pin_show_event = dev[0].wait_global_event(["P2P-PROV-DISC-SHOW-PIN"],
timeout=5)
if adv_pin_show_event is None:
raise Exception("PIN Display on advertiser side")
pin = adv_pin_show_event.split(" ")[2]
ev1 = dev[1].wait_global_event(["P2P-GROUP-STARTED"], timeout=10)
if ev1 is None:
raise Exception("P2P-GROUP-STARTED timeout on seeker side")
dev[1].group_form_result(ev1)
ev1 = dev[1].group_request("WPS_PIN any " + pin)
if ev1 is None:
raise Exception("Failed to initiate Pin authorization on registrar side")
if "join=" in adv_prov:
if "OK" not in dev[0].global_request("P2P_CONNECT " + addr1 + " " + pin + " display persistent join"):
raise Exception("P2P_CONNECT failed on advertiser side")
ev0 = dev[0].wait_global_event(["P2P-GROUP-STARTED"], timeout=10)
if ev0 is None:
raise Exception("Group formation failed to start on seeker side")
dev[0].group_form_result(ev0)
ev1 = dev[1].wait_global_event(["AP-STA-CONNECTED"], timeout=10)
if ev1 is None:
raise Exception("AP-STA-CONNECTED timeout on advertiser side")
ev0 = dev[0].global_request("P2P_SERVICE_DEL asp " + str(adv_id))
if ev0 is None:
raise Exception("Unable to remove the advertisement instance")
remove_group(dev[0], dev[1])
开发者ID:NS-K,项目名称:hostapd,代码行数:53,代码来源:test_p2ps.py
示例11: test_p2ps_connect_adv_client_p2ps_method
def test_p2ps_connect_adv_client_p2ps_method(dev):
"""P2PS auto-accept connection with advertisement as Client and P2PS method"""
addr0 = dev[0].p2p_dev_addr()
addr1 = dev[1].p2p_dev_addr()
p2ps_advertise(r_dev=dev[0], r_role='2', svc_name='org.wi-fi.wfds.send.rx',
srv_info='I can receive files upto size 2 GB')
[adv_id, rcvd_svc_name] = p2ps_exact_seek(i_dev=dev[1], r_dev=dev[0],
svc_name='org.wi-fi.wfds.send.rx',
srv_info='2 GB')
if "OK" not in dev[1].global_request("P2P_ASP_PROVISION " + addr0 + " adv_id=" + str(adv_id) + " adv_mac=" + addr0 + " session=1 session_mac=" + addr1 + " info='' method=1000"):
raise Exception("Failed to request provisioning on seeker")
ev0 = dev[0].wait_global_event(["P2PS-PROV-DONE"], timeout=10)
if ev0 is None:
raise Exception("P2PS-PROV-DONE timeout on advertiser side")
if "join=" not in ev0:
raise Exception("Advertiser failed to become Client")
adv_conncap = ev0.split("conncap=")[1].split(" ")[0]
if adv_conncap == "2":
logger.info("Advertiser is Client")
ev1 = dev[1].wait_global_event(["P2PS-PROV-DONE"], timeout=5)
if ev1 is None:
raise Exception("Provisioning failed on seeker side")
seeker_conncap = ev1.split("conncap=")[1].split(" ")[0]
ev1 = dev[1].wait_global_event(["P2P-GROUP-STARTED"], timeout=10)
if ev1 is None:
raise Exception("P2P-GROUP-STARTED timeout on seeker side")
dev[1].group_form_result(ev1)
if "join=" in ev0:
if "OK" not in dev[0].global_request("P2P_CONNECT " + addr1 + " 12345670 p2ps persistent join"):
raise Exception("P2P_CONNECT failed on seeker side")
ev0 = dev[0].wait_global_event(["P2P-GROUP-FORMATION-SUCCESS"], timeout=15)
if ev0 is None:
raise Exception("P2P Group Formation failed on advertiser side")
ev0 = dev[0].wait_global_event(["P2P-GROUP-STARTED"], timeout=10)
if ev0 is None:
raise Exception("P2P-GROUP-STARTED timeout on advertiser side")
dev[0].group_form_result(ev0)
ev1 = dev[1].wait_global_event(["AP-STA-CONNECTED"], timeout=5)
if ev1 is None:
raise Exception("Group formation failed")
ev0 = dev[0].global_request("P2P_SERVICE_DEL asp " + str(adv_id))
if ev0 is None:
raise Exception("Unable to remove the advertisement instance")
remove_group(dev[0], dev[1])
开发者ID:NS-K,项目名称:hostapd,代码行数:52,代码来源:test_p2ps.py
示例12: test_p2p_channel_5ghz
def test_p2p_channel_5ghz(dev):
"""P2P group formation with 5 GHz preference"""
try:
set_country("US")
[i_res, r_res] = go_neg_pin_authorized(i_dev=dev[0], i_intent=15,
r_dev=dev[1], r_intent=0,
test_data=False)
check_grpform_results(i_res, r_res)
freq = int(i_res['freq'])
if freq < 5000:
raise Exception("Unexpected channel %d MHz - did not follow 5 GHz preference" % freq)
remove_group(dev[0], dev[1])
finally:
set_country("00")
开发者ID:LiZhaoxing,项目名称:hostapd,代码行数:14,代码来源:test_p2p_channel.py
示例13: p2ps_connect_adv_go_pin_method
def p2ps_connect_adv_go_pin_method(dev, keep_group=False):
p2ps_advertise(r_dev=dev[0], r_role='4', svc_name='org.wi-fi.wfds.send.rx',
srv_info='I can receive files upto size 2 GB')
[adv_id, rcvd_svc_name] = p2ps_exact_seek(i_dev=dev[1], r_dev=dev[0],
svc_name='org.wi-fi.wfds.send.rx',
srv_info='2 GB')
ev1, ev0, pin = p2ps_provision(dev[1], dev[0], adv_id, method="8")
p2ps_connect_pd(dev[0], dev[1], ev0, ev1, pin)
if not keep_group:
ev0 = dev[0].global_request("P2P_SERVICE_DEL asp " + str(adv_id))
if ev0 is None:
raise Exception("Unable to remove the advertisement instance")
remove_group(dev[0], dev[1])
开发者ID:cococorp,项目名称:hostap,代码行数:14,代码来源:test_p2ps.py
示例14: test_p2p_channel_random_social_with_op_class_change
def test_p2p_channel_random_social_with_op_class_change(dev, apdev, params):
"""P2P group formation using random social channel with oper class change needed"""
try:
set_country("US")
logger.info("Start group on 5 GHz")
[i_res, r_res] = go_neg_pin_authorized(i_dev=dev[0], i_intent=15,
r_dev=dev[1], r_intent=0,
test_data=False)
check_grpform_results(i_res, r_res)
freq = int(i_res['freq'])
if freq < 5000:
raise Exception("Unexpected channel %d MHz - did not pick 5 GHz preference" % freq)
remove_group(dev[0], dev[1])
logger.info("Disable 5 GHz and try to re-start group based on 5 GHz preference")
dev[0].request("SET p2p_oper_reg_class 115")
dev[0].request("SET p2p_oper_channel 36")
dev[0].request("P2P_SET disallow_freq 5000-6000")
[i_res, r_res] = go_neg_pin_authorized(i_dev=dev[0], i_intent=15,
r_dev=dev[1], r_intent=0,
test_data=False)
check_grpform_results(i_res, r_res)
freq = int(i_res['freq'])
if freq not in [ 2412, 2437, 2462 ]:
raise Exception("Unexpected channel %d MHz - did not pick random social channel" % freq)
remove_group(dev[0], dev[1])
try:
arg = [ "tshark",
"-r", os.path.join(params['logdir'], "hwsim0.pcapng"),
"-R", "wifi_p2p.public_action.subtype == 0",
"-V" ]
cmd = subprocess.Popen(arg, stdout=subprocess.PIPE,
stderr=open('/dev/null', 'w'))
except Exception, e:
logger.info("Could run run tshark check: " + str(e))
cmd = None
pass
if cmd:
last = None
for l in cmd.stdout.read().splitlines():
if "Operating Channel:" not in l:
continue
last = l
if last is None:
raise Exception("Could not find GO Negotiation Request")
if "Operating Class 81" not in last:
raise Exception("Unexpected operating class: " + last.strip())
开发者ID:LiZhaoxing,项目名称:hostapd,代码行数:49,代码来源:test_p2p_channel.py
示例15: test_p2ps_connect_display_method_autoaccept
def test_p2ps_connect_display_method_autoaccept(dev):
"""P2PS connection with auto-accept and display method on seeker side"""
p2ps_advertise(r_dev=dev[0], r_role='1', svc_name='org.wi-fi.wfds.send.rx',
srv_info='I can receive files upto size 2 GB')
[adv_id, rcvd_svc_name] = p2ps_exact_seek(i_dev=dev[1], r_dev=dev[0],
svc_name='org.wi-fi.wfds.send.rx',
srv_info='2 GB')
ev1, ev0, pin = p2ps_provision(dev[1], dev[0], adv_id, method="100")
p2ps_connect_pd(dev[0], dev[1], ev0, ev1, pin)
ev0 = dev[0].global_request("P2P_SERVICE_DEL asp " + str(adv_id))
if ev0 is None:
raise Exception("Unable to remove the advertisement instance")
remove_group(dev[0], dev[1])
开发者ID:cococorp,项目名称:hostap,代码行数:15,代码来源:test_p2ps.py
示例16: test_concurrent_grpform_while_connecting
def test_concurrent_grpform_while_connecting(dev, apdev):
"""Concurrent P2P group formation while connecting to an AP"""
logger.info("Start connection to an infrastructure AP")
hapd = hostapd.add_ap(apdev[0]["ifname"], {"ssid": "test-open"})
dev[0].connect("test-open", key_mgmt="NONE", wait_connect=False)
logger.info("Form a P2P group while connecting to an AP")
dev[0].request("SET p2p_no_group_iface 0")
[i_res, r_res] = go_neg_pin_authorized(i_dev=dev[0], i_freq=2412, r_dev=dev[1], r_freq=2412)
check_grpform_results(i_res, r_res)
remove_group(dev[0], dev[1])
logger.info("Confirm AP connection after P2P group removal")
hwsim_utils.test_connectivity(dev[0], hapd)
开发者ID:yann-morin-1998,项目名称:hostap,代码行数:15,代码来源:test_p2p_concurrency.py
示例17: test_p2ps_connect_adv_client_p2ps_method
def test_p2ps_connect_adv_client_p2ps_method(dev):
"""P2PS auto-accept connection with advertisement as Client and P2PS method"""
p2ps_advertise(r_dev=dev[0], r_role='2', svc_name='org.wi-fi.wfds.send.rx',
srv_info='I can receive files upto size 2 GB')
[adv_id, rcvd_svc_name] = p2ps_exact_seek(i_dev=dev[1], r_dev=dev[0],
svc_name='org.wi-fi.wfds.send.rx',
srv_info='2 GB')
ev1, ev0 = p2ps_provision(dev[1], dev[0], adv_id)
p2ps_connect_pd(dev[0], dev[1], ev0, ev1)
ev0 = dev[0].global_request("P2P_SERVICE_DEL asp " + str(adv_id))
if ev0 is None:
raise Exception("Unable to remove the advertisement instance")
remove_group(dev[0], dev[1])
开发者ID:cococorp,项目名称:hostap,代码行数:15,代码来源:test_p2ps.py
示例18: test_p2ps_connect_display_method_nonautoaccept
def test_p2ps_connect_display_method_nonautoaccept(dev):
"""P2PS connection with non-auto-accept and seeker having display method"""
p2ps_advertise(r_dev=dev[0], r_role='0', svc_name='org.wi-fi.wfds.send.rx',
srv_info='I can receive files upto size 2 GB')
ev_list = p2ps_nonexact_seek(i_dev=dev[1], r_dev=dev[0],
svc_name='org.wi-fi.wfds*', srv_info='2 GB')
adv_id = ev_list[0].split()[0]
ev1, ev0, pin = p2ps_provision(dev[1], dev[0], adv_id, auto_accept=False, method="100")
p2ps_connect_pd(dev[0], dev[1], ev0, ev1, pin)
ev0 = dev[0].global_request("P2P_SERVICE_DEL asp " + str(adv_id))
if ev0 is None:
raise Exception("Unable to remove the advertisement instance")
remove_group(dev[0], dev[1])
开发者ID:cococorp,项目名称:hostap,代码行数:15,代码来源:test_p2ps.py
示例19: test_p2ps_connect_adv_client_pin_method
def test_p2ps_connect_adv_client_pin_method(dev):
"""P2PS advertiser as client with keypad config method on seeker side and auto-accept"""
dev[0].flush_scan_cache()
p2ps_advertise(r_dev=dev[0], r_role='2', svc_name='org.wi-fi.wfds.send.rx',
srv_info='I can receive files upto size 2 GB')
[adv_id, rcvd_svc_name] = p2ps_exact_seek(i_dev=dev[1], r_dev=dev[0],
svc_name='org.wi-fi.wfds.send.rx',
srv_info='2 GB')
ev1, ev0, pin = p2ps_provision(dev[1], dev[0], adv_id, method="8")
p2ps_connect_pd(dev[0], dev[1], ev0, ev1, pin)
ev0 = dev[0].global_request("P2P_SERVICE_DEL asp " + str(adv_id))
if ev0 is None:
raise Exception("Unable to remove the advertisement instance")
remove_group(dev[0], dev[1])
开发者ID:cococorp,项目名称:hostap,代码行数:16,代码来源:test_p2ps.py
示例20: test_concurrent_grpform_cli
def test_concurrent_grpform_cli(dev, apdev):
"""Concurrent P2P group formation to become P2P Client"""
logger.info("Connect to an infrastructure AP")
hapd = hostapd.add_ap(apdev[0]["ifname"], {"ssid": "test-open"})
dev[0].connect("test-open", key_mgmt="NONE", scan_freq="2412")
hwsim_utils.test_connectivity(dev[0], hapd)
logger.info("Form a P2P group while associated to an AP")
dev[0].request("SET p2p_no_group_iface 0")
[i_res, r_res] = go_neg_pin_authorized(i_dev=dev[0], i_intent=0, r_dev=dev[1], r_intent=15)
check_grpform_results(i_res, r_res)
remove_group(dev[0], dev[1])
logger.info("Confirm AP connection after P2P group removal")
hwsim_utils.test_connectivity(dev[0], hapd)
开发者ID:yann-morin-1998,项目名称:hostap,代码行数:16,代码来源:test_p2p_concurrency.py
注:本文中的test_p2p_grpform.remove_group函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论