> I am using NANDBlaster to update all of our SFSU Lending Library XOs > (a total of 12). All machines update via nb-secure to 8.2.1 except one > XO, which repeatedly (five tries so far) fails to find the NANDBlaster > info, cycles through all other options and says "Boot failed". It > does update via USB key though. > > Suggestions for diagnosis? > >
The client code that discovers a NANDblaster session is shown below. Additional supporting words can be seen at http://tracker.coreboot.org/trac/openfirmware/browser/cpu/x86/pc/olpc/wifichannel.fth : multinand-traffic? ( channel# -- flag ) start-mesh " "(01 00 5e 7e 01 02)" " set-multicast" $call-wlan d# 300 0 do scan-buf d# 2048 " read" $call-wlan ( actual ) 0> if ( ) scan-buf d# 12 + " XO" comp 0= if ( ) stop-mesh ( ) true unloop exit then then 1 ms loop stop-mesh false ; : search-channels ( -- true | chan# false ) channel-bounds do ( ) i channel-avail? if ( ) i multinand-traffic? if ( ) i unloop false exit then ( ) then ( ) loop ( ) true ; : find-multinand-server ( -- true | chan# false ) open-wlan search-channels close-wlan ; : nandblaster ( -- ) find-multinand-server abort" No multicast NAND server" ( chan# ) #nb ; The top-level word "nandblaster" is normally called from "try-fs-update", which checks for an update image on USB storage, SD, NANDblaster, and http in turn. try-fs-update is normally invoked by game key. Any of these words can be executed manually from the ok prompt. Also, you can use the Forth debugger to step through the execution interactively. http://wiki.laptop.org/go/Forth_Lesson_15 tells how to use the debugger. The operation of "find-multinand-server" should be self-explanatory. "search-channels" probably needs some explanation. It really boils down to calling "multinand-traffic?" for channels 1, 6, and 11 . The complexity (outer loop over a range of channel numbers with an inner "channel-avail?" filter) is due to the desire to support different regulatory domains that may have different allowed frequencies. "multinand-traffic?" is the main test for nandblaster activity on a channel. If you happen to know that the sender is on channel 6, for example, you could go directly to the test by writing: ok open-wlan 6 multinand-traffic? . close-wlan The result would be 0 for no traffic seen, ffffffff for traffic seen. multinand-traffic? puts the wifi interface in mesh mode listening to a specific multicast address, then tries to receive Ethernet frames, looking for one whose Ethernet type field has the value "XO". Here is a recipe for starting the debugger to step through the main event. Replace 6 with the channel number - either 1, 6, or d# 11 (if you just type 11 you will get 0x11). ok debug multinand-traffic? ok open-wlan 6 multinand-traffic? . close-wlan Type space to step through. _______________________________________________ Devel mailing list Devel@lists.laptop.org http://lists.laptop.org/listinfo/devel