|
以下是TI的demo程序中的注册信息get,但是程序里没有找到配置为混合监听的地方啊?
//****************************************************************************
// MAIN FUNCTION
//****************************************************************************
void main()
{
long lRetVal = -1;
//Board Initialization
BoardInit();
//Pin Configuration
PinMuxConfig();
//Change Pin 58 Configuration from Default to Pull Down
MAP_PinConfigSet(PIN_58,PIN_STRENGTH_2MA|PIN_STRENGTH_4MA,PIN_TYPE_STD_PD);
//
// Initialize GREEN and ORANGE LED
//
GPIO_IF_LedConfigure(LED1|LED2|LED3);
//Turn Off the LEDs
GPIO_IF_LedOff(MCU_ALL_LED_IND);
//UART Initialization
MAP_PRCMPeripheralReset(PRCM_UARTA0);
MAP_UARTConfigSetExpClk(CONSOLE,MAP_PRCMPeripheralClockGet(CONSOLE_PERIPH),
UART_BAUD_RATE,(UART_CONFIG_WLEN_8 |
UART_CONFIG_STOP_ONE | UART_CONFIG_PAR_NONE));
//Display Application Banner on UART Terminal
DisplayBanner(APPLICATION_NAME);
//
// Simplelinkspawntask
//
lRetVal = VStartSimpleLinkSpawnTask(SPAWN_TASK_PRIORITY);
if(lRetVal < 0)
{
UART_PRINT("Unable to start simpelink spawn task\n\r");
LOOP_FOREVER();
}
//
// Create HTTP Server Task
//
lRetVal = osi_TaskCreate(HTTPServerTask, (signed char*)"HTTPServerTask",
OSI_STACK_SIZE, NULL, OOB_TASK_PRIORITY, NULL );
if(lRetVal < 0)
{
UART_PRINT("Unable to create task\n\r");
LOOP_FOREVER();
}
//
// Start OS Scheduler
//
osi_start();
while (1)
{
}
}
Connection Using Profiles
A WLAN profile provides the information required to connect to a given AP. This includes the SSID,
security type and security keys. Each profile refers to a certain AP. The profiles are stored in the NVMEM
(nonvolatile memory), and preserved during device reset. The following APIs are available for handling
profiles:
• sl_WlanProfileAdd – Used for adding a new profile. SSID and security information must be provided,
where the returned value refers to the stored index (out of the seven available).
• sl_WlanProfileDel – Used for deleting a certain stored profile, or for deleting all profiles at once. Index
should be the input parameter.
• sl_WlanProfileGet – Used for retrieving information from a specific stored profile. Index should be the
input parameter.
For additional information about these APIs, refer to the doxygen API manual.
Download the latest SDK for the complete example code.
/* Delete all profiles (0xFF) stored */
sl_WlanProfileDel(0xFF);
/* Add unsecured AP profile with priority 0 (lowest) */
sl_WlanProfileAdd(SL_SEC_TYPE_OPEN, (unsigned char*)UNSEC_SSID_NAME, strlen(UNSEC_SSID_NAME),
g_BSSID, 0, 0, 0, 0);
/* Add WPA2 secured AP profile with priority 1 (0 is lowest) */
sl_WlanProfileAdd(SL_SEC_TYPE_WPA, (unsigned char*)SEC_SSID_NAME, strlen(SEC_SSID_NAME), g_BSSID,
1, (unsigned char*)SEC_SSID_KEY, strlen(SEC_SSID_KEY), 0);
|
阿莫论坛20周年了!感谢大家的支持与爱护!!
曾经有一段真挚的爱情摆在我的面前,我没有珍惜,现在想起来,还好我没有珍惜……
|