NTP impossible

@ Brett - yes but i try http to know if i’m really connect to internet :s

i use DHCP …

i’m lost now … but thanks to you i don’t throw my computer by the window ^^

If you can PING the device, then you’re on the network. That alone should be sufficient to prove network connectivity.

First, you say you’re using DHCP. But earlieryou showed us code that uses a static IP address. Which is it?

Also, what IP address or name are you using for your current NTP source? NTP isn’t something you can just point at any network device and have it work, I suggest you use a device from the ntp.org pool in your region - see pool.ntp.org: the internet cluster of ntp servers to find one.

This is how I would approach your situation right now.

Ignore everything else you have done so far in your existing project. Take a known working application, such as Nicolas3’s Wiz5100 app here http://www.tinyclr.com/codeshare/entry/247 or Jasdev’s similar Fez Connect driver here http://www.tinyclr.com/codeshare/entry/358 (this one is my favourite)

Prove that these work - if they don’t work then its because of your network or your Fez setup, not because of code.

Then once you have that working, incorporate the working NTP solution into your original project code.

For deeper networking diagnostics I also suggest you grab yourself netmon or wireshark to capture your data. You will need a hub not a switch to help capture the packets if you really get stuck and have to delve into this - but to understand what your device is putting on the wire now, you can simply connect the cable from your Connect shield to your PC network card, but you might need to do some IP address configs to make it work effectively, so come back and tell us what you next find.

Agreed. But that didn’t mean he was able to get to the internet on that network.

He was trying this:

NTPTime(“193.49.146.254”, +2);

[quote]Ignore everything else you have done so far in your existing project. Take a known working application, such as Nicolas3’s Wiz5100 app here http://www.tinyclr.com/codeshare/entry/247 or Jasdev’s similar Fez Connect driver here http://www.tinyclr.com/codeshare/entry/358 (this one is my favourite)

Prove that these work - if they don’t work then its because of your network or your Fez setup, not because of code.

Then once you have that working, incorporate the working NTP solution into your original project code. [/quote]

Makes perfect sense.

I try to use your favorite code ^^ and it work !!!

I am happy and sad bacause it come from my code :frowning:

but thanks you a lot !!!

très bon!!!

i have to had all the project of NTP to my project ?

no just the code that’s relevant to NTP :slight_smile:

sorry but i don’t understand :S

i can’t just take the methode SetClockFromNTPTime() … or maybe i’m wrong

@ Dylan
Yes, you need the static method “SetClockFromNTPTime” and the NTPClient class.
SetClockFromNTPTime uses my AppSettings class, which you don’t really need. You can just pass your values to the “GetNTPTime” method.

I think NTP work but not the network on FEZ … because GetNTPTime was closer than the methode i was use.

And when i use all your program it work, but just with GetNTPTime it dosen’t work.

witch server do you use for NTP ?

There is a static method in Program.cs that creates default settings:


private static AppSettings GetDefaultSettings()
{
	AppSettings settings = new AppSettings();

	// network appSettings
	settings.HostName = "WebServerDemo";
	settings.MACAddress = "00-EF-18-84-E8-BE";
	settings.DHCPEnabled = true;
	settings.IPAddress = "";
	settings.IPMask = "";
	settings.IPGateway = "";
	settings.DNSAddress = "";
	settings.NTPEnabled = true;
	settings.NTPServer = "us.pool.ntp.org";
	settings.NTPOffset = "-480";
	settings.HTTPEnabled = true;
	settings.HTTPPrefix = "http";
	settings.HTTPPort = "80";

	// appSettings
	settings.Password = "test";

	return settings;
}

sorry i still don’t understand :s

where settings will be use ? and when does i have to call this methode ?

sorry again and thanks for your help !!

Ok i think i understand it was just for show me the setting i have to use ?

I would do what Brett suggested… that you start with the entire web server project, and then slowly remove or modify the parts (one at a time) that you don’t need in your application.

It’s late here, and I have to wake up very early tomorrow morning, so I’m going to logout for now. I hope you get your application working !

ok thanks ! i will try this !

sorry for the time me in france it’s 8h30 am :slight_smile:

good night!

Try servers from the pool.ntp.org that I pointed out before… pool.ntp.org: NTP Servers in France, fr.pool.ntp.org for France :slight_smile:

I’ll be online in a few hours and I might be able to assist in more detail - I’ll try to be on the IRC chat line #TinyCLR (you might need to search for that to find all the details)

IRC Details: http://www.tinyclr.com/forum/topic?id=7210

So I guess we can assume your’ project is done and you’re all happy? :slight_smile: