

#include <nitro/wm.h>
WMErrCode WM_StartConnectEx(
WMCallbackFunc callback ,
const WMBssDesc* pInfo ,
const u8* ssid ,
BOOL powerSave ,
u16 authMode
);
callback |
Callback function to be called when the notification of the status for the asynchronous process is sent or when the asynchronous process completes. This callback is called from within the interrupt handler. |
pInfo |
Information on the parent to be connected. Be sure to designate the structure obtained in WM_StartScan or WM_StartScanEx as is. Note that this structure entity will be forcibly cached. |
ssid |
Child information, fixed at 24 bytes (WM_SIZE_CHILD_SSID), to be sent to the parent.The specified data will be sent to the parent by the callback of WM_StartParent. If NULL, the 24 bytes of data will be set to all zeros. |
powerSave |
Designate TRUE if the power-saving mode is being used or FALSE if the full-time response mode is being used. Normally, TRUE should be designated. FALSE should be assigned only when there is a need to perform relatively frequent data sending and receiving in infrastructure mode. If FALSE is designated, significantly more power will be consumed then in power-saving mode. |
authMode |
Authentication mode. Normally, open system authentication (WM_AUTHMODE_OPEN_SYSTEM) should be designated. When designating shared-key authentication (WM_AUTHMODE_SHARED_KEY), authentication that uses WEP encryption will be performed, so a WEP key that is the same as that of the communication partner must be configured in advance of using a function such as WM_SetWEPKeyEx. No other values than these two can be designated. |
Returns the results of the WMErrCode enumerated type process.
Initiates a connection process to a parent. When using infrastructure mode, etc., this function allows a finer degree of control over the connection operations than does WM_StartConnect, but normally there is no need to use this. This function is executable only when the WM is in the IDLE state. If the return value for API is WM_ERRCODE_OPERATING, a callback is triggered when the connection process starts, the request is approved by the parent, and AID was allocated. The callback is also generated when the normal connection state could not be achieved after starting the connection process. When the connection is complete, the WM changes to the CHILD state. After the connection is established, the callback specified by this function is generated when the device is disconnected from the parent. The callback that was specified with this function is also generated if the beacon that was transmitted by the parent on a periodic basis was not received after a set period of time. If the connection process fails along the way and the callback is returned, it indicates that there is an error in the internal state, so try to call WM_Reset before retrying WM_StartConnectEx.
After calling this function, a callback will be generated when the connection as a child device completes as expected, but sometimes before the callback is generated a notification will be generated that shows that there was a beacon receive notification or a disconnect from the parent device. When performing an initialization process, etc., as the child device, perform it before this function is called rather than when the callback has been generated.
Because the API return value WM_ERRCODE_OVER_MAX_ENTRY sometimes occurs temporarily the instant another inappropriate child device without matching GGID or TGID connects to the parent, we recommend that you retry execution.
This problem can arise easily if another IPL child device arrives for a download connection based on the old beacon of the parent device, particularly in the case of connections made immediately before child device program boot during download play.
The pInfo data is forcibly stored in the internal cache. To avoid overwriting surrounding memory regions, be sure to pass data that is 32-byte aligned.
See the Wireless Communication Library Manual (AboutWirelessManager.pdf) for additional details.
WM_StartConnect
WM_StartScan
WM_EndScan
WM_Disconnect
2008/12/17 Added a note about how data passed in arguments is forcibly cached internally.
2007/04/12 Added a note about WM_ERRCODE_OVER_MAX_ENTRY.
2005/06/08 Added the fact that the callback is called from the interrupt handler.
2005/03/02 Made addition to Description.
2005/02/14 Initial version.
CONFIDENTIAL