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 

Getting local MAC Address

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



Joined: 17 Jun 2005
Posts: 30

PostPosted: Thu Jul 28, 2005 7:03 pm    Post subject: Getting local MAC Address Reply with quote

I'm trying to use the sceNetGetLocalEtherAddr() to get the local PSP MAC address. The API only works after the program has made a successful connection to a AP. The API fails if the program haven't made a successful connection to the AP and returns 0x80410180. Anyone know what the error code means? BTW, is there anyway to obtain the local MAC address without having physically made a connection to a AP. Thanks!
Back to top
View user's profile Send private message
Vampire



Joined: 12 Apr 2005
Posts: 138

PostPosted: Thu Jul 28, 2005 10:12 pm    Post subject: Re: Getting local MAC Address Reply with quote

Phantom8 wrote:
BTW, is there anyway to obtain the local MAC address without having physically made a connection to a AP.

sceWlanGetEtherAddr
Back to top
View user's profile Send private message
Phantom8



Joined: 17 Jun 2005
Posts: 30

PostPosted: Fri Jul 29, 2005 12:28 am    Post subject: Reply with quote

Thanks for the reply, Vampire! The sceWlanGetEtherAddr api it's not included in the standard pspsdk library, which means I will need to load a .prx module and patch it my myself. The problem is I don't even know which prx contains this API and also not sure how to patch it. Any hints would be appreciated.
Back to top
View user's profile Send private message
Vampire



Joined: 12 Apr 2005
Posts: 138

PostPosted: Fri Jul 29, 2005 12:40 am    Post subject: Reply with quote

you don't have to load the sceWlan_driver (wlan.prx) because the kernel loads it by default...
Back to top
View user's profile Send private message
Phantom8



Joined: 17 Jun 2005
Posts: 30

PostPosted: Sat Jul 30, 2005 9:35 pm    Post subject: Reply with quote

The standard pspsdk library does not contain this API. It gives me an error of "undefined reference to sceWlanGetEtherAddr" when I tried to compile/link my program. Any other suggestions? Thanks!
Back to top
View user's profile Send private message
rinco



Joined: 21 Jan 2005
Posts: 255
Location: Canberra, Australia

PostPosted: Sat Jul 30, 2005 9:52 pm    Post subject: Reply with quote

so write the necessary .S and .h files and create (or just patch) a Makefile.am.
Back to top
View user's profile Send private message
Phantom8



Joined: 17 Jun 2005
Posts: 30

PostPosted: Sun Jul 31, 2005 12:25 am    Post subject: Reply with quote

I checked other .S files, but don't know how to get the entry point numbers and NIDs for WLAN module and its APIs. Can someone pls help?
Back to top
View user's profile Send private message
PspPet



Joined: 30 Mar 2005
Posts: 210

PostPosted: Sun Jul 31, 2005 1:31 am    Post subject: Reply with quote

> I checked other .S files, but don't know how to get the entry point numbers and NIDs for WLAN module and its APIs.
Code:
   STUB_START   "sceWlanDrv",0x40010000,0x00030004
   STUB_FUNC   0x93440b11,sceWlanDevIsPowerOn
   STUB_FUNC   0xd7763699,sceWlanGetSwitchState
   STUB_FUNC   0x0c622081,sceWlanGetEtherAddr
   STUB_END
or for the single entry
Code:

   STUB_START   "sceWlanDrv",0x40010000,0x00010004
   STUB_FUNC   0x0c622081,sceWlanGetEtherAddr
   STUB_END

(notice the change for the count)

NOTE: you can get most names/nids from the database:
http://pspdev.ofcode.com/api.php?type=2&id=176
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Phantom8



Joined: 17 Jun 2005
Posts: 30

PostPosted: Sun Jul 31, 2005 10:37 pm    Post subject: Reply with quote

The API works nicely now. Thanks everybody for your help. :)
Back to top
View user's profile Send private message
yawza



Joined: 07 Aug 2005
Posts: 2

PostPosted: Wed Aug 10, 2005 12:53 am    Post subject: Reply with quote

but is there anyway to obtain local MAC address without having to connect to a AP?
_________________
"As long as we have loyalty to the end, there is no point in believing in anything...even in those we love"
Back to top
View user's profile Send private message
Warren



Joined: 24 Jan 2004
Posts: 173
Location: San Diego, CA

PostPosted: Wed Aug 10, 2005 2:47 am    Post subject: Reply with quote

I added wlan stuff to PSPSDK last ngiht, check out the example in samples/wlan.
Back to top
View user's profile Send private message
yawza



Joined: 07 Aug 2005
Posts: 2

PostPosted: Thu Aug 11, 2005 1:20 pm    Post subject: Reply with quote

how do I get to samples/wlan?
_________________
"As long as we have loyalty to the end, there is no point in believing in anything...even in those we love"
Back to top
View user's profile Send private message
Warren



Joined: 24 Jan 2004
Posts: 173
Location: San Diego, CA

PostPosted: Thu Aug 11, 2005 1:52 pm    Post subject: Reply with quote

Update to the latest SDK version from SVN (svn://svn.pspdev.org/psp/trunk/pspsdk) you can also access that from http to browse it.

Samples get installed in /usr/local/pspdev/psp/sdk/samples
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