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 

ps2ip_init hangs?

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



Joined: 29 Jun 2004
Posts: 33

PostPosted: Sat Jul 10, 2004 9:31 am    Post subject: ps2ip_init hangs? Reply with quote

With a few words: I check whether ELF has been executed from a MC, CD or via PS2LINK (I saw it from ps2menu.c) and in any case, but PS2LINK, I load ps2ip.irx & ps2smap.irx along with some others (once again I saw it from ps2menu.c - using SifExecModuleBuffer).

However, in the following code fragment
Code:
int
serve (void)
{
  const int port = 23;

  printf ("calling ps2ip_init...\n");
  if (ps2ip_init () < 0)
    {
      printf ("ps2ip_init failed.\n");
      return (-1);
    }
  else
    printf ("ps2ip_init ok.\n");

  int sck = socket (PF_INET, SOCK_STREAM, 0);
  if (!(sck < 0))
    {
      ...

when ran via PS2LINK the first printf is shown and then nothing. If I comment-out the ps2ip_init call, socket fails.

PS2 TCP/IP is already initialized by PS2LINK, I can ping the PS2, and, AFAIK I upload ELF file via TCP/IP. Then where is the problem?

Ideas, someone?
Back to top
View user's profile Send private message Visit poster's website
Oobles
Site Admin


Joined: 17 Jan 2004
Posts: 362
Location: Melbourne, Australia

PostPosted: Sat Jul 10, 2004 12:44 pm    Post subject: Reply with quote

because ps2link uses ps2ip already, I don't advise using loading programs that use ps2ip during development. Using Naplink over USB means that you can start ps2ip, ps2smap without there being any collissions of drivers already loaded.

You can try not loading ps2ip and ps2smap and use the version already installed by ps2link. If you are making socket calls from EE, you may need to load ps2ips if ps2link doesn't load it already.
Back to top
View user's profile Send private message Visit poster's website Yahoo Messenger MSN Messenger
Raizor



Joined: 18 Jan 2004
Posts: 60
Location: out there

PostPosted: Sat Jul 10, 2004 7:09 pm    Post subject: Reply with quote

Rebooting the IOP should enable you to use ps2link and Naplink for testing.

raizor
Back to top
View user's profile Send private message
606u



Joined: 29 Jun 2004
Posts: 33

PostPosted: Sat Jul 10, 2004 7:53 pm    Post subject: Reply with quote

Oobles: Thanks. Now, I execute test program via PS2LINK (it loads poweroff.irx, iomanx.irx, ps2dev9.irx and ps2ips.irx), and I'm able to connect to the server socket (with telnet and with a test program), but I cannot receive the data I've sent (got zeroes instead). I can also ping the PS2.

ps2client output:
Code:
loadelf: fname host:tcpip_test.elf secname all
Input ELF format filename = host:tcpip_test.elf
0 00100000 0003c328 ....
Loaded, host:tcpip_test.elf
start address 0x100008
gp address 00000000
Loading SIO2MAN
loadmodule: fname rom0:SIO2MAN args 0 arg
loadmodule: id 33, ret 1
Loading MCMAN
loadmodule: fname rom0:MCMAN args 0 arg
loadmodule: id 34, ret 1
Loading MCSERV
loadmodule: fname rom0:MCSERV args 0 arg
loadmodule: id 35, ret 1
Loading XPADMAN
loadmodule: fname rom0:XPADMAN args 0 arg
Pad Driver for OSD (2000/12/05 18:05) 392, 128
loadmodule: id 36, ret 0
Loading poweroff.irx 2137 bytes
Loading iomanx.irx 7417 bytes
Loading ps2dev9.irx 9429 bytes

DEV9 device driver v1.0 - Copyright (c) 2003 Marcus R. Brown

dev9_driver: CXD9611 (Expansion Bay type) initialized.
Loading ps2ips.irx 5813 bytes
PS2IPS: Module Loaded.
PS2IPS: RPC Thread Started
calling ps2ip_init...
ps2ip_init ok.
socket ok.
bind ok.
Server listening on port 23.
14 bytes sent.
14 bytes sent.
14 bytes sent.
14 bytes sent.
14 bytes sent.
14 bytes sent.
14 bytes sent.
14 bytes sent.
14 bytes sent.
14 bytes sent.
Poweroff!!!!


However, if I execute the same app via napClient (it loads poweroff.irx, iomanx.irx, ps2dev9.irx, ps2ip.irx, ps2snap.irx with arguments and ps2ips.irx) I cannot either ping the PS2 or to connect to it via telnet.

napClient log:
Code:
loadelf: fname host:/exec/elf secname all
loadelf version 3.30
Input ELF format filename = host:/exec/elf
0 00100000 0003c328 ....
Loaded, host:/exec/elf
start address 0x100008
gp address 00000000
read/write allocate memory 4000
Loading SIO2MAN
loadmodule: fname rom0:SIO2MAN args 0 arg
loadmodule: id 27, ret 0
Loading MCMAN
loadmodule: fname rom0:MCMAN args 0 arg
loadmodule: id 28, ret 0
Loading MCSERV
loadmodule: fname rom0:MCSERV args 0 arg
loadmodule: id 29, ret 0
Read IPCONFIG.DAT
open name mc0:/SYS-CONF/IPCONFIG.DAT flag 1 data 44978
open fd = -4
Loading XPADMAN
loadmodule: fname rom0:XPADMAN args 0 arg
Pad Driver for OSD (2000/12/05 18:05) 392, 128
loadmodule: id 30, ret 0
Loading poweroff.irx 2137 bytes
loadbuffer: addrres 4d700 args 0 arg
loadbuffer: id 31, ret 0
Loading iomanx.irx 7417 bytes
loadbuffer: addrres 8c100 args 0 arg
loadbuffer: id 32, ret 0
Loading ps2dev9.irx 9429 bytes
loadbuffer: addrres 8f600 args 0 arg

DEV9 device driver v1.0 - Copyright (c) 2003 Marcus R. Brown

dev9_driver: CXD9611 (Expansion Bay type) initialized.
dev9_driver: Driver loaded.
loadbuffer: id 33, ret 0
Loading ps2ip.irx 78909 bytes
loadbuffer: addrres 8f600 args 0 arg
loadbuffer: id 34, ret 0
Loading ps2smap.irx 19533 bytes
loadbuffer: addrres 8f600 args 40 arg 192.168.0.100
SMAP: argc 4
SMAP: 192.168.0.100 255.255.255.0 192.168.0.1
loadbuffer: id 35, ret 0
Loading ps2ips.irx 5813 bytes
loadbuffer: addrres 8f600 args 0 arg
PS2IPS: Module Loaded.
PS2IPS: RPC Thread Started
loadbuffer: id 36, ret 0
calling ps2ip_init...
ps2ip_init ok.
socket ok.
bind ok.
Server listening on port 23.


Raizor: Thanks for the reply, but how to do that? :-)

PS: I've published the sources here: tcpip_test.c, Makefile
Back to top
View user's profile Send private message Visit poster's website
606u



Joined: 29 Jun 2004
Posts: 33

PostPosted: Thu Jul 22, 2004 3:44 am    Post subject: Reply with quote

Can you, at least, direct me where to find a working streaming TCP/IP sockets for EE source? Thanks.
Back to top
View user's profile Send private message Visit poster's website
606u



Joined: 29 Jun 2004
Posts: 33

PostPosted: Sat Jul 24, 2004 6:42 am    Post subject: Reply with quote

Just in case anyone cares: ps2ip.irx (2004-05-02, 78909 bytes long) and ps2ips.irx (2004-05-02, 5813 bytes long) from ps2sdk-v1.0alpha-bin.zip doesn't seems to work on my setup. Replacing this file with ps2ip.irx (2004-01-01, 68189 bytes long) and ps2ips.irx (2003-12-31, 8661 bytes long) taken from ps2link binary fixes the problem.
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    forums.ps2dev.org Forum Index -> PS2 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