SBL2e & Time

Discussion to talk about software related topics only.
Post Reply
cmo
Posts: 20
Joined: Sat Jul 24, 2010 4:20 pm

SBL2e & Time

Post 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.
bbracken
Posts: 54
Joined: Mon Jun 23, 2008 11:21 am
Location: Southern California
Contact:

Re: SBL2e & Time

Post 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
Ridgeglider
Posts: 513
Joined: Sat Apr 26, 2008 7:14 am

Re: SBL2e & Time

Post 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.
User avatar
pbreed
Posts: 1088
Joined: Thu Apr 24, 2008 3:58 pm

Re: SBL2e & Time

Post 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
Attachments
ntp.zip
NTP example for the SBL2E
(7.35 KiB) Downloaded 323 times
User avatar
pbreed
Posts: 1088
Joined: Thu Apr 24, 2008 3:58 pm

Re: SBL2e & Time

Post by pbreed »

Forgot one file...
You need to add the attached nbtime.h to nburn\include_sc

Paul
Attachments
nbtime.h
(1.99 KiB) Downloaded 324 times
cmo
Posts: 20
Joined: Sat Jul 24, 2010 4:20 pm

Re: SBL2e & Time

Post by cmo »

Thank you Paul. The code you provided compiles fine. I will test it on my device and let you know. Thanks again.
Post Reply