<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Change IP address at runtime in MQX Software Solutions</title>
    <link>https://community.nxp.com/t5/MQX-Software-Solutions/Change-IP-address-at-runtime/m-p/339737#M10942</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I need only one IP for each ethernet. I also use the ipcfg_unbind() function before ipcfg_bind_staticip() but the result doesn't change. To use the new IP I must restart the board.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 04 Feb 2015 16:07:26 GMT</pubDate>
    <dc:creator>angeloborghi</dc:creator>
    <dc:date>2015-02-04T16:07:26Z</dc:date>
    <item>
      <title>Change IP address at runtime</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/Change-IP-address-at-runtime/m-p/339735#M10940</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;BR /&gt;I have a board with mpc8309 processor, MQX V3.8.0 and I use CW power pc windows classic&amp;nbsp; 8.80.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;At the program startup I initilize the three fec with this sequence:&lt;/P&gt;&lt;P&gt;1) ENET_get_mac_address(device, newMac, mac);&lt;BR /&gt;2) result = ipcfg_init_device(device, mac);&lt;BR /&gt;3) ipcfg_bind_staticip(device, &amp;amp;ip_data);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And it works.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If I try to reassign a new IP address a runtime to a one of three fec it doesn't work. In particulary:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;4) I call the function ipcfg_bind_staticip(device, &amp;amp;ip_data) with a new IP&lt;BR /&gt;5) the function exit with no errors&lt;BR /&gt;6) but the new IP doesn't work&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How can I do to change IP at Runtime?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 02 Feb 2015 10:56:20 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/Change-IP-address-at-runtime/m-p/339735#M10940</guid>
      <dc:creator>angeloborghi</dc:creator>
      <dc:date>2015-02-02T10:56:20Z</dc:date>
    </item>
    <item>
      <title>Re: Change IP address at runtime</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/Change-IP-address-at-runtime/m-p/339736#M10941</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I didn’t found any documented issue according your description, but you version of MQX is quite old.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;IPCFG layer could keep maximum one IP address.&lt;/P&gt;&lt;P&gt;If 1 IP address is fine for you, please try unbinding first address by ipcfg_unbind() function and after that bind new ip address by ipcfg_bind_staticip() function.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you need more than one IP address for your interface, please use functions RTCS_if_bind() instead of ipcfg_bind.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I hope it helps.&lt;BR /&gt;Have a great day,&lt;BR /&gt;RadekS&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-----------------------------------------------------------------------------------------------------------------------&lt;BR /&gt;Note: If this post answers your question, please click the Correct Answer button. Thank you!&lt;BR /&gt;-----------------------------------------------------------------------------------------------------------------------&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 04 Feb 2015 14:58:57 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/Change-IP-address-at-runtime/m-p/339736#M10941</guid>
      <dc:creator>RadekS</dc:creator>
      <dc:date>2015-02-04T14:58:57Z</dc:date>
    </item>
    <item>
      <title>Re: Change IP address at runtime</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/Change-IP-address-at-runtime/m-p/339737#M10942</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I need only one IP for each ethernet. I also use the ipcfg_unbind() function before ipcfg_bind_staticip() but the result doesn't change. To use the new IP I must restart the board.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 04 Feb 2015 16:07:26 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/Change-IP-address-at-runtime/m-p/339737#M10942</guid>
      <dc:creator>angeloborghi</dc:creator>
      <dc:date>2015-02-04T16:07:26Z</dc:date>
    </item>
    <item>
      <title>Re: Re: Change IP address at runtime</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/Change-IP-address-at-runtime/m-p/339738#M10943</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you for additional information.&lt;/P&gt;&lt;P&gt;In that case it looks like some bug in MQX 3.8.0&lt;/P&gt;&lt;P&gt;In attachment you can find ipcfg.c file from MQX v 4.0.2.2 with small modification at line 808 (just added brackets). I checked that content of this file is almost identical to current version. However since MQX 4.1 we use different types and it is not necessary confuse you by this change.&lt;/P&gt;&lt;P&gt;Please compare attached file with your version …&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 04 Feb 2015 16:52:49 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/Change-IP-address-at-runtime/m-p/339738#M10943</guid>
      <dc:creator>RadekS</dc:creator>
      <dc:date>2015-02-04T16:52:49Z</dc:date>
    </item>
    <item>
      <title>Re: Change IP address at runtime</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/Change-IP-address-at-runtime/m-p/339739#M10944</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I compared the 2 version of "ipcfg.c" and apply the modification at line 808. I also verify that "ipcfg_bind_autoip_internal_actual" is never called. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I put the call to the function "ipcfg_unbind" before "ipcfg_bind_staticip" but it doesn't work.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I copy in our "ipcfg.c" file the "ipcfg_release_device", "ipcfg_release_interface" and "ipcfg_del_interface" functions from your file. After that, I put the next code before to call "ipcfg_unbind" to change IP at Runtime.&lt;/P&gt;&lt;P&gt;&amp;nbsp; &lt;/P&gt;&lt;P&gt;Step 1)&lt;/P&gt;&lt;P&gt;&amp;nbsp; if(ipcfg_release_device(device) != RTCS_OK)&lt;/P&gt;&lt;P&gt;&amp;nbsp; {&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; return;&lt;/P&gt;&lt;P&gt;&amp;nbsp; }&amp;nbsp;&amp;nbsp; // OK it work&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Step 2)&lt;/P&gt;&lt;P&gt; ENET_get_mac_address(device, newMac, mac);&lt;/P&gt;&lt;P&gt; result = ipcfg_init_device(device, mac);&amp;nbsp;&amp;nbsp; // KO&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The step 2 failed in "ipcfg_init_interface" on call to:&lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;&lt;/TD&gt;&lt;TD&gt;if (_lwsem_create (&amp;amp;ipcfg_data[device].control_semaphore, 1) != MQX_OK)&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;/TD&gt;&lt;TD&gt;{&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/TD&gt;&lt;TD&gt;return RTCSERR_IPCFG_INIT;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;/TD&gt;&lt;TD&gt;}&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and the program end to breakpoint on "_int_unexpected_isr" function.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 05 Feb 2015 11:13:48 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/Change-IP-address-at-runtime/m-p/339739#M10944</guid>
      <dc:creator>angeloborghi</dc:creator>
      <dc:date>2015-02-05T11:13:48Z</dc:date>
    </item>
    <item>
      <title>Re: Change IP address at runtime</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/Change-IP-address-at-runtime/m-p/339740#M10945</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Angelo,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I think you need to restart the TCPIP task. There are some variables that are not resetting or so. Kill your TCPIP task and then run again your networking initialization code.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Have a great day,&lt;BR /&gt;Garabo&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-----------------------------------------------------------------------------------------------------------------------&lt;BR /&gt;Note: If this post answers your question, please click the Correct Answer button. Thank you!&lt;BR /&gt;-----------------------------------------------------------------------------------------------------------------------&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 17 Feb 2015 22:28:31 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/Change-IP-address-at-runtime/m-p/339740#M10945</guid>
      <dc:creator>Luis_Garabo</dc:creator>
      <dc:date>2015-02-17T22:28:31Z</dc:date>
    </item>
  </channel>
</rss>

