Page 1 of 1

SBL2e & Time

Posted: Wed Jul 28, 2010 6:44 pm
by cmo
I'm testing out an SBL2e device and I'm trying to use the SetNTPTime function. However the header file doesn't look like it's available (NBTime.h). Does anyone know of a workaround? Is there any way to set the time on this device from a time server or otherwise?

Thanks in advance.

Re: SBL2e & Time

Posted: Wed Jul 28, 2010 9:56 pm
by bbracken
Would be interested in your results. Particularly interested in the maximum bandwidth of the serial ports. In my particular case I'll be tunnelilng both serial ports.

Thanks,

bb

Re: SBL2e & Time

Posted: Thu Jul 29, 2010 6:38 am
by Ridgeglider
I have not worked with the SBL2e but nbtime.h is usually at: C:\nburn\include and nbtime.cpp is in C:\nburn\system.

Re: SBL2e & Time

Posted: Thu Jul 29, 2010 9:09 am
by pbreed
SBL2E uses a different set of libraries.
nburn\include_sc
and nburn_system_sc

where SC means single chip.

The nbtime functions are not presently in that library.

The NTP protocol is a fairly simple UDP protocol so its well within the capabilities of the SBL2E, its just not there in the library yet.

I ported the NTP stuff from the normal Library to the SBL2E

The example application is attached.

WARNING this code has had very little testing.
SPECIFICALLY the time zone set stuff pulls in a huge amount of library stuff that probably is not a good idea
on the SBL2E. One should probably just do your own time zone conversion or keep everything in GMT.

Paul

Re: SBL2e & Time

Posted: Thu Jul 29, 2010 9:10 am
by pbreed
Forgot one file...
You need to add the attached nbtime.h to nburn\include_sc

Paul

Re: SBL2e & Time

Posted: Thu Jul 29, 2010 5:04 pm
by cmo
Thank you Paul. The code you provided compiles fine. I will test it on my device and let you know. Thanks again.