RDK Resources
[*RDK Preferred*]
Code Management Facility
RDK Forums
[RDK Conferences]
RDK Support
Archives
Papers & Presentations Archive
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.
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.
# 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"
# 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"
# 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"
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.
10 Comments
Unknown User (vgosine_ctrlit)
Good day,
I am writing to report an error I am receiving while following the instructions found at https://wiki.rdkcentral.com/display/RDK/USP+-+Testing+with+CDRouter.
I am running RDK-B dunfell on a raspberry pi 4 using the rdkb-extsrc.xml manifest.
I am attempting to configure MQTT as specified on the wiki. After configuring usp_factory_reset.conf and running
/usr/bin/UspPa -p -v4 --resetfile /etc/usp-pa/usp_factory_reset.conf --truststore /etc/usp-pa/usp_truststore.pem --interface erouter0
I receive the following output:
DATABASE_Init: Opening database /nvram/usp-pa.db
DM_PRIV_GetNodeFromPath: Path is invalid: Device.MQTT.Client.1.BrokerAddress
ResetFactoryParametersFromFile: Failed to set parameter at line 1 of /etc/usp-pa/usp_fact_wiki.conf
USP Agent aborted unexpectedly
We do not see the Device.MQTT. or Device.LocalAgent. objects. These were referenced in the sample configuration.
Upon investigation it was discovered that the usp_dm_objs.conf and usp_dm_params.conf files do not include Device.MQTT. and Device.LocalAgent. objects.
The USP agent supports only the objects and parameters that are included in these in conf file.
Thank you for any assistance provided.
Richard Holme
The config files usp_dm_objs.conf and usp_dm_params.conf contain data model elements imported into UspPa from RDK-B's data model provider components. But Device.MQTT and Device.LocalAgent are built into UspPa, and so should not be included in those files.
The changes required to use MQTT were only merged into rdk-next on 9th June 2022. Perhaps your build does not include these changes ? You can check by looking at meta-rdk-broadband/recipes-rdkb/usp-pa/usp-pa.bb. For MQTT support to be enabled you should see:
Unknown User (vgosine_ctrlit)
I can confirm the build was an older one and it is now working. However we are now trying to connect to an actual controller which needs a serial number.
However the USP agent is not able to get the serial number.
root@RaspberryPi-Gateway:/etc/usp-pa# /usr/bin/UspPa -c get Device.DeviceInfo. | grep -i Serial
ERROR: 7003 retrieving Device.DeviceInfo.SerialNumber (RDK_GetGroup: CcspBaseIf_getParameterValues() failed (9005 - CCSP_ERR_INVALID_PARAMETER_NAME))
The parameter exists as it can be seen when a dmcli getv is done.
root@RaspberryPi-Gateway:/etc/usp-pa# dmcli eRT getv Device.DeviceInfo.SerialNumber
CR component name is: eRT.com.cisco.spvtg.ccsp.CR
subsystem_prefix eRT.
getv from/to component(eRT.com.cisco.spvtg.ccsp.pam): Device.DeviceInfo.SerialNumber
Execution succeed.
Parameter 1 name: Device.DeviceInfo.SerialNumber
type: string, value: 10000000e98e2bdb
Richard Holme
Does it work if you try ?
/usr/bin/UspPa -c get Device.DeviceInfo.SerialNumber
Please see Troubleshooting section on Including UspPa in a device
Unknown User (vgosine_ctrlit)
I can confirm the instructions you provided works, thanks for the guidance.
However now when I attempt to run uspa I recieve the following warnings after the data model is regenerated.
DEVICE_CONTROLLER_Start: WARNING: No instances in Device.LocalAgent.Controller
WARNING: No enabled MTPs in Device.LocalAgent.MTP. USP Agent may only be usable via the CLI
And the output ends here, the agent keeps running, previously say pings to and from the controller.
If I terminate the agent and attempt to restart (removing the origially generated /nvram/usp-pa.db file) I recieve the error regarding the Serial Number again.
Unknown User (vgosine_ctrlit)
P.S
/usr/bin/UspPa -c get Device.LocalAgent.Controller.
and
/usr/bin/UspPa -c get Device.LocalAgent.MTP.
return nothing.
dmcli eRT getv Device.LocalAgent.
Is not found as well
Richard Holme
I have updated Including UspPa in a device, hopefully answering some of your queries. As to your problem with Serial Number, I am not sure, but RDK Bus component names might have been changed in the build that you have (for me SerialNumber is at eRT.com.cisco.spvtg.ccsp.pam). Try deleting out usp_dm_comps.conf, usp_dm_objs.conf, usp_dm_params.conf and usp-pa.db, then rebooting.
Harish Agrawal
Dear USP Team,
Good Day.
I need help on configuration of CDRouter based on the instructions found at https://wiki.rdkcentral.com/display/RDK/USP+-+Testing+with+CDRouter.
We are getting below error while executing the CDRouter configuration.
2022-10-27 09:29:16.252 WARNING(usp): The agent never sent a GET_SUPPORTED_PROTO_RESP
2022-10-27 09:29:16.252 WARNING: USP GetSupportedProtocol request failed
2022-10-27 09:29:16.252 INFO(setup): Waiting 5 seconds before retrying
2022-10-27 09:29:16.255 WARNING(usp): Cannot send messages: No MQTT clients subscribed to the configured agent destination: /tmp/usp
USP Configuration:
SECTION "Basic Controller Configuration" {
testvar uspControllerID proto::controller-id
testvar uspControllerIpMode ipv4-only
testvar uspControllerIpv4 10.17.63.20
# testvar uspControllerIpv6 6000::2
#testvar uspControllerPort 1883
testvar uspControllerPath /my/controller
testvar uspControllerUseNonPayloadProtection no
testvar uspControllerUseSessionContext no
testvar uspControllerMTP mqtt
testvar uspControllerMTPEncryption no
testvar uspControllerUSPEncryption no
# testvar uspControllerDomain controller.cdrouter.xyz
# testvar uspSegmentationEnable no
# testvar uspSegmentationSize auto
# testvar uspControllerMTPCertPath /usr/cdrouter/tests/wildcard.cdrouter.xyz.pem
# testvar uspControllerMTPCaCertPath /usr/cdrouter/tests/wildcard.cdrouter.xyz-ca.pem
# testvar uspControllerUSPCaCertPath /usr/cdrouter/tests/wildcard.cdrouter.xyz-ca.pem
# testvar uspControllerUSPCertPath /usr/cdrouter/tests/wildcard.cdrouter.xyz.pem
# testvar uspControllerSenderCertPath /usr/cdrouter/tests/wildcard.cdrouter.xyz.pem
# testvar uspControllerVerifyRecordIntegrity yes
# 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 1883
testvar uspAgentPath /tmp/usp
#testvar uspMessageTimeout 30
}
Please help us to unblock on reported errror.
Priyankaa K V B
Hi Unknown User (harish.agrawal) ,
2022-10-27 09:29:16.252 WARNING(usp): The agent never sent a GET_SUPPORTED_PROTO_RESP
2022-10-27 09:29:16.252 WARNING: USP GetSupportedProtocol request failed
2022-10-27 09:29:16.252 INFO(setup): Waiting 5 seconds before retrying
2022-10-27 09:29:16.255 WARNING(usp): Cannot send messages: No MQTT clients subscribed to the configured agent destination: /tmp/usp
These are warnings . Can you paste the exact error ?
Regards,
Priyankaa KVB
Richard Holme
Quick things to check:
If you've done all that, and you still have problems then please post the full UspPa logs from bootup, collected with the prototrace (-p) and verbose (-v4) options set in usp-pa.service.