<?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 ipcfg_bind_staticip() block in MQX Software Solutions</title>
    <link>https://community.nxp.com/t5/MQX-Software-Solutions/ipcfg-bind-staticip-block/m-p/489330#M15941</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi, i'm working on mqx 4.2, cw 10.6 and frmk64f.&lt;/P&gt;&lt;P&gt;I have a LAN with multiple device. every device start with a bootloader that have a static ip fixed with ipcfg_bind_staticip() function and this ip is the same for every one. sometimes happens that 2 or more devices start at the same time. my code for bind is:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="c++" __jive_macro_name="code" class="jive_macro_code _jivemacro_uid_1450285091658659 jive_text_macro" data-renderedposition="92_8_1232_128" jivemacro_uid="_1450285091658659"&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; while(1) {&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; err=ipcfg_bind_staticip(BSP_DEFAULT_ENET_DEVICE,&amp;amp;my_ip_data);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; if(err==IPCFG_OK){&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; break;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; _time_delay(2000);&lt;/P&gt;&lt;P&gt;&amp;nbsp; }&lt;/P&gt;&lt;/PRE&gt;&lt;P&gt;my test is: i keep a device in the bootloader, bound with this static ip in the LAN. when i start the second device, always in the LAN, it do not go over this while cycle. at this point i release the first device from the bootloader leaving this ip free. &lt;/P&gt;&lt;P&gt;the documentation explain that: &lt;/P&gt;&lt;P&gt;"This function tries to bind device to network using given IPv4 address information. If the&lt;/P&gt;&lt;P&gt;address is already used, an error is returned. This is blocking function, i.e., doesn't return&lt;/P&gt;&lt;P&gt;until the process is finished or error occurs."&lt;/P&gt;&lt;P&gt;So i expected that the ipcfg_bind_staticip() return that the address is already in use until, finally, it succeed to bound this ip to the device. &lt;/P&gt;&lt;P&gt;why it not happens?&amp;nbsp; the device remain indefinitely in this while cycle. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 16 Dec 2015 17:20:14 GMT</pubDate>
    <dc:creator>emanueletrapani</dc:creator>
    <dc:date>2015-12-16T17:20:14Z</dc:date>
    <item>
      <title>ipcfg_bind_staticip() block</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/ipcfg-bind-staticip-block/m-p/489330#M15941</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi, i'm working on mqx 4.2, cw 10.6 and frmk64f.&lt;/P&gt;&lt;P&gt;I have a LAN with multiple device. every device start with a bootloader that have a static ip fixed with ipcfg_bind_staticip() function and this ip is the same for every one. sometimes happens that 2 or more devices start at the same time. my code for bind is:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="c++" __jive_macro_name="code" class="jive_macro_code _jivemacro_uid_1450285091658659 jive_text_macro" data-renderedposition="92_8_1232_128" jivemacro_uid="_1450285091658659"&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; while(1) {&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; err=ipcfg_bind_staticip(BSP_DEFAULT_ENET_DEVICE,&amp;amp;my_ip_data);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; if(err==IPCFG_OK){&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; break;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; _time_delay(2000);&lt;/P&gt;&lt;P&gt;&amp;nbsp; }&lt;/P&gt;&lt;/PRE&gt;&lt;P&gt;my test is: i keep a device in the bootloader, bound with this static ip in the LAN. when i start the second device, always in the LAN, it do not go over this while cycle. at this point i release the first device from the bootloader leaving this ip free. &lt;/P&gt;&lt;P&gt;the documentation explain that: &lt;/P&gt;&lt;P&gt;"This function tries to bind device to network using given IPv4 address information. If the&lt;/P&gt;&lt;P&gt;address is already used, an error is returned. This is blocking function, i.e., doesn't return&lt;/P&gt;&lt;P&gt;until the process is finished or error occurs."&lt;/P&gt;&lt;P&gt;So i expected that the ipcfg_bind_staticip() return that the address is already in use until, finally, it succeed to bound this ip to the device. &lt;/P&gt;&lt;P&gt;why it not happens?&amp;nbsp; the device remain indefinitely in this while cycle. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 16 Dec 2015 17:20:14 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/ipcfg-bind-staticip-block/m-p/489330#M15941</guid>
      <dc:creator>emanueletrapani</dc:creator>
      <dc:date>2015-12-16T17:20:14Z</dc:date>
    </item>
    <item>
      <title>Re: ipcfg_bind_staticip() block</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/ipcfg-bind-staticip-block/m-p/489331#M15942</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Emanuel,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Could you please try to use the unbind function before the ipcfg_bind_staticip function?&lt;/P&gt;&lt;P&gt;For example:&lt;/P&gt;&lt;P&gt;...&lt;/P&gt;&lt;P&gt;ipcfg_unbind();&lt;/P&gt;&lt;P&gt;while (1){&lt;/P&gt;&lt;P&gt;...&lt;/P&gt;&lt;P&gt;};&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please let me know if this helps!!&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Have a great day,&lt;BR /&gt;Sol&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, 05 Jan 2016 16:28:57 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/ipcfg-bind-staticip-block/m-p/489331#M15942</guid>
      <dc:creator>soledad</dc:creator>
      <dc:date>2016-01-05T16:28:57Z</dc:date>
    </item>
  </channel>
</rss>

