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.

[参考译文] CC3100MOD:STA 中的 CC3100无法连接到 AP

Guru**** 2551110 points
Other Parts Discussed in Thread: CC3100, CC3100MOD

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

https://e2e.ti.com/support/wireless-connectivity/wi-fi-group/wifi/f/wi-fi-forum/827102/cc3100mod-cc3100-in-sta-not-able-to-connect-to-ap

器件型号:CC3100MOD
主题中讨论的其他器件:CC3100

您好!

1.我正在 STA 模式下启用'CC3100 MOD'并尝试连接到 AP。

2.正确添加 SSID、密码和安全类型。

3.以前,它可以轻松连接到已知的 AP。

4.从过去几个小时开始、我无法连接到 AP、它未连接或 IP_Acquired、它一直在等待。

5.原因可能是什么? 如何使其再次工作? (可通过任何方法将 CC3100从 API 重置为出厂设置(SPI 通信?))。

6.我尝试了其他设备,它正在连接,但并非连接到所有 AP。 它仅与少数 AP 连接。

7.(供您参考:如果 cc3100MOD 处于 AP 模式。 我始终能够从我的 PC 连接。)

谢谢你

纳文 G S

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

    您好、Naveen、

    您最近是否对您的应用程序进行了其他更改?

    您使用的是定制板还是 CC3100 BP?

    是否使用 sl_WlanConnect 或通过添加新配置文件(sl_WlanProfileAdd)进行连接?

    您可以使用 sl_WlanProfileDel (sl_WLAN_DEL_All_PROFILES)删除存储的配置文件。

    BR、

    Kobi

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

    您好、Kobi、

    1.最近我尝试阅读并列出所有可用网络。 我在这里附上了这部分代码。

      「香港

    int scanWifi (int scan_table_size、int channel、int timeout、sl_WlanNetworkEntry_t * netEntry)

    printf ("scan wifi \n\r");


    sl_WlanNetworkEntry_t netentry ={.bssid ='0'、.reserved = 0、。 RSSI = 0、
    sec_type = 0、.ssid ='0'、.ssID_len = 1};

    _u8 policyOpt = 0;
    _U16 idx = 0;
    _U16 runningIdx = 0;
    _u32 numOfEntry = 0;
    _i32返回值=-1;
    _u32 policyVal = 0;

    //如果(_already _initialized =1)
    // sl_Stop (0);

    // init_device();

    RetVal =初始化 AppVariables();
    if (RetVal < 0) retVal;

    slWlanScanParamCommand_t ScanParamConfig ={0};

    if (通道>= 1 &&通道<= 11)

    printf ("在通道%d\n\r\n 上扫描"、通道);


    ScanParamConfig.G_Channels_mask =通道;
    ScanParamConfig.rsSIThershold =- 80;

    其他

    printf ("扫描所有通道\n");

    ScanParamConfig.G_Channels_mask = 12;
    ScanParamConfig.rsSIThershold =- 80;


    SL_WlanSet (SL_WLAN_CFG_General_Param_ID、WLAN_General_Param_opt_scan_Params、
    sizeof (slWlanScanParamCommand_t)、(_u8 *)&ScanParamConfig);

    policyOpt = sl_connection_policy (0、0、0、0);
    RetVal = sl_WlanPolicySet (sl_policy_connection、policyOpt、NULL、0);
    如果(RetVal < 0)

    printf ("未能设置连接策略\n\r");


    policyOpt = sl_scan_policy (1);

    PolicyVal = 15;

    printf ("启用和配置扫描策略\n\r");

    RetVal = sl_WlanPolicySet (sl_policy_scan、policyOpt、
    (_u8 *)&policyVal、sizeof (policyVal);
    如果(RetVal < 0)

    printf ("启用扫描策略失败\n\r");


    OSI_SLEEP (超时* 1000);

    RunningIdx = 0;
    numberOfEntry = scan_table_size;

    RetVal = sl_WlanGetNetworkList (runningIdx、numOfEntry、
    netEntry[runningIdx]);

    /*来自德州仪器 CC3100驱动程序
    *
    *由于存在错误,用户应读取最大条目或读取
    *从结尾逐个输入并检查是否有重复项。 重复一次
    应停止* is found 进程。
    *

    RunningIdx = 20;
    numberOfEntry = 1;
    memset (netEntry、0、sizeof (netEntry));

    执行{
    RunningIdx--;
    RetVal = sl_WlanGetNetworkList (runningIdx、numOfEntry、
    netentry (&N);
    if (RetVal <(int) numOfEntry){
    printf ("找不到 wifi \n");
    返回0;


    if (idx > 0){
    if (0 ==memcmp (netentry.BSSID、
    NetEntries [idx - 1].BSSID、sl_BSSID_LENGTH))
    中断;


    memcpy (&netEntry[idx]、&netentry、sizeof (sl_WlanNetworkEntry_t));
    IDX++;

    } while (runningIdx>0);

    printf ("扫描过程已完成\n\r\n);

    policyOpt = sl_scan_policy (0);
    RetVal = sl_WlanPolicySet (sl_policy_scan、policyOpt、NULL、0);

    如果(RetVal < 0)

    printf ("无法禁用扫描策略\n\r");


    printf ("禁用扫描策略\n\r");

    RetVal = sl_Stop (sl_stop_timeout);
    _already 已初始化= 0;

    if (RetVal < 0)
    printf ("wifi 扫描函数中出错\n\r\n);

    //_connection_state = setWifiConnectionState (""、""、0、-1、not _connected);

    退货 IDx;

    (三

    2.我正在使用定制板。 它可以与其他器件配合使用。

    3.在 将 configureSimpleLinkToDefaultState()置于 STA 模式之前,我每次都会调用 configureSimpleLinkToDefaultState()。 它也会清除所有旧的配置文件。

      SL_WlanProfileDel (0xFF);

    急切地等待您的回复。

    谢谢你

    纳文 G S

      

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

    G_CHANNES_MASK 应为位掩码、而不是包含特定的通道编号。

    例如、应使用 x7ff 来启用通道1-11

    BR、

    Kobi

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

    您好、Kobi、

    非常感谢。 这对我很有用。 我的设备已恢复。

    但我还有一个问题。 我的设备可以连接到 AP、我的 PC 也可以连接到同一 AP。 但我没有从 PC 获取到主机设备的路由。 可能是什么问题。 (AP 侧? 路由器?)

    如果我将我的移动热点用作 AP、则通信没有问题。

    谢谢你

    纳文 G S

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

    根据流量类型、路由器或 PC 可能会阻止流量。

    Simplelink 设备当前不使用任何通用防火墙。

    BR、

    Kobi