nn::ac::CTR::Connect Function

Syntax

Result Connect(
     Config & config
);

Arguments

Name Description
in config Instance of connection conditions.

Return Values

The result.

Value Description
Result::IsSuccess Connection successful.
nn::fs::ResultNotInitialized The FS library has not been initialized.
ResultNotFoundAccessPoint Unable to find an access point that could be connected to.
ResultCanceled Canceled while a connection was being processed.
ResultAlreadyExists Already processing.
ResultNotAgreeEula The EULA has not been agreed to, or the icon file has not been configured.
ResultAlreadyConnectUnsupportAp Connecting to an unusable AP.
ResultWifiOff Cannot use a network because the system is in "flight mode."
ResultFailedScan Failed scan.
ResultConflictIpAddress Conflicting IP address.
ResultFailedDhcp DHCP failure.
ResultInvalidDns Name resolution failure.
ResultInvalidProxy Proxy failure.
ResultFailedConnTest Failed Internet connection test.
ResultFailedHotspotAuthentication Failed hotspot authentication.
ResultFailedHotspotConntest Passed hotspot authentication and then failed an Internet connection test.
ResultOutOfMemory Failed to allocate memory.
ResultUnsupportAuthAlgorithm Could not connect to an access point because it used an unsupported encryption scheme.
ResultDenyUsbAp Access to a Nintendo Wi-Fi USB Connector was denied.
ResultUnsupportPlace Could not connect because the network is unusable from the current location.
A value other than the above. Failed for reasons other than those given above.

Description

Starts an automatic connection.

This API may return success immediately when a connection is completed using BG communications.
If a connection was not established using BG communications, some time may be required for the connection.
We recommend stopping BG communications to check operations as required.

A process runs inside this function to verify that a connection to the Internet is possible.
For this reason, when connecting to an access point that cannot connect to the Internet, extra time is required for verification.

Use this only after you have called the nn::fs::Initialize function.

Once a connection is established, the nn::os::LightEvent registered by RegisterDisconnectEvent is signaled if the system is accidentally disconnected from the access point.
This function gets the application's EULA version, so it returns ResultNotAgreeEula if the icon file is not configured.

Revision History

2010/11/18
Explained that this function gets the application's EULA information.
2010/06/14
Initial version.

CONFIDENTIAL