XBee Firmware Library  1.6.0
Files | Functions

Files

file  ota_server.h
 
file  xbee_ota_server.c
 

Functions

XBEE_BEGIN_DECLS int xbee_ota_server_cmd (const wpan_envelope_t FAR *envelope, void FAR *context)
 Cluster command to initiate firmware updates. More...
 
const char * xbee_update_firmware_ota (const wpan_envelope_t FAR *envelope, void FAR *context)
 Application needs to provide this function as a method of receiving firmware updates over-the-air with Xmodem protocol. More...
 

Detailed Description

Code for the Programmable XBee to receive over-the-air firmware updates.

Function Documentation

int xbee_ota_server_cmd ( const wpan_envelope_t FAR *  envelope,
void FAR *  context 
)

Cluster command to initiate firmware updates.

Verifies that APS encryption was used (if cluster is configured as such) before handing off to implementation-provided function xbee_update_firmware_ota().

See also
wpan_aps_handler_fn
const char* xbee_update_firmware_ota ( const wpan_envelope_t FAR *  envelope,
void FAR *  context 
)

Application needs to provide this function as a method of receiving firmware updates over-the-air with Xmodem protocol.

See xbee/ota_client.h for details on sending updates.

Your application can support password-protected updates by checking the payload of the request. If the payload is a valid request to initiate an update, this function should enter an "XMODEM receive" mode and start sending 'C' to the sender of the request, indicating that it should start sending 64-byte XMODEM packets with the new firmware.

On Digi's Programmable XBee platform, this function would exit to the bootloader so it can receive the new application firmware.

Parameters
[in]envelopecommand sent to start update – function may want to use the payload for some sort of password verification
[in,out]contextuser context (from cluster table)
Return values
NULLdo not respond to request
!NULLrespond to request with error message