Wifi Scanning or How Racing Ridges leads to Information Loss

Discuss the development of new homebrew software, tools and libraries.

Moderators: cheriff, TyRaNiD

Post Reply
TyRaNiD
Posts: 907
Joined: Sun Jan 18, 2004 12:23 am

Wifi Scanning or How Racing Ridges leads to Information Loss

Post by TyRaNiD »

You can tell you are bored when you find yourself typing semi-humourous subjects.

Anyway wifi scanning, people keep begging for a crappy little wireless access point scanner but up to now I don't think anyone has bothered to work out how to do it (forgive me if I am wrong). So I took a look at scan.prx from my japanese copy of ridge racer and this is what I've come up with.

First off there is a sample of this in the latest pspsdk, best check that out really as it contains all the structures and stuff you have to do to get the functions to work.

Wifi scanning uses three functions from sceNet_lib (not the normal sceNet) I am at a loss to work out the names so here is the libdoc names :)

int sceNet_lib_5216CBF5(const char *name);
int sceNet_lib_7BA3ED91(const char *name, void *type, u32 *size, void *buf, u32 *unk);
int sceNet_lib_D2422E4D(const char *name);

The first function enables the wifi nic in a scanning mode, the third turns that back off. The second one is the most important, it actually does the scan. Name is the same as the one you pass to the other two functions ("wlan"), type is a complex structure which must be filled correctly for it to work, size is the size of buf which is where your scan data is written to and unk is well unknown ;)

And well it works :P The sample btw is a prx as I couldn't be bothered making sure the special libs get linked in properly so you will need to run it in something which can load a prx and display stdout to you for the scan results *hint* psplink *hint*. Oh and you need to preload ifhandle.prx and pspnet.prx. You should get something like:

==================
BSS: 1
==================
BSSID: XX:XX:XX:XX:XX:XX
SSID: bored
bsstype: Infrastructure
Beacon Period: 100
DTIM period: 0
Timestamp: 0
Local Time: 0
Channel: 1
ATIM: 0
Capability Information: ESS,
Rate: Basic 1000 kbps, Basic 2000 kbps, Basic 5500 kbps, Basic 11000 kbps,
RSSI: 69

Anyway hopefully someone less lazy can make this all wizzy with a graphical interface etc. as I have better things I should have been doing.
jtwald
Posts: 24
Joined: Wed Jan 04, 2006 2:57 am

Post by jtwald »

airsnort/netstumbler port anyone?
pspkrazy
Posts: 49
Joined: Mon Jul 04, 2005 1:31 am

Compilation

Post by pspkrazy »

Tyranid, when i try to compile then start your sample,
I got a black screen then a reboot with some error code (800200d9).

am i missing something ?

thanks in advance.
TyRaNiD
Posts: 907
Joined: Sun Jan 18, 2004 12:23 am

Post by TyRaNiD »

How exactly are you loading the file? If you are running it from an EBOOT it will probably not work, you need to load it using Load/Start Module etc. The ideal is running it in psplink but not everyone has acess to that and it probably doesn't work too well if you are using the wifi shell.
pspkrazy
Posts: 49
Joined: Mon Jul 04, 2005 1:31 am

Thanks

Post by pspkrazy »

Thanks for the reply anyway
I will load required prxs in an EBOOT :)

This is the only way i know...
Post Reply