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 

PRX & Networking Libraries... Help needed.

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



Joined: 08 Feb 2007
Posts: 155

PostPosted: Sat Apr 04, 2009 10:35 am    Post subject: PRX & Networking Libraries... Help needed. Reply with quote

Hi guys~

I need to use the Networking Functions of the PSP to connect to a Access Point and from there on to a server of mine...

All of this has to work from inside a PRX somehow... while a game is running.

I've figured out that loading the Networking Modules from a Kernel PRX seems to fail, for whatever reasons...

And inside a Usermodule they only load decrypted and decompressed from Memory Stick... not from Flash. But that really isn't what I want to know anyway.

So - the module is loaded, yet when I try to start the Module it gives me a 8002013C error, which equals "Library not yet loaded"... as the library loaded fine with kuKernelLoadModule though... it should be!

Further - I also get a error when I try to load the sceNetInetInit Function...

Check it out here in this log...
Code:
Loading pspnet_inet.prx returns 0445AA45.
Starting pspnet_inet.prx returns 8002013C.
sceNetInetInit returns 8002013A.

As always, I'm up for possible ideas of cause.

Also here's the codesnippet I use... it's running from inside it's own Userthread in a Usermode Module.
Code:
  // Target Memory Space
  SceUID mpid = PSP_MEMORY_PARTITION_USER;
 
  // User Module Loading Options
  SceKernelLMOption option;
  memset(&option, 0, sizeof(option));
  option.size = sizeof(option);
  option.mpidtext = mpid;
  option.mpiddata = mpid;
  option.position = 0;
  option.access = 1;
 
  result = kuKernelLoadModule("ms0:/km/pspnet_inet.prx", 0, &option);
  sprintf(log, "Loading pspnet_inet.prx returns %08X.\n", result);
  debuglog(log);
 
  if(!(result & 0x80000000))
  {
    int startstatus = 0;
    result = sceKernelStartModule(result, 0, NULL, &startstatus, NULL);
    sprintf(log, "Starting pspnet_inet.prx returns %08X.\n", result);
    debuglog(log);
  }
 
  result = sceNetInetInit();
  sprintf(log, "sceNetInetInit returns %08X.\n", result);
  debuglog(log);

_________________
Been gone for some time. Now I'm back. Someone mind getting me up-2-date?
Back to top
View user's profile Send private message MSN Messenger
Insert_witty_name



Joined: 10 May 2006
Posts: 376

PostPosted: Sat Apr 04, 2009 9:53 pm    Post subject: Reply with quote

Use sceUtilityLoadModule() from psputility_modules.h to load the modules you need in user mode.
Back to top
View user's profile Send private message
Coldbird



Joined: 08 Feb 2007
Posts: 155

PostPosted: Sat Apr 04, 2009 10:32 pm    Post subject: Reply with quote

Different Function - Different Error.

sceUtilityLoadModule returns 800200D9 - Error while allocating memory Block
sceUtilityLoadNetModule returns 80110801...

I do know that the error is quite self-explaining but I really doubt those errors lately as I got a module not found error even though the module was there...

Suggestions?
_________________
Been gone for some time. Now I'm back. Someone mind getting me up-2-date?
Back to top
View user's profile Send private message MSN Messenger
TyRaNiD



Joined: 18 Jan 2004
Posts: 918

PostPosted: Sat Apr 04, 2009 10:58 pm    Post subject: Reply with quote

As the modules need to load into user memory (no way around that, and you wouldn't have space in kernel mode anyway) then you will just hit the problem that games will probably have consumed all memory anyway. Tbh you are screwed unless you implement a simple kernel mode version and talk to the kernel library for handling the wifi card directly. Oh did I mention none of that is simple or documented. Come back when you have reversed it all :)
Back to top
View user's profile Send private message
Coldbird



Joined: 08 Feb 2007
Posts: 155

PostPosted: Sat Apr 04, 2009 11:05 pm    Post subject: Reply with quote

In fact the module I'm loading it from is Usermode.
Also I'm using a Kernel module in the background which the User Module can access via Syscalls.

@TyRaNiD: Wonderful news... seriously. lol.
_________________
Been gone for some time. Now I'm back. Someone mind getting me up-2-date?
Back to top
View user's profile Send private message MSN Messenger
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