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 

0x8002013a, Use ad-hoc ?

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



Joined: 12 Mar 2007
Posts: 1

PostPosted: Mon Mar 12, 2007 2:32 am    Post subject: 0x8002013a, Use ad-hoc ? Reply with quote

Hi,First of all my ingles :)
I canīt work with wifi, my code is :
Code:

#include <pspkernel.h>
#include <pspdebug.h>
#include <pspdisplay.h>
#include <pspctrl.h>
#include <pspwlan.h>
#include <pspsdk.h>
#include <pspnet_adhoc.h>
#include <string.h>

PSP_MODULE_INFO("Wifi", 0x1000, 1, 1);
/* Define the main thread's attribute value (optional) */
PSP_MAIN_THREAD_ATTR(0);
SceUID load_start_module(const char *path, int flags, int type);
int sceNetInit(u32 r4, u32 r5, u32 r6, u32 r7, u32 r8);
/* Define printf, just to make typing easier */
#define printf   pspDebugScreenPrintf

int user_main(SceSize args, void *argp){
    SceCtrlData pad;
    u32 err;
    printf("User main\n");
    printf("sceNetInit()\n");
    err = sceNetInit(0x20000, 0x20, 0x1000, 0x20, 0x1000);
    printf("Return: %x\n",err);
    printf("sceNetAdhocInit()\n");
    err = sceNetAdhocInit();
    printf("Return: %x\n",err);
    while(1){
    sceCtrlReadBufferPositive(&pad,1);
    if( pad.Buttons & PSP_CTRL_DOWN ) { break; }
    }
}

int main(int argc, char *argp[]){
    pspDebugScreenInit();
    printf("Loading PRX...\n");
    printf("Return: %x\n",load_start_module("flash0:/kd/ifhandle.prx", 0, 0));
    printf("Return: %x\n",load_start_module("flash0:/kd/memab.prx", 0, 0));
    printf("Return: %x\n",load_start_module("flash0:/kd/pspnet_adhoc_auth.prx", 0, 0));
    printf("Return: %x\n",load_start_module("flash0:/kd/pspnet.prx", 0, 0));
    printf("Return: %x\n",load_start_module("flash0:/kd/pspnet_adhoc.prx", 0, 0));
    printf("Return: %x\n",load_start_module("flash0:/kd/pspnet_adhocctl.prx", 0, 0));
    printf("Return: %x\n",load_start_module("flash0:/kd/pspnet_adhoc_matching.prx", 0, 0));
   
    /* create user thread */
    SceUID thid = sceKernelCreateThread("User Mode Thread", user_main,
            0x11, // default priority
            256 * 1024, // stack size (256KB is regular default)
            PSP_THREAD_ATTR_USER, NULL); //# user mode

    // start user thread, then wait for it to do everything else
    sceKernelStartThread(thid, 0, 0);
    sceKernelWaitThreadEnd(thid, NULL);

   /* quick clean exit */
   sceKernelExitGame();
   
    return 0;
}
SceUID load_start_module(const char *path, int flags, int type)
{
   SceKernelLMOption option;
   SceUID mpid;
    SceModule *mod;
   SceUID modid;
    int fd;
    /* If the type is 0, then load the module in the kernel partition, otherwise load it
      in the user partition. */
   if (type == 0) {
      mpid = 1;
   } else {
      mpid = 2;
   }

   memset(&option, 0, sizeof(option));
   option.size = sizeof(option);
   option.mpidtext = mpid;
   option.mpiddata = mpid;
   option.position = 0;
   option.access = 1;

   modid = sceKernelLoadModule(path, flags, type > 0 ? &option : NULL);
    mod = sceKernelFindModuleByUID(modid);   
   return sceKernelStartModule(modid, 0, NULL, &fd, NULL);
}


sceNetInit(0x20000, 0x20, 0x1000, 0x20, 0x1000); and sceNetAdhocInit();
return the error SCE_KERNEL_ERROR_LIBRARY_NOT_YET_LINKED = 0x8002013a , why ? I read some post, but i didnīt find the info or i didnīt understand it
_________________
:)
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