我需要一种方法来检查我的 DS 自制软件上的 Wi-Fi 路由器/接入点。我正在使用 PAlib。
2 回答
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)
如果我是你,我会避开 PALib。它构建在过时的 libnds 版本之上,并且为了向后兼容而没有使用新版本进行更新。相反,花时间学习 libnds,并从一个维护良好且没有自身依赖关系的库中获益。sylvainulg 上面写的相同代码仍然可以工作,因为它依赖于 dswifi,而不是 libnds 或 PALib。