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 

Retrieve files via http
Goto page Previous  1, 2
 
Post new topic   Reply to topic    forums.ps2dev.org Forum Index -> PSP Development
View previous topic :: View next topic  
Author Message
planetusa



Joined: 06 Dec 2005
Posts: 21
Location: Asheville

PostPosted: Fri Jan 13, 2006 5:39 pm    Post subject: Reply with quote

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
Back to top
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger MSN Messenger
danzel



Joined: 04 Nov 2005
Posts: 182

PostPosted: Sat Jan 14, 2006 2:22 pm    Post subject: Reply with quote

Yeah it comes with a built in way to save files to a filehandle.
http://curl.haxx.se/lxr/source/docs/examples/sepheaders.c uses it to save the headers.

Examples are here: http://curl.haxx.se/libcurl/c/example.html incase you haven't seen them.
Back to top
View user's profile Send private message
dbeyer3069



Joined: 19 Dec 2005
Posts: 81

PostPosted: Sun Jan 15, 2006 2:41 pm    Post subject: toolchain install error, compile error Reply with quote

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
Back to top
View user's profile Send private message
danzel



Joined: 04 Nov 2005
Posts: 182

PostPosted: Sun Jan 15, 2006 9:23 pm    Post subject: Reply with quote

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.
Code:
svn checkout svn://svn.pspdev.org/psp/trunk/psptoolchain
cd psptoolchain
./toolchain.sh

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.
Back to top
View user's profile Send private message
dbeyer3069



Joined: 19 Dec 2005
Posts: 81

PostPosted: Mon Jan 16, 2006 4:51 am    Post subject: Reply with quote

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.
Code:
svn checkout svn://svn.pspdev.org/psp/trunk/psptoolchain
cd psptoolchain
./toolchain.sh

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.


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.

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
Back to top
View user's profile Send private message
dbeyer3069



Joined: 19 Dec 2005
Posts: 81

PostPosted: Mon Jan 16, 2006 4:57 am    Post subject: blocking vs. nonblocking Reply with quote

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
Back to top
View user's profile Send private message
danzel



Joined: 04 Nov 2005
Posts: 182

PostPosted: Mon Jan 16, 2006 8:13 am    Post subject: Reply with quote

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 ;)
Back to top
View user's profile Send private message
dbeyer3069



Joined: 19 Dec 2005
Posts: 81

PostPosted: Tue Jan 17, 2006 8:07 am    Post subject: Reply with quote

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 ;)


I made good progress today. I got my app running with WLAN code as follows:

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
Back to top
View user's profile Send private message
danzel



Joined: 04 Nov 2005
Posts: 182

PostPosted: Tue Jan 17, 2006 8:44 am    Post subject: Reply with quote

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).
Back to top
View user's profile Send private message
dbeyer3069



Joined: 19 Dec 2005
Posts: 81

PostPosted: Tue Jan 17, 2006 11:04 am    Post subject: Reply with quote

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).


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.

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
Back to top
View user's profile Send private message
pailes



Joined: 16 Feb 2007
Posts: 16

PostPosted: Thu Feb 22, 2007 9:00 am    Post subject: Reply with quote

Hey this is really nice. Can we use this code freely for our own purpose?
Back to top
View user's profile Send private message Visit poster's website
dbeyer3069



Joined: 19 Dec 2005
Posts: 81

PostPosted: Thu Feb 22, 2007 9:59 am    Post subject: Reply with quote

pailes wrote:
Hey this is really nice. Can we use this code freely for our own purpose?


Yes.. feel free. I no longer develop for the PSP (at least for now).

David Beyer
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
Goto page Previous  1, 2
Page 2 of 2

 
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