![]() |
|
#1
|
|||
|
|||
|
__________________
Have you ever want to use your computer away from your home? Do you wish you can have your desktop/laptop at the palm of your hand. Comming soon within 2008, homebrew program call \"NetPlay\" which will allow you to use your computer where ever you go. Ether through Adhoc or Wifi, it can be done. All you need is a router, for wifi, or a wifi card/adapter for adhoc. Goto http://www.psp-hacks.com/forums/viewtopic.php?id=146907 and learn more. |
|
#2
|
|||
|
|||
|
maybe post your code?
|
|
#3
|
|||
|
|||
|
Im not ready to post my code, but I can post the parts of the code.
__________________
Have you ever want to use your computer away from your home? Do you wish you can have your desktop/laptop at the palm of your hand. Comming soon within 2008, homebrew program call \"NetPlay\" which will allow you to use your computer where ever you go. Ether through Adhoc or Wifi, it can be done. All you need is a router, for wifi, or a wifi card/adapter for adhoc. Goto http://www.psp-hacks.com/forums/viewtopic.php?id=146907 and learn more. |
|
#4
|
||||
|
||||
|
Well then...?
__________________
The PSP Programming and Development Mega Thread VDrum downloaded over 10000 times! PSN: Xsjado7 |
|
#5
|
|||
|
|||
|
Here is what code i use then. This wont be the full coding of my program.
Code:
if (pad.Buttons != 0){
if (pad.Buttons & PSP_CTRL_CROSS){
pspDebugScreenPrintf("Activating Wlan Mode");
int sceWlanDevIsPowerOn();
}
}
}
if (pad.Buttons & PSP_CTRL_CIRCLE){
pspDebugScreenPrintf("Activating Adhoc Mode.");
if(sceNetAdhocInit() < 0){
pspDebugScreenPrintf("ERR on ADHOC");
}
//retVal = sceWlanGetEtherAddr(sVal);
// int sceNetAdhocPdpCreate(retVal, 0x309, 0x400, 0);
}
sceKernelExitGame();
}
Code:
#include <pspkernel.h> #include <pspdebug.h> #include <pspsdk.h> #include <stdio.h> #include <string.h> #include <unistd.h> #include <pspwlan.h> #include <pspnet_apctl.h> #include <psppower.h> #include <arpa/inet.h> #include <pspdisplay.h> #include <pspctrl.h> #include <psputility_netparam.h> #include <pspnet_adhoc.h> #include <pspnet_adhocctl.h> #include <pspnet_adhocmatching.h> #include <pspnet.h> Can someone please help me with the wlan connection, or the adhoc connection?
__________________
Have you ever want to use your computer away from your home? Do you wish you can have your desktop/laptop at the palm of your hand. Comming soon within 2008, homebrew program call \"NetPlay\" which will allow you to use your computer where ever you go. Ether through Adhoc or Wifi, it can be done. All you need is a router, for wifi, or a wifi card/adapter for adhoc. Goto http://www.psp-hacks.com/forums/viewtopic.php?id=146907 and learn more. |
|
#6
|
|||
|
|||
|
Ok, start with this:
In case you don't know, prx from kd folder are libraries and you need to link them to use the adhoc or infrastructure. Use the code below to link the libraries as you can't load them directly with a load module function as it requires kernel mode. Code:
int utility = 0;
utility = sceUtilityLoadNetModule(PSP_NET_MODULE_COMMON);
if (utility < 0)
{
printf("Error loading PSP_NET_MODULE_COMMON 0x%08X", utility);
}
utility = sceUtilityLoadNetModule(PSP_NET_MODULE_ADHOC);
if (utility < 0)
{
printf("Error loading PSP_NET_MODULE_ADHOC 0x%08X", utility);
}
Code:
sceNetInit(0x20000, 0x20, 0x1000, 0x20, 0x1000); then initialize the adhoc: Code:
sceNetAdhocInit(); I ported a 1.50 adhoc sample from psp-programming.com to 3.xx version (should work on 4.0.1 m33 too, I haven't tried it yet) |
|
#7
|
||||
|
||||
|
Have you even put that 3.xx ported code into anything or did you just get bored one day and decide to get it working on the new kernel :P
__________________
The PSP Programming and Development Mega Thread VDrum downloaded over 10000 times! PSN: Xsjado7 |
|
#8
|
|||
|
|||
|
I decied to get it working on the new kernel xD
But I need it for my adhoc file transfer for NervOS. Haven't worked on it for a while, I have added/fixed a total of 60 things (mostly new features and 3 beta versions left until the 2.1 release) I always forget about it. Maybe on 2.0.9 beta I will work on it as I have done almost everything that can be done |
|
#9
|
|||
|
|||
|
Here is the message I get when I try to compile that.
Code:
psp-gcc -I. -IC:/pspdev/psp/sdk/include -O2 -G0 -Wall -c -o main.o main.c main.c(24) : warning: type defaults to 'int' in declaration of 'utility' main.c(24) : error: redefinition of 'utility' main.c(23) : error: previous definition of 'utility' was here main.c(24) : warning: implicit declaration of function 'sceUtilityLoadNetModule' main.c(24) : error: 'PSP_NET_MODULE_ADHOC' undeclared here (not in a function) main.c(24) : error: initializer element is not constant main.c(24) : warning: data definition has no type or storage class main.c(25) : error: syntax error before 'if' main.c: In function 'main_thread': main.c(34) : error: 'Return' undeclared (first use in this function) main.c(34) : error: (Each undeclared identifier is reported only once main.c(34) : error: for each function it appears in.) main.c(34) : error: syntax error before numeric constant make: *** [main.o] Error 1 Code:
#include <pspkernel.h>
#include <pspdebug.h>
#include <pspsdk.h>
#include <stdio.h>
#include <string.h>
#include <unistd.h>
#include <pspwlan.h>
#include <pspnet_apctl.h>
#include <psppower.h>
#include <arpa/inet.h>
#include <pspdisplay.h>
#include <pspctrl.h>
#include <psputility_netparam.h>
#include <pspnet_adhoc.h>
#include <pspnet_adhocctl.h>
#include <pspnet_adhocmatching.h>
#include <pspnet.h>
PSP_MODULE_INFO("ADHOC_CONNECT", 0x0800, 0, 1);
PSP_MAIN_THREAD_ATTR(0);
PSP_HEAP_SIZE_KB(1000);
int utility = 0;
utility = sceUtilityLoadNetModule(PSP_NET_MODULE_ADHOC);
if (utility < 0)
{
printf("Error loading PSP_NET_MODULE_ADHOC 0x%08X", utility);
}
int main_thread(SceSize args, void *argp)
{
sceNetAdhocInit();
Return 0;
}
int module_start(SceSize args, void *argp) {
int thid;
thid = sceKernelCreateThread("my prx", main_thread, 0x18, 0x0800, 0, NULL);
if(thid >= 0) sceKernelStartThread(thid, args, argp);
return 0;
}
__________________
Have you ever want to use your computer away from your home? Do you wish you can have your desktop/laptop at the palm of your hand. Comming soon within 2008, homebrew program call \"NetPlay\" which will allow you to use your computer where ever you go. Ether through Adhoc or Wifi, it can be done. All you need is a router, for wifi, or a wifi card/adapter for adhoc. Goto http://www.psp-hacks.com/forums/viewtopic.php?id=146907 and learn more. |
|
#10
|
|||
|
|||
|
Add this to your includes:
Code:
#include <pspnet.h> #include <pspnet_adhoc.h> #include <pspnet_adhocctl.h> #include <pspnet_adhocmatching.h> #include <pspnet_apctl.h> #include <psputility.h> #include <psputility_netmodules.h> #include <pspwlan.h> -lpspnet_adhocmatching -lpspnet_adhocctl -lpspnet_adhoc -lpsputility -lpspwlan |
![]() |
|
|
|||
|
|||
|
|
| Thread Tools | |
| Display Modes | |
|
|