XTCP core with a run-time dynamic IP

If you have a simple question and just want an answer.
jpe
Junior Member
Posts: 4
Joined: Thu May 28, 2015 1:15 pm

XTCP core with a run-time dynamic IP

Post by jpe »

Hello,

I am designing an application which uses the TCP/UDP network stack on a XMOS xCORE-200 eXplorer board. The application itself is designed as a task running on a core, which is connected to an XTCP core (provided by the lib_xtcp library) via the channel (c_xtcp from the XTCP point of view).

The problem is, the IP, Netmask and Gateway parameters (all those included in the xtcp_ipconfig_t structure) are set only at the initialization of the XTCP core and cannot be reset later. Is there a possibility to overcome this problem without modifying the lib_xtcp source files? The possibility to change the IP address is crucial in my application.

Just to be clear: I'm not talking about the dynamic IP address using DHCP - I am talking about changing the IP address from within the application.

Thank you very much for your answers.

User avatar
larry
Respected Member
Posts: 275
Joined: Fri Mar 12, 2010 6:03 pm

Post by larry »

At the moment it is not possible to change IP configuration at runtime. xTCP passes it down to the uIP stack once, at the beginning, and it stays like that.

 

If uIP has a clean shutdown, you could make xTCP "closable" and reinitialise it with different IP configuration.

 

 

To do this with no changes to xTCP, I guess a soft reboot would trigger a reinitialisation where a new different IP configuration is used.

 

 

See latest AVB/TSN for example soft reboot routine:

 

https://github.com/xmos/lib_tsn/blob/ma ... /reboot.xc