To be able to implement an auto join to an access point, the first step would be to use WICED’s scan API, wiced_wifi_scan_networks( ). This function works by passing the address of a callback function to it. The function is called by WICED whenever a nearby access point is discovered. WICED passes the following information about the scanned access point:
- Security type
- Signal Strength (RSSI)
- Indication if scanning is complete
Using the specified SSID and password, try to look for any match against the scanned access points. If a match is found, joining the access point can be done by populating the platform_dct_wifi_config_t structure with the SSID, password and security. Then write this to DCT by calling the wiced_dct_write_wifi_config_section( ) function which writes a volatile copy of the DCT Wi-Fi config section in RAM to the flash. The access point information set in DCT will be used to connect to the access point when the network interface is brought up using wiced_network_up( ).
A copy is written to flash each time and could result in flash wear-out, so this must be considered in the design.
Hi, I have the same issues for this kinds of issues.
1. WiFi AP is set as below
SSID : aptest
Auth : WPAPSK
Encrypt : TKIP
Network Key : 1234567890abc
2. At the module, I got the scan result
3. I refered stored_ap_list
4. WIFI DCT at the compile time
// wifi_dct is defined as below and network key(PASSPHRASE) is defined 1234567890abc
#define CLIENT_AP_SSID "aptest"
#define CLIENT_AP_PASSPHRASE "1234567890abc"
#define CLIENT_AP_SECURITY WICED_SECURITY_WPA_TKIP_PSK
#define CLIENT_AP_CHANNEL 11
#define CLIENT_AP_BAND WICED_802_11_BAND_2_4GHZ
As you wrote, if I can change the " platform_dct_wifi_config_t" with stored_ap_list.
I think that I have to make key encryption, how can I make encrypt as TKIP?
1. Do we need to passphrase encryption and store it to wifi dct and write it to
2. Is there are any like belows
- WiFi driver does scan AP and it does make encryption with scaned AP information.
if AP is TKIP, then driver does passphrase as TKIP and apply to connected.
3. We are using this as serial to wifi module and all configuration is done by serial input.
1. serial input command <AP-SSID,PASSPHRASE,Auth_method,encrypt_type>
2. if we save it to stored_ap_list, then there is no way for encryption.
Any of advice is highly appreciated.
Please take a look at <WICED-SDK>/Apps/snip/security_types/security_types.c. This snippet application demonstrates how to specify and join access points with different security types.
Is there an equivalent example for SDK 3.0.1? Security_types is not available, and some of the function calls used were depreciated.