Posted By: wraggster
News/release from Rex_VF5
OK boys and girls (if any here). As my first project on PSP and an attempt to do some C/C++ coding I decided non-the-less to do UPNP client (I aim for PS3 look-and-feel - i.e. integrated into XMB creating a virtual drive holding all the UPnP servers & available media). The base for this is to be provided by Portable SDK for UPnP Devices (libupnp 1.6.6) With a pthread PSP port it only took few hours to replace some stuff not available on PSP (more time was spent to learn about setting up toolchain, configure scripts, etc). I added conditional compilation everywhere so it should be possible to build for other platforms from the modified sources (haven't tested it though). Here's what to do:
0) Get pthread-emb, cd platform/psp; make; sudo make install Do not forget to copy pthread.h and sched.h to your `psp-config --psp-prefix`/include directory
1) Apply the provided diff to the libupnp-1.6.6 source
2) ./configure.psp.sh --disable-samples --enable-debug
3) sudo make install
4) cd upnp/test; make
The last step should produce runnable test_init stuff.prx, EBOOT.PBP and PARAM.SFO which should start and stop basic stuff and show some info about it like this:
UPNP_VERSION_STRING = "1.6.6"
UPNP_VERSION_MAJOR = 1
UPNP_VERSION_MINOR = 6
UPNP_VERSION_PATCH = 6
UPNP_VERSION = 10606
UPNP_HAVE_DEBUG = yes
UPNP_HAVE_CLIENT = yes
UPNP_HAVE_DEVICE = yes
UPNP_HAVE_WEBSERVER = yes
UPNP_HAVE_TOOLS = yes
Initializing UPnP ...
UPnP Initialized OK ip=192.168.1.3, port=49152
I included a netdialog sample into it to connect to AP at the beginning. However it crashes in pthread-emb in thread creation in harmless(?) assignment of result to a variable - see my post in pthread-emb thread Also I found later that pthread-psp-test hangs on Semaphore test #4 (maybe unrelated to the this thing).
Any help getting this up and running is warmly welcomed. I am really stuck. There is high probability I screwed up something as I am new to PSP development and haven't coded in C/C++ in years (I do Java). I believe many could benefit from having this library working...