AnsweredAssumed Answered

Atheros AR4100 and MQX 4.2

Question asked by Yvan BOURNE on Jul 22, 2015
Latest reply on Jul 30, 2015 by Petr Kubiznak

Hi,

I'm trying to porting my project under MQX 4.2 to fix a bug with MFS (MFS - file access error) and several other with RTCS.

 

The Wifi part seems to be completly changed without any explanations

 

- Some declarations are added for the Wifi in the BSP (init_enet.c) but nothing about where to place the Atheros files

- Includes for other modules are added and make errors because code source are not present (GainSpan, RedPine)

 

Is there a very new document about WiFi implementation ?

 

 

EDIT 07/24/2015 :

I put all the new lines in comments (init_enet.c and twrk60d100m.h) and re-use old code for Wifi.

There is a new problem in iwcfg.c, in the iwcfg_set_essid function :

 

uint32_t iwcfg_set_essid

    (

        uint32_t dev_num,

        char *essid

    )

{

    _rtcs_if_handle ihandle;

    ENET_ESSID  inout_param;

    uint32_t error;

    bool dev_status;

   

    if (dev_num < IPCFG_DEVICE_COUNT)

    {

        ihandle = ipcfg_get_ihandle(dev_num);

       

        if (ihandle == NULL)

        {

            printf("Initialize Wifi Device Using ipconfig\n");

            return ENET_ERROR;

        }

        if (!essid)

          inout_param.flags = 0;

        else

         inout_param.flags = 1;

       

        inout_param.essid = essid;

        inout_param.length = strlen(essid);

 

        error = ENET_mediactl (((IP_IF_PTR)ihandle)->HANDLE,ENET_MEDIACTL_IS_INITIALIZED,&dev_status);

        if (ENET_OK != error)

        {

            return error;

        }

        if (dev_status == FALSE)

        {

            return ENET_ERROR;

        }

        error = ENET_mediactl (((IP_IF_PTR)ihandle)->HANDLE,ENET_SET_MEDIACTL_ESSID,&inout_param);

        if (ENET_OK != error)

        {

            return error;

        }

        return ENET_OK;

    }

    printf("IWCONFIG_ERROR: Invalid Device number\n");

    return ENETERR_INVALID_DEVICE;

}

After calling ENET_mediactl for the first call, the inout_param struct is crushed and the ssid string is corrupted. It needs to be reaffected (or only affected AFTER the first call) before call the ENET_SET_MEDIACTL_ESSID.

 

Yvan

Outcomes