Please note as of Wednesday, August 15th, 2018 this wiki has been set to read only. If you are a TI Employee and require Edit ability please contact x0211426 from the company directory.

CC3200 P2P Application

From Texas Instruments Wiki
Jump to: navigation, search
Cc31xx cc32xx return home.png
Cc32xx return sample apps.png

Overview

This sample example demostrates how CC3200 connects to a P2P device. The application starts a TCP server on port 5001 and waits for P2P device to connect and send data on it.

Different supported P2P roles of CC3200 are:

  • SL_P2P_ROLE_GROUP_OWNER: CC3200 will be configured in 'Group-Owner' mode
  • SL_P2P_ROLE_CLIENT: CC3200 will be configured in 'Client' mode
  • SL_P2P_ROLE_NEGOTIATE: CC3200 will negotiate with remote device for client/GO role.

CC3200 can be configure in below modes to initiate negotiation:

  • SL_P2P_NEG_INITIATOR_ACTIVE: CC3200 will perform discovery - Once the remote device is found, it sends the negotiation request immediately
  • SL_P2P_NEG_INITIATOR_PASSIVE: CC3200 will perform discovery - Once the remote device is found, CC3200 waits for it to start negotiation
  • SL_P2P_NEG_INITIATOR_RAND_BACKOFF: CC3200 will perform discovery - Once the remote device is found, it triggers a random timer (1-7 seconds) and waits for the remote device to negotiate. On timer expiry, CC3200 starts negotiation itself

Supported security types used during p2p negotiation are:

  • SL_SEC_TYPE_P2P_PBC
  • SL_SEC_TYPE_P2P_PIN_DISPLAY
  • SL_SEC_TYPE_P2P_PIN_KEYPAD

CC3200 can be configured in 'any_p2p' mode as well - When configured, CC3200 will perform discovery and connect to the first found device using security type 'SL_SEC_TYPE_P2P_PBC'

Application details

The example intends to demonstrate how p2p mode can be configured and used. Application configure the device with following settings:

  • P2P role negotiate (SL_P2P_ROLE_NEGOTIATE)
#define  P2P_ROLE_TYPE_NEGOTIATE
  • P2P negotiation initiation active (SL_P2P_NEG_INITIATOR_ACTIVE)
  • P2P device listens on channel 11 and P2P device's operation channel is set to 6
  • P2P connect security type 'PBC'

Usage

  • Open a terminal program (like teraterm) and configure it w/ '9600' baud rate.
  • Build and run the application
  • Start remote P2P device
   CC3200 will be visible as P2P_DEVICE_NAME (which is set in the sample application) to the remote P2P device
CC3200 P2P Client snapshot.png

  • Connect to CC3200. On successful connection, CC3200's IP address will be displayed on the terminal-program's console
P2P Terminal
  • Open an 'Ipef' client on the remote P2P device and connect on 'PORT_NUM'
   Iperf.exe -c <DEST_IP_ADDR> -p <PORT_NUM> -i 1

Limitations/Known Issues

None

Links