搜索
bottom↓
回复: 1

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

[复制链接]

出0入0汤圆

发表于 2015-4-10 16:39:06 | 显示全部楼层 |阅读模式
以下是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);

出0入0汤圆

发表于 2015-4-10 16:49:26 | 显示全部楼层
MDNS只是根据端口分析的, TI是通过包长度编码信息的。
回帖提示: 反政府言论将被立即封锁ID 在按“提交”前,请自问一下:我这样表达会给举报吗,会给自己惹麻烦吗? 另外:尽量不要使用Mark、顶等没有意义的回复。不得大量使用大字体和彩色字。【本论坛不允许直接上传手机拍摄图片,浪费大家下载带宽和论坛服务器空间,请压缩后(图片小于1兆)才上传。压缩方法可以在微信里面发给自己(不要勾选“原图),然后下载,就能得到压缩后的图片】。另外,手机版只能上传图片,要上传附件需要切换到电脑版(不需要使用电脑,手机上切换到电脑版就行,页面底部)。
您需要登录后才可以回帖 登录 | 注册

本版积分规则

手机版|Archiver|amobbs.com 阿莫电子技术论坛 ( 粤ICP备2022115958号, 版权所有:东莞阿莫电子贸易商行 创办于2004年 (公安交互式论坛备案:44190002001997 ) )

GMT+8, 2024-5-10 01:22

© Since 2004 www.amobbs.com, 原www.ourdev.cn, 原www.ouravr.com

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