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

Create 1:2 P2P Group - Connect With PIN Code

The following section details the P2P Group creation using a PIN Code method.

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 use wpa_cli prefix to run wpa cli commands (instead of entering wpa_cli utility)
4 p2p_peers p2p_peers verify p2p candidates MAC ADDRESS
5 p2p_connect EVM#2_MAC_ADDRESS pin That command will print EVM#1 PIN-code in the following line to that command
6 p2p_connect EVM#2_MAC_ADDRESS EVM#1_PIN_CODE getting EVM#1_PIN_CODE from previous EVM#1 command
7 Define IP Address Define IP Address EVM#1: ifconfig p2p-wlan0-0 192.168.3.3 EVM#2: ifconfig p2p-wlan0-0 192.168.3.4
8 Verify connection using ping EVM#1: ping 192.168.3.4 EVM#2: ping 192.168.3.3

The following are details of the output from each of the commands listed above. The commands the response for p2p_cli.sh, p2p_find, p2p_peers are same as detailed in the previous sections. Once the EVMs are able to find the peers, the connection is made using a PIN as shown below:

> p2p_peers
54:4a:16:3a:c6:29

EVM#1 defines the EVM#2 MAC Address in the connection commands, and as a response to that command we get the EVM#1 Pin-Code (in the below example it is 04194996) EVM#2 attempt to connect EVM#1 with EVM#1 MAC Address and Pin-Code.

> p2p_connect 78:a5:04:26:97:3e 04194996
OK
> P2P-GO-NEG-SUCCESS role=client freq=5745 ht40=1 peer_dev=78:a5:04:26:97:3e peer_iface=7a:a5:04:26:97:3d wps_method=Keypad
<3>P2P-GO-NEG-SUCCESS role=client freq=5745 ht40=1 peer_dev=78:a5[ 1954.766093] IPv6: ADDRCONF(NETDEV_UP): p2p-wlan0-0: link is not ready
:04:26:97:3e peer_iface=7a:a5:04:26:97:3d wps_method=Keypad
> rfkill: Cannot open RFKILL control device
<3>CTRL-EVENT-SCAN-RESULTS
<3>CTRL-EVENT-SCAN-RESULTS
> p2p-wlan0-0: SME: Trying to authenticate with 7a:a5:04:26:97:3d [ 1955.517183] p2p-wlan0-0: authenticate with 7a:a5:04:26:97:3d
(SSID='DIRECT-Ka' freq=5745 MHz)
[ 1955.534399] p2p-wlan0-0: send auth to 7a:a5:04:26:97:3d (try 1/3)
[ 1955.602583] p2p-wlan0-0: authenticated
p2p-wlan0-0: Trying to associate with 7a:a5:04:26:97:3d (SSID='DIRECT-Ka' freq=5745 MHz)
[ 1955.613139] p2p-wlan0-0: associate with 7a:a5:04:26:97:3d (try 1/3)
[ 1955.643432] p2p-wlan0-0: RX AssocResp from 7a:a5:04:26:97:3d (capab=0x11 status=0 aid=1)
[ 1955.665736] IPv6: ADDRCONF(NETDEV_CHANGE): p2p-wlan0-0: link becomes ready
[ 1955.672755] 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[ 1956.259741] p2p-wlan0-0: deauthenticating from 7a:a5:04:26:97:3d by local choice (Reason: 3=DEAUTH_LEAVING)

[ 1956.314091] 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 [ 1956.338506] p2p-wlan0-0: authenticate with 7a:a5:04:26:97:3d
(SSID='DIRECT-Ka' freq=5745 MHz)
[ 1956.366373] p2p-wlan0-0: send auth to 7a:a5:04:26:97:3d (try 1/3)
[ 1956.523895] p2p-wlan0-0: authenticated
p2p-wlan0-0: Trying to associate with 7a:a5:04:26:97:3d (SSID='D[ 1956.528187] cfg80211: World regulatory domain updated:
IRECT-Ka' freq=5745 MHz)
[ 1956.539313] cfg80211:  DFS Master region: unset
[ 1956.545556] cfg80211:   (start_freq - end_freq @ bandwidth), (max_antenna_gain, max_eirp), (dfs_cac_time)
[ 1956.555800] cfg80211:   (2402000 KHz - 2472000 KHz @ 40000 KHz), (N/A, 2000 mBm), (N/A)
[ 1956.564298] cfg80211:   (2457000 KHz - 2482000 KHz @ 40000 KHz), (N/A, 2000 mBm), (N/A)
[ 1956.572350] cfg80211:   (2474000 KHz - 2494000 KHz @ 20000 KHz), (N/A, 2000 mBm), (N/A)
[ 1956.580685] cfg80211:   (5170000 KHz - 5250000 KHz @ 80000 KHz, 160000 KHz AUTO), (N/A, 2000 mBm), (N/A)
[ 1956.590251] cfg80211:   (5250000 KHz - 5330000 KHz @ 80000 KHz, 160000 KHz AUTO), (N/A, 2000 mBm), (0 s)
[ 1956.600097] cfg80211:   (5490000 KHz - 5730000 KHz @ 160000 KHz), (N/A, 2000 mBm), (0 s)
[ 1956.608334] cfg80211:   (5735000 KHz - 5835000 KHz @ 80000 KHz), (N/A, 2000 mBm), (N/A)
[ 1956.616665] cfg80211:   (57240000 KHz - 63720000 KHz @ 2160000 KHz), (N/A, 0 mBm), (N/A)
[ 1956.624925] cfg80211: Calling CRDA for country: US
p2p-wlan0-0: CTRL-EVENT-REGDOM-CHANGE init=CORE type=WORLD
[ 1956.642652] p2p-wlan0-0: associate with 7a:a5:04:26:97:3d (try 1/3)
[ 1956.667467] p2p-wlan0-0: RX AssocResp from 7a:a5:04:26:97:3d (capab=0x11 status=0 aid=1)
[ 1956.768148] cfg80211: Regulatory domain changed to country: US
[ 1956.774906] cfg80211:  DFS Master region: FCC
[ 1956.779752] cfg80211:   (start_freq - end_freq @ bandwidth), (max_antenna_gain, max_eirp), (dfs_cac_time)
[ 1956.790725] cfg80211:   (2402000 KHz - 2472000 KHz @ 40000 KHz), (N/A, 3000 mBm), (N/A)
[ 1956.800254] cfg80211:   (5170000 KHz - 5250000 KHz @ 80000 KHz, 160000 KHz AUTO), (N/A, 1700 mBm), (N/A)
[ 1956.810834] cfg80211:   (5250000 KHz - 5330000 KHz @ 80000 KHz, 160000 KHz AUTO), (N/A, 2300 mBm), (0 s)
[ 1956.821088] cfg80211:   (5735000 KHz - 5835000 KHz @ 80000 KHz), (N/A, 3000 mBm), (N/A)
[ 1956.830259] 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
[ 1956.847737] 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:[ 1956.867484] 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-Ka" freq=5745 psk=b7e653e4fef3ddc385497ea2df892b3c520c438cc763e91064bc1d92b6fcf37c go_dev_addr=78:a5:04:26:97:3e
> P2P-GROUP-STARTED p2p-wlan0-0 client ssid="DIRECT-Ka" freq=5745 go_dev_addr=78:a5:04:26:97:3e

Typical Response on EVM#1 is given below:

> P2P-GO-NEG-SUCCESS role=GO freq=5745 ht40=1 peer_dev=54:4a:16:3a:c6:29 peer_iface=56:4a:16:3a:c6:28 wps_method=Display
<3>P2P-GO-NEG-SUCCESS role=GO freq=5745 ht40=1 peer_dev=54:4a:16:3a:c6:29 peer_iface=56:4a:16:3a:c6:28 wps_method=Display
> rfkill: Cannot open RFKILL control device
[ 1966.108421] IPv6: ADDRCONF(NETDEV_UP): p2p-wlan0-0: link is not ready
[ 1966.265558] 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-Ka"
[ 1966.524889] 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=]
<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-Ka" freq=5745 passphrase="VRtsc4Nz" go_dev_addr=78:a5:04:26:97:3e
> P2P-GROUP-STARTED p2p-wlan0-0 GO ssid="DIRECT-Ka" freq=5745 go_dev_addr=78:a5:04:26:97:3e
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

At this point both the EVM can exit the CLI interface by hitting "q" on the console.

The next step is to assign IP address statically and verify that they P2P clients can communicate using that IP address. This is verified using a ping sequence.

EVM#1 EVM#2
root@am437x-evm:/usr/share/wl18xx# ifconfig p2p-wlan0-0 192.168.3.3
root@am437x-evm:/usr/share/wl18xx# ifconfig –a p2p-wlan0

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:8 errors:0 dropped:2 overruns:0 frame:0
          TX packets:18 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:1253 (1.2 KiB)  TX bytes:2503 (2.4 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

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:10 errors:0 dropped:0 overruns:0 frame:0
          TX packets:13 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:1511 (1.4 KiB)  TX bytes:1903 (1.8 KiB)

Once the IP address is assigned, you can verify the connection as shown below:

EVM#1 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=1384.869 ms
64 bytes from 192.168.3.4: seq=1 ttl=64 time=383.960 ms
64 bytes from 192.168.3.4: seq=2 ttl=64 time=97.437 ms
64 bytes from 192.168.3.4: seq=3 ttl=64 time=122.172 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=11.911 ms
64 bytes from 192.168.3.3: seq=1 ttl=64 time=1115.697 ms
64 bytes from 192.168.3.3: seq=2 ttl=64 time=115.208 ms
64 bytes from 192.168.3.3: seq=3 ttl=64 time=9.148 ms