ZTP on Cisco 819 and 829 Routers


NOTE: For Cisco 829 with a firmware version >= 16.2 and RuBAN 6.0.148 - Now included in default config files:

The following lines should always be included in the beginning of your ZTP config file for above firmware and RuBAN versions:

do copy http://<ruban_IP>:<ruban_http_port>/eem/tcl/public/eem_library/initDavraLib.tcl flash:/RuBAN/initDavraLib.tcl
do mkdir flash:/RuBAN/eem_library
do copy http://<ruban_IP>:<ruban_http_port>/eem/tcl/public/eem_library/pkgIndex.tcl flash:/RuBAN/eem_library/pkgIndex.tcl
do copy http://<ruban_IP>:<ruban_http_port>/eem/tcl/public/eem_library/davra.tcl flash:/RuBAN/eem_library/davra.tcl
do copy http://<ruban_IP>:<ruban_http_port>/eem/tcl/public/eem_library/metrics.tcl flash:/RuBAN/eem_library/metrics.tcl
do copy http://<ruban_IP>:<ruban_http_port>/eem/tcl/public/eem_library/utils.tcl flash:/RuBAN/eem_library/utils.tcl
do copy http://<ruban_IP>:<ruban_http_port>/eem/tcl/public/config/j1939DefaultMetrics.cfg flash:/RuBAN/j1939DefaultMetrics.cfg
no ev m dir user lib
ev m dir user lib flash:/RuBAN/eem_library
no ev m env davra_lib_version
ev m env davra_lib_version 1.8




Note for OBDII streamer configuration (i.e. NOT J1939):

The requested metrics and metric mappings have to be defined in the following format:

event manager environment bb_requestParameters EngineSpeed, VehicleSpeed, BatteryVoltage
event manager environment bb_rubanMappings EngineSpeed#4358_105, VehicleSpeed#4358_107, BatteryVoltage#4358_136

The above metric names correspond to the device side metric name (which you can discover by following this process: How to Run the OBDII Info Script) and the Davra server metric name, found under Admin > Metric Configuration.

We advise that you add the metric mappings to your config file in your ZTP profile, instead of making the change manually on each router.


Note on Debug Variables

event manager environment debug_policy 1
event manager environment logTostdout 1
event manager environment log_RuBAN_heartbeat level debug
event manager environment log_BB_J1939 level debug

Prerequisites

To follow this tutorial you will need:

  • A working connection via terminal to your router.
  • A RuBAN instance running on your network.
  • A working network connection between your router and your RuBAN instance, i.e. you can ping your RuBAN server IP address.

Instructions


Step 1:

Open your RuBAN dashboard in your browser on http://<RuBAN IP>:58000/eem/eem.html


Step 2:

In your RuBAN dashboard, go to Admin > Zero Touch > Create New


Step 3:

Fill in anything under Profile Name, while the Provisioning Message has to correspond to the exact value of profile_name in Step 9. Please do not use names with spaces or special characters.


Step 4:

Click on Upload Gateway List and select your device list csv file, containing the serial numbers for all your devices. Example device file:

devices.csv

IMPORTANT: Please use Microsoft Notepad (but not Notepad++), nano, vi, or similar editor for this step to prevent hidden characters and lines from being added to the file.


Step 5:

Click on Upload Configuration and select your configuration txt file. 

Please find the appropriate configuration files below for router data only (Cisco_IOS_Basic_Conf.txt), or router data + BB device data (for transportation).

Cisco_IOS_Basic_Conf.txt

829_j1939_config.txt

819_j1939_config-reformatted.txt

819_OBDIIStreamer_config-reformatted.txt

829_OBDIIStreamer_config.txt

Above configuration files should basically work out of the box, though you will need to update the RuBAN server IP address in two places.

IMPORTANT: Please use Microsoft Notepad (but not Notepad++), nano, vi, or similar editor for this step.


Step 6:

Click on Create.


Step 7:

Logon to your router.


Step 8:

We will now check that your network connection is working properly by pinging your RuBAN server with ping ip <RuBAN server IP>

Example:

ping ip 192.168.0.113


Step 9:

Configure your router with the necessary variables by copy-pasting the appropriate bootstrap commands into the terminal. 

Please find the relevant bootstrap commands below.

ZTP_BOOTSTRAP-reformatted.txt

You will need to set the correct ruban_ip and profile_name, then copy-paste the commands into your router terminal.


Step 10:

Now run the ZTP_BOOTSTRAP applet:

ev m r ZTP_BOOTSTRAP


Step 11:

Go back to your RuBAN dashboard.

Your device should now change status from Pending to Provisioned as seen below. The time for this to happen will depend on the home calling value set in step 5.