查看: 1808|回复: 0
打印 上一主题 下一主题

CC3200发的UDP包用wireshark截取为MDNS,如何解析的呢

[复制链接]
跳转到指定楼层
沙发
发表于 2015-10-27 18:34:14 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
以下是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);转载

回复

使用道具 举报

您需要登录后才可以回帖 登录 | 加入因仑

本版积分规则

快速回复 返回顶部 返回列表