Working with Configuration Files and Software Images

This chapter describes how to copy configuration files and how to download software images to a Cisco LoRaWAN Gateway.

Managing Files

You can manage the files system in USB or flash.

Copying Files

To copy a file from a source to a destination, use the copy source-url destination-url privileged EXEC command. For the source and destination URLs, you can use running-config and startup-config keyword shortcuts. For example, the copy running-config startup-config command saves the currently running configuration file to the NVRAM section of flash memory to be used as the configuration during system initialization.

Network file system URLs include ftp: and tftp: and have these syntaxes:

  • FTP—ftp: [[// username [: password ]@ location ]/ directory ]/ filename

  • TFTP—tftp: [[// location ]/ directory ]/ filename

Local writable file systems include flash:.

Some invalid combinations of source and destination exist. Specifically, you cannot copy these combinations:

  • From a running configuration to a running configuration

  • From a startup configuration to a startup configuration

  • From a device to the same device (for example, the copy flash: flash: command is invalid)

You can copy from remote to local, local to remote, and local to local. However, copying from remote to remote is not supported. During the copying process, one symbol ! printed on the screen indicates 100 blocks (512 bytes per block) transferred.

For specific examples of using the copy command with configuration files, see Working with Configuration Files.

To copy software images either by downloading a new version or by uploading the existing one, use the archive download-sw or the archive upload-sw privileged EXEC command. For more information, see Working with Software Images.

File Management Commands

You can use the commands in the following table to manage the file system.

Table 1. File Management Commands

Command

Description

cd

Change current directory.

copy

Copy from one file to another.

delete

Delete a file.

dir

List files on a filesystem.

format

Format a filesystem.

Note

 
Only flash can be formatted.

mkdir

Create a new directory.

more

Display the contents of a file.

pwd

Display the current working directory.

rename

Rename a file.

Working with Configuration Files

This section describes how to download or maintain configuration files.

You can copy (download ) configuration files from a TFTP or FTP server to the running configuration or startup configuration of the Cisco LoRaWAN Gateway. You might perform this task to back up a current configuration file to a server before changing its contents so that you can later restore the original configuration file from the server.

The protocol you use depends on which type of server you are using. The FTP transport mechanisms provide faster performance and more reliable delivery of data than TFTP. These improvements are possible because FTP is built on and uses the TCP/IP stack, which is connection-oriented.

Configuration File Types and Location

Startup configuration files are used during system startup to configure the software. Running configuration files contain the current configuration of the software. The two configuration files can be different. For example, you might want to change the configuration for a short time period rather than permanently. In this case, you would change the running configuration but not save the configuration by using the copy running-config startup-config privileged EXEC command.

Displaying Configuration Files

To display the configuration of the device, use the show [running-config | startup-config ] EXEC command.

Removing Configuration Files

To remove the configuration of the device, use the no configuration command in global configuration mode.

Reloading the System

To reboot the system, use the reload EXEC command.

The reload command will first check if the running configuration has been saved and prompt user if not. You can enter yes to save the configuration or no to skip this step. Then, you will be prompted to reload the system.

Working with Software Images

This section describes how to download software image files, which is stored as a .tar.gz file and contains the kernel and root file system.

You can download a Cisco LoRaWAN Gateway image file from a TFTP or FTP server, or from a USB device, to upgrade the Cisco LoRaWAN Gateway software.

Downloading an Image File


Note


When upgrading from any version prior to Release 1.0.20 to Release 2.0, you must perform a factory upgrade for proper behavior.



Note


To download the firmware from an USB device, you should first enable the USB support by executing the usb enable command.


Beginning in privileged EXEC mode, follow these steps to download a new image file.

Procedure

  Command or Action Purpose

Step 1

Log into the Cisco LoRaWAN Gateway through through SSH or Console.

Note

 

The console port is 115.2kbs.

Step 2

archive download-sw firmware {/factory | /normal | /uboot-only | /uboot-normal | /uboot-factory [/save-reload | /force-reload ]} path

Download the image file to the Cisco LoRaWAN Gateway.

  • /factory – Upgrade the firmware and delete user data.

Note

 
Avoid using the /factory option with this command, because it erases everything and brings back to factory default.
  • /factory - Upgrade the firmware and delete the user data

  • /normal - Upgrade the firmware and keep the user data

  • /uboot-only - Upgrade the uboot and keep the user data

  • /uboot-normal - Upgrade the uboot and firmware, and keep the user data

  • /uboot-factory - Upgrade the uboot and firmware, and delete the user data

  • /save-reload – Save the current configuration if required and reload the system after successful upgrade.

  • /force-reload – Do not save the current configuration and reload the system after successful upgrade.

  • path - The location of the file, which can be usb:, tftp, ftp, or flash:

What to do next

Example


#archive download-sw firmware /normal /save-reload tftp://172.27.74.9/corsica_i_k9-2.0.0015.tar.gz

USB Support

After the USB is plugged in:

  • To enable USB, use the following command:

    
    Router# usb enable
    
    
  • To display the USB content, use the following command:

    
    Router# dir usb:
    
    
  • To disable USB, use the following command:

    
    Router# usb disable
    
    

The USB partition should be formatted to FAT//ms-dos. Other file system types are not supported.

  • For the formatting on Windows 7 and Windows 10, choose Fat (default) for the format option, and 4096 bytes for the allocation size; or choose Fat32 for the format option, and 2048 bytes for the allocation size.

  • For the formatting on MAC OS, choose MS-Dos (FAT).


Note


To make sure that the USB is detected and usable on the IXM:

  1. If any error is shown during the formatting, try to format it again or use another USB.

  2. Do not unplug the USB directly after formatting. Use the Eject command provided by the host OS.


Configuring U-boot

U-boot is a universal bootloader for embedded boards based on PowerPC, ARM, MIPS and several other processors, which can be installed in a boot ROM and used to initialize and test the hardware or to download and run OS and application code.

Bootloader version requirement for the u-boot feature is “Bootloader Version: 20170515_cisco”.

Beginning in privileged EXEC mode, follow these steps to configure U-boot option.

Procedure

  Command or Action Purpose

Step 1

configure terminal

Enter global configuration mode.

Step 2

uboot console {disable |restore }

Configure U-boot console.

  • disable - Disable U-boot console (and System console if SSH is enabled).

    Note

     

    When IP SSH limit local is enabled on the IXM, the SSH access from outside is disabled for the unit. The uboot console disable option only checks whether SSH is enabled or not, and does not factor the IP SSH limit local option. If both commands are configured, it is possible that both the console conntecvity and SSH connectivity are lost. In that case, the only way to access the unit is through container via Thing park.

  • restore - Restore U-boot console (and System console if it was disabled).

Step 3

uboot protection word

Enable U-boot password protection.

  • word - 8 to 30 alphanumeric or special characters.

To disable U-boot password protection, use the no uboot protection command.

Step 4

exit

Return to privileged EXEC mode.

Step 5

show uboot console

Example:

show uboot protection 

Show U-boot console status.

Show U-boot password protection status.