CDRouter is a test automation platform from QA Cafe that contains many test cases for the USP protocol, including the DTP-469 USP Conformance tests.

To test UspPa with CDRouter, you need to configure both the agent and CDRouter.


Configuring UspPa Agent

Use the one of the factory reset settings below in your usp_factory_reset.conf file. They configure your agent to use an unencrypted STOMP, MQTT or WebSocket connection to CDRouter.

NOTE: Replace "192.168.1.128" with the IP address or hostname of your CDRouter unit.


STOMP

# IMPORTANT: Modify Device.STOMP.Connection.1.Host with the IP address of your CDRouter
Device.STOMP.Connection.1.Host "192.168.100.128"
Device.LocalAgent.Controller.1.EndpointID "proto::controller-id"
Device.STOMP.Connection.1.Username "qacafe"
Device.STOMP.Connection.1.Password "qacafe123"
Device.LocalAgent.Controller.1.MTP.1.STOMP.Destination "/controller-path"
Device.LocalAgent.MTP.1.STOMP.Destination "/agent-path"
Device.STOMP.Connection.1.X_ARRIS-COM_EnableEncryption "false"
Device.LocalAgent.EndpointID "proto::agent-id"

Device.LocalAgent.MTP.1.Alias "cpe-1"
Device.LocalAgent.MTP.1.Enable "true"
Device.LocalAgent.MTP.1.Protocol "STOMP"
Device.LocalAgent.MTP.1.STOMP.Reference "Device.STOMP.Connection.1"
Device.LocalAgent.Controller.1.Alias "cpe-1"
Device.LocalAgent.Controller.1.Enable "true"
Device.LocalAgent.Controller.1.AssignedRole "Device.LocalAgent.ControllerTrust.Role.1"
Device.LocalAgent.Controller.1.PeriodicNotifInterval "600"
Device.LocalAgent.Controller.1.PeriodicNotifTime "0001-01-01T00:00:00Z"
Device.LocalAgent.Controller.1.USPNotifRetryMinimumWaitInterval "5"
Device.LocalAgent.Controller.1.USPNotifRetryIntervalMultiplier "2000"
Device.LocalAgent.Controller.1.ControllerCode ""
Device.LocalAgent.Controller.1.MTP.1.Alias "cpe-1" 
Device.LocalAgent.Controller.1.MTP.1.Enable "true"
Device.LocalAgent.Controller.1.MTP.1.Protocol "STOMP"
Device.LocalAgent.Controller.1.MTP.1.STOMP.Reference "Device.STOMP.Connection.1"
Device.STOMP.Connection.1.Alias "cpe-1"
Device.STOMP.Connection.1.Enable "true"
Device.STOMP.Connection.1.Port "61613"
Device.STOMP.Connection.1.VirtualHost "/"
Device.STOMP.Connection.1.EnableHeartbeats "true"
Device.STOMP.Connection.1.OutgoingHeartbeat "30000"
Device.STOMP.Connection.1.IncomingHeartbeat "300000"
Device.STOMP.Connection.1.ServerRetryInitialInterval "60"
Device.STOMP.Connection.1.ServerRetryIntervalMultiplier "2000"
Device.STOMP.Connection.1.ServerRetryMaxInterval "30720"
Internal.Reboot.Cause "LocalFactoryReset"


MQTT

# IMPORTANT: Modify Device.MQTT.Client.1.BrokerAddress with the IP address of your CDRouter
Device.LocalAgent.Controller.1.EndpointID "proto::controller-id"
Device.MQTT.Client.1.BrokerAddress "192.168.100.128"
Device.LocalAgent.MTP.1.MQTT.ResponseTopicConfigured "/agent-path"
Device.MQTT.Client.1.Username "qacafe"
Device.MQTT.Client.1.Password "qacafe123"
Device.LocalAgent.EndpointID "proto::agent-id"

Device.LocalAgent.MTP.1.Alias "cpe-1"
Device.LocalAgent.MTP.1.Protocol "MQTT"
Device.LocalAgent.MTP.1.Enable "true"
Device.LocalAgent.MTP.1.MQTT.Reference "Device.MQTT.Client.1"
Device.LocalAgent.Controller.1.Alias "cpe-1"
Device.LocalAgent.Controller.1.Enable "true"
Device.LocalAgent.Controller.1.AssignedRole "Device.LocalAgent.ControllerTrust.Role.1"
Device.LocalAgent.Controller.1.PeriodicNotifInterval "600"
Device.LocalAgent.Controller.1.PeriodicNotifTime "0001-01-01T00:00:00Z"
Device.LocalAgent.Controller.1.USPNotifRetryMinimumWaitInterval "5"
Device.LocalAgent.Controller.1.USPNotifRetryIntervalMultiplier "2000"
Device.LocalAgent.Controller.1.ControllerCode ""
Device.LocalAgent.Controller.1.MTP.1.Alias "cpe-1" 
Device.LocalAgent.Controller.1.MTP.1.Enable "true"
Device.LocalAgent.Controller.1.MTP.1.Protocol  "MQTT"
Device.LocalAgent.Controller.1.MTP.1.MQTT.Reference "Device.MQTT.Client.1"
Device.LocalAgent.Controller.1.MTP.1.MQTT.Topic "/controller-path"
Device.MQTT.Client.1.ProtocolVersion "5.0"
Device.MQTT.Client.1.BrokerPort "1883"
Device.MQTT.Client.1.TransportProtocol "TCP/IP"
Device.MQTT.Client.1.Alias "cpe-1"
Device.MQTT.Client.1.Enable true
Device.MQTT.Client.1.ClientID ""
Device.MQTT.Client.1.KeepAliveTime "60"
Internal.Reboot.Cause "LocalFactoryReset"


WebSockets

# IMPORTANT: Modify Device.LocalAgent.Controller.1.MTP.1.WebSocket.Host with the IP address of your CDRouter Device.LocalAgent.Controller.1.EndpointID "proto::controller-id"
Device.LocalAgent.EndpointID "proto::agent-id"

Device.LocalAgent.Controller.1.MTP.1.Protocol  "WebSocket"
Device.LocalAgent.Controller.1.MTP.1.WebSocket.Host "192.168.100.128"
Device.LocalAgent.Controller.1.MTP.1.WebSocket.Port "80"
Device.LocalAgent.Controller.1.MTP.1.WebSocket.Path "/controller-path"
Device.LocalAgent.Controller.1.MTP.1.WebSocket.EnableEncryption "false"
Device.LocalAgent.Controller.1.MTP.1.WebSocket.KeepAliveInterval "2000"
Device.LocalAgent.Controller.1.MTP.1.WebSocket.SessionRetryMinimumWaitInterval "5"
Device.LocalAgent.Controller.1.MTP.1.WebSocket.SessionRetryIntervalMultiplier "2000"
Device.LocalAgent.Controller.1.MTP.1.Enable  "true"
Device.LocalAgent.MTP.1.Enable  "true"
Device.LocalAgent.MTP.1.Protocol  "WebSocket"
Device.LocalAgent.MTP.1.WebSocket.Port  "80"
Device.LocalAgent.MTP.1.WebSocket.Path  "/agent-path"
Device.LocalAgent.MTP.1.WebSocket.EnableEncryption  "false"
Device.LocalAgent.MTP.1.WebSocket.KeepAliveInterval  "2000"
Device.LocalAgent.Controller.1.Alias "cpe-1"
Device.LocalAgent.Controller.1.Enable "true"
Device.LocalAgent.Controller.1.AssignedRole "Device.LocalAgent.ControllerTrust.Role.1"
Device.LocalAgent.Controller.1.PeriodicNotifInterval "600"
Device.LocalAgent.Controller.1.PeriodicNotifTime "0001-01-01T00:00:00Z"
Device.LocalAgent.Controller.1.USPNotifRetryMinimumWaitInterval "5"
Device.LocalAgent.Controller.1.USPNotifRetryIntervalMultiplier "2000"
Device.LocalAgent.Controller.1.ControllerCode ""
Internal.Reboot.Cause "LocalFactoryReset"


Configuring CDRouter

The following instructions are for configuring CDRouter for testing with a RPi running RDK-B. Some tweaking may be necessary with other devices.

First add a new configuration using the CDRouter Web GUI.

Then you need to modify the following testvars:

testvar wanIspIp                         192.168.100.1
testvar wanIspMask                       255.255.255.240

If you don't connect CDRouter's designated LAN port to RPi using an ethernet to USB dongle, then you must connect a network switch to CDRouter's designated LAN port instead and set the lanMode testvar to 'static':

testvar lanMode                          static


Replace the "USP Add-On" section in the configuration with the text below.

If you are testing using a different MTP than STOMP, modify the testvar uspControllerMTP appropriately.

SECTION "CDRouter USP Add-On" {

    testvar supportsUSP                      yes

    SECTION "Basic Controller Configuration" {

        # testvar uspControllerID                  proto::controller-id
        # testvar uspControllerInterface           wan

        # testvar uspControllerIpMode              ipv4-only
        testvar uspControllerIpv4                192.168.100.128
        # testvar uspControllerIpv6                6000::2
        # testvar uspControllerPort                auto
        # testvar uspControllerPath                /controller-path

        testvar uspControllerUseNonPayloadProtection no
        testvar uspControllerUseSessionContext   no
        testvar uspControllerMTP                 stomp
        testvar uspControllerMTPEncryption       no
        # testvar uspControllerUSPEncryption       no
        # testvar uspControllerDomain              controller.cdroutertest.com

        # testvar uspSegmentationEnable            no
        # testvar uspSegmentationSize              auto

        testvar uspControllerMTPCertPath         /usr/cdrouter/tests/cdroutertest.pem
#        testvar uspControllerMTPCaCertPath       /usr/cdrouter/tests/eco_agent_root.crt

        # testvar uspControllerUSPCaCertPath       /usr/cdrouter/tests/wildcard.cdroutertest.com-ca.pem
        # testvar uspControllerUSPCertPath         /usr/cdrouter/tests/wildcard.cdroutertest.com.pem

        # testvar uspControllerSenderCertPath      /usr/cdrouter/tests/wildcard.cdroutertest.com.pem
        testvar uspControllerVerifyRecordIntegrity no

        # testvar uspControllerHost                any
        # testvar uspControllerUsername            qacafe
        # testvar uspControllerPassword            qacafe123

    }

    SECTION "Basic Agent Configuration" {

        # testvar uspAgentID                       proto::agent-id

        # testvar uspAgentIpv4                     auto
        # testvar uspAgentIpv6                     auto
        # testvar uspAgentPort                     auto
        # testvar uspAgentPath                     /agent-path

        # testvar uspMessageTimeout                30

    }

    SECTION "USP Scenarios" {

        # testvar uspScenarioPath                  /home/dev/myUSPScenario.usp
        # testvar uspScenarioSingleMode            no
        # testvar uspScenarioBootstrap             /home/dev/myBootstrapScenario.usp

    }

    SECTION "Data Model" {

        # testvar uspSkipParameters                empty
        # testvar uspModifyParameters              empty
        # testvar uspSupportedDataModel            all

        SECTION "Custom USP Data Model" {

            IGNORE testvar_group usp_profile_1 {

                # testvar uspProfileName                   myVendorParameters
                # testvar uspProfilePath                   /home/dev/myVendorParameters.xml

            }

        }

    }

    SECTION "USP Agent Data Model Configuration" {

        testvar uspParameterPath1                Device.DeviceInfo.ManufacturerOUI
        testvar uspParameterPath2                Device.IP.Interface.1.Name
        testvar uspMissingParameterPath          Device.DeviceInfo.DeviceCategory
        testvar uspExternallyChangeableParam     Device.LocalAgent.Controller.1.MTP.1.CoAP.Host

        # testvar uspNotificationParamManualChange yes
        # testvar uspNotificationParamNewValue     myCustomParameterValue

        testvar uspObject1                       Device.Bridging.Bridge.
        testvar uspObject2                       Device.RouterAdvertisement.InterfaceSetting.

        testvar uspValidSearchPath               {Device.IP.Interface.[Name=="brlan0"].}
        testvar uspValidSearchPathResultParam    Alias
        testvar uspValidSearchPathResultValue    "Primary LAN"

        testvar uspFirmwareImage                 /home/qacafe/imageC.txt
        testvar uspOriginalFirmwareImage         /home/qacafe/imageA.txt
        testvar uspInactiveFirmwareSlot          Device.DeviceInfo.FirmwareImage.2

    }

}


Finally you will need to create a test package containing the tests to run. For example the tests from the USP -> usp.tcl group.