#11425 NORM Not Tri: Need a secure field mechanism for setting RTC
Zarro Boogs per Child
bugtracker at laptop.org
Sun Nov 20 23:32:36 EST 2011
#11425: Need a secure field mechanism for setting RTC
-------------------------------------------+--------------------------------
Reporter: reuben | Owner: reuben
Type: enhancement | Status: new
Priority: normal | Milestone: Not Triaged
Component: ofw - open firmware | Version: not specified
Resolution: | Keywords:
Next_action: never set | Verified: 0
Deployment_affected: | Blockedby:
Blocking: |
-------------------------------------------+--------------------------------
Comment(by Quozl):
Yes, it is possible, but not in current OpenFirmware version, to associate
to an AP given a prefix. This is yet to be implemented.
Meanwhile, with current version, you can provide a list of SSIDs to be
tried, and they will be tried in order until one works. Disadvantage of
this method is that each SSID must be listed, which may be impractical for
a large deployment.
{{{
\ OLPC Boot script to set RTC via NTP
: deployment-ssids "
schoolXX-1"nschoolXX-2"nschoolXX-3"nschoolXY-1"nschoolXY-2"nschoolXY-3"nOLPCOFW"
;
' deployment-ssids to default-ssids
ntp-set-clock
}}}
Output:
{{{
ok ntp-set-clock
Scan for: schoolXX-1 failed
Scan for: schoolXX-2 failed
Scan for: schoolXX-3 failed
Scan for: schoolXY-1 failed
Scan for: schoolXY-2 failed
Scan for: schoolXY-3 failed
Scan for: OLPCOFW found
Associate with: OLPCOFW
DHCP got 10.0.0.1
2011-11-21 02:20:21 UTC
ok
}}}
The following code fragment may be added to olpc.fth to set the SSID to
the last scanned SSID that matches a prefix "school*". This works for me,
but may not work where there are more networks that fit into the scan
buffer.
{{{
\ OLPC Boot script to set RTC via NTP using access point prefix.
: prefix$ " school" ;
d# 34 buffer: an-ssid
: an-ssid0 ( -- ) 0 an-ssid c! ;
: an-ssid! ( ssid$ -- ) d# 32 min an-ssid pack drop ;
: an-ssid@ ( -- ssid$ ) an-ssid count ;
dev /supplicant
: capture-ssid ( ssid$ -- )
\ test for hidden access point, first byte of essid is zero
over c@ if ( ssid$ )
2dup
prefix$ ( ssid$ ssid$ prefix$ )
rot drop comp ( ssid$ comparison )
0= if
\ a match by prefix, capture the ssid for re-use
2dup an-ssid!
then
then ( ssid$ )
type ( )
;
patch capture-ssid type .ie-short
dend
scan-wifi an-ssid@ $essid
ntp-set-clock
}}}
Also, if a USB to ethernet adapter is used, then no SSID is required.
Relates to #11230, request for a test that would scan for any open SSID.
--
Ticket URL: <http://dev.laptop.org/ticket/11425#comment:3>
One Laptop Per Child <http://laptop.org/>
OLPC bug tracking system
More information about the Bugs
mailing list