<?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: How to stop RTCS DHCP server in MQX Software Solutions</title>
    <link>https://community.nxp.com/t5/MQX-Software-Solutions/How-to-stop-RTCS-DHCP-server/m-p/439891#M14694</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Jason,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Just as you pointed, there is not a function to stop the DHCP server. What you can do is to kill the task. Take this code as an example:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;/* Start DHCP Server: */&lt;/P&gt;&lt;P&gt;error = DHCPSRV_init(“DHCP server”, 7, 2000);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;/* Kill DHCP server */&lt;/P&gt;&lt;P&gt;task_id = _task_get_id_from_name(“DHCP server”);&lt;/P&gt;&lt;P&gt;_task_abort(task_id);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I hope this helps.&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, &lt;STRONG&gt;please click the Correct Answer button&lt;/STRONG&gt;. Thank you!&lt;BR /&gt;-----------------------------------------------------------------------------------------------------------------------&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 27 Apr 2015 21:53:32 GMT</pubDate>
    <dc:creator>Luis_Garabo</dc:creator>
    <dc:date>2015-04-27T21:53:32Z</dc:date>
    <item>
      <title>How to stop RTCS DHCP server</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/How-to-stop-RTCS-DHCP-server/m-p/439890#M14693</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am using RTCS DHCP server on the MQX 4.02. DHCP server is working on our product.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As our product requirement, I need to stop the RTCS DHCP server. In the MQX_RTCS_User_Guide.pdf, I can't find the stop DHCP server API.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can anyone give me some insight how to stop RTCS DHCP server?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Jason&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 23 Apr 2015 18:39:56 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/How-to-stop-RTCS-DHCP-server/m-p/439890#M14693</guid>
      <dc:creator>JasonPeng</dc:creator>
      <dc:date>2015-04-23T18:39:56Z</dc:date>
    </item>
    <item>
      <title>Re: How to stop RTCS DHCP server</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/How-to-stop-RTCS-DHCP-server/m-p/439891#M14694</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Jason,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Just as you pointed, there is not a function to stop the DHCP server. What you can do is to kill the task. Take this code as an example:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;/* Start DHCP Server: */&lt;/P&gt;&lt;P&gt;error = DHCPSRV_init(“DHCP server”, 7, 2000);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;/* Kill DHCP server */&lt;/P&gt;&lt;P&gt;task_id = _task_get_id_from_name(“DHCP server”);&lt;/P&gt;&lt;P&gt;_task_abort(task_id);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I hope this helps.&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, &lt;STRONG&gt;please click the Correct Answer button&lt;/STRONG&gt;. Thank you!&lt;BR /&gt;-----------------------------------------------------------------------------------------------------------------------&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 27 Apr 2015 21:53:32 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/How-to-stop-RTCS-DHCP-server/m-p/439891#M14694</guid>
      <dc:creator>Luis_Garabo</dc:creator>
      <dc:date>2015-04-27T21:53:32Z</dc:date>
    </item>
    <item>
      <title>Re: How to stop RTCS DHCP server</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/How-to-stop-RTCS-DHCP-server/m-p/439892#M14695</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Garabo,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you for your reply.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The DHCP server task can be killed after running your code.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;However I got the error when I restart DHCP server.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; // Start DHCP Server&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; error = DHCPSRV_init("DHCP server", 7, 2000);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; if (error != RTCS_OK) {&amp;nbsp; &amp;lt;== error is 0x1663 (RTCSERR_UDP_PORT_OPEN)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; return error;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;Any idea?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks a lot!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Jason&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 29 Apr 2015 00:15:48 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/How-to-stop-RTCS-DHCP-server/m-p/439892#M14695</guid>
      <dc:creator>JasonPeng</dc:creator>
      <dc:date>2015-04-29T00:15:48Z</dc:date>
    </item>
    <item>
      <title>Re: How to stop RTCS DHCP server</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/How-to-stop-RTCS-DHCP-server/m-p/439893#M14696</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Jason,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The error makes sense. This is a brutal stop for the DHCP. This means that there is not a clean up of the sockets used by the task. You will need to create a function that kills the DHCP task and clean up all the resources associated to it.&lt;/P&gt;&lt;P&gt;&lt;BR /&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>Wed, 29 Apr 2015 20:04:07 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/How-to-stop-RTCS-DHCP-server/m-p/439893#M14696</guid>
      <dc:creator>Luis_Garabo</dc:creator>
      <dc:date>2015-04-29T20:04:07Z</dc:date>
    </item>
  </channel>
</rss>

