SWRU576 January   2021 WL1801MOD , WL1805MOD , WL1807MOD , WL1831MOD , WL1835MOD , WL1837MOD

 

  1.   Trademarks
  2. Introduction
    1. 1.1 Acronyms Used in This Document
  3. Peer to Peer (P2P) Mode
    1. 2.1 P2P Device
      1. 2.1.1 Searching Phase
      2. 2.1.2 Negotiation
      3. 2.1.3 Group Formation
    2. 2.2 PSP Client
    3. 2.3 P2P GO
    4. 2.4 P2P Commands
      1. 2.4.1 P2P Commands Detailed Information
        1. 2.4.1.1 p2p_find
        2. 2.4.1.2 p2p_connect
        3. 2.4.1.3 p2p_listen
        4. 2.4.1.4 p2p_group_add
        5. 2.4.1.5 p2p_group_remove
        6. 2.4.1.6 p2p_peer
        7. 2.4.1.7 p2p_invite
      2. 2.4.2 P2P Event Details
    5. 2.5 P2P Use Cases
      1. 2.5.1 P2P Connection in PBC (Push Button Control)
      2. 2.5.2 Create Autonomous 1:2 P2P Group (Push button Control)
        1. 2.5.2.1 Assigning IP Address in P2P Mode Using DHCP Method
        2. 2.5.2.2 Create 1:2 P2P Group - Connect With PIN Code
        3. 2.5.2.3 P2P Invitation Procedure - Create Autonomous 1:2 P2P Group, (Push button Control)
  4. Access Point (AP) and Peer-to-Peer (P2P) Multirole
    1. 3.1 Errata/Limitations
  5. Multi BSSID (mBSSID)
    1. 4.1 Setup and Configuration
    2. 4.2 User Guide and Examples
  6. Access Point (AP) Enhanced Low Power (ELP) Mode
    1. 5.1 Setup and Configuration
    2. 5.2 User Guide and Examples
    3. 5.3 Errata/Limitations
  7. WiLink8 Wake on WLAN (WoWLAN) Feature
    1. 6.1 Mode of Operation
    2. 6.2 Adding "Suspend/Resume" WoW Mode to AM335x EVM
      1. 6.2.1 Patch Description
    3. 6.3 WoWLAN (Wake on WLAN) Mode Enable Procedure
      1. 6.3.1 Commands and Expected Output
      2. 6.3.2 Rx Filter Configuration
        1. 6.3.2.1 Rx Filter Configuration Examples
    4. 6.4 WoWLAN - Magic Packet
    5. 6.5 Block Acknowledgement (BA) Filter Setting
    6. 6.6 Hardware Modification Engineering Change Order (ECO) Request for AM335x EVM
  8. WiLink8 Suspend Resume Mode
    1. 7.1 Suspend Resume Example With AM437x SDK
  9. Access Point (AP) Dynamic Frequency Selection (DFS) Master Support
    1. 8.1 Setup and Configuration
    2. 8.2 User Guide & Examples
    3. 8.3 Errata/Limitations
  10. Station Mode - Alternative Method, With iw Commands, Explained
    1. 9.1 Step 1- Check if the wlan0 Interface is Already Running
    2. 9.2 Step 2- Bringup wlan0 Interface if Not Running
    3. 9.3 Step 3 - Connect Device to Available Acces Point
  11. 10References

P2P Connection in PBC (Push Button Control)

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.

Table 2-6 Commands for Creating P2P in PBC mode
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.

Table 2-7 Ping Response in P2P Mode

Ping Response on EVM#1

Ping Response on EVM#2

root@am437x-evm:/usr/share/wl18xx# ping 192.168.3.4
PING 192.168.3.4 (192.168.3.4): 56 data bytes
64 bytes from 192.168.3.4: seq=0 ttl=64 time=193.529 ms
64 bytes from 192.168.3.4: seq=1 ttl=64 time=1032.839 ms
64 bytes from 192.168.3.4: seq=2 ttl=64 time=32.006 ms
root@am335x-evm:/usr/share/wl18xx# ping 192.168.3.3
PING 192.168.3.3 (192.168.3.3): 56 data bytes
64 bytes from 192.168.3.3: seq=0 ttl=64 time=229.453 ms
64 bytes from 192.168.3.3: seq=1 ttl=64 time=9.430 ms
64 bytes from 192.168.3.3: seq=2 ttl=64 time=10.999 ms

To exit p2p test run p2p_stop.sh on both EVM:

p2p_stop response on EVM#1 p2p_stop response on EVM#2
root@am437x-evm:/usr/share/wl18xx# ./p2p_stop.sh
P2P-GROUP-REMOVED p2p-wlan0-0 GO reason=REQUESTED
p2p-wlan0-0: interface state ENABLED->DISABLED
p2p-wlan0-0: AP-STA-DISCONNECTED 56:4a:16:3a:c6:28 p2p_dev_addr=54:4a:16:3a:c6:29
AP-STA-DISCONNECTED 56:4a:16:3a:c6:28 p2p_dev_addr=54:4a:16:3a:c6:29
p2p-wlan0-0: AP-DISABLED
p2p-wlan0-0: CTRL-EVENT-DISCONNECTED bssid=7a:a5:04:26:97:3d reason=3 locally_generated=1
nl80211: deinit ifname=p2p-wlan0-0 disabled_11b_rates=1
[ 1135.058889] wlcore: down
P2P-DEVICE-LOST p2p_dev_addr=54:4a:16:3a:c6:29
nl80211: deinit ifname=p2p-dev-wlan0 disabled_11b_rates=0
OK
root@am437x-evm:/usr/share/wl18xx# [ 1135.173022] wlcore: down
p2p-dev-wlan0: CTRL-EVENT-TERMINATING
nl80211: deinit ifname=wlan0 disabled_11b_rates=0
wlan0: CTRL-EVENT-TERMINATING
root@am335x-evm:/usr/share/wl18xx# ./p2p_stop.shnl80211: deinit ifname=p2p-dev-wlan0 disabled_11b_rates=0OK[ 1169.243405] wlcore: downroot@am335x-evm:/usr/share/wl18xx# p2p-dev-wlan0: CTRL-EVENT-TERMINATINGnl80211: deinit ifname=wlan0 disabled_11b_rates=0wlan0: CTRL-EVENT-TERMINATING