Forums » Tutorial and setups »
Tutorial: CentOS, TVH, OSCam, TBS 6981
Added by Meeko Kittika almost 10 years ago
Hi all,
Just thought I'd post my experiences of setting up TVHeadend on my system as it seemed hard initially but when its working it seems simple when you know what you've done! This isn't an original work but the consolidation of lots of work by others helping me work out what I'm doing wrong and hopefully it'll help someone else.
1. Basic server with CentOS 6.5 installed and VirtualMin/WebMin administration software. 2. Install TV Card: In my case its a TBS 6981. 1. Install card drivers from TBS: (with acknolwledgements to the wiki on this site) 1. mkdir ~/tbs, cd ~/tbs 2. wget http://www.tbsdtv.com/download/document/common/tbs-linux-drivers_v141019.zip 3. unzip * 4. tar xf linux-tbs-drivers.tar.bz2 5. find -type d -exec chmod 755 {} \; 6. chmod 755 linux-tbs-drivers/v4l/scripts/* 7. find linux-tbs-drivers -name “*.sh” -exec chmod 755 {} \; 8. cd linux* 9. ./v4l/tbs-x86_64.sh 10. wget https://tvheadend.org/attachments/download/1013/tbs6981.config 11. mv tbs6981.config v4l/.config 12. I had problems with some declarations in the v4l/compat.h file conflicting with RHEL declarations, so commented out: 13. find_next_zero_bit and find_next_bit in v4l/compat.h (approx lines 25-30) 14. make 15. mkdir tbs (yes again) 16. find -name "*.ko" -exec cp {} tbs/ \; 17. tar jcf tbs-modules.tar.bz2 tbs 18. sudo tar -C /lib/modules/$(uname -r) -xf tbs-modules.tar.bz2 19. sudo depmod -a 2. reboot 3. Install TVHeadend from latest git. 1. mkdir ~/tvh 2. git clone https://github.com/tvheadend/tvheadend 3. cd tvheadend 4. ./configure 5. I had to comment out part of the Makefile: 1. edit line CFLAGS += -g -O2 -Wunused-result to look like 1. CFLAGS += -g -O2 2. #-Wunused-result *(Im not sure what it does! But it works) 6. sudo make install 7. edit /etc/rc.d/rc.local to make TVHeadend autostart 1. insert line "/usr/local/bin/tvheadend -u USERNAME -g GROUP -f" 2. where USERNAME and GROUP are your video user details 8. default settings are used 4. Install OSCam 1. mkdir ~/OSCam 2. cd ~/OSCam 3. git clone http://www.oscam.cc/git/oscam-mirror 4. cd oscam* 5. make 6. sudo make install 7. edit /etc/rc.d/rc.local aagain to make OSCam autostart 1. insert line "/usr/local/bin/oscam &" 5. Reboot and have a well-earned cuppa (or a beer!) 6. pgrep tvheadend – just check its running 7. pgrep oscam – just check its running 8. Configure TVHeadend 1. Pull up a browser and open your server, port 9981 ie 1. http://192.168.0.2:9981/ 2. you may need to open ports in IPTABLES. Open ports 9981,9982,15050 and 15080 2. FIRST change the access rights: 1. Go to CONFIGURATION, ACCESS ENTRIES 2. Click ADD and add a USERNAME and PASSWORD, check ENABLE, click SAVE 3. Click the default like, uncheck ENABLE, click save 3. Login as your new user details 4. Configure a network: 1. Go to CONFIGURATION, NETWORKS, ADD, type DVB-S, check the following boxes: 1. Network Discovery 2. Idle Scan Muxes 2. Uncheck 1. Skip Initial Scan 5. Search for channels: 1. Go to CONFIGURATION, DVB INPUTS, you should see a tree of the adapters/frontends in your system. In mine I have: 1. TV ADAPTERS 1. /dev/dvb/adapter0 [TurboSight TBS 6981 DVBS/S2 frontend] 1. TurboSight TBS 6981 DVBS/S2 frontend: DVB-S #0 1. Unversal LNB Only 2. /dev/dvb/adapter1 [TurboSight TBS 6981 DVBS/S2 frontend] 1. TurboSight TBS 6981 DVBS/S2 frontend: DVB-S #0 1. Unversal LNB Only 2. Now ENABLE the adapters! Its easily missed (I did) so go to each FRONTEND lineand check for the ENABLE box, dont forget to click SAVE too! ;) 3. Go to each LNB line and select network NAME (or whatever you used) and SAVE. 6. Go back to CONFIGURATION, DVB INPUTS, NETWORKS and you should see somethings listed under # Muxes and Scan Q length. If not, check youve enabled the devices! You should see somethig like 83 in Scan length, slowly count down to 0. 7. Go to CONFIGURATION, DVB INPUTS, MUXES and there will be lots of muxes listed. 8. Go to CONFIGURATION, DVB NPUTS, SERVICES and your channels will be listed. 9. Click MAP ALL to map channel names to services. These can be edited in CONFIGURATION, CHANNEL/EPG 9. Enable OSCam in TVHeadend: 1. Go to CONFIGURATION, CAs 2. ENABLE, 192.168.0.2, USERNAME and PASSWORD that you will use below. Port 15050 and key: 01:02:03:04:05:06:07:08:09:10:11:12:13:14, check UPDATE CARD and SAVE. 10. Configure OSCam (in my case I use a N-line) 1. Browse to http://192.168.0.2:15080 2. Enter USERNAME and PASSWORD previously set. 3. Goto USERS, ADD USER, set USERNAME and PASSWORD that was used in step 9/2 above, CAID: = 0963 and IDENT: = 0963:000000 (this will vary for different satellite systems), SAVE 4. Goto READERS, ADD READER, choose protocol, ie NEWCAMD, servername,port ie 192.168.0.3,50000 *THIS COMMA IS IMPORTANT! Not a colon but a comma* CAID: = 0963, IDENT: 0963:000000 as above. Set EMMCACHE: = 1,3,2 and check the following BLOCKEMM boxes: 1. UNKNOWN, UNIQUE, SHARED, GLOBAL. 5. Set CACHE EX MODE: to 1-CACHE PULL. 6. SAVE 11. Open XBMC on your media computer. IF you havent already done so, enable LIVE TV and enable TVHEADEND PVR addon with the details from 8/2 above ie Address 192.168.0.2, port 9981 and 9982, USERNAME PASSWORD. 12. IF all is good you should be able to choose a channel and watch it. 13. Get yourself another well-earned drink!
Sorry about the wall of text but I've tried to cover every step as I missed out on a few simple but very important points when setting up myself.
Replies (1)
RE: Tutorial: CentOS, TVH, OSCam, TBS 6981 - Added by Arshvinder Singh Sehmi almost 10 years ago
Thanks Meeko for a great tutorial:
I have few queries:
What hardware you are using for reading smart cards?
And Is your smart card paired with its respective set top box?
Regards,
ErSehmi