snip.config_mode using local wifi_config_dct.h behaves differently than using default_wifi_config_dct.h

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

cross mob
Anonymous
Not applicable

I am using snip.config_mode as a starting point or my project and want to use a local wifi_config_dct.h file.  I modified config_mode.mk to include the line

WIFI_CONFIG_DCT_H  := wifi_config_dct.h

and everything builds as expected.

The problem occurs when I run it.  When the default_wifi_config_dct.h is used the program works as expected, the web server is started and it acts as a soft ap, when the local copy is used, the program tries to join the the SSID defined by CLIENT_AP_SSID in the wifi_config_dct.h file.

The problem seems to occur in the function wiced_configure_device() when it calls wiced_dct_read_lock() getting the device_configured state.  When default_wifi_config_dct.h is used, device_configured returns WICED_FALSE, when the local copy (an identical copy) is used WICED_TRUE is returned.

What am I missing?  Is there a document I should be reading?

Thanks in advance

0 Likes
1 Solution
Anonymous
Not applicable

I could reproduced it.

If we add WIFI_CONFIG_DCT_H into Makefile,

SDK automatically sets "device_configured" as WICED_TRUE.

Please refer following files for detail.

<WICED-SDK>/tools/makefiles/wiced_config.mk

<WICED-SDK>/WICED/internal/dct.c

Anyway, snip.config_mode is a sample for Wi-Fi configuration and etc.

So you don't need to use local "wifi_config_dct.h" with it.

If you want to use pre-defined configuration,

please refer other samples like apsta, http_server_sent_events.

View solution in original post

0 Likes
6 Replies
Anonymous
Not applicable

It looks strange.

So let me check one thing.

I think you just add/remove one line below in config_mode.mk.

WIFI_CONFIG_DCT_H  := wifi_config_dct.h

Then do you "clean" before building "snip.config_mode-xxxx"?

0 Likes
Anonymous
Not applicable

Yes, I only added the one line and did a clean before building.

0 Likes

Adding rashijain​ and abirjepatil​ from the WICED applications team.

0 Likes
Anonymous
Not applicable

I could reproduced it.

If we add WIFI_CONFIG_DCT_H into Makefile,

SDK automatically sets "device_configured" as WICED_TRUE.

Please refer following files for detail.

<WICED-SDK>/tools/makefiles/wiced_config.mk

<WICED-SDK>/WICED/internal/dct.c

Anyway, snip.config_mode is a sample for Wi-Fi configuration and etc.

So you don't need to use local "wifi_config_dct.h" with it.

If you want to use pre-defined configuration,

please refer other samples like apsta, http_server_sent_events.

0 Likes
Anonymous
Not applicable

Thank you for your answer. Unfortunately the apsta and http_server_sent_events do not fit my needs as config_mode does.  I will simply modify <WICED-SDK>/WICED/internal/dct.c.  I realize this is not the best solution but it is one I will deal with.

Thank you again for your response.

Regards,

-- Ken

0 Likes

I know this is old, but hypothetically if I wanted to have a custom wifi_config_dct.h file AND make the configuration app run what would be the appropriate way of doing it?

If we add WIFI_CONFIG_DCT_H into Makefile,

SDK automatically sets "device_configured" as WICED_TRUE.

So how would we make the SDK NOT automatically set "device_configured" as WICED_TRUE?

0 Likes