triEngine problem(?)

Discuss the development of new homebrew software, tools and libraries.

Moderators: cheriff, TyRaNiD

Post Reply
Producted
Posts: 56
Joined: Thu Jun 04, 2009 12:16 am

triEngine problem(?)

Post by Producted »

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
a_noob
Posts: 97
Joined: Sun Sep 17, 2006 8:33 am
Location: _start: jr 0xDEADBEEF

Post by a_noob »

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

Code: Select all

triNetConnect(&netConfigs[0]);
Because, if you are not using the first connection point to access, then this will never work.

Also here

Code: Select all

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: Select all

.øOº'ºOø.
'ºOo.oOº'
Producted
Posts: 56
Joined: Thu Jun 04, 2009 12:16 am

Post by Producted »

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...
sakya
Posts: 190
Joined: Fri Apr 28, 2006 5:48 pm
Contact:

Post by sakya »

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
Producted
Posts: 56
Joined: Thu Jun 04, 2009 12:16 am

Post by Producted »

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. :(
sakya
Posts: 190
Joined: Fri Apr 28, 2006 5:48 pm
Contact:

Post by sakya »

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/brows ... c/triNet.c

Can you try to connect to an access point without security or with WEP?
I think the problem is this:

Code: Select all

err = pspSdkInetInit();
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? ... dkinetinit

Ciaooo
Sakya
Producted
Posts: 56
Joined: Thu Jun 04, 2009 12:16 am

Post by Producted »

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.
sakya
Posts: 190
Joined: Fri Apr 28, 2006 5:48 pm
Contact:

Post by sakya »

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
Producted
Posts: 56
Joined: Thu Jun 04, 2009 12:16 am

Post by Producted »

If triNetIsConnected is speaking the truth, yes.
a_noob
Posts: 97
Joined: Sun Sep 17, 2006 8:33 am
Location: _start: jr 0xDEADBEEF

Post by a_noob »

Why not make a small update to triNet* and have it use sony's networks dialog $PSPSDK/samples/utility/netdialog

Code: Select all

.øOº'ºOø.
'ºOo.oOº'
Producted
Posts: 56
Joined: Thu Jun 04, 2009 12:16 am

Post by Producted »

Nah, that won't fix the problem. I might implement it later though.
Producted
Posts: 56
Joined: Thu Jun 04, 2009 12:16 am

Post by Producted »

Still in need for help.
Post Reply