PRX & Networking Libraries... Help needed.

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

Moderators: cheriff, TyRaNiD

Post Reply
User avatar
Coldbird
Posts: 97
Joined: Thu Feb 08, 2007 7:22 am

PRX & Networking Libraries... Help needed.

Post by Coldbird »

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: Select all

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: Select all

  // 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?
Insert_witty_name
Posts: 376
Joined: Wed May 10, 2006 11:31 pm

Post by Insert_witty_name »

Use sceUtilityLoadModule() from psputility_modules.h to load the modules you need in user mode.
User avatar
Coldbird
Posts: 97
Joined: Thu Feb 08, 2007 7:22 am

Post by Coldbird »

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?
TyRaNiD
Posts: 907
Joined: Sun Jan 18, 2004 12:23 am

Post by TyRaNiD »

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 :)
User avatar
Coldbird
Posts: 97
Joined: Thu Feb 08, 2007 7:22 am

Post by Coldbird »

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?
Post Reply