Wi-Fi 直连测试过程

本文转载至:http://blog.xuite.net/free6d1823/blog/70485698-WiFi+Direct+testing+procedure

1. Remove old wpa_supplicant

wpa_cli terminate

2. Install WPA_Supplicant with P2P supported (open debug if needed)

wpa_supplicant -Dnl80211 -iwlan0 -c /etc/wpa_buffalo.conf -B -d -f wpa.txt

3. enter wpa_cli interactive mode to test P2P

wpa_cli

4. Test P2P command

The basics commands: Discovery, connection etc.

CommandDescription
p2p_find [timeout (seconds)] [type <social \ progressive>]Enables discovery – start sending probe request frames
p2p_stop_findStops discovery, or whatever you are doing (listen mode, connection process etc.)
P2p_connect <device address> <PBC \ PIN> [GO_intent=<0-15> \ auth \ join]GO_intent – initiate connection to another device (using entered group intent)
Auth – WPS authorize incoming connection 
Join – connect to an existing GO 
No input – initiate connection using default GO intent
P2p_listen [timeout (seconds)]Enable listen mode
P2p_group_remove <interface>Remove device from group, return to device mode if acting as GO or autonomous GO
P2p_group_addBecome an autonomous GO

Examples:

> p2p_find

<3>P2P-DEVICE-FOUND 12:68:3f:71:c6:5c p2p_dev_addr=12:68:3f:71:c6:5c pri_dev_type=10-0050F204-5 name='Android_4.2' config_methods=0x188 dev_capab=0x20 gro0

 

> p2p_connect 12:68:3f:71:c6:5c pbc GO_intent=7

> p2p_group_add

......

<3>P2P-GROUP-STARTED wlan0 GO ssid="DIRECT-3E" freq=2412 passphrase="nScOEING" go_dev_addr=b0:38:29:02:04:ed

Managing discovered peers: Using the discovered peers list

CommandDescription
P2p_peers [discovered]Shows list of discovered peers (with ‘discovered’ – shows only fully discovered peers)
P2p_peer <address>Show detailed information about discovered peers
P2p_flushFlush p2p_state, and clears the discovered peer list

Examples

> p2p_peer 12:68:3f:71:c6:5c

12:68:3f:71:c6:5c
pri_dev_type=10-0050F204-5
device_name=Android_4.2
manufacturer= 
model_name= 
model_number= 
serial_number=
config_methods=0x0
dev_capab=0x20
group_capab=0x0
level=0
age=69
listen_freq=2412
wps_method=not-ready
interface_addr=00:00:00:00:00:00
member_in_go_dev=00:00:00:00:00:00
member_in_go_iface=00:00:00:00:00:00
go_neg_req_sent=0
go_state=unknown
dialog_token=0
intended_addr=00:00:00:00:00:00
country=XX
oper_freq=0
req_config_methods=0x0
flags=[PROBE_REQ_ONLY]
status=0
wait_count=0
invitation_reqs=0

 


GO WPS authorizations:When devices try to connect to GOUT

CommandDescription
Wps_pbcpushbutton to accept incoming connections
Wps_pin <PIN> <UUID>Enable WPS enrollee PIN


Others

CommandDescription
p2p_prov_disc <address> <method>Request provision discovery
p2p_serv_disc_req <addr> <TLVs>Send service discovery request
p2p_serv_disc_cancel_req <id>Cancel service discovery request
p2p_serv_disc_resp <freq> <addr> <dialog token> <TLVs>Service discovery response
p2p_service_add <bonjour\upnp> <query\version> <response\service>Add a local service
p2p_service_del <bonjour\upnp> <query\version> [service]Remove a local service
p2p_invite <cmd> [address]Send invitation to device
ReconfigureWpa_supplicant will re-read configuration file
PingPing wpa_supplicant (only)
  • 0
    点赞
  • 6
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值