Ps2Link problems?

Discuss the development of software, tools, libraries and anything else that helps make ps2dev happen.

Moderators: cheriff, Herben

Post Reply
ubergeek42
Posts: 83
Joined: Wed Jul 13, 2005 12:25 am

Ps2Link problems?

Post by ubergeek42 »

I am having some issues with ps2link.
It gets the command to load the file, but it stops halfway through loading. I have tried different network adapters, different cables, thinking that could be the issue, but I imagine if it was, then it wouldn't get any commands at all.

Code: Select all

ps2client -h 192.168.1.41 execee host:ps2test.elf
loadelf: fname host:ps2test.elf secname all
loadelf version 3.30
Input ELF format filename = host:ps2test.elf
0 00100000 00018e8c ..
I am using the ps2link found on this page, with the latest ps2client from svn.
If I test with a smaller elf file, it will sometimes work, but much much slower then it should.

Also if I press the reset button on the ps2, I see unmounting. show up on my terminal, so the connection is still there(Or so it seems).

[EDIT] In doing some more testing, it seems there is something wrong with either a)ps2client, or b)my ps2. I tried using ps2client with the listen option and uLaunchElf 4.12 to browse files on my computer. I am able to browse the files no problem, but when I try to copy one, it crashes on my ps2.

I am usiing Linux; going to try testing with windows in a little bit.

edit2: Some more testing on linux reveals that I can send random files of almost any size, but it crashes when trying to send my elf file. I don't know why this is happening. I tried stripping my elf, using ee-strip, but that made no difference either.


EDIT3?
Ok, this is getting very odd now, I went through my code, and removed all of the object files until I got it running under ps2link. Then I added them back, testing as I went. Found the file that when added to the final elf, crashes it.
So I started poking around in this file to find out what might be causing it, so I started commenting out random stuff until it stopped crashing
Riddle me this, the code HTTP/ in a sprintf statement breaks the ps2; see this simple test program, compile and try and run it(it's just modified from the hello sample)

Code: Select all

#include <stdio.h>

int main&#40;&#41;
&#123;
    char test&#91;400&#93;;
    sprintf&#40;test,"GET %s HTTP/1.1\n","testing"&#41;;
    printf&#40;"%s", test&#41;;
    return 0;
&#125;
This crashes for me.
Change the HTTP/ to something else, like HTTX/ and it works fine. Anyone have any idea what is going on here?
User avatar
Lukasz
Posts: 248
Joined: Mon Jan 19, 2004 8:37 pm
Location: Denmark
Contact:

Post by Lukasz »

Just tested this for you, works fine here in both PS2LINK 1.31 and 1.46.

Maybe your toolchain is broken? Or problems with the flags you pass to gcc?

I've packed the source, makefile and ELF in this file www.lukasz.dk/files/ubergeek42.zip .

I suggesting trying my ELF and also comparing it against the one you get when you compile the source, in case your toolchain gives a different output.

Hope this helps :-)
ubergeek42
Posts: 83
Joined: Wed Jul 13, 2005 12:25 am

Post by ubergeek42 »

Thanks, I tried to run your compiled elf over ps2link, but it didn't work:

Code: Select all

ubergeek@ubergeek&#58;~/ubergeek42$ ps2client -h 192.168.1.41 execee host&#58;main.elf
loadelf&#58; fname host&#58;main.elf secname all
loadelf version 3.30
And it just stops there. This is with PS2LINK 1.46(from the main page), and the latest ps2client from the repository.

Were you testing from windows or linux? What ps2client were you using? Direct connection to ps2 via crossover or do you use a router?
(If you are on linux, can you post your binaries for ps2client, so I can see if that is the real issue?)

I tried to use some of the windows binaries through wine, but got the same result.
I can't imagine its an issue with the physical network, because I can run other program just fine.(All the ps2sdk samples work without a problem)

Thanks for the help.
User avatar
Lukasz
Posts: 248
Joined: Mon Jan 19, 2004 8:37 pm
Location: Denmark
Contact:

Post by Lukasz »

I tested from Ubuntu 7.04. My ps2client www.lukasz.dk/files/ps2client.

I'm running on the same setup as for years, my PC and PS2 are connected to a Linksys router.

Do you have an first generation japanese network adapter for the PS2? I remember that the first network adapters were different from the "final" ones available in Europe and USA. There was some patching done to the SMAP driver, don't know if there still could be bugs.

Another problem could be UDP, if you are connected via a router/firewall. PS2Link uses UDP for sending commands to the PS2 and for printing to stdout on your PC. Could it be that something on your network is picking up the UDP packets?

I would test on another PC if I were you, eliminate your setup as the problem.
ubergeek42
Posts: 83
Joined: Wed Jul 13, 2005 12:25 am

Post by ubergeek42 »

My ps2 is a v7 USA console, so I guess we can rule out the jap network adapter thing. And we can rule out ps2client, since the one you posted does the same thing.

I am connected via a linksys router to the ps2, wierd thing is every other elf works fine, except that one. I've found a workaround to the problem, so it's no longer a major issue, but its still really odd.

Thanks for the help, I really appreciate it.
Post Reply