|
按照如下调用方式,发现smartconfig 无法成功,有没有做过的人指点一下,看看我下面代码哪里出了问题?
long lRetVal = -1;
//
// Clear all profiles
// This is of course not a must, it is used in this example to make sure
// we will connect to the new profile added by SmartConfig
//
lRetVal = sl_WlanProfileDel(WLAN_DEL_ALL_PROFILES);
ASSERT_ON_ERROR(lRetVal);
//set AUTO policy
lRetVal = sl_WlanPolicySet(SL_POLICY_CONNECTION,
SL_CONNECTION_POLICY(1,0,0,0,1),
NULL,
0 /*PolicyValLen*/);
ASSERT_ON_ERROR(lRetVal);
sl_WlanProfileDel(0xFF);
//
// Start SmartConfig
// This example uses the unsecured SmartConfig method
//
lRetVal = sl_WlanSmartConfigStart(0, /*groupIdBitmask*/
SMART_CONFIG_CIPHER_NONE, /*cipher*/
0, /*publicKeyLen*/
0, /*group1KeyLen*/
0, /*group2KeyLen */
NULL, /*publicKey */
NULL, /*group1Key */
NULL); /*group2Key*/
ASSERT_ON_ERROR(lRetVal);
|
|