Atheros AR4100 and MQX 4.2

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

Atheros AR4100 and MQX 4.2

跳至解决方案
1,451 次查看
yb
Contributor IV

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 :smileyconfused:

- 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

标签 (1)
标记 (4)
0 项奖励
回复
1 解答
1,076 次查看
yb
Contributor IV

Solved : between CW10.5 and 10.6, I need to change the bool type (_Bool) by uint32_t.

在原帖中查看解决方案

0 项奖励
回复
7 回复数
1,077 次查看
yb
Contributor IV

Solved : between CW10.5 and 10.6, I need to change the bool type (_Bool) by uint32_t.

0 项奖励
回复
1,076 次查看
soledad
NXP Employee
NXP Employee

Hello Yvan,

Thank you for sharing your solution.

Regards

Sol

0 项奖励
回复
1,076 次查看
kubiznak_petr
Contributor V

Hi Sol,

This is just a workaround, not a solution. Solution to the situation, when there is obviously a never-compiled code in the MQX release, would be a prompt patch by Freescale.

I tried to fix the problem by adding the Atheros code in MQX and managed to build it successfully. I ran the httpsrv demo, but it did not work correctly. That's where I stopped, it is not my task to debug untested MQX features.

Can you please provide some official patch or initiate its implementation?

Regards,

Petr

0 项奖励
回复
1,076 次查看
yb
Contributor IV

Petr,

After several days and nigths, it's re-working for me. If you have specific question, ask me !

I think a AR4100 patch must be released by FREESCALE quickly (it's not the Qualcomm job since the last patch).

Yvan

0 项奖励
回复
1,076 次查看
kubiznak_petr
Contributor V

Hi Yvan,

Thank you for your reply. It would be good to share some knowledge. Can you please follow me so I can send you private messages? Thank you.

Petr

0 项奖励
回复
1,076 次查看
yb
Contributor IV

Done !

0 项奖励
回复
1,076 次查看
kubiznak_petr
Contributor V

Hmm, are you sure? :-) I can't see you in the followers list, nor I can send you a direct message...

0 项奖励
回复