title: How to send/receive via UDP with ESP8266-12E
body: <p>Well I've already done UDP send/receive many times. But now I'm stucked.</p>
  
  <p>Maybe I'm missing some dumb mistake that's in the code or maybe there's problem in the libraries that I'm using. Anyway if there's someone who could help please take a look.</p>
  
  <p>Code of the receiver</p>
  
  <pre><code>#include &lt;ESP8266WiFi.h&gt;
  #include &lt;WiFiUdp.h&gt;
  
  const char* ssid = "M3-L7";
  const char* password = "mySmartChoice";
  unsigned int localPort = 2390; 
  char packetBuffer[255];
  WiFiUDP Udp;
  
  void setup() {
    Serial.begin(115200);
    WiFi.begin(ssid, password);
      while (WiFi.status() != WL_CONNECTED){
      delay(500);
      Serial.print(".");
    }
    Udp.begin(localPort);
  }
  
  void loop() {
    delay(10);
    if (Udp.parsePacket()) {
      int len = Udp.read(packetBuffer, 255);
      if (len &gt; 0) {
        packetBuffer[len] = 0;
        Serial.println(packetBuffer); 
      }
    }
  }
  </code></pre>
  
  <p>The code of the sender/accesss point</p>
  
  <pre><code>#include &lt;ESP8266WiFi.h&gt;
  #include &lt;WiFiUdp.h&gt;
  
  const char *ssid = "M3-L7";
  const char *password = "mySmartChoice";
  unsigned int localPort = 2390; 
  
  WiFiUDP Udp;
  void setup() {
      delay(1000);
      Serial.begin(115200);
      WiFi.softAP(ssid, password);
    Udp.begin(localPort);
  }
  
  void loop() {
   Udp.beginPacket("192.168.4.1", localPort);
   Udp.write("Hello");
   Udp.endPacket();
   delay(10);
  }
  </code></pre>
  
  <p>Well I'd expect "Hello" to be printed repeatedly :D.. they reach the point where they connect but that's over.</p>