Retrieve files via http
On the quitting problem, you ALSO need to turn off wifi, else it has problems turning it on the next time.
On the other issue, having never used curl, I went to take a look.
Looks like if you don't use a callback, it can write to a file, this is good news indeed.
Now to define the appropriate functions.
Michael
On the other issue, having never used curl, I went to take a look.
Looks like if you don't use a callback, it can write to a file, this is good news indeed.
Now to define the appropriate functions.
Michael
Yeah it comes with a built in way to save files to a filehandle.
http://curl.haxx.se/lxr/source/docs/exa ... pheaders.c uses it to save the headers.
Examples are here: http://curl.haxx.se/libcurl/c/example.html incase you haven't seen them.
http://curl.haxx.se/lxr/source/docs/exa ... pheaders.c uses it to save the headers.
Examples are here: http://curl.haxx.se/libcurl/c/example.html incase you haven't seen them.
-
- Posts: 81
- Joined: Mon Dec 19, 2005 4:09 pm
toolchain install error, compile error
I have not been able to get the wlan example working that was posted in this forum. Installing the latest toolchain gives me an error about netinet/in.h being missing (not in my path) and even If I move files to get around that, I get the same exact error as PSPFAN.
Is anyone else getting this?
If it's working for you...please post your exact makefile and PSPSDK pathing info please.
I have reinstalled cygwin and the toolchain FRESH twice this weekend with no luck (doing it now for a third time). I can compile my application and run it otherwise...but programs using the netinet are giving me real grief.
David Beyer
Is anyone else getting this?
If it's working for you...please post your exact makefile and PSPSDK pathing info please.
I have reinstalled cygwin and the toolchain FRESH twice this weekend with no luck (doing it now for a third time). I can compile my application and run it otherwise...but programs using the netinet are giving me real grief.
David Beyer
You need to do a cvs checkout of the latest psp toolchain, as you will probally be using the old newlib patch which didn't contain this file.
You can copy the .tar.bz2/gz of the newlib/gcc/binutils/gdb source files into the psptoolchain folder before running ./toolchain.sh to save on downloading them again if they are the same version.
Code: Select all
svn checkout svn://svn.pspdev.org/psp/trunk/psptoolchain
cd psptoolchain
./toolchain.sh
-
- Posts: 81
- Joined: Mon Dec 19, 2005 4:09 pm
Strangely enough.. I tried this and had the same result. What I did was go to the oopo site and download the toolchain tar from there and install that... and that took (don't ask me why). Everything is working and compiling fine now. I woke up this morning and did a DAMN! It worked. Took 3 tries.danzel wrote:You need to do a cvs checkout of the latest psp toolchain, as you will probally be using the old newlib patch which didn't contain this file.You can copy the .tar.bz2/gz of the newlib/gcc/binutils/gdb source files into the psptoolchain folder before running ./toolchain.sh to save on downloading them again if they are the same version.Code: Select all
svn checkout svn://svn.pspdev.org/psp/trunk/psptoolchain cd psptoolchain ./toolchain.sh
Thanks for the help. I'm trying to the curl stuff now.
Anyone tried it yet in a real app? (besides the original poster)?
David Beyer
-
- Posts: 81
- Joined: Mon Dec 19, 2005 4:09 pm
blocking vs. nonblocking
I've noticed a lot of libraries coming out for WLAN and transfers are using blocking mode for a lot of their calls. Are there PSP issues with running non-blocking code in background threads (or main thread) that I'm not aware of? In some cases (like interactive games), blocking simply isn't going to work.
David Beyer
David Beyer
-
- Posts: 81
- Joined: Mon Dec 19, 2005 4:09 pm
I made good progress today. I got my app running with WLAN code as follows:danzel wrote:Good to hear you got it going.
I'm using non blocking waits with multiple threads in peldet (irc and telnet client) and I don't have any trouble with it.
I haven't made anything using libcurl yet, I have something in mind though ;)
The main app's main thread is created in KERNEL mode;
it spawns a USER mode main thread;
it spawns a USER mode WLAN background thread;
Had a little problem but then I backed down the stack size of the second spawned user thread and it then worked.
###
I need to see what the differences are in how you do ADHOC vs. INFRASTRUCTURE mode access. I am trying to figure out the best way to exchange data with other WIFI players (I will probably pass it through my web site server). Ideas on this is welcome.
David Beyer
You call a different set of functions to do an adhoc connection, and I don't think these have been properly documented yet. (have a search around)
However, I seem to recall someone saying that if the two psps are set up with infrastructure connections that have the same SSID then they can create some sort of infrastructure connection between themselves, if you search around you may be able to find the thread, I don't think there was much in it though.
I don't have a 2nd psp to test, but if you do then have a play with it :)
If both psps can connect to the same infrastructure then you would be able to send a file directly between them over a tcp socket (through the wifi AP of course).
However, I seem to recall someone saying that if the two psps are set up with infrastructure connections that have the same SSID then they can create some sort of infrastructure connection between themselves, if you search around you may be able to find the thread, I don't think there was much in it though.
I don't have a 2nd psp to test, but if you do then have a play with it :)
If both psps can connect to the same infrastructure then you would be able to send a file directly between them over a tcp socket (through the wifi AP of course).
-
- Posts: 81
- Joined: Mon Dec 19, 2005 4:09 pm
In all likelyhood, few of my game players would be in close proximity to each other for an ADHOC connection but I'd probably like to support it anyways.danzel wrote:You call a different set of functions to do an adhoc connection, and I don't think these have been properly documented yet. (have a search around)
However, I seem to recall someone saying that if the two psps are set up with infrastructure connections that have the same SSID then they can create some sort of infrastructure connection between themselves, if you search around you may be able to find the thread, I don't think there was much in it though.
I don't have a 2nd psp to test, but if you do then have a play with it :)
If both psps can connect to the same infrastructure then you would be able to send a file directly between them over a tcp socket (through the wifi AP of course).
I have to exchange potentially large amounts of varied data between users (location, profiles, etc.) so it will be interesting to see how all this works out.
David Beyer
-
- Posts: 81
- Joined: Mon Dec 19, 2005 4:09 pm