DSWifi
|
Enumerations | |
enum | WIFI_ASSOCSTATUS { ASSOCSTATUS_DISCONNECTED , ASSOCSTATUS_SEARCHING , ASSOCSTATUS_AUTHENTICATING , ASSOCSTATUS_ASSOCIATING , ASSOCSTATUS_ACQUIRINGDHCP , ASSOCSTATUS_ASSOCIATED , ASSOCSTATUS_CANNOTCONNECT } |
Returned by Wifi_AssocStatus() after calling Wifi_ConnectAP() More... | |
enum | WIFI_RETURN { WIFI_RETURN_OK = 0 , WIFI_RETURN_LOCKFAILED = 1 , WIFI_RETURN_ERROR = 2 , WIFI_RETURN_PARAMERROR = 3 } |
Error codes for Wifi_GetAPData() More... | |
Functions | |
int | Wifi_AssocStatus (void) |
Returns information about the status of connection to an AP. | |
void | Wifi_AutoConnect (void) |
Connect to an Access Point specified by the WFC data in the firmware. | |
int | Wifi_ConnectAP (Wifi_AccessPoint *apdata, int wepmode, int wepkeyid, unsigned char *wepkey) |
Connect to an Access Point. | |
int | Wifi_ConnectOpenAP (Wifi_AccessPoint *apdata) |
Connect to an AP without encryption (and NDS multiplayer hosts). | |
int | Wifi_DisconnectAP (void) |
Disassociate from the Access Point. | |
int | Wifi_FindMatchingAP (int numaps, Wifi_AccessPoint *apdata, Wifi_AccessPoint *match_dest) |
Determines whether various APs exist in the local area. | |
int | Wifi_GetAPData (int apnum, Wifi_AccessPoint *apdata) |
Grabs data from internal structures for user code (always succeeds). | |
int | Wifi_GetNumAP (void) |
Returns the current number of APs that are known and tracked internally. | |
void | Wifi_ScanMode (void) |
Makes the ARM7 go into scan mode and list Internet APs. | |
void | Wifi_ScanModeFilter (Wifi_APScanFlags flags) |
Makes the ARM7 go into scan mode, filterint out the requested device types. | |
enum WIFI_ASSOCSTATUS |
Returned by Wifi_AssocStatus() after calling Wifi_ConnectAP()
enum WIFI_RETURN |
Error codes for Wifi_GetAPData()
int Wifi_AssocStatus | ( | void | ) |
Returns information about the status of connection to an AP.
Continue polling this function until you receive ASSOCSTATUS_CONNECTED or ASSOCSTATUS_CANNOTCONNECT.
int Wifi_ConnectAP | ( | Wifi_AccessPoint * | apdata, |
int | wepmode, | ||
int | wepkeyid, | ||
unsigned char * | wepkey | ||
) |
Connect to an Access Point.
apdata | Basic data about the AP. |
wepmode | Indicates whether WEP is used, and what kind (WEPMODES). Use WEPMODE_NONE if WEP isn't required. |
wepkeyid | Indicates which WEP key ID to use for transmitting (normally 0). |
wepkey | The WEP key, to be used in all 4 key slots. For WEPMODE_40BIT it is a 5 byte long array. For WEPMODE_128BIT it is a 13 byte long array. |
int Wifi_ConnectOpenAP | ( | Wifi_AccessPoint * | apdata | ) |
Connect to an AP without encryption (and NDS multiplayer hosts).
apdata | Basic data about the AP. |
int Wifi_DisconnectAP | ( | void | ) |
Disassociate from the Access Point.
int Wifi_FindMatchingAP | ( | int | numaps, |
Wifi_AccessPoint * | apdata, | ||
Wifi_AccessPoint * | match_dest | ||
) |
Determines whether various APs exist in the local area.
You provide a list of APs, and it will return the index of the first one in the list that can be found in the internal list of APs that are being tracked.
numaps | Number of records in the list. |
apdata | Pointer to an array of structures with information about the APs to find. |
match_dest | OPTIONAL pointer to a record to receive the matching AP record. |
int Wifi_GetAPData | ( | int | apnum, |
Wifi_AccessPoint * | apdata | ||
) |
Grabs data from internal structures for user code (always succeeds).
apnum | The 0-based index of the access point record to fetch. |
apdata | Pointer to the location to store the retrieved data. |
int Wifi_GetNumAP | ( | void | ) |
Returns the current number of APs that are known and tracked internally.
void Wifi_ScanMode | ( | void | ) |
Makes the ARM7 go into scan mode and list Internet APs.
The ARM7 periodically rotates through the channels to pick up and record information from beacons given off by APs.
When in DSWIFI_INTERNET mode, this function will scan looking for Internet APs. It will list all detecetd APs, whether they are compatible with a DS or not (because of using WPA, for example). However, NDS devices acting as hosts are excluded.
When in DSWIFI_MULTIPLAYER_CLIENT, this function will scan looking for other NDS consoles acting as multiplayer hosts. It will filter out all devices that aren't NDS devices acting as multiplayer hosts (only devices that include Nintendo vendor information in their beacon packets are added to the list).
void Wifi_ScanModeFilter | ( | Wifi_APScanFlags | flags | ) |
Makes the ARM7 go into scan mode, filterint out the requested device types.
The ARM7 periodically rotates through the channels to pick up and record information from beacons given off by APs.
flags | Types of devices to include to the list of scanned devices. |