Adding new SSID to DCT

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
Anonymous
Not applicable

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!

0 Likes
7 Replies
JaeyoungY_71
Employee
Employee
First comment on KBA 25 solutions authored 10 solutions authored

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

0 Likes
Anonymous
Not applicable

Hi jaeyoung​ 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 !

0 Likes

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 vik86​ knows if this is possible.

jaeyoung

0 Likes
Anonymous
Not applicable

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 !

0 Likes

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?

0 Likes
Anonymous
Not applicable

Hi jaeyoung​, 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 !

0 Likes
Anonymous
Not applicable

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

0 Likes