CC3200 p2p with CC3200
CC3200 P2P with handhold device and PC is ok
I want to use cc3200 connect with cc3200 using p2p mode.
one used as server and another used as client.
The SDK's P2P sample is cc3200 with handhold deive.
is there any guide sample for cc3200 p2p wth cc3200?
Thanks a lot.
Hi,troy
If you have downloaded CC3200SDK_1.3.0, you can refer to C:\ti\CC3200SDK_1.3.0\cc3200-sdk\example\p2p
谢谢,
是用这个 Sample改的code, 2两个cc3200,都可p2p方式连接到手机, 包括同时连到手机.
但是两个cc3200 p2p互联(不用手机), 只能看到一个连接成功, 另一个挂在WlanConnect()里面
Group owner/client 和Negotitiate都一样. 是不是需要更改下面code?
static long WlanConnect()
{
SlSecParams_t secParams = {0};
long lRetVal = 0;
secParams.Key = (signed char *)P2P_SECURITY_KEY;
secParams.KeyLen = strlen(P2P_SECURITY_KEY);
secParams.Type = P2P_SECURITY_TYPE;
lRetVal = sl_WlanConnect((signed char *)P2P_REMOTE_DEVICE,
strlen((const char *)P2P_REMOTE_DEVICE), 0,
&secParams, 0);
ASSERT_ON_ERROR(lRetVal);
// Wait till Device acquired an IP in P2P mode
while(! IS_P2P_REQ_RCVD(g_ulStatus))
{
_SlNonOsMainLoopTask();
}
// Connect with the device requesting the connection
lRetVal = sl_WlanConnect((signed char *)g_p2p_dev,
strlen((const char *)g_p2p_dev),
0, &secParams, 0);
ASSERT_ON_ERROR(lRetVal);
#ifdef P2P_ROLE_TYPE_NEGOTIATE
while(! IS_IP_ACQUIRED(g_ulStatus))
#else
while(! IS_IP_LEASED(g_ulStatus))
#endif
{
_SlNonOsMainLoopTask();
if(IS_CONNECT_FAILED(g_ulStatus))
{
// Error, connection is failed
ASSERT_ON_ERROR(NETWORK_CONNECTION_FAILED);
}
}
return SUCCESS;
}