Tool/software: Code Composer Studio
Hi,
i am using ccs 7 version ,wlan ap sample code in ccs edited to wlan ap mode with password authentication .but i am getting only open wifi ,no authentication/passsword .here i am added below my code .
Did anyone tried this code with password. i am waiting for reponse.
static int ConfigureMode(int iMode)
{
char pcSsidName[33];
long lRetVal = -1;
char password[10]="francis";
unsigned char val;
//passphrase[7]='\0';
UART_PRINT("Enter the AP SSID name: ");
GetSsidName(pcSsidName,33);
lRetVal = sl_WlanSetMode(ROLE_AP);
ASSERT_ON_ERROR(lRetVal);
lRetVal = sl_WlanSet(SL_WLAN_CFG_AP_ID, WLAN_AP_OPT_SSID, strlen(pcSsidName),
(unsigned char*)pcSsidName);
ASSERT_ON_ERROR(lRetVal);
val = SL_SEC_TYPE_WPA;
lRetVal = sl_WlanSet(SL_WLAN_CFG_AP_ID, WLAN_AP_OPT_SECURITY_TYPE, 1, (unsigned char*)val);
lRetVal = sl_WlanSet(SL_WLAN_CFG_AP_ID, WLAN_AP_OPT_PASSWORD, strlen(password),
(unsigned char *)password);
UART_PRINT("Device is configured in AP mode\n\r");
//UART_PRINT("TEST JINU\n\r");
/* Restart Network processor */
lRetVal = sl_Stop(SL_STOP_TIMEOUT);
// reset status bits
CLR_STATUS_BIT_ALL(g_ulStatus);
return sl_Start(NULL,NULL,NULL);
}