2 Replies Latest reply on Aug 20, 2018 3:39 PM by BrEl_1782996

    Modify Wi-Fi Config Section of DCT


      I've been unable to modify the wifi config section of the DCT.


      The modification appears to be successful. The failure occurs when I make the wiced_network_up() call following the DCT modification. The board fails to connect three times and then returns the 1024 error code.


      I'm using the dct_read_write snip as a starting point.


      Below is a stripped down version of the dct_read_write snip that modifies the network name & password before connecting to the network.


      static const char* network_name  = "___";

      static const char* network_password  = "___";

      void application_start( )


          platform_dct_wifi_config_t* dct_wifi_config = NULL;



          wiced_init( );




          wiced_dct_read_lock( (void**) &dct_wifi_config, WICED_TRUE, DCT_WIFI_CONFIG_SECTION, 0, sizeof( *dct_wifi_config ) );



          strcpy( dct_wifi_config->stored_ap_list[0].details.SSID.value, network_name );

          strcpy( dct_wifi_config->stored_ap_list[0].security_key, network_password );

          wiced_dct_write( (const void*) dct_wifi_config, DCT_WIFI_CONFIG_SECTION, 0, sizeof(platform_dct_wifi_config_t) );



          wiced_dct_read_unlock( dct_wifi_config, WICED_TRUE );







          WPRINT_APP_INFO( ( "DONE\r\n" ) );



      I'm not sure if I'm supposed to use the strcpy() function to modify the dct_wifi_config->stored_ap_list[0].details.SSID.value & dct_wifi_config->stored_ap_list[0].security_key variables. I saw this line ( strcpy( app_dct->string_var, modified_string_var ); )  in the dct_read_write snip, and was hoping they all work the same way.


      Thanks for any thoughts.

      - Bradley