FPGA, SoC, And CPLD Boards And Kits
FPGA Evaluation and Development Kits
5922 Discussions

DE4 Simple Server Socket example

Altera_Forum
Honored Contributor II
1,102 Views

Hi, 

I have an Altera DE4 Development and Education Board. I’m using Quartus II 11.0. 

I’m trying to run “Simple Socket Server (RGMII)” example. 

This is the ‘Nios II Console’ output: 

 

=============== Software License Reminder ================ 

This software project uses an unlicensed version of the NicheStack TCP/IP 

Network Stack - Nios II Edition. If you want to ship resulting object 

code in your product, you must purchase a license for this software from 

Altera. For information go to: "http://www.altera.com/nichestack

===================================================== 

InterNiche Portable TCP/IP, v3.1  

 

Copyright 1996-2008 by InterNiche Technologies. All rights reserved.  

prep_tse_mac 0 

Your Ethernet MAC address is 00:07:ed:ff:ed:15 

prepped 1 interface, initializing... 

[tse_mac_init] 

INFO : TSE MAC 0 found at address 0x05101800 

INFO : PHY Marvell 88E1111 found at PHY address 0x00 of MAC Group[0] 

INFO : PHY[0.0] - Automatically mapped to tse_mac_device[0] 

INFO : PHY[0.0] - Restart Auto-Negotiation, checking PHY link... 

INFO : PHY[0.0] - Auto-Negotiation PASSED 

INFO : Extended PHY Specific Status Register = 0x0001 

INFO : PCS[0.0] - Configuring PCS operating mode 

INFO : PCS[0.0] - PCS SGMII mode enabled 

INFO : PHY[0.0] - Checking link... 

INFO : PHY[0.0] - Link established 

INFO : PHY[0.0] - Speed = 100, Duplex = Full 

OK, x=0, CMD_CONFIG=0x00000000 

 

MAC post-initialization: CMD_CONFIG=0x04000203 

[tse_sgdma_read_init] RX descriptor chain desc (1 depth) created 

mctest init called 

IP address of et1 : 192.168.1.234 

Created "Inet main" task (Prio: 2) 

Created "clock tick" task (Prio: 3) 

DHCP timed out, going back to default IP address(es) 

 

Simple Socket Server starting up 

[sss_task] Simple Socket Server listening on port 30 

Created "simple socket server" task (Prio: 4) 

InterNiche Portable TCP/IP, v3.1  

 

Copyright 1996-2008 by InterNiche Technologies. All rights reserved.  

prep_tse_mac 0 

Can't read the MAC address from your board (this probably means 

that your flash was erased). We will assign you a MAC address and 

static network settings 

 

Please enter your 9-digit serial number. This is printed on a  

label under your Nios dev. board. The first 3 digits of the  

label are ASJ and the serial number follows this. 

-->Created "Inet main" task (Prio: 2) 

Created "clock tick" task (Prio: 3) 

 

123456789 

123456789 

Your Ethernet MAC address is ff:ff:ff:ff:ff:ff 

prepped 1 interface, initializing... 

[tse_mac_init] 

INFO : TSE MAC 0 found at address 0x05101800 

INFO : PHY Marvell 88E1111 found at PHY address 0x00 of MAC Group[0] 

INFO : PHY[0.0] - Automatically mapped to tse_mac_device[0] 

INFO : PHY[0.0] - Restart Auto-Negotiation, checking PHY link... 

INFO : PHY[0.0] - Auto-Negotiation PASSED 

MARVELL : Mode changed to RGMII/Modified MII to Copper mode 

MARVELL : Enable RGMII Timing Control 

MARVELL : PHY reset 

INFO : PCS[0.0] - Configuring PCS operating mode 

INFO : PCS[0.0] - PCS SGMII mode enabled 

INFO : PHY[0.0] - Checking link... 

INFO : PHY[0.0] - Link not yet established, restart auto-negotiation... 

INFO : PHY[0.0] - Restart Auto-Negotiation, checking PHY link... 

INFO : PHY[0.0] - Auto-Negotiation PASSED 

INFO : PHY[0.0] - Link established 

INFO : PHY[0.0] - Speed = 100, Duplex = Full 

OK, x=89, CMD_CONFIG=0x00000000 

 

MAC post-initialization: CMD_CONFIG=0x04000203 

[tse_sgdma_read_init] RX descriptor chain desc (1 depth) created 

mctest init called 

IP address of et1 : 0.0.0.0 

 

DHCP timed out, going back to default IP address(es) 

 

Simple Socket Server starting up 

[sss_task] Simple Socket Server listening on port 30 

Created "simple socket server" task (Prio: 4) 

 

After this message, I try to connect via telnet to the board, but nothing happens. 

 

Can you help me, please? 

 

BR, 

Umberto
0 Kudos
4 Replies
Altera_Forum
Honored Contributor II
276 Views

It seems your flash memory stored invalid ip and mac addresses. 

In your SSS project you should have a function named get_ip_add(). 

Try forcing *use_dhcp = 0 and momentarily set a well known static ip address. 

In the same file you should also find a get_mac_addr() function: force it returning a fixed mac address, not ff ff ff ff ff ff  

If everything works this way, debug into these functions in order to discover why you can't retrieve the correct addresses from flash.
0 Kudos
Altera_Forum
Honored Contributor II
276 Views

Hi Cris72, 

thank you for your support. 

I already tried to do what you suggested me, but without success. 

I also tried to do a restore of the flash with the factory settings, but I have not succeeded.
0 Kudos
Altera_Forum
Honored Contributor II
276 Views

Forgive me if these are stupid questions, but I don't know your expertise level with network and embedded systems: 

- are your sure the DE4 board is actually initializing with valid mac/ip addresses, as I said above? 

- did you try a simple ping before testing the telnet connection? 

- did you check your pc network configuration? did you configure the same subnet?
0 Kudos
Altera_Forum
Honored Contributor II
276 Views

Hi Cris, 

- I'm not surethe DE4 is initialized with valid mac/ip addresses. In this regard, I tried to do a reset to factory settings but I did not succeed. 

- Yes, I tried pinging, but without success. 

- Yes, I modified the file simple_socket_server.h to assign static network parameters. 

 

BR, 

Umberto
0 Kudos
Reply