forums.ps2dev.org Forum Index forums.ps2dev.org
Homebrew PS2, PSP & PS3 Development Discussions
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Wifi Scanning or How Racing Ridges leads to Information Loss

 
Post new topic   Reply to topic    forums.ps2dev.org Forum Index -> PSP Development
View previous topic :: View next topic  
Author Message
TyRaNiD



Joined: 18 Jan 2004
Posts: 918

PostPosted: Mon Jan 09, 2006 10:06 am    Post subject: Wifi Scanning or How Racing Ridges leads to Information Loss Reply with quote

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.
Back to top
View user's profile Send private message
jtwald



Joined: 04 Jan 2006
Posts: 24

PostPosted: Mon Jan 09, 2006 11:36 am    Post subject: Reply with quote

airsnort/netstumbler port anyone?
_________________
http://www.omlette.net/uniterror/
Back to top
View user's profile Send private message AIM Address
pspkrazy



Joined: 04 Jul 2005
Posts: 49

PostPosted: Mon Jan 09, 2006 10:27 pm    Post subject: Compilation Reply with quote

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.
Back to top
View user's profile Send private message
TyRaNiD



Joined: 18 Jan 2004
Posts: 918

PostPosted: Tue Jan 10, 2006 3:39 am    Post subject: Reply with quote

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.
Back to top
View user's profile Send private message
pspkrazy



Joined: 04 Jul 2005
Posts: 49

PostPosted: Tue Jan 10, 2006 4:42 am    Post subject: Thanks Reply with quote

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

This is the only way i know...
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    forums.ps2dev.org Forum Index -> PSP Development All times are GMT + 10 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group