Forum Discussion
Altera_Forum
Honored Contributor
14 years agoDHCP Timed Out problem in simple socket server
Hi,
I am running simple socket server for rgmii from Nios2 Eclipse template. I could get the Auto negotiation passed and Link established successfully. However the DHCP server fails to acquire an IP address. The program prompts me DHCP Timed Out and back to static IP address. Anyone knows what could bring to this problem? Any way to debug? Thanks, -Carid11 Replies
- Altera_Forum
Honored Contributor
The following can help you better understanding where the problem is.
Browse the Nios sw library and locate the file ipnet.c. It should be in: <altera_directory>\nios2eds\components\altera_iniche\UCOSII\src\ip Look for the pktdemux() function and place a breakpoint here. Compile the whole project and bsp in debug mode and start a debug session. Your code should hit the breakpoint whenever an ethernet packet is received. At this point you can follow the execution and find out where it fails. For a ping packet, the flow should lead to the entry: case ARPTP If pktdemux is not reached at all, you have a problem at a lower level. Are you using tse, isn't it? Then you can place a breakpoint in tse_mac_rcv() (file ins_tse_mac.c) and check if execution at least gets here. Another good method is using tse_mac_raw_send() to manually transmit a packet and check if it's actually transmitted, using any network analyzer program (i.e. WireShark)