The cnPilot R-series R200/R201 Family products support DHCP options 66, to update the configuration from a TFTP server and to update the firmware.
- As R200/R201 is powered up, the device will receive an IPaddress using DHCP over WAN port. As part of that DHCP response it also sees the Option-66, the device will use that as an indication to retrieve configuration file from the location specified in the DHCP server option 66
- Then R200/R201 device will be updated to latest config file that is pulled from TFTP server.
- Firmware on R200/R201 devices can be upgraded using this mechanism, for that required rules/instructions to be added in above configfile as explained in the following sections.
- When devices are updated with latest config file, rules for firmware upgrade will executed and firmware will be loaded from the location (TFTP/HTTP server) mentioned in the rule.
Prerequisite /Set up:
- Auto provisioning on device.
Make sure auto provisioning is enabled on the device as shown below. (auto-provisioning is enabled in the factory-default configuration of the device.)
- Device should be reachable to TFTP server through WAN interface and Device WAN interface should be dhcp client mode.
- DHCP server should be running with auto provisioning option (option -66) to specify the IP address of the TFTP server where configuration file is placed.
On below screen shot with tftp64, option 66 is configured with server ip 192.168.10.66 where new configuration file is located.
- Configuration file to be placed in TFTP location
- New Configuration fike should be placed in the TFTP server location that is mentioned in DHCP server option 66.
- Upon detecting option 66 DHCP message ,Device will be looking and retrieving for the configuration file from TFTP server with name that is specified in the device (administration -àprovisioning -> Config File Name ).
- Default configuration file Name in 4.2 firmware or older firmware is MAC of WAN interface of the device. (Eg: The Config filename is 00045604AEB1 in the screen shots given in this document as an example). This WAN MAC is on the label of the unit as well as the packaging the AP comes in, in upper-case without any separators.
- Configfile default name as MAC of the WAN interface is set as $(MA) in the WEB GUI as seen in screen shot.
Note:
The administrator can configure the AP with other config file name (Eg: $(PN) to indicate the Product Name of “cnPilot R200”, $(IP) to indicatethe IP address or with any other name).
Config file name can be changed using DHCP option 66 with DBID_PRV_CONFIGFILE.
Update DBID_PRV_CONFIGFILE with new configuration file .
Example :DBID_PRV_CONFIGFILE =$(MA))
- Default configuration file Name 4.3 firmware is Cambium-cnPilot-R.cfg
- Make sure configuration file name in the server matching to the File name set in the device.
Rules to be set in configuration file for firmware upgrade
-
Rules for Devices running 4.3 and later releases
- Configuration file on tftp folder should have the rule DBID_UPGRADE_RULE, set with firmware location as shown below.
DBID_UPGRADE_RULE=tftp://<server ip>/ <binary name>
Example for configuration file for firmware upgrade:
DBID_DBASE_VERSION=1 WebInit=1 DBID_UPGRADE_RULE=tftp://192.168.10.66/cnPilot-R201P_4.3-R9_201611181444.bin
Screen shot shows TFTP folder with Configuration file and Firmware:
- Rules for device running with firmware release 4.2.x or older
-
- Devices which runs with firmware release 4.0 or older releases , need to have script to download the firmware and write to the flash and script should be in tftp/http folder as mentioned in the rule below.
-
- Attached script sw_upgrade_to_4.3R9.sh is for upgrading to 4.3R9 release.(edit server_url as per the setup)
-
Need to add instruction/rule (with misc_cmd) in the configfile for downloading the script and trigger the script.
misc_cmd=cd /tmp;sleep 15; tftp -g -l sw_upgrade_to_4.3R9.sh <tftp server ip> ;if [ $?= "0" ] ;then chmod 777 sw_upgrade_to_4.3R9.sh; /tmp/sw_upgrade_to_4.3R9.sh;fi ;
-
Once system is updated with latest configuration, misc_cmd will be executed and that triggers the script and script will down load the image and write to the flash.
-
Configuration file example is: (device WAN MAC is 00:04:56:04:AE:B1/ configuration file name in tftp folder is 00045604AEB1 /tftp server address 192.168.10.66).
DBID_DBASE_VERSION=1 WebInit=1 DBID_UPGRADE_RULE= misc_cmd=cd /tmp;sleep 15; tftp -g -l sw_upgrade_to_4.3R9.sh 192.168.10.66;if [ $? = "0" ];then chmod 777 sw_upgrade_to_4.3R9.sh;/tmp/sw_upgrade_to_4.3R9.sh;fi ;
-
so in this method, TFTP folder should include script sw_upgrade_to_4.3R9.sh along with configuration file and binary in the server root location.
-
Screen shot shows TFTP folder with config file, firmware and the script sw_upgrade_to_4.3R9.: