<?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>MCUXpresso SDKのトピックHow can I receive a Thread UDP packet from a network socket without using the Session module?</title>
    <link>https://community.nxp.com/t5/MCUXpresso-SDK/How-can-I-receive-a-Thread-UDP-packet-from-a-network-socket/m-p/739414#M515</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am using the MCUXPresso SDK version 2.2 with the Thread stack on the KW41Z.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The manual says that in order to receive a packet on a UDP socket, I must register a Session callback, initilialize the Session task, a message queue, etc. I want to use just the simple recv() function.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When I try that, it does not seem to work. Also I can not see how I could give the function a timeout, or tell it to block until a packet comes in, or use a function like select() to find out when a packet arrives. It just immediately returns and gives me an error (-1).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please explain how I should use the recv() function to receive UDP packets on a socket.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 27 Nov 2017 15:15:01 GMT</pubDate>
    <dc:creator>thomasblank</dc:creator>
    <dc:date>2017-11-27T15:15:01Z</dc:date>
    <item>
      <title>How can I receive a Thread UDP packet from a network socket without using the Session module?</title>
      <link>https://community.nxp.com/t5/MCUXpresso-SDK/How-can-I-receive-a-Thread-UDP-packet-from-a-network-socket/m-p/739414#M515</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am using the MCUXPresso SDK version 2.2 with the Thread stack on the KW41Z.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The manual says that in order to receive a packet on a UDP socket, I must register a Session callback, initilialize the Session task, a message queue, etc. I want to use just the simple recv() function.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When I try that, it does not seem to work. Also I can not see how I could give the function a timeout, or tell it to block until a packet comes in, or use a function like select() to find out when a packet arrives. It just immediately returns and gives me an error (-1).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please explain how I should use the recv() function to receive UDP packets on a socket.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 27 Nov 2017 15:15:01 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MCUXpresso-SDK/How-can-I-receive-a-Thread-UDP-packet-from-a-network-socket/m-p/739414#M515</guid>
      <dc:creator>thomasblank</dc:creator>
      <dc:date>2017-11-27T15:15:01Z</dc:date>
    </item>
    <item>
      <title>Re: How can I receive a Thread UDP packet from a network socket without using the Session module?</title>
      <link>https://community.nxp.com/t5/MCUXpresso-SDK/How-can-I-receive-a-Thread-UDP-packet-from-a-network-socket/m-p/739415#M516</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When you are trying to send a message you will need to create the socket, bind it and create a connection.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you are trying to receive from a socket you will need to create a socket, bind the IP with a port and it will be listed, this is enabled by the #define SOCK_DEMO.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you want to see step by step the&amp;nbsp;how to use UDP sockets on a Thread Host Controlled Device using SDK from MCUXpresso&amp;nbsp; you can check the following&amp;nbsp;&lt;A _jive_internal="true" href="https://community.nxp.com/message/925682?commentID=925682#comment-925682"&gt;thread&lt;/A&gt; &lt;/P&gt;&lt;P&gt;&lt;A _jive_internal="true" href="https://community.nxp.com/message/925682?commentID=925682#comment-925682" title="https://community.nxp.com/message/925682?commentID=925682#comment-925682"&gt;Reboot will be caused immediately as soon as it received Socket Bind command for the TCP protocol + Stream socket type.&amp;nbsp; &lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best Regards,&amp;nbsp;&lt;/P&gt;&lt;P&gt;Estephania&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 05 Dec 2017 18:13:16 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MCUXpresso-SDK/How-can-I-receive-a-Thread-UDP-packet-from-a-network-socket/m-p/739415#M516</guid>
      <dc:creator>stephanie_m</dc:creator>
      <dc:date>2017-12-05T18:13:16Z</dc:date>
    </item>
  </channel>
</rss>

