SWRU576 January 2021 WL1801MOD , WL1805MOD , WL1807MOD , WL1831MOD , WL1835MOD , WL1837MOD
The commands listed in Table 2-6 indicate how to create a 1:1 P2P group using push button control method. The hardware setup is detailed in Figure 2-2. The commands that needs to be run on each of the EVM are provided under different columns and the comments indicate the action taken by the system.
Step # | EVM #1 | EVM #2 | Comments |
---|---|---|---|
1 | Run: p2p_start.sh | Run: p2p_start.sh | cd /usr/share/wl18xx/ ./p2p_start.sh |
2 | Run: p2p_cli.sh | Run: p2p_cli.sh | ./p2p_cli.sh |
3 | p2p_find | p2p_find | |
4 | p2p_peers | p2p_peers | verify p2p candidates MAC ADDRESS |
5 | p2p_connect EVM#2_MAC_ADDRESS pbc go_intent=7 | go_intent=7 means that there a same chance for both EVMs to become GO go_intent= 15 means that EVM will become GO go_intent= 0 means that EVM will become Client | |
6 | p2p_connect EVM#1_MAC_ADDRESS pbc | ||
7 | Verify connection with Ping traffic | ||
8 | Run: p2p_stop.sh | Run: p2p_stop.sh | ./p2p_stop.sh |
The following is the typical output on the terminal on EVM#1 after step #3:
> p2p_find
OK
<3>CTRL-EVENT-SCAN-STARTED
<3>CTRL-EVENT-SCAN-STARTED
<3>CTRL-EVENT-SCAN-STARTED
> P2P-DEVICE-FOUND 54:4a:16:3a:c6:29 p2p_dev_addr=54:4a:16:3a:c6:29 pri_dev_type=0-00000000-0 name='Sitara' config_methods=0x188 dev_capab=0x25 group_capab=0x0 new=1
<3>P2P-DEVICE-FOUND 54:4a:16:3a:c6:29 p2p_dev_addr=54:4a:16:3a:c6:29 pri_dev_type=0-00000000-0 name='Sitara' config_methods=0x188 dev_capab=0x25 group_capab=0x0 new=1
<3>CTRL-EVENT-SCAN-STARTED
The following is the typical output on the terminal on EVM#2 after step#3:
> p2p_find
OK
<3>CTRL-EVENT-SCAN-STARTED
<3>CTRL-EVENT-SCAN-STARTED
> P2P-DEVICE-FOUND 78:a5:04:26:97:3e p2p_dev_addr=78:a5:04:26:97:3e pri_dev_type=0-00000000-0 name='Sitara' config_methods=0x188 dev_capab=0x25 group_capab=0x0 new=1
<3>P2P-DEVICE-FOUND 78:a5:04:26:97:3e p2p_dev_addr=78:a5:04:26:97:3e pri_dev_type=0-00000000-0 name='Sitara' config_methods=0x188 dev_capab=0x25 group_capab=0x0 new=1
<3>CTRL-EVENT-SCAN-STARTED
<3>CTRL-EVENT-SCAN-STARTED
> p2p_peers
78:a5:04:26:97:3e
The following is the typical output after step #4 p2p_peers on EVM#1 and p2p_connect on EVM#2:
> p2p_peers
54:4a:16:3a:c6:29
> p2p_connect 54:4a:16:3a:c6:29 pbc auth go_intent=7
OK
<3>CTRL-EVENT-SCAN-STARTED
> P2P-FIND-STOPPED
<3>P2P-FIND-STOPPED
> P2P-GO-NEG-SUCCESS role=GO freq=5785 ht40=1 peer_dev=54:4a:16:3a:c6:29 peer_iface=56:4a:16:3a:c6:28 wps_method=PBC
<3>P2P-GO-NEG-SUCCESS role=GO freq=5785 ht40=1 peer_dev=54:4a:16:3a:c6:29 peer_iface=56:4a:16:3a:c6:28 wps_method=PBC
> rfkill: Cannot[ 163.485189] IPv6: ADDRCONF(NETDEV_UP): p2p-wlan0-0: link is not ready
open RFKILL control device
[ 163.696518] wlcore: down
p2p-wlan0-0: interface state UNINITIALIZED->HT_SCAN
Using interface p2p-wlan0-0 with hwaddr 7a:a5:04:26:97:3d and ssid "DIRECT-HS"
[ 163.964447] IPv6: ADDRCONF(NETDEV_CHANGE): p2p-wlan0-0: link becomes ready
p2p-wlan0-0: interface state HT_SCAN->ENABLED
p2p-wlan0-0: AP-ENABLED
p2p-wlan0-0: CTRL-EVENT-CONNECTED - Connection to 7a:a5:04:26:97:3d completed [id=0 id_str=]
p2p-wlan0-0: WPS-PBC-ACTIVE
<3>CTRL-EVENT-SCAN-RESULTS
> p2p-wlan0-0: CTRL-EVENT-EAP-STARTED 56:4a:16:3a:c6:28
p2p-wlan0-0: CTRL-EVENT-EAP-PROPOSED-METHOD vendor=0 method=1
p2p-wlan0-0: CTRL-EVENT-EAP-PROPOSED-METHOD vendor=14122 method=254
p2p-wlan0-0: WPS-REG-SUCCESS 56:4a:16:3a:c6:28 78efc791-3214-54b1-8c7e-5be0d1f274e2
P2P-GROUP-FORMATION-SUCCESS
<3>P2P-GROUP-FORMATION-SUCCESS
<3>P2P-GROUP-STARTED p2p-wlan0-0 GO ssid="DIRECT-HS" freq=5785 passphrase="hf3O0VFN" go_dev_addr=78:a5:04:26:97:3e
> P2P-GROUP-STARTED p2p-wlan0-0 GO ssid="DIRECT-HS" freq=5785 go_dev_addr=78:a5:04:26:97:3e
p2p-wlan0-0: WPS-PBC-DISABLE
p2p-wlan0-0: WPS-SUCCESS
p2p-wlan0-0: CTRL-EVENT-EAP-FAILURE 56:4a:16:3a:c6:28
p2p-wlan0-0: AP-STA-CONNECTED 56:4a:16:3a:c6:28 p2p_dev_addr=54:4a:16:3a:c6:29
AP-STA-CONNECTED 56:4a:16:3a:c6:28 p2p_dev_addr=54:4a:16:3a:c6:29
<3>AP-STA-CONNECTED 56:4a:16:3a:c6:28 p2p_dev_addr=54:4a:16:3a:c6:29
> p2p_connect 78:a5:04:26:97:3e pbc
P2P-FIND-STOPPED
OK
<3>P2P-FIND-STOPPED
> P2P-GO-NEG-SUCCESS role=client freq=5785 ht40=1 peer_dev=78:a5:04:26:97:3e peer_iface=7a:a5:04:26:97:3d wps_method=PBC
<3>P2P-GO-NEG-SUCCESS role=client freq=5785 ht40=1 peer_dev=78:a5:04[ 152.100796] IPv6: ADDRCONF(NETDEV_UP): p2p-wlan0-0: link is not ready
:26:97:3e peer_iface=7a:a5:04:26:97:3d wps_method=PBC
> rfkill: Cannot open RFKILL control device
p2p-wlan0-0: SME: Trying to authenticate with 7a:a5:04:26:97:3d [ 153.031799] p2p-wlan0-0: authenticate with 7a:a5:04:26:97:3d
(SSID='DIRECT-HS' freq=5785 MHz)
[ 153.048411] p2p-wlan0-0: send auth to 7a:a5:04:26:97:3d (try 1/3)
[ 153.106117] p2p-wlan0-0: authenticated
p2p-wlan0-0: Trying to associate with 7a:a5:04:26:97:3d (SSID='D[ 153.112919] p2p-wlan0-0: associate with 7a:a5:04:26:97:3d (try 1/3)
IRECT-HS' freq=5785 MHz)
[ 153.137937] p2p-wlan0-0: RX AssocResp from 7a:a5:04:26:97:3d (capab=0x11 status=0 aid=1)
[ 153.160889] IPv6: ADDRCONF(NETDEV_CHANGE): p2p-wlan0-0: link becomes ready
[ 153.168129] p2p-wlan0-0: associated
p2p-wlan0-0: Associated with 7a:a5:04:26:97:3d
p2p-wlan0-0: CTRL-EVENT-EAP-STARTED EAP authentication started
p2p-wlan0-0: CTRL-EVENT-EAP-PROPOSED-METHOD vendor=14122 method=1
p2p-wlan0-0: CTRL-EVENT-EAP-METHOD EAP vendor 14122 method 1 (WSC) selected
p2p-wlan0-0: WPS-CRED-RECEIVED
p2p-wlan0-0: WPS-SUCCESS
P2P-GROUP-FORMATION-SUCCESS
<3>P2P-GROUP-FORMATION-SUCCESS
> p2p-wlan0-0: CTRL-EVENT-EAP-FAILURE EAP authentication failed[ 153.587483] p2p-wlan0-0: deauthenticating from 7a:a5:04:26:97:3d by local choice (Reason: 3=DEAUTH_LEAVING)
[ 153.641061] cfg80211: Calling CRDA to update world regulatory domain
p2p-wlan0-0: CTRL-EVENT-DISCONNECTED bssid=7a:a5:04:26:97:3d reason=3 locally_generated=1
p2p-wlan0-0: SME: Trying to authenticate with 7a:a5:04:26:97:3d [ 153.662373] p2p-wlan0-0: authenticate with 7a:a5:04:26:97:3d
(SSID='DIRECT-HS' freq=5785 MHz)
[ 153.693043] p2p-wlan0-0: send auth to 7a:a5:04:26:97:3d (try 1/3)
[ 153.886367] p2p-wlan0-0: authenticated
p2p-wlan0-0: Trying to associate with 7a:a5:04:26:97:3d (SSID='D[ 153.890652] cfg80211: World regulatory domain updated:
IRECT-HS' freq=5785 MHz)
[ 153.901788] cfg80211: DFS Master region: unset
[ 153.908091] cfg80211: (start_freq - end_freq @ bandwidth), (max_antenna_gain, max_eirp), (dfs_cac_time)
[ 153.917925] cfg80211: (2402000 KHz - 2472000 KHz @ 40000 KHz), (N/A, 2000 mBm), (N/A)
[ 153.926348] cfg80211: (2457000 KHz - 2482000 KHz @ 40000 KHz), (N/A, 2000 mBm), (N/A)
[ 153.934436] cfg80211: (2474000 KHz - 2494000 KHz @ 20000 KHz), (N/A, 2000 mBm), (N/A)
[ 153.942746] cfg80211: (5170000 KHz - 5250000 KHz @ 80000 KHz, 160000 KHz AUTO), (N/A, 2000 mBm), (N/A)
[ 153.953124] cfg80211: (5250000 KHz - 5330000 KHz @ 80000 KHz, 160000 KHz AUTO), (N/A, 2000 mBm), (0 s)
[ 153.962716] cfg80211: (5490000 KHz - 5730000 KHz @ 160000 KHz), (N/A, 2000 mBm), (0 s)
[ 153.970848] cfg80211: (5735000 KHz - 5835000 KHz @ 80000 KHz), (N/A, 2000 mBm), (N/A)
[ 153.979253] cfg80211: (57240000 KHz - 63720000 KHz @ 2160000 KHz), (N/A, 0 mBm), (N/A)
[ 153.987494] cfg80211: Calling CRDA for country: US
p2p-wlan0-0: CTRL-EVENT-REGDOM-CHANGE init=CORE type=WORLD[ 154.002636] p2p-wlan0-0: associate with 7a:a5:04:26:97:3d (try 1/3)
[ 154.122766] cfg80211: Regulatory domain changed to country: US
[ 154.129005] p2p-wlan0-0: RX AssocResp from 7a:a5:04:26:97:3d (capab=0x11 status=0 aid=1)
[ 154.137984] cfg80211: DFS Master region: FCC
[ 154.142205] cfg80211: (start_freq - end_freq @ bandwidth), (max_antenna_gain, max_eirp), (dfs_cac_time)
[ 154.153611] cfg80211: (2402000 KHz - 2472000 KHz @ 40000 KHz), (N/A, 3000 mBm), (N/A)
[ 154.161787] cfg80211: (5170000 KHz - 5250000 KHz @ 80000 KHz, 160000 KHz AUTO), (N/A, 1700 mBm), (N/A)
[ 154.172011] cfg80211: (5250000 KHz - 5330000 KHz @ 80000 KHz, 160000 KHz AUTO), (N/A, 2300 mBm), (0 s)
[ 154.181774] cfg80211: (5735000 KHz - 5835000 KHz @ 80000 KHz), (N/A, 3000 mBm), (N/A)
[ 154.191168] cfg80211: (57240000 KHz - 63720000 KHz @ 2160000 KHz), (N/A, 4000 mBm), (N/A)
p2p-wlan0-0: CTRL-EVENT-REGDOM-CHANGE init=USER type=COUNTRY alpha2=US
[ 154.212782] p2p-wlan0-0: associated
p2p-wlan0-0: Associated with 7a:a5:04:26:97:3d
p2p-wlan0-0: WPA: Key negotiation completed with 7a:a5:04:26:97:[ 154.291945] wlcore: Association completed.
3d [PTK=CCMP GTK=CCMP]
p2p-wlan0-0: CTRL-EVENT-CONNECTED - Connection to 7a:a5:04:26:97:3d completed [id=0 id_str=]
<3>P2P-GROUP-STARTED p2p-wlan0-0 client ssid="DIRECT-HS" freq=5785 psk=08dd88ac41f0a0d4321fd33de19e35d7a54fb827e8a5359193d8487880e15704 go_dev_addr=78:a5:04:26:97:3e
> P2P-GROUP-STARTED p2p-wlan0-0 client ssid="DIRECT-HS" freq=5785 go_dev_addr=78:a5:04:26:97:3e
Exit the wpa supplicant CLI by hitting "q" on both EVMs.
> q
Assign IP address to the P2P interface on both teh EVMs as shown below:
root@am437x-evm:/usr/share/wl18xx# ifconfig p2p-wlan0-0 192.168.3.3
root@am437x-evm:/usr/share/wl18xx# ifconfig -a p2p-wlan0-0
p2p-wlan0-0 Link encap:Ethernet HWaddr 7A:A5:04:26:97:3D
inet addr:192.168.3.3 Bcast:192.168.3.255 Mask:255.255.255.0
inet6 addr: fe80::78a5:4ff:fe26:973d/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:33 errors:0 dropped:2 overruns:0 frame:0
TX packets:36 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:2919 (2.8 KiB) TX bytes:4457 (4.3 KiB)
root@am335x-evm:/usr/share/wl18xx# ifconfig p2p-wlan0-0 192.168.3.4
root@am335x-evm:/usr/share/wl18xx# ifconfig -a p2p-wlan0-0
p2p-wlan0-0 Link encap:Ethernet HWaddr 56:4A:16:3A:C6:28
inet addr:192.168.3.4 Bcast:192.168.3.255 Mask:255.255.255.0
inet6 addr: fe80::544a:16ff:fe3a:c628/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:26 errors:0 dropped:0 overruns:0 frame:0
TX packets:38 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:3023 (2.9 KiB) TX bytes:4041 (3.9 KiB)
Do a ping test specified in Step#7 to verify connection.
Ping Response on EVM#1 |
Ping Response on EVM#2 |
|
|
To exit p2p test run p2p_stop.sh on both EVM:
p2p_stop response on EVM#1 | p2p_stop response on EVM#2 |
|
|