Subject: [Capwap] Issue 40: Adapt firmware trigger state machine to allow transition from Run state

From: "Pat Calhoun (pacalhou)" <[email-masked]>
Date: Mon, 1 May 2006 22:55:46 -0700

All,

Here is my proposed fix for issue 40. The request was to allow for the
firmware download to be able to be triggered not only at boot time, but
at any time while in the Run state. The remaining issue is that the new
DTLS state machine no longer includes a change I had made to support
this mode of operation, so I will readd this once the DTLS state machine
has stabilized.

8.1.  Image Data Request

   The Image Data Request message is used to update firmware on the WTP.
   This message and its companion response message are used by the AC to
   ensure that the image being run on each WTP is appropriate.

   Image Data Request messages are exchanged between the WTP and the AC
   to download a new firmware image to the WTP.  When a WTP or AC
   receives an Image Data Request message it will respond with an Image
   Data Response message.  The message elements contained within the
   Image Data Request is required in order to determine the intent of
   the request.  Note that only one message element may be present in
   any given Image Data Request message.

   The decision that new firmware is to downloaded to the WTP can occur
   in one of two methods:

      When the WTP joins the AC, and each exchange their software
      revision, the WTP may opt to initiate a firmware download by
      sending an Image Data Request, which contains an Image Filename
      message element.

      Once the WTP is in the CAPWAP state, it is possible for the AC to
      cause the WTP to initiate a firmware download by initiating an
      Image Data Request, with the Initiate Download message element.
      The WTP would then transmit the Image Filename message element to
      start the download process.

   Regardless of how the download was initiated, once the AC receives an
   Image Data Request with the Image Filename message element, it begins
   the transfer process by transmitting its own request with the Image
   Data message element.  This continues until the whole firmware image
   has been transfered.

   The format of the message elements used with the Image Data Request
   are described in the following subsections.

8.1.1.  Initiate Download

   The Initiate Download message element is used by the AC to inform the
   WTP that it should initiate a firmware upgrade.  This is performed by
   having the WTP initiate its own Image Data Request, with the Image
   Download message element.  This message element does not contain any

Calhoun, Editor, et al.  Expires August 5, 2006                [Page 61]

Internet-Draft        CAPWAP Protocol Specification        February 2006

   data.

   Type:  TBD for Initiate Download

   Length:  0

8.1.2.  Image Filename

   The image filename message element is sent by the WTP to the AC and
   is used to initiate the firmware download process.  This message
   element contains the image filename, which the AC subsequently
   transfers to the WTP via the Image Data message element.  The value
   is a variable length byte string, which is NOT zero terminated.

      0                   1                   2                   3
      0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
     |                           Filename ...                        |
     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

   Type:  32 for Image Filename

   Length:  >= 1

   Filename:  A variable length string containing the filename to
      download.

8.1.3.  Image Data

   The image data message element is present in the Image Data Request
   message sent by the AC and contains the following fields.

      0                   1                   2                   3
      0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
     |     Opcode    |           Checksum            |  Image Data   |
     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
     |                          Image Data ...                       |
     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

   Type:  33 for Image Data

   Length:  >= 4 (allows 0 length element if last data unit is 1024
      bytes)

   Opcode:  An 8-bit value representing the transfer opcode.  The
      following values are supported:

      3 - Image data is included

      5 - An error occurred.  Transfer is aborted

   Checksum:  A 16-bit value containing a checksum of the image data
      that follows

   Image Data:  The Image Data field contains 1024 characters, unless
      the payload being sent is the last one (end of file).  If the last
      block was 1024 in length, an Image Data with a zero length payload
      is sent. 

Pat Calhoun
CTO, Wireless Networking Business Unit
Cisco Systems
_________________________________________________________________
To unsubscribe or modify your subscription options, please visit:
http://lists.frascone.com/mailman/listinfo/capwap

Archives: http://lists.frascone.com/pipermail/capwap