Configuring the WCM on WICED
The WCM has configuration options which are set in the WCM_INIT_CONFIG_T structure argument for wcm_start():
- no_log_print - enables or disables log printing into stdout. Could be useful when debugging.
- hs20_enabled - enables or disables discovering of additional ZipKey networks identified by specific ISP vendor-specific information elements. Note: 0001-Added-pointers-to-IE-in-wiced_scan_result_t.patch patch is responsible for adding support in the SDK, thus, the patch must be applied if the flag is enabled.
- user_binding_enabled - defines whether a device supports user binding. See the article on design considerations for more details on the user-binding process.
- onboarding_button_exists - defines whether a device has a button which could be used by device users to enable the on-boarding mode. If the flag is enabled, then the WCM will handle wcmc_make_discoverable() API call as an on-boarding request. Depending on the configuration, the call could enable SoftAP and/or change the binding status. If the flag isn’t set, then the API call will be ignored. See the article on design considerations for more details on how device onboarding is managed.
- wcm_dct_offset - contains pointer to a DCT structure field where the WCM puts its configuration data.
- wcm_dct_size - contains size of the DCT structure field. The size of the field must be equal to the corresponding value in wcm.h (WCM_CONFIG_STORAGE_SIZE).
- softap_config configuration:
- softap_enabled - determines whether the WCM should run with SoftAP on-boarding support. If the flag isn’t set, then the WCM will not bring up a SoftAP network.
- ssid - defines the SoftAP ssid. $$$$DUB$$$$ string placeholder could be used inside the ssid to generate a unique ssid for each device (though it should be noted that iOS 11 does not support wildcard SSIDs for the softAP SSID).
- server_ip - sets default SoftAP IP address on which DHCP and HTTP servers will be started. If the subnet is already used on another interface, then the WCM will try to generate another local IP address.
- server_port - port where the HTTP server should be started.
- credentials - defines credentials for the device to use to authenticate to the Cirrent cloud. Includes the account id, device id, and secret. See Devices for more details on how to configure your devices in the Cirrent cloud.