CC3200怎么设置为AP模式
CC3200怎么设置为AP模式?又工作在monitor监听模式,麻烦给解答一下,谢谢
参考例程:getting_started_with_wlan_ap
注意必须连接串口,通过串口输入AP的名字,启动AP。
static int ConfigureMode(int iMode)
{
char pcSsidName[33];
long lRetVal = -1;
UART_PRINT("Enter the AP SSID name: ");
GetSsidName(pcSsidName,33); //(1)获取Name
lRetVal = sl_WlanSetMode(ROLE_AP); //(2)配置成AP模式
ASSERT_ON_ERROR(lRetVal);
lRetVal = sl_WlanSet(SL_WLAN_CFG_AP_ID, WLAN_AP_OPT_SSID, strlen(pcSsidName),(unsigned char*)pcSsidName); //(3)配置AP信息 ---未加密
ASSERT_ON_ERROR(lRetVal);
UART_PRINT("Device is configured in AP mode\n\r");
/* Restart Network processor */
lRetVal = sl_Stop(SL_STOP_TIMEOUT); //<1>先停止NWP
// reset status bits
CLR_STATUS_BIT_ALL(g_ulStatus);
return sl_Start(NULL,NULL,NULL); //<2>启动NWP-使sl_WlanSetMode(ROLE_AP)生效!
}