Managing Plug-n-Play (PnP)

This chapter describes how to configure and manage the Plug-n-Play (PnP) on the Cisco LoRaWAN Gateway.

Understanding Plug-n-Play

The PnP agent is an embedded software application running on Cisco routers, switches, wireless access points, and sensors. It enables zero-touch provisioning by automatically starting on boot up for new or factory reset devices and by automatically discovering the PnP server. Once a secure channel communication is established with the PnP server through one of the secure PnP discovery mechanisms, the PnP agent is capable of performing different operations on a Cisco device, such as image upgrading, configuration upgrading, and CLI executing.

Configuring Plug-n-Play


Note


The PnP agent will be trigged only by doing a factory reset on an existing device or on a completely new device.


PnP agent on the IXM supports the following DHCP, DNS, and CCO discovery mechanisms:

  • DHCP/DNS discovery: The precondition of using DHCP and DNS discovery is to setup DHCP server first. Refer to http://pnp.cisco.com/index.php/solutions/training/agent-discovery for information on configuring the DHCP server.

  • CCO discovery:

    This configuration is only for PnP CCO discovery use. If IXM needs NTP server, it still needs to go through CLIs.

    1. Log in to https://software.cisco.com/#

    2. Choose Plug and Play Connect under Network Plug and Play.

    3. Add the device information.

    4. You will see status "Pending Redirection."

    5. When device connects to CCO status will be "Contacted" and after some time "Redirected."

    6. After successful PNP, a Redirection Successful message appears.

For more information, see the following document: http://pnp.cisco.com/index.php/solutions/pnp-connect.

Follow these steps to configure pnp on the LoRaWAN gateway:

Procedure

  Command or Action Purpose

Step 1

configure terminal

Enter global configuration mode.

Step 2

pnp enable

Start the PnP agent.

Step 3

pnp disable

Stop the PnP agent.

Step 4

exit

Exit the global configuration mode.

Step 5

show pnp profiles

(Optional) Show PnP version.

Step 6

show pnp status

(Optional) Show PnP status.

Step 7

show pnp log name trace number-of-lines

(Optional) Display the PnP trace log.

number-of-lines – Number of lines in the log to display from end of file.

number-of-lines – Number of lines in config to display from end of file.

Example

Example of showing PnP profiles and status

#show pnp profiles
Created by              UDI
DHCP Discovery  PID:POSIX-Reference,VID:V01,SN:23336985067

     Primary transport: http
     Address: 10.154.201.104
     Port: 9455
     CA file:

     Work-Request Tracking:
         Pending-WR: Correlator= Cisco-PnP-POSIX-reference-1.8.1.dev19-2-7013f6f5-ac52-4a96-b589-ac35d91c499b-1
         Last-WR:    Correlator= Cisco-PnP-POSIX-reference-1.8.1.dev19-1-c9aadc77-760b-42b6-b6c7-859093ab5e09-1
     PnP Response Tracking:
         Last-PR:    Correlator= Cisco-PnP-POSIX-reference-1.8.1.dev19-1-c9aadc77-760b-42b6-b6c7-859093ab5e09-1

#show pnp status
PnP Agent is running

#show pnp status
PnP Agent is not running
file-transfer
    status: Failure
    time: 17:44:01 Aug 06
server-connection
    status: Success
time: 17:44:01 Aug 06

Debugging Plug-n-Play

When the PnP is running , the PnP trace log file can be displayed through the IXM using the show pnp log name trace command:

#show pnp log name trace 15
2016-08-06 17:43:56,023 - pnp.infra.network.HTTPConnClient - DEBUG - PNP requests with url: http://10.154.201.104:9455/pnp/HELLO
2016-08-06 17:43:56,040 - pnp.discovery.infra.discovery_manager - DEBUG - Existing profile config found valid.
2016-08-06 17:43:56,041 - pnp.discovery.infra.discovery_manager - DEBUG - Discovery skipped upon existing profile configs presence
2016-08-06 17:43:56,043 - pnp.infra.utils.pnp_utils - DEBUG - PnP config read: Connection Info:
Transport: http
Address: 10.154.201.104
Port: 9455
Remote CA File:
Core Trust Enabled? False
2016-08-06 17:43:56,056 - pnp.agent - INFO - platform_dict: {'hardwareInfo': {'platformName': 'reference', 'hostname': 'Gateway', 'vendor': 'Network-PnP', 'processorT
2016-08-06 17:43:56,058 - pnp.agent - DEBUG - Unsuccessful attempt to get reason code from msg: INVALID_REASON_CODE
2016-08-06 17:43:56,058 - pnp.agent - DEBUG - Agent not using reload reason.
2016-08-06 17:43:56,058 - pnp.agent - INFO - UDI: PID:POSIX-Reference,VID:V01,SN:81961640269
2016-08-06 17:43:56,061 - pnp.infra.utils.pnp_utils - DEBUG - PnP config read: Connection Info:
Transport: http
Address: 10.154.201.104