Quantcast
Channel: Intel Communities: Message List
Viewing all articles
Browse latest Browse all 18153

udp.parsePacket issues

$
0
0

Hi everyone,

 

   I am having a problem with udp.parsePacket.  I am trying to move a program that I have been using on the Uno and Mega over to the Galileo.  On my second read of udp.ParsePacket it just freezes, never hits the next line.

 

   I have stripped down my code to just the basics thinking it may be something else not compatible but I cannot figure it out.  I have seen a few mentions of others having a similar issue but no solutions that I could find.

 

   Any thoughts would be greatly appeciated.

 

Oh, here is the test code and the output:

 

#include #include          // needed for Arduino versions later than 0018
#include
EthernetUDP Udp;

void setup() {
     
}

void loop() {
  uint16_t packetSize = 0;   while(true) {         Serial.println("A2");    packetSize = Udp.parsePacket();                                       Serial.println(packetSize);              if (Udp.available() && packetSize !=0)   {       Serial.println("A22");    } else {      Serial.println("A31");      break;         }            }  Serial.println("A3");     
}

 

And here is the output:

 

        A2     20     A22     A2     20

Viewing all articles
Browse latest Browse all 18153

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>