Non-Network Time Protocol for Haiti?

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

Non-Network Time Protocol for Haiti?

Adam Holt-2
In Haiti many teachers and kids would prefer the time was set correctly on their XO-1 laptops, no matter if the time is off by a couple minutes.  So they could really use a script that creates the following /boot/olpc.fth, writing it out to an attached USB stick:
\ Open Firmware
select /rtc decimal 0 0 0 1 1 1804 set-time
\ Optionally unlock XO
disable-security
Then the teacher/operator can walk around the room to fix all XO's clocks (refreshing the USB time as often as she/he wants).  Of course not every day can be Haitian Independence Day (Jan 1 1804!) so what the script should really do is create a timestamp 1 minute into the future, filling out those 6 numbers above correctly.

The untrained operator (teacher typically) will then move the USB stick to the XO(s) in need, to set their RTC's (real-time-clocks).  Some ambitious teachers will want to do this every month/semester it appears, to sanitize/harmonize all clocks in their classroom/school as much as possible!

Any recommended approaches to getting the UX clean, so that such untrained operator have a visual confirmation that the USB stick has been updated with a proper time-stamp, and (perhaps just as important??) the stick mounted+unmounted effortlessly without too much risk, when this USB stick is recreated hundreds of times within 1 day?  A non-confusing command line script can work, that says basically 2 things:
  • PLEASE INSERT A USB STICK
  • USB STICK READY: REMOVE IT NOW!
The less keyboard activity required from the teacher the better.  But I'm tempted by command syntax as follows:

usb-timestamper <minute-into-the-future>

Such that running "/bin/usb-timestamper 5" would create USB sticks timestamped 5 minutes into the future.  The default should be 1 minute into the future, so running "/bin/usb-timestamper" would be equivalent to "/bin/usb-timestamper 1".

Conclusion: am just looking for general suggestions from everyone as we cook up something simple!  We do not want to rely on networking of mesh at all in this case, as USB sticks are the most reliable and quick approach in this case.

Clarif: I will of course train the teacher/operator to set the clock correctly on their own XO-1, which will typically be running OLPC OS 13.2.7 -- so that all these "offline-NTP sticks" are created based on a reasonably accurate baseline timestamp :)

--
Unsung Heroes of OLPC, interviewed live @ http://unleashkids.org !

_______________________________________________
Devel mailing list
[hidden email]
http://lists.laptop.org/listinfo/devel
Reply | Threaded
Open this post in threaded view
|

Re: Non-Network Time Protocol for Haiti?

Adam Holt-2
Clarifs below~

On Sun, Mar 6, 2016 at 11:51 AM, Adam Holt <[hidden email]> wrote:
In Haiti many teachers and kids would prefer the time was set correctly on their XO-1 laptops, no matter if the time is off by a couple minutes.  So they could really use a script that creates the following /boot/olpc.fth, writing it out to an attached USB stick:
\ Open Firmware
select /rtc decimal 0 0 0 1 1 1804 set-time
\ Optionally unlock XO
disable-security
Then the teacher/operator can walk around the room to fix all XO's clocks (refreshing the USB time as often as she/he wants).  Of course not every day can be Haitian Independence Day (Jan 1 1804!) so what the script should really do is create a timestamp 1 minute into the future, filling out those 6 numbers above correctly.

The untrained operator (teacher typically) will then move the USB stick to the XO(s) in need, to set their RTC's (real-time-clocks).  Some ambitious teachers will want to do this every month/semester it appears, to sanitize/harmonize all clocks in their classroom/school as much as possible!

Any recommended approaches to getting the UX clean, so that such untrained operator have a visual confirmation that the USB stick has been updated with a proper time-stamp, and (perhaps just as important??) the stick mounted+unmounted effortlessly without too much risk, when this USB stick is recreated hundreds of times within 1 day?  A non-confusing command line script can work, that says basically 2 things:
  • PLEASE INSERT A USB STICK
  • USB STICK READY: REMOVE IT NOW!
The less keyboard activity required from the teacher the better.  But I'm tempted by command syntax as follows:

usb-timestamper <minutes-into-the-future>
 
Such that running "/bin/usb-timestamper 5" would create USB sticks timestamped 5 minutes into the future.  The default should be 1 minute into the future, so running "/bin/usb-timestamper" would be equivalent to "/bin/usb-timestamper 1".

Conclusion: am just looking for general suggestions from everyone as we cook up something simple!

We do not want to rely on networking or mesh At All.  KISS (key it simple/stupid) at the firmware level allows the teacher/operator to move thru the classroom quite rapidly, fixing the time on each XO laptop as often as s/he wants.  2 examples scenarios, showing how this will be used:
  1. Teacher/operator may choose to run "usb-timestamper 10" once as s/he enters each classroom, if she wants to timestamp the USB stick 10min into the future, and then apply this rapidly to all 50 XO's in a classroom/lab over the coming 20minutes.  Works great ifs/he does not care that the XO's clocks are off by +/- 10min!
  2. Or if teacher/operator is perfectionist, then usb-timestamper (interactive command-line program) can be left running on hir own XO laptop that s/he carries around the room -- updating the USB stick repeatedly while walking around the classroom -- such that each of that room's 50 XO laptops has an almost-exact clock, accurate within a minute or so.
 
in this case, as USB sticks are the most reliable and quick approach in this case.

Clarif: I will of course train the teacher/operator to set the clock correctly on their own XO-1, which will typically be running OLPC OS 13.2.7 -- so that all these "offline-NTP sticks" are created based on a reasonably accurate baseline timestamp :)

--
Unsung Heroes of OLPC, interviewed live @ http://unleashkids.org !



--
Unsung Heroes of OLPC, interviewed live @ http://unleashkids.org !

_______________________________________________
Devel mailing list
[hidden email]
http://lists.laptop.org/listinfo/devel
Reply | Threaded
Open this post in threaded view
|

Re: Non-Network Time Protocol for Haiti?

Adam Holt-2
In short, http://NTP.org - by - sneakernet, not carrier pigeon :>

On Sun, Mar 6, 2016 at 12:06 PM, Adam Holt <[hidden email]> wrote:
Clarifs below~

On Sun, Mar 6, 2016 at 11:51 AM, Adam Holt <[hidden email]> wrote:
In Haiti many teachers and kids would prefer the time was set correctly on their XO-1 laptops, no matter if the time is off by a couple minutes.  So they could really use a script that creates the following /boot/olpc.fth, writing it out to an attached USB stick:
\ Open Firmware
select /rtc decimal 0 0 0 1 1 1804 set-time
\ Optionally unlock XO
disable-security
Then the teacher/operator can walk around the room to fix all XO's clocks (refreshing the USB time as often as she/he wants).  Of course not every day can be Haitian Independence Day (Jan 1 1804!) so what the script should really do is create a timestamp 1 minute into the future, filling out those 6 numbers above correctly.

The untrained operator (teacher typically) will then move the USB stick to the XO(s) in need, to set their RTC's (real-time-clocks).  Some ambitious teachers will want to do this every month/semester it appears, to sanitize/harmonize all clocks in their classroom/school as much as possible!

Any recommended approaches to getting the UX clean, so that such untrained operator have a visual confirmation that the USB stick has been updated with a proper time-stamp, and (perhaps just as important??) the stick mounted+unmounted effortlessly without too much risk, when this USB stick is recreated hundreds of times within 1 day?  A non-confusing command line script can work, that says basically 2 things:
  • PLEASE INSERT A USB STICK
  • USB STICK READY: REMOVE IT NOW!
The less keyboard activity required from the teacher the better.  But I'm tempted by command syntax as follows:

usb-timestamper <minutes-into-the-future>
 
Such that running "/bin/usb-timestamper 5" would create USB sticks timestamped 5 minutes into the future.  The default should be 1 minute into the future, so running "/bin/usb-timestamper" would be equivalent to "/bin/usb-timestamper 1".

Conclusion: am just looking for general suggestions from everyone as we cook up something simple!

We do not want to rely on networking or mesh At All.  KISS (key it simple/stupid) at the firmware level allows the teacher/operator to move thru the classroom quite rapidly, fixing the time on each XO laptop as often as s/he wants.  2 examples scenarios, showing how this will be used:
  1. Teacher/operator may choose to run "usb-timestamper 10" once as s/he enters each classroom, if she wants to timestamp the USB stick 10min into the future, and then apply this rapidly to all 50 XO's in a classroom/lab over the coming 20minutes.  Works great ifs/he does not care that the XO's clocks are off by +/- 10min!
  2. Or if teacher/operator is perfectionist, then usb-timestamper (interactive command-line program) can be left running on hir own XO laptop that s/he carries around the room -- updating the USB stick repeatedly while walking around the classroom -- such that each of that room's 50 XO laptops has an almost-exact clock, accurate within a minute or so.
 
in this case, as USB sticks are the most reliable and quick approach in this case.

Clarif: I will of course train the teacher/operator to set the clock correctly on their own XO-1, which will typically be running OLPC OS 13.2.7 -- so that all these "offline-NTP sticks" are created based on a reasonably accurate baseline timestamp :)

--
Unsung Heroes of OLPC, interviewed live @ http://unleashkids.org !



--
Unsung Heroes of OLPC, interviewed live @ http://unleashkids.org !

--
Unsung Heroes of OLPC, interviewed live @ http://unleashkids.org !

_______________________________________________
Devel mailing list
[hidden email]
http://lists.laptop.org/listinfo/devel
Reply | Threaded
Open this post in threaded view
|

Re: Non-Network Time Protocol for Haiti?

Adam Holt-2
(Apologies I forgot to mention that auto-mounting and auto-dismounting the USB stick is likely the hard part -- untrained teachers simply cannot handle mount-point ambiguities, if they can handle the command-line at all -- suggestions on how to solve this elegantly most appreciated!)

PS we are happy to mandate that teachers must supply an empty/formatted FAT32 stick or similar if that's the best practice?

On Sun, Mar 6, 2016 at 12:08 PM, Adam Holt <[hidden email]> wrote:
In short, http://NTP.org - by - sneakernet, not carrier pigeon :>


On Sun, Mar 6, 2016 at 12:06 PM, Adam Holt <[hidden email]> wrote:
Clarifs below~

On Sun, Mar 6, 2016 at 11:51 AM, Adam Holt <[hidden email]> wrote:
In Haiti many teachers and kids would prefer the time was set correctly on their XO-1 laptops, no matter if the time is off by a couple minutes.  So they could really use a script that creates the following /boot/olpc.fth, writing it out to an attached USB stick:
\ Open Firmware
select /rtc decimal 0 0 0 1 1 1804 set-time
\ Optionally unlock XO
disable-security
Then the teacher/operator can walk around the room to fix all XO's clocks (refreshing the USB time as often as she/he wants).  Of course not every day can be Haitian Independence Day (Jan 1 1804!) so what the script should really do is create a timestamp 1 minute into the future, filling out those 6 numbers above correctly.

The untrained operator (teacher typically) will then move the USB stick to the XO(s) in need, to set their RTC's (real-time-clocks).  Some ambitious teachers will want to do this every month/semester it appears, to sanitize/harmonize all clocks in their classroom/school as much as possible!

Any recommended approaches to getting the UX clean, so that such untrained operator have a visual confirmation that the USB stick has been updated with a proper time-stamp, and (perhaps just as important??) the stick mounted+unmounted effortlessly without too much risk, when this USB stick is recreated hundreds of times within 1 day?  A non-confusing command line script can work, that says basically 2 things:
  • PLEASE INSERT A USB STICK
  • USB STICK READY: REMOVE IT NOW!
The less keyboard activity required from the teacher the better.  But I'm tempted by command syntax as follows:

usb-timestamper <minutes-into-the-future>
 
Such that running "/bin/usb-timestamper 5" would create USB sticks timestamped 5 minutes into the future.  The default should be 1 minute into the future, so running "/bin/usb-timestamper" would be equivalent to "/bin/usb-timestamper 1".

Conclusion: am just looking for general suggestions from everyone as we cook up something simple!

We do not want to rely on networking or mesh At All.  KISS (key it simple/stupid) at the firmware level allows the teacher/operator to move thru the classroom quite rapidly, fixing the time on each XO laptop as often as s/he wants.  2 examples scenarios, showing how this will be used:
  1. Teacher/operator may choose to run "usb-timestamper 10" once as s/he enters each classroom, if she wants to timestamp the USB stick 10min into the future, and then apply this rapidly to all 50 XO's in a classroom/lab over the coming 20minutes.  Works great ifs/he does not care that the XO's clocks are off by +/- 10min!
  2. Or if teacher/operator is perfectionist, then usb-timestamper (interactive command-line program) can be left running on hir own XO laptop that s/he carries around the room -- updating the USB stick repeatedly while walking around the classroom -- such that each of that room's 50 XO laptops has an almost-exact clock, accurate within a minute or so.
 
in this case, as USB sticks are the most reliable and quick approach in this case.

Clarif: I will of course train the teacher/operator to set the clock correctly on their own XO-1, which will typically be running OLPC OS 13.2.7 -- so that all these "offline-NTP sticks" are created based on a reasonably accurate baseline timestamp :)

--
Unsung Heroes of OLPC, interviewed live @ http://unleashkids.org !



--
Unsung Heroes of OLPC, interviewed live @ http://unleashkids.org !

--
Unsung Heroes of OLPC, interviewed live @ http://unleashkids.org !

--
Unsung Heroes of OLPC, interviewed live @ http://unleashkids.org !

_______________________________________________
Devel mailing list
[hidden email]
http://lists.laptop.org/listinfo/devel
Reply | Threaded
Open this post in threaded view
|

Re: [UKids] Re: Non-Network Time Protocol for Haiti?

Adam Holt-2
On Sun, Mar 6, 2016 at 6:58 PM, Tony Anderson <[hidden email]> wrote:
Adam

I have a script that attempts to accomplish this through ds_backup. The goal is to have all of the clients with the same time as the school server (may not be internet accurate but at least gives some consistency to time stamps). The problem is that this must be done by a command issued from a tty. In the case
of xsce, this could be done at connect-time when the XO1 time is off by more than X.

Cool, please post?

My problem is there are many school in Haiti that do not and will not have school servers -- for the forseeable future -- so let's attack this problem from both angles -- thanks!

Tony


On 03/07/2016 01:19 AM, Adam Holt wrote:
(Apologies I forgot to mention that auto-mounting and auto-dismounting the USB stick is likely the hard part -- untrained teachers simply cannot handle mount-point ambiguities, if they can handle the command-line at all -- suggestions on how to solve this elegantly most appreciated!)

PS we are happy to mandate that teachers must supply an empty/formatted FAT32 stick or similar if that's the best practice?

On Sun, Mar 6, 2016 at 12:08 PM, Adam Holt <[hidden email]> wrote:
In short, http://NTP.org - by - sneakernet, not carrier pigeon :>


On Sun, Mar 6, 2016 at 12:06 PM, Adam Holt <[hidden email][hidden email]> wrote:
Clarifs below~

On Sun, Mar 6, 2016 at 11:51 AM, Adam Holt <[hidden email][hidden email]> wrote:
In Haiti many teachers and kids would prefer the time was set correctly on their XO-1 laptops, no matter if the time is off by a couple minutes.  So they could really use a script that creates the following /boot/olpc.fth, writing it out to an attached USB stick:
\ Open Firmware
select /rtc decimal 0 0 0 1 1 1804 set-time
\ Optionally unlock XO
disable-security
Then the teacher/operator can walk around the room to fix all XO's clocks (refreshing the USB time as often as she/he wants).  Of course not every day can be Haitian Independence Day (Jan 1 1804!) so what the script should really do is create a timestamp 1 minute into the future, filling out those 6 numbers above correctly.

The untrained operator (teacher typically) will then move the USB stick to the XO(s) in need, to set their RTC's (real-time-clocks).  Some ambitious teachers will want to do this every month/semester it appears, to sanitize/harmonize all clocks in their classroom/school as much as possible!

Any recommended approaches to getting the UX clean, so that such untrained operator have a visual confirmation that the USB stick has been updated with a proper time-stamp, and (perhaps just as important??) the stick mounted+unmounted effortlessly without too much risk, when this USB stick is recreated hundreds of times within 1 day?  A non-confusing command line script can work, that says basically 2 things:
  • PLEASE INSERT A USB STICK
  • USB STICK READY: REMOVE IT NOW!
The less keyboard activity required from the teacher the better.  But I'm tempted by command syntax as follows:

usb-timestamper <minutes-into-the-future>
 
Such that running "/bin/usb-timestamper 5" would create USB sticks timestamped 5 minutes into the future.  The default should be 1 minute into the future, so running "/bin/usb-timestamper" would be equivalent to "/bin/usb-timestamper 1".

Conclusion: am just looking for general suggestions from everyone as we cook up something simple!

We do not want to rely on networking or mesh At All.  KISS (key it simple/stupid) at the firmware level allows the teacher/operator to move thru the classroom quite rapidly, fixing the time on each XO laptop as often as s/he wants.  2 examples scenarios, showing how this will be used:
  1. Teacher/operator may choose to run "usb-timestamper 10" once as s/he enters each classroom, if she wants to timestamp the USB stick 10min into the future, and then apply this rapidly to all 50 XO's in a classroom/lab over the coming 20minutes.  Works great ifs/he does not care that the XO's clocks are off by +/- 10min!
  2. Or if teacher/operator is perfectionist, then usb-timestamper (interactive command-line program) can be left running on hir own XO laptop that s/he carries around the room -- updating the USB stick repeatedly while walking around the classroom -- such that each of that room's 50 XO laptops has an almost-exact clock, accurate within a minute or so.
 
in this case, as USB sticks are the most reliable and quick approach in this case.

Clarif: I will of course train the teacher/operator to set the clock correctly on their own XO-1, which will typically be running OLPC OS 13.2.7 -- so that all these "offline-NTP sticks" are created based on a reasonably accurate baseline timestamp :)

--
Unsung Heroes of OLPC, interviewed live @ http://unleashkids.org !



--
Unsung Heroes of OLPC, interviewed live @ http://unleashkids.org !

--
Unsung Heroes of OLPC, interviewed live @ http://unleashkids.org !

--
Unsung Heroes of OLPC, interviewed live @ http://unleashkids.org !
--
Unsung Heroes of OLPC, interviewed live @ http://unleashkids.org !
---
You received this message because you are subscribed to the Google Groups "Unleash Kids" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.

--
Unsung Heroes of OLPC, interviewed live @ http://unleashkids.org !
---
You received this message because you are subscribed to the Google Groups "Unleash Kids" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.

--
Unsung Heroes of OLPC, interviewed live @ http://unleashkids.org !

_______________________________________________
Devel mailing list
[hidden email]
http://lists.laptop.org/listinfo/devel
Reply | Threaded
Open this post in threaded view
|

Re: Non-Network Time Protocol for Haiti?

James Cameron-2
In reply to this post by Adam Holt-2
Your question reminded me to release my "download time button" for the
Clock activity, which you can find at

        http://dev.laptop.org/~quozl/Clock-18.1.xo

The new button sets the system date and time and then saves it in the
real-time clock.  Screenshot attached.  It fits your use-case for the
teacher's laptop, but can also be used on children's laptops.  Patches
sent to Gonzalo [1].

For the rest of your question to do with scripting or programming USB
drive actions; there are plenty of programming languages available on
the XO, so your best bet is to find who is going to do the work and
let them choose the most appropriate language for their experience.

I wouldn't do it the way you've proposed; it shows how little you know
of what can be done, and an insistence on specific solutions, probably
pushed along by teachers who can't be bothered learning useful skills.

Instead I'd use Daniel Drake's Oatslite server on the master laptop,
with the Oatstime file on a USB drive that only gets set up once, or
use network booting with the four game keys gesture.  With no
deployment keys the file [4] can be simplified by removing the key
check:

        : verify-oats   2drop   ;

The question of how to maintain the clocks does come up regularly.  A
nice summary of the secure method is in ticket #11425 [5].

Another thing you could do is find out;

(a) why the time isn't being kept, e.g. broken battery holders, dead
batteries,

(b) what the time is used for; given that Sugar barely uses it.

My guess is that having fixed the firmware problems that prevent
laptops from booting with dead clock batteries, I've simply moved the
problem to later.  Silly me.


References:

1.  https://github.com/godiard/clock-activity/pull/2
2.  http://wiki.laptop.org/go/Oatstime
3.  http://wiki.laptop.org/go/Oatslite
4.  http://dev.laptop.org/git/users/quozl/openfirmware/tree/cpu/x86/pc/olpc/oatstime.fth
5.  https://dev.laptop.org/ticket/11425

--
James Cameron
http://quozl.netrek.org/

_______________________________________________
Devel mailing list
[hidden email]
http://lists.laptop.org/listinfo/devel

clock-18-1-screenshot.png (96K) Download Attachment