Knowledge base : Knowledge Base > ConfigFileEditor > Tips and Tricks

The docsis tool (see http://sourceforge.net/projects/docsis/) can convert textual config files into binary mode and vice versa.

While the binary format is universal (and hence compatible), the textual version is not compatible with the textual version of the Excentis Cable Modem Config File Editor.

An easy way to convert textual docsis tool config files to Excentis Cable Modem Config File Editor compatible textual files is to convert them to binary mode using the docsis tool and then convert those binary files into compatible textual config files using the Excentis Cable Modem  Config File Editor CommandLine tool. Obviously, you can also simply open the binary config files in the Excentis Cable Modem Config File Editor.

Note that due to the conversion to and from binary mode, any comments made in any of the textual versions will be lost during conversion.

To convert to binary mode, you need to install the docsis tool. See http://sourceforge.net/projects/docsis/ for details.

On a ubuntu system, you need to install the following libraries before installing the docsis tool:

sudo aptitude install m4
sudo aptitude install bison
sudo aptitude install libsnmp-dev
sudo aptitude install flex

To further install the docsis tool, you typically execute

./configure

make

make install

Now you can convert docsis tool compatible textual configfiles into binary mode:

$ docsis -e docsis_textual_file.txt my_key_file cm_config_file.bin

The my_key_file contains the shared secret (e.g. Euro). Note that it will be not be used in Excentis Cable Modem Config File Editor, but it is needed as a parameter for the docsis tool.

The binary file cm_config_file.bin can now be opened with Excentis Cable Modem Config File Editor.

Or use the CommandLine tool to convert the binary file into a Excentis Cable Modem Config File Editor compatible text file:

$ java -classpath <path_to_Excentis DOCSIS Config File Editor>/jar/coupe.jar com.excentis.configfile.CommandLine bin2text cm_config_file.bin Excentis DOCSIS Config File Editor_textual_file.txt

Combining the latter two statements into a script allows you to convert batches of configfiles.

In a similar way, Excentis Cable Modem Config File Editor textual files can be converted to docsis tool textual files using the text2bin function of the CommandLine tool combined with the docsis -d mode of the docsis tool to display the binary config file to docsis tool compatible text.

 

By default, DOCSIS 3.0 modems only allow SNMPv3 access.

For testing purposes, it's sometimes convenient to have full SNMPv2 access. To do this, you can add SNMPv1v2c Coexistence Configuration TLVs (TLV 53) to the modem's Config File.

The following example (simply copy/paste in the text editor mode of the Excentis Cable Modem ConfigFile Editor) allows full read/write access for both public and private community strings:

SNMPv1v2c Coexistence Configuration
  SNMPv1v2c Community Name:public
  SNMPv1v2c Transport Address Access
    SNMPv1v2c Transport Address:0.0.0.0/0
    SNMPv1v2c Transport Address Mask:0.0.0.0/0
  SNMPv1v2c Transport Address Access
    SNMPv1v2c Transport Address:0:0:0:0:0:0:0:0/0
    SNMPv1v2c Transport Address Mask:0:0:0:0:0:0:0:0/0
  SNMPv1v2c Access View Type:read-write
  SNMPv1v2c Access View Name:docsisManagerView
SNMPv1v2c Coexistence Configuration
  SNMPv1v2c Community Name:private
  SNMPv1v2c Transport Address Access
    SNMPv1v2c Transport Address:0.0.0.0/0
    SNMPv1v2c Transport Address Mask:0.0.0.0/0
  SNMPv1v2c Transport Address Access
    SNMPv1v2c Transport Address:0:0:0:0:0:0:0:0/0
    SNMPv1v2c Transport Address Mask:0:0:0:0:0:0:0:0/0
  SNMPv1v2c Access View Type:read-write
  SNMPv1v2c Access View Name:docsisManagerView

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

We to help you!