[Ruby] ePMP Provisioning Script

Here’s a basic ePMP programming script we’ve written. It’s not entirely pretty, and it’s not out-of-the-box a mass provisioning option, but it suffices for single- or group-provisioning of any ePMP model and definitely fits as a fairly simple in-the-field option for a wireless technician provided their computer is set up for it.
Basic requirements: It’s a ruby script, so obviously a ruby interpreter is needed. The net-ping and optparse gems are required. ‘ssh’ is required. By default the script is written with linux in mind and may need minimal modification (ftp path) to work on Windows. An FTP server needs to be available to host both json templates and the firmware, along with having both be readable anonymously. There should be two json templates, by default ‘ePMPBaseConfig.json’ for all ePMP1000 series and ‘ePMPBaseConfigF300.json’ for the F300 series. Generally speaking, these templates should only override fields that need to be changed from factory default (hence being able to group radios by those two series with wildly different gains).
Example setup: A computer with an FTP server listening on and connected to a radio. Both json templates exist in ‘/srv/ftp’ in this example.
Usage: The script has two main modes. Running it directly requests the user enter a radio type and uses sensible defaults, but has no other control. Functions for reprogramming a factory-default radio, and a legacy feature. The second mode involves passing arguments directly. Some examples:

./ePMPDefaulter-release.rb -t 200
Uses all defaults and attempts to use options that make sense for a 200 (also legacy, we haven’t used different options since the release of the 300s, relying on templating
./ePMPDefaulter-release.rb -t 200 --snmp-string somestring
Attempts to program a radio using the given snmp string rather than the default. Useful if you’ve templated a different snmp string from factory. Also the -u option is a shorthand for another default string. i.e You program all radios from ‘private’ to ‘Canopyprivate’. The default options will communicate with ‘private’, but if you’re resetting an already templated radio -u indicates to use ‘Canopyprivate’ instead.
./ePMPDefaulter-release.rb -t 200 --skip-firmware
Skips the firmware flashing and skips straight to sending the template. --skip-configuration also exists to write firmware and then finish.
./ePMPDefaulter-release.rb -t 300 --firmware-writes 2
Indicates how many times to flash the firmware to the unit. Useful in 300s to flash the backup location as well.

Additionally, ‘–ip’ takes a radio address, ‘–ftp’ takes an ftp address, and ‘–firmware’ takes a firmware version. All these options are accessible with ‘-h’ or ‘–help’.

Free for use. It’s especially educational as the script’s several years old at this point so there was a lot of reverse-engineering oddities with the ePMPs. It’s still far from ‘clean’, but Cambium’s response to better options was largely ‘that’s not supported’. Having seen a few requests for something like this, hope it helps someone.
ePMPDefaulter-release.txt (5.3 KB)