1 Reply Latest reply on Feb 17, 2016 11:53 AM by rashijain

    DEFAULT_AP_LIST problem

    AndriiL_16

      I have added an entry to "DEFAULT_AP_LIST" in "dct.c" and defined an AP in "wifi_config_dct.h". The problem is that unless I also add the definition of the AP to "default_wifi_config_dct.h" I get an error:

       

      ./WICED/internal/dct.c:102:24: error: 'CLIENT_AP_SSID_1' undeclared here (not in a function)

          .details = {{sizeof(CLIENT_AP_SSID_1)-1, CLIENT_AP_SSID_1},{{0,0,0,0,0,0}}, 0, 0, CLIENT_AP_BSS_TYPE_1, CLIENT_AP_SECURITY_1, CLIENT_AP_CHANNEL_1, CLIENT_AP_BAND_1}, \

                              ^

      ./WICED/internal/dct.c:192:40: note: in expansion of macro 'DEFAULT_AP_LIST'

           .wifi_config.stored_ap_list      = DEFAULT_AP_LIST,

                                            

      With definitions in both "wifi_config_dct.h" and "default_wifi_config_dct.h" the application correctly reads the information from "wifi_config_dct.h". It also works if I add the definition to "dct.c".

       

      I would prefer it if I could keep the AP definitions in "wifi_config_dct.h". Any help would be appreciated.

       

      Thanks

       

      And a follow-up question:

       

      When configuring the device in configuration mode - how do I save the AP in a different index than [0] of the "stored_ap_list" ?

       

      Meddelandet redigerades av: Andreas Johansson

        • 1. Re: DEFAULT_AP_LIST problem

          Hello Anjo,

           

          As you mentioned that you added an entry to "DEFAULT_AP_LIST" in "dct.c" and defined an AP in "wifi_config_dct.h" but it gives error unless you define the same in "default_wifi_config_dct.h". This might be because you have to define the which wifi_config file to use in the .mk file of the application.

           

          For example:

          To make you application use the "wifi_config_dct.h" add this to the .mk file

          WIFI_CONFIG_DCT_H := wifi_config_dct.h

          This will make sure it uses the wifi_config_dct.h of the application not the "default_wifi_config_dct.h".

           

          I hope this helps.

           

          Thanks

          RJ