This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

How to get DHCP IP address

I have a working TCP client on the Tiva TM4C1294. It currently runs RTOS and uses DHCP to get its own IP address and prints it out to the console. I made it out of the example TCPecho code.

What I want to do is have the Tiva be able to access its own address within my program. Is there a way to do that? I don't get anything through getsockname(), but possibly im not using it correctly

  • Any leads? 

    I looked at RTOS object viewer and it says that there is a dhcpState task. I want to find out where this task is created because it will likely lead me to where I can find out my Tiva's IP as a variable instead of just a console printout.

  • Aside from getting the actual DHCP address to use. I seem to also have a problem even acquiring the DHCP address whenever I have a CLOCK SWI added to my RTOS program.

    I dont know if the below link helps any as its solution has already been implemented in the latest RTOS.

    http://processors.wiki.ti.com/index.php/TI-RTOS_TM4C129_Emac_Issues

  • Apparently solved by just using a regular BIOs timer instead of clock.

    So the only problem is still getting the DHCP address as a variable.