If you’re running a digital set top box based on Enigma with the Swedish service provider com hem you probably can’t see all of your channels. This is because they’ve changed the modulation on pretty much all of their MUXes except one from QAM64 to QAM256. This means you’ll need a new cables.xml containing the new MUXes. I’ve written a simple shell script to create this new file.

#!/bin/sh

# Usage:
# ./cables.sh [Network ID] > /etc/tuxbox/cables.xml
#
# Network ID for Com Hem can be found at
# http://www.comhem.se/blob/view/-/3440/data/10640/-/natnummer.pdf.pdf

# Make a backup of cables.xml
if [ ! -f /etc/tuxbox/cables.xml.bak ]
then
        cp /etc/tuxbox/cables.xml /etc/tuxbox/cables.xml.bak
fi

# Do the actual creation of the new data for cables.xml
echo '<!--?xml version="1.0" encoding="iso-8859-1"?-->'
echo ''
echo '  '
area=`printf '%x\n' $1|sed 's/^\(.\{2\}\)/\1./'`

dvbsnoop -n 4 -f 0x41.$area -m 0xff.ff.ff 0x10 | grep -E 'Frequency|Modulation'|while read line
do
        if [ `echo $line|awk '{print $4}'|cut -d x -f 1` != "(0" ]
        then
                temp2=`echo $line|awk '{print $4}'|sed 's/\.0//g'`
        fi

        if [ `echo $line|awk '{print $3}'` != '(=' ]
        then
                temp=`echo $line|awk '{print $3}'`

                echo -n '
'
        fi
done

echo '  '
echo ''

As you can see in the source you’ll need to get hold of your Network ID from com hem and then run the script. Make sure you have dvbsnoop installed.

Creds to bowman for coming up with the idea for the script.