I need a way to check for Wi-Fi routers/access points on my DS homebrew. I'm using PAlib.
How do I programatically search for Wi-Fi access point using PAlib on the Nintendo DS
638 views Asked by MrValdez At
2
There are 2 answers
0
On
i used the code from ds_wifi_test (which comes with the original dswifi library) when i tried to implement this. Basically, access points are scanned internally when you invoke Wifi_ScanMode()
. You can then have the number of AP identified with Wifi_GetNumAP()
and retrieve the information for the ith access point with Wifi_GetAPData(i,&data);
nbitems=Wifi_GetNumAP();
Wifi_AccessPoint ap;
for (int i=0;i<nbitems; i++) {
if(Wifi_GetAPData(i+scrolltop,&ap)==WIFI_RETURN_OK)
do_whatever_with(&ap);
}
I'm not aware of any "helper" functions through the PALib in this regards. All the PALib seems to have is a few "wrappers" to ease common tasks once a WFC setting has been defined (see day#20 tutorial)
If I were you, I'd steer clear of PALib. It's built atop an outdated version of libnds, and isn't updated with the new version in the interests of backwards-compatibility. Instead, take the time to learn libnds, and reap the benefits of a well-maintained library that doesn't have dependencies of its own. The same code that sylvainulg wrote above will still work, as it is dependant on dswifi, not libnds or PALib.