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 

triEngine problem(?)

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



Joined: 04 Jun 2009
Posts: 56

PostPosted: Sun Oct 04, 2009 4:25 pm    Post subject: triEngine problem(?) Reply with quote

I'm working on a multiplayer pong game. Everything works fine but now I'm on the part that I should connect to the server, retrieve player2's x and y cords etc etc.
Before I was going to do this I thought "Hey, lets do a few tests". I created a page to fetch and to display it on the PSP screen. I'm using the triEngine, I gotta love the net part!

So this is what happens: everything compiles fine and runs fine but somehow the screen stays at "Please wait. Connecting to access point...". Just see for yourself;

http://pastebin.com/m743ee907 (if you got any comments on the code etc, do tell)

http://www.producted.net/POPong/POPong.rar (eboot)

Thanks in advance
_________________
Producted.net
Back to top
View user's profile Send private message
a_noob



Joined: 17 Sep 2006
Posts: 97
Location: _start: jr 0xDEADBEEF

PostPosted: Mon Oct 05, 2009 3:17 am    Post subject: Reply with quote

Are you 100% positive that you want to use the first config?

Code:

triNetConnect(&netConfigs[0]);


Because, if you are not using the first connection point to access, then this will never work.

Also here

Code:

if(triNetIsConnected())
                {
                        message = "Connected!";
                        triNetGetUrl(url, response);
                }


Message was never allocated and you never allocated room for the response. I may be wrong though, maybe triNetGetUrl allocates the space for you, but I don't know. I haven't used triNet. Either way you should look into that and confirm it.

Those are some problems I see from a quick scan.
_________________
Code:
.øOº'ºOø.
'ºOo.oOº'
Back to top
View user's profile Send private message AIM Address MSN Messenger
Producted



Joined: 04 Jun 2009
Posts: 56

PostPosted: Mon Oct 05, 2009 3:22 am    Post subject: Reply with quote

Yes, I am. I might add a selection menu later, to be sure. But it to used to work, that's the weird thing. I think it is the GetUrl function but how would I go on fixing it...
_________________
Producted.net
Back to top
View user's profile Send private message
sakya



Joined: 28 Apr 2006
Posts: 190

PostPosted: Mon Oct 05, 2009 5:24 am    Post subject: Reply with quote

Hi! :)

As far as I know the first config (index=0) is a "special" one used to store the configurations before saving it or something like this.
The first configuration saved in your psp is the one with index=1

Ciaooo
Sakya
Back to top
View user's profile Send private message Visit poster's website
Producted



Joined: 04 Jun 2009
Posts: 56

PostPosted: Mon Oct 05, 2009 3:27 pm    Post subject: Reply with quote

sakya wrote:
Hi! :)

As far as I know the first config (index=0) is a "special" one used to store the configurations before saving it or something like this.
The first configuration saved in your psp is the one with index=1

Ciaooo
Sakya


I thought that 0 is the connection last used, so most likely the working on? Anyway, 1 doesn't works either. :(
_________________
Producted.net
Back to top
View user's profile Send private message
sakya



Joined: 28 Apr 2006
Posts: 190

PostPosted: Mon Oct 05, 2009 6:33 pm    Post subject: Reply with quote

Hi! :)

Probably you're right: the last used connection is stored in config[0].

I had a look to triEngine source code here:
http://trac2.assembla.com/openTRI/browser/trunk/src/triNet.c

Can you try to connect to an access point without security or with WEP?
I think the problem is this:
Code:
err = pspSdkInetInit();


Quote:
Important point: you can't use pspSdkInetInit() to initialize the Network modules since it calls sceNetApctlInit() with a stack size of 0x1000 by default. Just make your own and call sceNetApctlInit() with a stack size of at least 0x1400.

http://forums.ps2dev.org/viewtopic.php?t=6523&highlight=pspsdkinetinit

Ciaooo
Sakya
Back to top
View user's profile Send private message Visit poster's website
Producted



Joined: 04 Jun 2009
Posts: 56

PostPosted: Mon Oct 05, 2009 11:05 pm    Post subject: Reply with quote

After some tests etc, I came up with this;

http://pastebin.com/m7f921be2

http://www.producted.net/POPong/POPong.rar (eboot)

It seems to be that the function triNetGetUrl needs a fix. Anyone who could help me with that?

Btw, thanks sayka for your research, too bad it wasn't really the solution.
_________________
Producted.net
Back to top
View user's profile Send private message
sakya



Joined: 28 Apr 2006
Posts: 190

PostPosted: Tue Oct 06, 2009 12:13 am    Post subject: Reply with quote

Hi! :)

Producted wrote:
Btw, thanks sayka for your research, too bad it wasn't really the solution.

Are you saying you can connect to an access point with WPA security using that code?
I thought this wasn's possible using pspSdkInetInit.

Ciaooo
sakya
Back to top
View user's profile Send private message Visit poster's website
Producted



Joined: 04 Jun 2009
Posts: 56

PostPosted: Tue Oct 06, 2009 12:21 am    Post subject: Reply with quote

If triNetIsConnected is speaking the truth, yes.
_________________
Producted.net
Back to top
View user's profile Send private message
a_noob



Joined: 17 Sep 2006
Posts: 97
Location: _start: jr 0xDEADBEEF

PostPosted: Tue Oct 06, 2009 3:57 am    Post subject: Reply with quote

Why not make a small update to triNet* and have it use sony's networks dialog $PSPSDK/samples/utility/netdialog
_________________
Code:
.øOº'ºOø.
'ºOo.oOº'
Back to top
View user's profile Send private message AIM Address MSN Messenger
Producted



Joined: 04 Jun 2009
Posts: 56

PostPosted: Tue Oct 06, 2009 8:42 pm    Post subject: Reply with quote

Nah, that won't fix the problem. I might implement it later though.
_________________
Producted.net
Back to top
View user's profile Send private message
Producted



Joined: 04 Jun 2009
Posts: 56

PostPosted: Thu Oct 08, 2009 2:18 am    Post subject: Reply with quote

Still in need for help.
_________________
Producted.net
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