nn::uds::CTR::ConnectNetwork Functionnn::Result ConnectNetwork( const NetworkDescription & networkDescription, ConnectType type, const char passphrase[], size_t passphraseLength );
| Name | Description | |
|---|---|---|
| in | networkDescription | Network information. Obtained from scanning results. |
| in | type | Connection type. |
| in | passphrase[] | Passphrase to use for wireless layer encryption. With UDS, communication can only be established if uniqueId and passphrase match. |
| in | passphraseLength | Passphrase length. Specify a value between UDS_PASSPHRASE_LENGTH_MIN and UDS_PASSPHRASE_LENGTH_MAX, inclusive. |
Result values listed below. | Value | Description |
|---|---|
Result::IsSuccess |
Connection succeeded and operations began for the specified connection type. |
ResultNotInitialized |
The library is not initialized. Execute the Initialize function. |
ResultNotFoundNetwork |
The connection target network was not found: Returned when the network has already been destroyed or when it is outside the range of communications. |
ResultAlreadyNetworkIsFull |
The number of network nodes has already reached the maximum number of connections. You will be unable to connect unless you reduce the number of nodes. |
ResultDeniedFromMaster |
Connection was denied by the master. Returned when the master has denied connection. Also returned when the passphrase is in error. |
ResultConnectionTimeout |
A connection was not established within a set time. Returned when the signal strength is bad or when there is excessive load on the master. |
ResultInvalidState |
Not in an executable state. Returned when executed in a state other than STATE_DISCONNECTED. |
ResultOutOfRange |
The specified argument value was not in the valid range for the argument. It is possible it will succeed if you re-execute with an appropriate value for the argument. |
ResultWirelessOff |
Transitioned to wireless-disabled mode. Re-initialization is required. |
| A value other than the above | Failed for reasons other than those given above. |
Connects to an existing network.
It takes longer to connect when the signal strength is poor. Up to approximately 800 ms is required until completion.
CONFIDENTIAL