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.
SBL2e & Time
Re: SBL2e & Time
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
Thanks,
bb
-
- Posts: 513
- Joined: Sat Apr 26, 2008 7:14 am
Re: SBL2e & Time
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
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
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
- Attachments
-
- ntp.zip
- NTP example for the SBL2E
- (7.35 KiB) Downloaded 323 times
Re: SBL2e & Time
Forgot one file...
You need to add the attached nbtime.h to nburn\include_sc
Paul
You need to add the attached nbtime.h to nburn\include_sc
Paul
- Attachments
-
nbtime.h
- (1.99 KiB) Downloaded 324 times
Re: SBL2e & Time
Thank you Paul. The code you provided compiles fine. I will test it on my device and let you know. Thanks again.