auto bouquets for uk cable??

credit all goes to lraizer as it his work i just edited couple bits
here is script included dvbsnoop for those that have not got. dvbsnoop location /usr/bin, autobouquets script as before to tmp. both files need chmod 755

backup your existing bouquets to be on safe side, these ones are named movies, sports etc so if yours are named same will overwrite
 

Attachments

  • files.rar
    107.6 KB · Views: 64
Last edited:
I will upload, but it's not as stable as I'd like, I'll find some time over the weekend and upload the image and the seperate .ipk files (so people can use with thier own image)
 
can someone upload the cable.xml files please , l need to put into my spare 800 after l swap out the tuner but havnt got my other 800 here , daughter is using it , cheers lads
 
can someone upload the cable.xml files please , l need to put into my spare 800 after l swap out the tuner but havnt got my other 800 here , daughter is using it , cheers lads

Here you go m8
 

Attachments

  • cables.xml
    12.6 KB · Views: 82
thanks m8 . up and running sweet . here my channels if anyone wants .. if anyone else has a good Birmingham bouquet can you up yours , the more the better , saves a long scan for new users


birmingham tw

epg (about 2 day )working fine , update xmltv and find virgin-uk click to set and set to download 4am everyday
 

Attachments

  • cablechannels.bhamtw.rar
    205.5 KB · Views: 15
Last edited:
Re: Autobouquets cable

found the epg files had to edit a few as channels service id as mine were different and got it working. some channels will double check on weekend as no epg not many though. first time i got epg on suray so all good. using xmltv import plugin as crossepg uses vermin online list which has quite a few diffferent service ids compared to mine. if anyone needs i can post my edited lraizer's autobouquet script it moves channels to correct place, i removed channel numbering it does not delete existing bouquets or reload bouquets so i just restart enigma. still you have to run from tmp as didn't get plugin running will look again someday bit don't know coding i just try things


Have just got around to running this file but get this error when running it:

./autobouquets_c2.sh: line 316: can't open /tmp/netid_filter.txt: no such file
./autobouquets_c2.sh: line 316: can't open /tmp/netid_unsorted.txt: no such file
write Bouquets..
./autobouquets_c2.sh: line 318: can't open /tmp/netid_sorted.txt: no such file

Any ideas please?
 
thanks m8 . up and running sweet . here my channels if anyone wants .. if anyone else has a good Birmingham bouquet can you up yours , the more the better , saves a long scan for new users


birmingham tw

epg (about 2 day )working fine , update xmltv and find virgin-uk click to set and set to download 4am everyday

You using Cross-epg to get your epg m8?
 
Re: Autobouquets cable

Have just got around to running this file but get this error when running it:

./autobouquets_c2.sh: line 316: can't open /tmp/netid_filter.txt: no such file
./autobouquets_c2.sh: line 316: can't open /tmp/netid_unsorted.txt: no such file
write Bouquets..
./autobouquets_c2.sh: line 318: can't open /tmp/netid_sorted.txt: no such file

Any ideas please?

You have to set netid in script
 
I will upload, but it's not as stable as I'd like, I'll find some time over the weekend and upload the image and the seperate .ipk files (so people can use with thier own image)

So has this been uploaded yet?
 
would anybody be so kind to pm me a working 800 image with auto bouquets working please
 
It seems that owing to the pure area being different, Lraizer's version does not have their net IDs listed. In such cases, convert the net id from decimal to hex.

Anyway, here is a pugin as such. transfer to normal plugin location (/usr/lib/enigma2/python/Plugins/Extensions/) and chmod 755. Script will need to be edited to use your netID. Reboot and you should have a plugin with no need for ftp afterwards.

Please backup your bouquets first. Saves having to rescan if things go wrong. If using a mutli tuner receiver, bear in mind you will lose all other services because lamedb is replaced.

You must have dvbsnoop installed and be on an active channel
 

Attachments

  • AutoBouquets_C2.rar
    5.8 KB · Views: 92
Last edited by a moderator:
The hex conversion I have for Belfast decimal 00021 to hex {15}16?
 
Re: Autobouquets cable

lads where do l add birmingham id and work it out


#!/bin/sh
# AutoBouquets C2 by LraiZer for www.ukcvs.net

versiondate="13th January 2014"

#set the location netid filter from the examples below
#Network_ID: 41050 (0xa05a)) Network_name: "Seven Kings"

netid="a0 5a"

######## Network ID examples ########

# 40961 (0xa001) "Barnsley 600MHz (Barnsley 1)"
# 40962 (0xa002) "Barnsley 860MHz (Barnsley 2)"
# 40963 (0xa003) "Sheffield 600MHz (Barnsley 3)"
# 40964 (0xa004) "Sheffield 860MHz (Barnsley 4)"
# 40965 (0xa005) "Knowsley 1"
# 40966 (0xa006) "Knowsley 2"
# 40967 (0xa007) "Preston 1"
# 40968 (0xa008) "Preston 2"
# 40969 (0xa009) "Gateshead"
# 40970 (0xa00a) "Bristol 1 (ex Aztec)"
# 40971 (0xa00b) "Bristol 2 (ex Aztec)"
# 40973 (0xa00d) "Wolverhampton 1"
# 40974 (0xa00e) "Wolverhampton 2"
# 40975 (0xa00f) "Basildon 1"
# 40976 (0xa010) "Basildon 2"
# 40977 (0xa011) "Basildon 3"
# 40978 (0xa012) "Basildon 4"
# 40979 (0xa013) "Croydon"
# 40980 (0xa014) "Hayes"
# 40981 (0xa015) "Edinburgh 1 (SCOTLAND)"
# 40982 (0xa016) "Dundee (Edinburgh 2 SCOTLAND)"
# 40983 (0xa017) "TTA Knowsley DMC (Hayes_RHE)"
# 40984 (0xa018) "Uddingston (SCOTLAND)"
# 40985 (0xa019) "Haringey"
# 40986 (0xa01a) "NGRHEE Knowsley"
# 40987 (0xa01b) "Exeter"
# 40988 (0xa01c) "Plymouth"
# 40990 (0xa01e) "Barnsley 2 TRIALS"
# 40995 (0xa023) "Wolverhampton TRIALS"
# 40998 (0xa026) "Barnsley 1 TRIALS"
# 40999 (0xa027) "Perth (SCOTLAND)"
# 41003 (0xa02b) "Edinburgh 1 TRIALS (SCOTLAND)"
# 41008 (0xa030) "Liverpool TDN TRIALS"
# 41009 (0xa031) "Falkirk (SCOTLAND) "
# 41011 (0xa033) "Birmingham 750"
# 41013 (0xa035) "TTA Knowsley 1 (Knowsley RHE)"
# 41015 (0xa037) "Birmingham TDN"
# 41016 (0xa038) "Liverpool TDN"
# 41018 (0xa03a) "Preston TDN"
# 41020 (0xa03c) "Crawley"
# 41026 (0xa042) "Leeds TRIALS"
# 41041 (0xa051) "Bromley"
# 41042 (0xa052) "Portsmouth"
# 41043 (0xa053) "Poole"
# 41044 (0xa054) "Brighton"
# 41045 (0xa055) "Hersham"
# 41046 (0xa056) "Derby"
# 41048 (0xa058) "Manchester 3"
# 41049 (0xa059) "Peterborough"
# 41050 (0xa05a) "Seven Kings"
# 41051 (0xa05b) "Watford"
# 41052 (0xa05c) "Ashford"
# 41053 (0xa05d) "Leeds"
# 41054 (0xa05e) "Wearside"
# 41055 (0xa05f) "Norwich"
# 41056 (0xa060) "NGRHEE Bromley"
# 41059 (0xa063) "Brighton TRIALS "
# 41060 (0xa064) "Manchester 1"
# 41061 (0xa065) "Code Download Test (Portsmouth)"
# 41063 (0xa067) "Stoke (FF Manchester)"
# 41064 (0xa068) "York (FF Leeds)"
# 41065 (0xa069) "Portsmouth TRIALS"
# 41066 (0xa06a) "Manchester 2"
# 41067 (0xa06b) "TTA Bromley DMC (Bromley RHE)"
# 41068 (0xa06c) "Manchester TRIALS"
# 41069 (0xa06d) "Lewisham"
# 41071 (0xa06f) "Southampton"

############### GLOBAL FUNCTIONS ###############

remove_old(){
rm -f /tmp/sdt*.txt
rm -f /tmp/nit*.txt
rm -f /tmp/netid*.txt
}

x2d(){
ret=`echo "0x$1" | sed 's/ //g'`
echo "$(($ret))"
}

x2X(){
echo "$1" | sed 's/0*//;y/abcdef/ABCDEF/'
}

############### SDT FUNCTIONS ###############

read_sdt(){
s1='^42 '
s2='^46 '
dvbsnoop -buffersize 512 -s sec -tn -timeout 3000 -ph 2 -pd 4 -f 0x42 -m 0xFF -n 5 0x11 |\
sed -n '/\('"$s1\|$s2"'\)/p;s/^[ \t]*//' | sed 's/ //g' > /tmp/sdt_unsorted.txt
dvbsnoop -buffersize 512 -s sec -tn -timeout 3000 -ph 2 -pd 4 -f 0x46 -m 0xFF -n 500 0x11 |\
sed -n '/\('"$s1\|$s2"'\)/p;s/^[ \t]*//' | sed 's/ //g' >> /tmp/sdt_unsorted.txt
sort -u < /tmp/sdt_unsorted.txt > /tmp/sdt.txt; rm -f /tmp/sdt_unsorted.txt
}

parse_sdt(){
rm -f /tmp/sdt_sorted.txt
rm -f /tmp/sdt_unsorted.txt
while read ln; do
Header_length=22
CRC_length=8
Section_length=`x2d "${ln:3:3}"`
Transport_stream_ID="${ln:6:4}"
pos=$Header_length
while [ $pos -lt $(($Section_length * 2 - $CRC_length)) ]; do
Service_id="${ln:$pos:4}"
pos=$(($pos + 7))
Section_descriptors_length=`x2d "${ln:$pos:3}"`
Section_descriptors_length_x2="$(($Section_descriptors_length * 2 + $pos))"
pos=$(($pos + 1))
while [ $pos -lt $Section_descriptors_length_x2 ]; do
pos=$(($pos + 2))
DescriptorTag="${ln:$pos:2}"
pos=$(($pos + 2))
descriptor_length=`x2d "${ln:$pos:2}"`
defined_length="$(($descriptor_length * 2 + $pos))"
if [ "$DescriptorTag" = "ca" ] || [ "$DescriptorTag" = "c0" ]; then
pos=$(($pos + 2))
lcn_id=`x2d "${ln:$pos:4}"`
case ${#lcn_id} in
'1') lcn_id="00$lcn_id" ;;
'2') lcn_id="0$lcn_id" ;;
esac
pos=$(($pos + 4))
name_length=`x2d "${ln:$pos:2}"`
pos="$((name_length *2 + $pos + 2))"
bouquet_id="${ln:$pos:2}"
case $bouquet_id in
'01') bouquet_id="fact" ;;
'02') bouquet_id="ent" ;;
'03') bouquet_id="inter" ;;
'04') bouquet_id="radio" ;;
'05') bouquet_id="kids" ;;
'06') bouquet_id="life" ;;
'07') bouquet_id="movie" ;;
'08') bouquet_id="music" ;;
'09') bouquet_id="news" ;;
'0a') bouquet_id="sport" ;;
'0b') bouquet_id="other" ;;
'0c') bouquet_id="adult" ;;
'0d') bouquet_id="shop" ;;
'0e') bouquet_id="other" ;;
'0f') bouquet_id="other" ;;
*) bouquet_id="other" ;;
esac
# DATA:
# pos=$(($pos + 2)); data1="${ln:$pos:2}" #visible flags?
# pos=$(($pos + 2)); data2="${ln:$pos:4}" #channel epgid?
# pos=$(($pos + 4)); data3="${ln:$pos:2}"
# pos=$(($pos + 2)); data4="${ln:$pos:2}"
# pos=$(($pos + 2)); data5="${ln:$pos:2}"
# echo $data1 $data2 $data3 $data4 $data5
fi
if [ "$DescriptorTag" = "48" ]; then
pos=$(($pos + 2))
service_type="${ln:$pos:2}"
pos=$(($pos + 2))
service_provider_name_length=`x2d "${ln:$pos:2}"`
pos="$(($service_provider_name_length * 2 + $pos + 2))"
service_name_length=`x2d "${ln:$pos:2}"`
service_name_length_x2="$(($service_name_length * 2))"
pos=$(($pos + 2))
Service_name=$(echo -e "\x"`echo ${ln:$pos:$service_name_length_x2}|sed 's/../&\\\x/g;s/\\\x$//'`)
fi
pos=$defined_length
done
pos=$(($pos + 2))
echo "$lcn_id,$Transport_stream_ID,$Service_id,$service_type,$bouquet_id,$Service_name" >> /tmp/sdt_unsorted.txt
echo -e "$Service_id:ffff0000:$Transport_stream_ID:f020:`x2d $service_type`:0\n`x2X $lcn_id` - $Service_name\np:" >>/tmp/sdt_lamedb.txt
done
done < /tmp/sdt.txt
echo -e "end\nCreated by AutoBouquets C2 on `date`" >>/tmp/sdt_lamedb.txt
sort -u < /tmp/sdt_unsorted.txt > /tmp/sdt_sorted.txt
rm -f /tmp/sdt_unsorted.txt
rm -f /tmp/sdt.txt
}

############### NIT FUNCTIONS ###############

read_nit(){
dvbsnoop -buffersize 512 -s sec -tn -timeout 3000 -ph 2 -pd 4 -f 0x40 -m 0xFF -n 500 0x10 |\
sed -n '/\(^40.......'"$netid"'\)/p;s/^[ \t]*//' | sed 's/ //g' > /tmp/nit.txt
sort -u < nit.txt > /tmp/nit_sorted.txt
rm -f /tmp/nit.txt
}

parse_nit(){
rm -f /tmp/netid_filter.txt
echo -e "eDVB services /4/\ntransponders" >/tmp/nit_lamedb.txt
while read ln; do
CRC_length=8
Section_length=`x2d "${ln:3:3}"`
Network_ID="${ln:6:4}"
Network_descriptor_length=`x2d "${ln:17:3}"`
pos=$(($Network_descriptor_length * 2 + 21))
Transport_stream_loop_length=`x2d "${ln:$pos:3}"`
Transport_stream_loop_length_x2="$(($Transport_stream_loop_length * 2 + $pos))"
pos=$(($pos + 3))
while [ $pos -lt $(($Section_length * 2 - $CRC_length)) ]; do
Transport_stream_ID="${ln:$pos:4}"
pos=$(($pos + 4))
Original_network_ID="${ln:$pos:4}"
pos=$(($pos + 5))
Transport_descriptor_length=`x2d "${ln:$pos:3}"`
Transport_descriptor_length_x2="$(($Transport_descriptor_length * 2 + $pos))"
pos=$(($pos + 3))
DescriptorTag="${ln:$pos:2}"
pos=$(($pos + 2))
descriptor_length=`x2d "${ln:$pos:2}"`
pos=$(($pos + 3))
Frequency="${ln:$pos:6}"
pos=$(($pos + 10))
FEC_outer="${ln:$pos:1}"
pos=$(($pos + 2))
Modulation="${ln:$pos:1}"
pos=$(($pos + 3))
Symbol_rate="${ln:$pos:5}00"
pos=$(($pos + 5))
FEC_inner="${ln:$pos:1}"
pos=$(($pos + 1))
DescriptorTag="${ln:$pos:2}"
pos=$(($pos + 2))
descriptor_length=`x2d "${ln:$pos:2}"`
descriptor_length_x2="$(($descriptor_length * 2 + $pos))"
pos=$(($pos + 2))
while [ $pos -lt $descriptor_length_x2 ]; do
service_ID="${ln:$pos:4}"
pos=$(($pos + 4))
service_type="${ln:$pos:2}"
pos=$(($pos + 2))
echo "$Transport_stream_ID,$service_ID,$service_type" >>/tmp/netid_filter.txt
done
echo -e "ffff0000:$Transport_stream_ID:f020\n\tc `x2X $Frequency`:$Symbol_rate:2:$Modulation:$FEC_inner:0:0\n/" >>/tmp/nit_lamedb.txt
done
done < /tmp/nit_sorted.txt
echo -e "end\nservices" >>/tmp/nit_lamedb.txt
cat /tmp/nit_lamedb.txt /tmp/sdt_lamedb.txt >/tmp/lamedb
rm -f /tmp/sdt_lamedb.txt
rm -f /tmp/nit_lamedb.txt
rm -f /tmp/nit.txt
}

filter_network_id(){
rm -f /tmp/netid_unsorted.txt
while read ln; do
grep $ln /tmp/sdt_sorted.txt >>/tmp/netid_unsorted.txt
done < /tmp/netid_filter.txt
sort -u < /tmp/netid_unsorted.txt >/tmp/netid_sorted.txt
rm -f /tmp/netid_unsorted.txt
}
############### MOVE to /etc/enigma2/ ############### Abu Baniaz
transfer(){
init 4
mv /tmp/*.tv /etc/enigma2/
mv /tmp/*.radio /etc/enigma2/
mv /tmp/lamedb /etc/enigma2/
sleep 5
init 3
}

############### OUTPUT FUNCTIONS ###############

write_bouquets(){
echo "#NAME Bouquets (TV)" >/tmp/bouquets.tv
echo "#NAME Bouquets (RADIO)" >/tmp/bouquets.radio
echo -e "#SERVICE: 1:7:1:0:0:0:0:0:0:0:userbouquet.radio.radio" >>/tmp/bouquets.radio
for bq in ent fact life music movie sport news kids shop inter adult other; do
echo -e "#SERVICE: 1:7:1:0:0:0:0:0:0:0:userbouquet.$bq.tv" >>/tmp/bouquets.tv
done
echo -e "#NAME - - Radio\n#SERVICE 1:64:A:0:0:0:0:0:0:0::-- Radio --\n#DESCRIPTION -- Radio --" >/tmp/userbouquet.radio
echo -e "#NAME - - Entertainment\n#SERVICE 1:64:A:0:0:0:0:0:0:0::-- Entertainment --\n#DESCRIPTION -- Entertainment --" >/tmp/userbouquet.ent.tv
echo -e "#NAME - - Factual\n#SERVICE 1:64:A:0:0:0:0:0:0:0::-- Factual --\n#DESCRIPTION -- Factual --" >/tmp/userbouquet.fact.tv
echo -e "#NAME - - Lifestyle\n#SERVICE 1:64:A:0:0:0:0:0:0:0::-- Lifestyle --\n#DESCRIPTION -- Lifestyle --" >/tmp/userbouquet.life.tv
echo -e "#NAME - - Music\n#SERVICE 1:64:A:0:0:0:0:0:0:0::-- Music --\n#DESCRIPTION -- Music --" >/tmp/userbouquet.music.tv
echo -e "#NAME - - Movies\n#SERVICE 1:64:A:0:0:0:0:0:0:0::-- Movies --\n#DESCRIPTION -- Movies --" >/tmp/userbouquet.movie.tv
echo -e "#NAME - - Sport\n#SERVICE 1:64:A:0:0:0:0:0:0:0::-- Sport --\n#DESCRIPTION -- Sport --" >/tmp/userbouquet.sport.tv
echo -e "#NAME - - News\n#SERVICE 1:64:A:0:0:0:0:0:0:0::-- News --\n#DESCRIPTION -- News --" >/tmp/userbouquet.news.tv
echo -e "#NAME - - Kids\n#SERVICE 1:64:A:0:0:0:0:0:0:0::-- Kids --\n#DESCRIPTION -- Kids --" >/tmp/userbouquet.kids.tv
echo -e "#NAME - - Shopping\n#SERVICE 1:64:A:0:0:0:0:0:0:0::-- Shopping --\n#DESCRIPTION -- Shopping --" >/tmp/userbouquet.shop.tv
echo -e "#NAME - - International\n#SERVICE 1:64:A:0:0:0:0:0:0:0::-- International --\n#DESCRIPTION -- International --" >/tmp/userbouquet.inter.tv
echo -e "#NAME - - Adult\n#SERVICE 1:64:A:0:0:0:0:0:0:0::-- Adult --\n#DESCRIPTION -- Adult --" >/tmp/userbouquet.adult.tv
echo -e "#NAME - - Other\n#SERVICE 1:64:A:0:0:0:0:0:0:0::-- Other --\n#DESCRIPTION -- Other --" >/tmp/userbouquet.other.tv
OIFS=$IFS
IFS=','
while read lcn_id Transport_stream_ID Service_id service_type bouquet_id Service_name; do
ext="tv"; [ $bouquet_id = "radio" ] && ext="radio"
echo "#SERVICE 1:0:`x2X $service_type`:`x2X $Service_id`:`x2X $Transport_stream_ID`:F020:FFFF0000:0:0:0::`x2X $lcn_id` - $Service_name" >> /tmp/userbouquet.$bouquet_id.$ext
echo "#DESCRIPTION `x2X $lcn_id` - $Service_name" >> /tmp/userbouquet.$bouquet_id.$ext
done < /tmp/netid_sorted.txt
IFS=OIFS
}

############### MAIN ###############

echo "AutoBouquets C2 - $versiondate"
start_time=`date +%s`
date
remove_old
echo "read Service Description Table.."
read_sdt
echo "parse Service Description Table.."
parse_sdt
echo "read Network Information Table.."
read_nit
echo "parse Network Information Table.."
parse_nit
echo "filter Network id.."
filter_network_id
echo "write Bouquets.."
write_bouquets
remove_old
stop_time=$(expr `date +%s` - $start_time)
log_time="finished in: $(expr $stop_time / 60) mins $(expr $stop_time % 60) secs"
echo -e "$log_time\n"


echo "Transferring.... Receiver will restart"
transfer

exit 0
 
Back
Top