7 Replies Latest reply on Feb 14, 2016 11:56 PM by nasac_2167841

    Adding new SSID to DCT

      Hello,

       

      I would like to pair the WiFi module with many APs. Is it possible to add a new AP to the AP_LIST ? Can you please provide also an example for this procedure ?

       

      Thank you!

        • 1. Re: Adding new SSID to DCT
          JaeyoungY_71

          You can add additional APs in the dct in  <SDK>/WICED/internal/dct.c line 103,

           

          #define DEFAULT_AP_LIST  \

              { \

                  [0] = \

                  { \

                      .details = {{sizeof(CLIENT_AP_SSID)-1, CLIENT_AP_SSID},{{0,0,0,0,0,0}}, 0, 0, CLIENT_AP_BSS_TYPE, CLIENT_AP_SECURITY, CLIENT_AP_CHANNEL, CLIENT_AP_BAND}, \

                      .security_key_length = sizeof(CLIENT_AP_PASSPHRASE)-1, \

                      .security_key = CLIENT_AP_PASSPHRASE\

                  }, \

              }

           

          Add a second entry to this list such as

                  [1] = \

                  { \

                      .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}, \

                      .security_key_length = sizeof(CLIENT_AP_PASSPHRASE_1)-1, \

                      .security_key = CLIENT_AP_PASSPHRASE_1\

                  }, \

           

          and define the new values you need in <SDK>/include/default_wifi_config_dct.h.

           

          You can see an example of reading the AP info from the dct in the function print_wifi_config_dct() in <SDK>/apps/snips/dct_read_write/dct_read_write.c

           

          Thanks,

          Jaeyoung

          • 2. Re: Adding new SSID to DCT

            Hi JaeyoungY_71 thank you very much for your reply.

             

            I have added the code to dct.c and default_wifi_config_dct.h. But I don't know how to add an additional network without erasing the dct ? The application used is aws_iot/shadow. What is the modifications required for aws_common.c in order to add this functionality ?

             

            Thank you very much for your help !

            • 3. Re: Adding new SSID to DCT
              MichaelF_56

              The default configuration, operation and connect as a client APs are defined in /WICED-SDK/apps/demo/aws_iot/shadow/wifi_config_dct.h

               

              I'm not sure if there is a way to extend each to add multiple APs.

               

              Perhaps VikramR_26 knows if this is possible.

               

              JaeyoungY_71

              • 4. Re: Adding new SSID to DCT

                Unfortunately, I am unable to add a new AP to AP_LIST if the DCT is not cleared. An example app based on clent2ap will be very welcome

                 

                Thank you !

                • 5. Re: Adding new SSID to DCT
                  JaeyoungY_71

                  Our network join process pulls up the AP configuration info from the DCT. In order to use any additional APs you would have to store it there. Is there any reason why you wouldn't want to change the DCT?

                  • 6. Re: Adding new SSID to DCT

                    Hi JaeyoungY_71, I would like to pair a WiFi product with many APs without erasing the DCT. In the examples given in demo/application or aws_iot/shadow, in order to pair a product with an AP, an erase of the DCT is mandatory. I would like to switch the device to SoftAP mode using a button and configure it with an AP without modifying the existing AP_LIST.

                     

                    Thank you for your help !

                    • 7. Re: Adding new SSID to DCT

                      You don't need to erase DCT in order to setup an AP

                       

                      You can check the config_mode sample

                       

                      But in the default DCT only one AP can be stored and when you invoke the wiced APIs this entry will be used

                       

                      If you want to store more than one AP information - you will have to extend the DCT either statically or better - by storing the AP information in the application section of the DCT and then using your application to read this information and joining the specific AP you want to join to