| View previous topic :: View next topic |
| Author |
Message |
Phantom8
Joined: 17 Jun 2005 Posts: 30
|
Posted: Thu Jul 28, 2005 7:03 pm Post subject: Getting local MAC Address |
|
|
| 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 |
|
 |
Vampire
Joined: 12 Apr 2005 Posts: 138
|
Posted: Thu Jul 28, 2005 10:12 pm Post subject: Re: Getting local MAC Address |
|
|
| 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 |
|
 |
Phantom8
Joined: 17 Jun 2005 Posts: 30
|
Posted: Fri Jul 29, 2005 12:28 am Post subject: |
|
|
| 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 |
|
 |
Vampire
Joined: 12 Apr 2005 Posts: 138
|
Posted: Fri Jul 29, 2005 12:40 am Post subject: |
|
|
| you don't have to load the sceWlan_driver (wlan.prx) because the kernel loads it by default... |
|
| Back to top |
|
 |
Phantom8
Joined: 17 Jun 2005 Posts: 30
|
Posted: Sat Jul 30, 2005 9:35 pm Post subject: |
|
|
| 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 |
|
 |
rinco
Joined: 21 Jan 2005 Posts: 255 Location: Canberra, Australia
|
Posted: Sat Jul 30, 2005 9:52 pm Post subject: |
|
|
| so write the necessary .S and .h files and create (or just patch) a Makefile.am. |
|
| Back to top |
|
 |
Phantom8
Joined: 17 Jun 2005 Posts: 30
|
Posted: Sun Jul 31, 2005 12:25 am Post subject: |
|
|
| 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 |
|
 |
PspPet
Joined: 30 Mar 2005 Posts: 210
|
Posted: Sun Jul 31, 2005 1:31 am Post subject: |
|
|
> 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 |
|
 |
Phantom8
Joined: 17 Jun 2005 Posts: 30
|
Posted: Sun Jul 31, 2005 10:37 pm Post subject: |
|
|
| The API works nicely now. Thanks everybody for your help. :) |
|
| Back to top |
|
 |
yawza
Joined: 07 Aug 2005 Posts: 2
|
Posted: Wed Aug 10, 2005 12:53 am Post subject: |
|
|
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 |
|
 |
Warren
Joined: 24 Jan 2004 Posts: 173 Location: San Diego, CA
|
Posted: Wed Aug 10, 2005 2:47 am Post subject: |
|
|
| I added wlan stuff to PSPSDK last ngiht, check out the example in samples/wlan. |
|
| Back to top |
|
 |
yawza
Joined: 07 Aug 2005 Posts: 2
|
Posted: Thu Aug 11, 2005 1:20 pm Post subject: |
|
|
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 |
|
 |
Warren
Joined: 24 Jan 2004 Posts: 173 Location: San Diego, CA
|
Posted: Thu Aug 11, 2005 1:52 pm Post subject: |
|
|
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 |
|
 |
|