Skip to content

LuKePicci/tr069-simulator

 
 

Repository files navigation

tr069-simulator

This is a Java based TR069 Simulator for CPE devices. Currently this simulator supports cwmp-1-0.xsd schema. Jibx tool has been used to bind the schema file into java classes.

This simulator can support different type of CPE devices. Also you can simulate hundreds of devices using the same instance.

How to install (without java SDK):
To run this simulator,

  1. Download the project and unzip it to a suitable location.
  2. Modify the agent.csv configuration file available in the ./conf directory.

To run:

java -jar target/tr069-0.7.5-SNAPSHOT.jar server simulator.yml
Or simply doubleclick the batch launcher (for Windows). Note: Java must be available in your system.

agent.csv Configuration

agent.csv file is the csv configuration file that contains agent configurations. General summary:

  • Start IP and End IP define a range of IP addresses, and the system runs a simulator thread for each
  • The HTTP Port defines the port on which a simulator listens for connection requests
  • The simulator reports a ConnectionRequestURL constructed from the IP address, port, and the path configured in agent.csv
  • The Dump Location is a relative path to the folder containing the device configuration data
  • User name, password, and authentication type are used to authenticate the device with ACS

Some examples:

startip, endip, acs_url, conn_req_url, http_port, periodic_inform, dump_location, username, password, authtype, useragent, xmlformat, sn_format, sn_numeric
192.168.1.11, 192.168.1.11, http://tr069.me/tr069/ws?wsdl&probe=257ebf, /wsdl, 8035, 300, /dump/microcell/, user1, passwd1, basic, TR069 Simulator, normal, CPE_A
192.168.1.51, 192.168.1.120, http://tr069.me/tr069/ws?wsdl&probe=257ebf, /wsdl, 8035, 300, /dump/microcell/, nouser, nopass, none, TR069 Simulator, stripdec, CPE%00d, 51
192.168.2.211, 192.168.2.220, http://tr069.me/tr069/ws?wsdl&probe=257ebf, /wsdl, 8035, 300, /dump/microcell/, user1, passwd1, digest, , stripdec+faketypes
First CPE IP Address
Last CPE IP Address
Initial ACS Management Server URL
Connection Request URL (HTTP GET query string)
Inbound Connection Request HTTP Port
Initial Period Inform Interval (in seconds)
Dump Location Path (relative)
ACS Management Server Username
ACS Management Server Password
ACS Management Server HTTP Auth Type (basic, digest, none)
CPE HTTP User Agent
XML Formatter Options
Serial Number Format (fixed or printf style to accomodate numeric)
Serial Number Numeric (integer, incremented for each agent in IP interval)

You can modify these parameters according to your requirements. To simulate multiple CPE devices, provide the start and
end ipaddress. Periodic Inform Interval is in seconds. Simulator will send Inform request based on this parameter.

Dump Location Path is the directory path where simulator will read and load the CPE data.
Simulator will check for two set of files.
1. getvalues.txt
2. getnames.txt

getvalues.txt contains Name/Value data as XML Nodes. Simulator will respond to the ACS Server based on this Name/Value Pair.
getnames.txt contains ParameterInfoStruct XML Nodes. Access detail about the parameters are retrieved from this file.
Currently, Femtocell device dump is being bundled with the JAR. If users wish to simulate a different CPE, either they need to
create these two XML files manually, or they need to take a dump from the real CPE device by reading the GetParameterValuesResponse and GetParameterNamesResponse for root node (e.g. InternetGatewayDevice, Device, ...).

If the ACS Server supports HTTP Authentication, provide the username, password and authentication type. basic and digest methods are currently supported. If authentication is not supported, leave auth type empty or use none, these fileds will be ignopred.

Connection Request Testing

  1. The connection request URL reported by the device as a TR-069 parameter is determined by the agent.csv IP address configuration, not the actual IP address
  2. For connection request testing, you can put connection requests in the JMS queue using Postman with the test harness. In this case enter a URL that corresponds with the actual visible IP address and port of the simulator
  3. For functional tests, the agent.csv configuration will have to be set up so the device reports a valid connection request URL

SDK Requirements

  • JDK >=1.7

License
MIT License.

About

Java based TR-069 CPE Agent Simulator

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Java 99.9%
  • Batchfile 0.1%