Home/Support/Support Forum/Get time from NTP server with XBee WiFi

Get time from NTP server with XBee WiFi

0 votes
I'm trying to read the current time from an NTP server using an XBee S6B Wi-Fi module. My XBee is plugged into an IO Expansion Shield which is plugged into an Arduino Mega 2560. My current XBee configuration is:

ATDL 216.128.67.249
ATDE 7B

I looked up the IP address for my local NTP server here: http://support.ntp.org/bin/view/Servers/PublicTimeServer000664

The example I'm using (http://playground.arduino.cc/Main/DS1307OfTheLogshieldByMeansOfNTP) said to use port 123, which is 7B in hex.

The packet I'm sending contains the bytes: 227 0 6 236 0 0 0 0 0 0 0 0 49 78 49 52.

I'm sending out this packet using the command:
Serial.write(pb, NTP_PACKET_SIZE);

I'm not getting any response back. Is this how I send data out of the XBee? I assume when I send data out of the serial port on the Mega that it goes to the XBee, which then sends it to the IP address configured by the DL parameter. What am I doing wrong?
asked Aug 19, 2013 in IEEE 802.11 (Wi-Fi) by theoracle39 New to the Community (2 points)

Please log in or register to answer this question.

...