Diaoul / arduino-ESP8266

An Arduino library to manage the ESP8266.
MIT License
68 stars 46 forks source link

Send UDP data #21

Closed tprochazka closed 9 years ago

tprochazka commented 9 years ago

I'm trying to send UDP NTP packet by code like this

Serial.print("connect NTP server: ");
Serial.println(getStatus(wifi.connect(4, ESP8266_PROTOCOL_UDP, "pool.ntp.org", 123)));
delay(20);
byte ntpP[48] = {0xEC,0x06,0x00,0xE3};
Serial.println(getStatus(wifi.send(4, ntpP)));

But in fact, all 0x00 values is skipped and ESP8266 receive only 3 bytes Do you know why please?

Diaoul commented 9 years ago

See #8, that should help.