void tcp_x_init(void){ WriteToSCI1("Initializing TCP server application. \r\n"); tcp_soch = tcp_getsocket(TCP_TYPE_CLIENT, TCP_TOS_NORMAL, TCP_DEF_TOUT, tcp_control_panel_eventlistener); if( tcp_soch < 0 ) { WriteToSCI1("TCP server unable to get socket. Resetting!!!\r\n"); RESET_SYSTEM(); }else{ WriteToSCI1("TCP Get Socket Client Type!!!\r\n"); } (void)tcp_connect(tcp_soch,0xC0A800C7,2002,TCP_PORT+2);}
Hi M.X.
If you are learning TCP/IP it may be best to check out the uTasker solution - see posting http://forums.freescale.com/freescale/board/message?board.id=16BITCOMM&message.id=897
It allows fast learning by simulating the NE64 and testing a complete demo project in the simulator without the need for hardware. It is completely free for hobby, educational and other non-commercial projects and is also personally supported by email.
It is a complete solution not only for the TCP/IP stack with FTP, TELNET, etc. but also other interfaces such as UART, file system, LCD display etc. The uTasker is an operating system with these all integrated - the demo project is ready-to-run on all demo boards using ColdWarrior, GNU, or IAR compiler (others being ported...). There is even a practical downloader / debugger as part of the package...
If you want to save some time getting up to speed check it out and don't be shy. There is a growing user community and always help at hand.
Regards
Mark Butcher
www.mjbc.ch
PS. The uTasker runs also on the ColdFire M5223X - the simulator supports it and projects can be converted from NE64 by changing just one compiler switch! The uTasker for M52235 supports now also CAN!!