User Manual
max_ap: The maximum number of access points to write to 'ap_list'.
Returns: The number of APs written into ap_list.
Connecting
The following functions are used to connect to an access point.
bool connect ( void )
This function will attempt to connect using the list of Profiles stored in non-volatile config memory on the WICED
Feather. See the AdafruitFeather: Profiles page in this learning guide for details on how to use the profile system.
Parameters: None
Returns: 'True' (1) if a connection was established with an AP based on the stored profile data, otherwise 'false' (0).
bool connect ( const char *ssid )
Attempts to connect to the open (security type = ENY_TYPE_OPEN) access point matching the 'ssid' parameter.
Parameters:
ssid: A string containing the name of the SSID to attempt to connect to.
Returns: 'True' (1) if the connection was successful, otherwise 'false' (0).
bool connect ( const char *ssid, const char *key, int enc_type = ENC_TYPE_AUTO )
Attempts to connect to the specified SSID using the supplied password ('key') and optionally a specific security type
('enc_type').
The security type is optional and if no value is provided the WICED Feather will attempt to determine the security type
on it's own, but the connection process will terminate more quickly if you provide the appropriate security type since
this avoids the need to perform a full access point scan before the connection attempt starts.
Parameters:
ssid: A string containing the name of the SSID to attempt to connect to.
key: The password to use when connecting to the AP
enc_type: The wl_enc_type_t value that indicates what type of security is used by the AP. The default value for
this field is ENC_TYPE_AUTO which will cause the WICED Feather to determine this information for you, at the
expense of a slower connection interval since we first have to perform a full access point scan. See
the Constants page in this learning guide for a list of possible values for this parameter.
Returns: 'True' (1) if the connection was successful, otherwise 'false' (0).
bool begin ( void )
This is an alias for ' bool connect(void) ' described above, and is provided to match the Arduino Client interface.
See the 'Constants' page in this learning guide for details on the wl_ap_info_t struct.
© Adafruit Industries https://learn.adafruit.com/introducing-the-adafruit-wiced-feather-wifi Page 61 of 202










