Knowledge base : Knowledge Base > ConfigFileEditor > Installation and configuration

The Excentis Cable Modem Config File Editor can also be used as a command-line tool, using the standard java JRE.

The CommandLine tool functionality allows easy integration in scripts. See the Excentis Cable Modem Config File Editor Manual for more details!

The following bash script illustrates how to use the CommandLine tool to change a line of text in a batch of configfiles, automatically recalculating CM and CMTS mics.

#!/bin/bash

# Input vars:
# directory containing the config files
cfg_dir=/home/vandeynse/configfiles
# directory containing Excentis Cable Modem Config File Editor install
cfg_jar_path=/home/vandeynse/Excentis/ConfigFileEditor/jar/coupe.jar
main_class=com.excentis.configfile.CommandLine
# shared secret
shared_secret=Euro
# temp text file
temp_text_file=/tmp/configfile.txt

# actual script
# loop over all .cfg files
for cfgfile in `ls -a $cfg_dir/*.cfg`
do
echo “$cfgfile”
# create textual version, using the bin2text function
`java -classpath $cfg_jar_path $main_class bin2text $cfgfile $temp_text_file`
# use regexp to change the configfile
# example: reduce max cpe from 16 to 8
sed -i -e ‘s/Maximum Number of CPEs:16/Maximum Number of CPEs:8/g’ $temp_text_file
# overwrite the file with the updated contents, using the text2bin function
`java -classpath $cfg_jar_path $main_class text2bin $temp_text_file $cfgfile $shared_secret`
# clean up temp file
rm $temp_text_file
done

For Windows and Linux, the DEFAULTS.INI file is located in the install directory.

For MAC, the DEFAULTS.INI file is embedded in the program package. Right-click the executable (ConfigFileEditor), choose "Show Package Contents", browse to Contents/Resources/Java. There you find the DEFAULTS.INI file that is used.

While it is not possible to import an entire MIB directly using the GUI, this article explains how you can manage to import a batch of OIDs into the MIBS.INI file.

What you need is the mib2c tool available in linux (http://net-snmp.sourceforge.net/wiki/index.php/Mib2c).

Specify the conversion format in a file, let's say convert_docsif.conf:

@open DOCSIFMIB.INI@
@foreach $t table@
    @foreach $c column@
$c	$c.objectID	$c.type
    @end@
@end@

Note: Make sure the parameters ($c, $c.objectID and $c.type) are separated by tabs!

Now you can convert the MIBs you want, e.g. the docsIfMib:

mib2c -c convert_docsif.conf DOCS-IF-MIB::docsIfMib

Use sed to make the OID types compatible with the Excentis Cable Modem Config File Editor, and remove any unsupported types (ASN_ types that were not replaced):

sed 's/ASN_INTEGER$/Integer/' DOCSIFMIBS.INI | sed 's/ASN_OCTET_STR$/Octet String/' | sed 's/ASN_OBJECT_ID$/Object Identifier/' | sed 's/ASN_IPADDRESS$/IP Address/'| sed 's/ASN_COUNTER$/Counter/'| sed 's/ASN_GAUGE$/Gauge/'| sed 's/ASN_UNSIGNED$/Gauge/'| sed 's/ASN_TIMETICKS$/Timeticks/' | grep -v "ASN_" > MIBS.INI

Copy this MIBS.INI file to the Excentis Cable Modem Config File Editor or append the contents to the existing MIBS.INI file, and you can select all name OIDs from the docsIfMib in the dropdown. Also, the MIB name will be displayed in textual mode.

There are two ways to add a MIB variable to the Known OIDs dropdown list.

  1. When adding a new SNMP MIB Object (TLV 11) in the GUI with an unknown OID/text combination, a popup will appear asking you whether you want to add that OID to the database. Clicking 'Yes' will add that OID/text combination permanently to the Known OIDs list.
  2. A more convenient way to add multiple OIDs to the Known OIDs list, is to edit the MIBS.INI file located in the installation directory. Check the "Conguration of the SNMP OID translation database - MIBS.INI" section of the manual for details.

Installing and running the Excentis DOCSIS Config File Editor on Mac OS should work fine with a default java installation.

If for some reason the installer doesn't find a valid java installation or running the app fails, here's a workaround:

1. Download and install a recent JDK (JDK, not JRE!!) from oracle (e.g. http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html).  This should already enable the installer to work.

2. If the application still doesn't run, Add

  <string>JNI</string>
  <string>BundledApp</string>
  <string>WebStart</string>
  <string>Applets</string>
To the JVM capabilities defined in the Info.plist file of the /Library/Java/JavaVirtualMachines/<jdk_path>/Contents directory

Check out http://crunchify.com/os-x-mavericks-eclipse-java-issue/ for detailed instructions

3. There can still be a problem with a dylib not found (issue with jdk1.8 library). The solution is mentioned in the comments of the same webpage:

sudo mkdir -p /Library/Java/JavaVirtualMachines/<jdk_path>/Contents/Home/bundle/Libraries
sudo ln -s /Library/Java/JavaVirtualMachines/<jdk_path>/Contents/Home/jre/lib/server/libjvm.dylib /Library/Java/JavaVirtualMachines/<jdk_path>/Contents/Home/bundle/Libraries/libserver.dylib

We to help you!