Class: XBee::Series2APIModeInterface

Inherits:
BaseAPIModeInterface show all
Defined in:
lib/ruxbee/xbee_api.rb

Overview

class Series1APIModeInterface

Constant Summary

Constants inherited from BaseAPIModeInterface

BaseAPIModeInterface::VERSION

Constants inherited from RFModule

RFModule::VERSION

Instance Attribute Summary

Attributes inherited from RFModule

#api_mode, #command_character, #command_mode_timeout, #firmware_rev, #guard_time, #hardware_rev, #node_discover_timeout, #node_identifier, #operation_mode, #serial_number, #transmission_mode, #xbee_serialport, #xbee_uart_config

Instance Method Summary collapse

Methods inherited from BaseAPIModeInterface

#association_indication, #baud, #baud!, #channel, #channel!, #destination_high, #destination_high!, #destination_low, #destination_low!, #dio, #dio!, #dio_change_detect, #dio_change_detect!, #exit_command_mode, #fw_rev, #get_param, #get_remote_param, #getresponse, #hw_rev, #initialize, #io_input, #io_output!, #neighbors, #network_reset!, #next_frame_id, #node_id, #node_id!, #pan_id, #pan_id!, #parity, #parity!, #received_signal_strength, #reset!, #restore!, #save!, #send!, #serial_num, #serial_num_high, #serial_num_low, #set_param, #set_remote_param, #start_apimode_communication, #version

Methods inherited from RFModule

#getresults, #in_command_mode, #initialize, #read_timeout, #version

Constructor Details

This class inherits a constructor from XBee::BaseAPIModeInterface

Instance Method Details

#init_ota_upgrade(password = nil, remote_address = 0x000000000000ffff, remote_network_address = 0xfffe) ⇒ Object

Initiating the application firmware OTA upgrade for Programmable XBee modules



636
637
638
639
640
# File 'lib/ruxbee/xbee_api.rb', line 636

def init_ota_upgrade(password = nil, remote_address = 0x000000000000ffff, remote_network_address = 0xfffe)
  frame_id = self.next_frame_id
  command_frame = XBee::Frame::ExplicitAddressingCommand.new(frame_id, remote_address, remote_network_address, 0xE8, 0xE8, 0x1000, 0xC105, 0x00, 0x00, password)
  self.xbee_serialport.write(command_frame._dump(self.api_mode.in_symbol))
end