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.

Stuck in an infinite loop when tryign to get MAC address from sl_NetCfgGet() function.

Other Parts Discussed in Thread: CC3200, CC3100, CC3200SDK

I have been trying to connect to an AP using the CC3200 examples to no avail (using the connection policies project enclosed in examples) so i decided to go for smaller tasks like getting the MAC address information of my board.. but for some reason, but the previous example project and my own code to get the macAddress always end up in an endless loop:

When the code reaches this function within the sl_NetCfgGet():  VERIFY_RET_OK(_SlDrvCmdOp((_SlCmdCtrl_t *)&_SlNetCfgGetCmdCtrl, &Msg, &CmdExt));

it goes into an endless loop from which it never comes out...

Is there any explanation to this? I am really new to this all

regards.

  • Hi Luis,We need following information:1. SDK and Service pack version
    2. Hardware version
    3. Did you try getting started with wlan station or AP application?Regards,
    Aashish
  • I am experiencing the same issue.
    1. CC3200SDK_1.2.0/CC3100_CC3200_ServicePack_1.0.1.6-2.6.0.5
    2. Rev 4.1
    3. I explicitly need the MAC address to connect to a secure wifi network. I've been trying to add the code referenced by essentially every other post on this topic to an existing example out of the SDK:

    _u8 macAddressVal[SL_MAC_ADDR_LEN];
    _u8 macAddressLen = SL_MAC_ADDR_LEN;
    sl_NetCfgGet(SL_MAC_ADDRESS_GET,NULL,&macAddressLen,(_u8 *)macAddressVal);

    which gets hung up on VERIFY_RET_OK(...); as the OP described.

    P.S. - sorry about the necro.
  • As a follow-up:  this call needs sl_Start() before you can call it.  The following code is working for me:

    sl_Start(NULL,NULL,NULL);
    char deviceId[] = "000000000000";
    unsigned char macAddressVal[SL_MAC_ADDR_LEN];
    unsigned char macAddressLen = SL_MAC_ADDR_LEN;
    sl_NetCfgGet(SL_MAC_ADDRESS_GET,NULL,&macAddressLen,(unsigned char *)macAddressVal);
    sprintf(deviceId, "%02x%02x%02x%02x%02x%02x", macAddressVal[0], macAddressVal[1], macAddressVal[2], macAddressVal[3], macAddressVal[4], macAddressVal[5]);