Main Site Documentation

NTP timeout (Fez Connect)


#1

I’ve tried several different “projects” and snippets to get the time using NPT client code.
In every case, the request times out and fails.
My first and current attempt is directly using “Driver — FEZ CONNECT DRIVER” by jasdev from the Code section. No changes to the code initially.

  • I updated the libraries and firmware to the latest (SDK V 1.0.19) This is a new panda II
    with new fez connect
  • rest of “fez connect driver” work great (setting, init, dhcp)
  • I am printing the IP address of the NPT servers before I connect, so DNS is working
  • I tried a dozen NPT servers:
    pool.ntp.org, 0.north-america.pool.npt.org, time.nist.gov, time.windows.com, …
  • I can grab the time from hppt (tycho.usno.navy.mil/cgi-bin/timer.pl) -
    (Plan B is parsing that output)
  • I’d be embarrassed if it were a router issue. I have standard settings and my windows machine
    has no problem syncing to those servers. (and I work for Cisco, so I would be embarrassed)

It is probably something simple, but I can’t figure this one out.


#2

@ eolson - Did you try this NTP server: us.pool.ntp.org ?


#3

I had no problems at all with Jasdev’s code as used in this http://code.tinyclr.com/project/426/fez-connect-web-server/ (which has a pretty much plug and play project that you can test !)


#4

FEZconnect WebServer is a great piece of code. It works perfectly …
except for the NTP request. I just added one debug line to GetNTPTime
to make sure the DNS was working

Web Server Demo : Initializing network...
Web Server Demo : Network ready.
  IP Address: 192.168.1.112
  Subnet Mask: 255.255.255.0
  Default Getway: 192.168.1.1
  DNS Server: 75.75.75.75
Free mem : 35676

Web Server Demo : Requesting NTP date-time...
[GetNTPTime] : requesting time from us.pool.ntp.org (208.75.88.4)
Web Server Demo : Error : Timed out.
Free mem : 35676

Web Server Demo : Registering Http event handlers...
Free mem : 34644

I’m not sure what to do next, I might need to run my own time server so I can see if the request is happening (and be 100% sure the router is not eating the request).


#5

Hi @ eolson

I’m far from being a network expert, but it looks like your DNS server is outside of your network, and it appears that your router is happy to route those requests from your device, so why wouldn’t it route the NTP requests… unless it is specifically blocking that protocol??


#6

Good news: It works with ntpd running on a linux machine in my local network.
Odd that my PC can set it’s time from various external NTP servers.
But it looks like a router or other network issue. The FEZ is working.


#7

A suggestion : watch for your MAC address. I don’t know how you selected the one for your FEZ, but some router / firewalls don’t allow some packets through if they consider it as “illegal”. You may try to use another one (like your PC’s + 1).

Have Fun :slight_smile: