This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

[参考译文] LAUNCHXL-CC3235SF:在开箱即用示例中添加了硬编码 WiFi 配置文件

Guru**** 2582405 points


请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

https://e2e.ti.com/support/wireless-connectivity/wi-fi-group/wifi/f/wi-fi-forum/1006603/launchxl-cc3235sf-add-hard-coded-wifi-profile-in-in-out-of-box-example

器件型号:LAUNCHXL-CC3235SF

您好!

需要支持在 开箱即用示例中添加一个硬编码 WiFi 配置文件。 我无法将 network_if.h/.c 文件用于开箱即用项目。 如何将 wifi 配置文件添加到开箱即用代码中?

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    您好!

    假设您不想使用 HTTP 演示接口来配置器件,则最简单的方法是使用 sl_WlanProfileAdd() API 来添加配置文件。

    类似以下示例代码的工作方式如下:

    _u8 MacAddr[] = {0xAA,0xBB,0xCC,0xDD,0xEE,0xFF};
    SlWlanSecParams_t SecParams;
    _i16 Index;SecParams.Type = SL_WLAN_SEC_TYPE_WPA_WPA2;
    SecParams.Key = "123456789";
    SecParams.KeyLen = strlen (SecParams.Key);
    Index = sl_WlanProfileAdd("Test_AP", strlen("Test_AP"), MacAddr, &SecParams, NULL, 7 /* Priority*/, 0);

    您可以在 Provisioning_task.c 的 ConfigureSimpleLinkToDefaultState()中的 sl_WlanProfileDel()调用之后添加此代码。

    如果您需要更多说明、或者无法使用提供的代码添加硬编码 Wi-Fi 配置文件、请告诉我。

    此致、

    Michael

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    您好、Michael、

    感谢您的支持。 这对我很有用。