您的位置:首页 > 其它

Wi-Fi 直连测试过程

2014-10-29 23:01 232 查看
本文转载至: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)
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: