Tvheadend oscam ziggo » History » Version 9
William Peters, 2010-03-25 08:44
1 | 1 | William Peters | This article describes how to build and configure oscam. |
---|---|---|---|
2 | 9 | William Peters | Note that this oscam configuration is configured to work with Ziggo as provider. |
3 | It might work with other providers, but that needs to be confirmed. |
||
4 | 1 | William Peters | |
5 | Make sure you have cmake and subversion installed, these are required for checking out and building oscam. |
||
6 | |||
7 | create the required directories |
||
8 | |||
9 | {{{ |
||
10 | mkdir -p /opt/oscam/src/ |
||
11 | }}} |
||
12 | |||
13 | Now we need to checkout the oscam source code using SVN |
||
14 | |||
15 | {{{ |
||
16 | svn co http://oscam.ump2002.net/svn/oscam/trunk/ /opt/oscam/src/ |
||
17 | }}} |
||
18 | |||
19 | Now we need to build oscam |
||
20 | |||
21 | {{{ |
||
22 | cd /opt/oscam/src/ |
||
23 | make |
||
24 | }}} |
||
25 | 2 | William Peters | |
26 | After oscam is built you should have a file like 'oscam-0.99.4svn1920-i686-pc-linux' in /opt/oscam/src/Distribution/. |
||
27 | We need to copy this file to an alternate location |
||
28 | |||
29 | {{{ |
||
30 | cd /opt/oscam/src/Distribution/ |
||
31 | cp ./oscam-0.99.4svn1920-i686-pc-linux /opt/oscam/oscam.bin |
||
32 | }}} |
||
33 | |||
34 | Ok, the binaries are installed :) |
||
35 | Now we need to configure oscam first create the configuration directories |
||
36 | |||
37 | {{{ |
||
38 | mkdir -p /opt/oscam/etc/ |
||
39 | mkdir -p /opt/oscam/etc/cw/ |
||
40 | }}} |
||
41 | |||
42 | Note: /opt/oscam/etc/cw/ is used for caching keys. |
||
43 | |||
44 | Now, create oscam.conf in /opt/oscam/etc/oscam.conf |
||
45 | |||
46 | {{{ |
||
47 | [global] |
||
48 | nice = -1 |
||
49 | WaitForCards = 1 |
||
50 | pidfile = /opt/oscam/oscam.pid |
||
51 | logfile = /opt/oscam/oscam.log |
||
52 | usrfile = /opt/oscam/oscamuser.log |
||
53 | cwlogdir = /opt/oscam/etc/cw |
||
54 | clienttimeout = 1 |
||
55 | |||
56 | [monitor] |
||
57 | port = 988 |
||
58 | aulow = 120 |
||
59 | monlevel = 0 |
||
60 | |||
61 | [newcamd] |
||
62 | 8 | William Peters | key = 0102030405060708091011121314 |
63 | 2 | William Peters | port = 15050@0604:000000 |
64 | }}} |
||
65 | |||
66 | Now create oscam.server in /opt/oscam/etc/oscam.server |
||
67 | |||
68 | {{{ |
||
69 | [reader] |
||
70 | Label = Ziggo |
||
71 | 8 | William Peters | Device = /dev/ttyUSB0 |
72 | mhz = 600 |
||
73 | cardmhz = 600 |
||
74 | 2 | William Peters | Protocol = mouse |
75 | EMMCache = 1,3,2 |
||
76 | Group = 1 |
||
77 | caid = 0604:0000 |
||
78 | 8 | William Peters | rsakey = 3C8633AAC0D367533DEC7BB2EEEDEB8CA3ADA52E58B99BB34672783277A1DAAC3B6106AD0909774E031B2A6E30195B437683AD0FC599B87D08CEA47BE1B6C76A |
79 | boxkey = 1122334455667788 |
||
80 | 2 | William Peters | fallback = 0 |
81 | }}} |
||
82 | |||
83 | Now create oscam.user in /opt/oscam/etc/oscam.user |
||
84 | |||
85 | {{{ |
||
86 | [account] |
||
87 | user = tvheadend |
||
88 | pwd = tvheadend |
||
89 | uniq = 0 |
||
90 | 1 | William Peters | group = 1 |
91 | 2 | William Peters | ident = 0604:000000 |
92 | caid = 0604 |
||
93 | 3 | William Peters | au = Ziggo |
94 | 2 | William Peters | }}} |
95 | |||
96 | Ok, if everything is configured correctly we can test the oscam installation |
||
97 | |||
98 | {{{ |
||
99 | /opt/oscam/oscam.bin -c /opt/oscam/etc/& touch /opt/oscam/oscam.log ; tail -f /opt/oscam/oscam.log ; killall oscam.bin |
||
100 | }}} |
||
101 | |||
102 | this should create some output like this |
||
103 | |||
104 | {{{ |
||
105 | ------------------------------------------------------------------------------- |
||
106 | >> OSCam << cardserver started at Sun Mar 14 13:04:17 2010 |
||
107 | ------------------------------------------------------------------------------- |
||
108 | 2010/03/14 13:04:17 2726 s version=0.99.4svn, build #1276, system=i686-pc-linux, nice=-1 |
||
109 | 2010/03/14 13:04:17 2726 s max. clients=509, client max. idle=120 sec |
||
110 | 2010/03/14 13:04:17 2726 s max. logsize=unlimited |
||
111 | 2010/03/14 13:04:17 2726 s client timeout=1000 ms, fallback timeout=2500 ms, cache delay=0 ms |
||
112 | 2010/03/14 13:04:17 2726 s shared memory initialized (size=4182108, id=1376260) |
||
113 | 2010/03/14 13:04:17 2726 s WARNING: fallbacktimeout adjusted to 900 ms (must be smaller than clienttimeout (1000 ms)) |
||
114 | 2010/03/14 13:04:17 2726 s WARNING: fallbacktimeout adjusted to 1600 ms (must be greater than serialreadertimeout (1500 ms)) |
||
115 | 2010/03/14 13:04:17 2726 s WARNING: clienttimeout adjusted to 1600 ms (must be greater than serialreadertimeout (1500 ms)) |
||
116 | 2010/03/14 13:04:17 2726 s auth size=4744 |
||
117 | 2010/03/14 13:04:17 2726 s Cannot open file "/opt/oscam/etc//oscam.services" (errno=2) |
||
118 | 2010/03/14 13:04:17 2726 s userdb reloaded: 0 accounts freed, 2 accounts loaded, 0 expired, 0 disabled |
||
119 | 2010/03/14 13:04:17 2726 s signal handling initialized (type=sysv) |
||
120 | 2010/03/14 13:04:17 2726 s can't open file "/opt/oscam/etc//oscam.srvid" (err=2), no service-id's loaded |
||
121 | 2010/03/14 13:04:17 2726 s monitor: initialized (fd=7, port=988) |
||
122 | 2010/03/14 13:04:17 2726 s camd 3.3x: disabled |
||
123 | 2010/03/14 13:04:17 2726 s camd 3.5x: disabled |
||
124 | 2010/03/14 13:04:17 2726 s cs378x: disabled |
||
125 | 2010/03/14 13:04:17 2726 s newcamd: initialized (fd=8, port=15050, crypted) |
||
126 | 2010/03/14 13:04:17 2726 s CAID: 0604 |
||
127 | 2010/03/14 13:04:17 2726 s provid #0: 000000 |
||
128 | 2010/03/14 13:04:17 2726 s radegast: disabled |
||
129 | 2010/03/14 13:04:17 2726 s resolver thread started |
||
130 | 2010/03/14 13:04:17 2726 s logger started (pid=2730) |
||
131 | 2010/03/14 13:04:17 2726 s resolver started (pid=2731, delay=30 sec) |
||
132 | 2010/03/14 13:04:17 2726 s reader started (pid=2732, device=/dev/ttyUSB0, detect=cd, mhz=600, cardmhz=600) |
||
133 | 2010/03/14 13:04:17 2726 s Waiting for local card init .... |
||
134 | 2010/03/14 13:04:20 2732 r02 card detected |
||
135 | 2010/03/14 13:04:23 2732 r02 ATR: XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX |
||
136 | 2010/03/14 13:04:24 2732 r02 type: irdeto, caid: 0604, acs: 6.08 |
||
137 | 2010/03/14 13:04:24 2732 r02 ascii serial: XXXXXXXXXX, hex serial: XXXXXX, hex base: XX |
||
138 | 2010/03/14 13:04:27 2732 r02 ready for requests |
||
139 | 2010/03/14 13:04:27 2732 r02 card detected |
||
140 | 2010/03/14 13:04:27 2732 r02 type: irdeto |
||
141 | 6 | William Peters | 2010/03/14 13:04:27 2732 r02 providers: 4 (xxxxxx,xxxxxx,xxxxxx,xxxxxx) |
142 | 2 | William Peters | 2010/03/14 13:04:27 2732 r02 provider: 1, id: 0645BD |
143 | 2010/03/14 13:04:27 2732 r02 chid: 0001, date: 2003/12/26 - 2004/01/25 |
||
144 | 2010/03/14 13:04:27 2732 r02 chid: 000B, date: 2003/12/26 - 2004/01/25 |
||
145 | 2010/03/14 13:04:27 2732 r02 chid: FFE0, date: 2003/12/26 - 2003/12/30 |
||
146 | 2010/03/14 13:04:27 2732 r02 chid: 0384, date: 2003/12/26 - 2004/01/25 |
||
147 | 2010/03/14 13:04:27 2732 r02 chid: 000D, date: 2003/12/26 - 2004/01/25 |
||
148 | 2010/03/14 13:04:32 2726 s Init for all local cards done ! |
||
149 | 2010/03/14 13:04:32 2726 s anti cascading disabled |
||
150 | }}} |
||
151 | |||
152 | Oscam is now running on serverip:15050. |
||
153 | Open your tvheadend web interface. |
||
154 | Go to Configuration -> Code Word Client |
||
155 | Click Add Entry |
||
156 | Doubleclick 'hostname' type your server ip or hostname that is runnin oscam. |
||
157 | Doubleclick 'port' type the port number (if you made no changes to config files it should be 15050). |
||
158 | Doubleclick 'username' type the username as configured in oscam.user. |
||
159 | Doubleclick 'password' type the password as configured in oscam.user. |
||
160 | Doubleclick 'DES key' here you can insert your DES key. If you haven't changed oscam.conf (you should!) then this should be: 01:02:03:04:05:06:07:08:09:10:11:12:13:14 |
||
161 | 4 | William Peters | Check 'Update Card', ~~at this moment tvheadend does not support EMM updates this option won't be used anyway~~ svn builds as of today support EMM updates. |
162 | 2 | William Peters | Now check Enabled and click 'Save Changes' |
163 | |||
164 | When you click Save Changes you will something like this in the system logs |
||
165 | |||
166 | {{{ |
||
167 | 5 | William Peters | Mar 24 20:55:38 cwc: 10.2.0.2: Connected as user 0x0x to a Irdeto-card [0x0604 : xx.xx.xx.xx.xx.xx.xx.xx] with 5 providers |
168 | Mar 24 20:55:38 cwc: 10.2.0.2: irdeto card |
||
169 | Mar 24 20:55:38 cwc: 10.2.0.2: Provider ID #1: 0x000000 xx.xx.xx.xx.xx.xx.xx.xx |
||
170 | Mar 24 20:55:38 cwc: 10.2.0.2: Provider ID #2: 0x000001 xx.xx.xx.xx.xx.xx.xx.xx |
||
171 | Mar 24 20:55:38 cwc: 10.2.0.2: Provider ID #3: 0x000002 xx.xx.xx.xx.xx.xx.xx.xx |
||
172 | Mar 24 20:55:38 cwc: 10.2.0.2: Provider ID #4: 0x000003 xx.xx.xx.xx.xx.xx.xx.xx |
||
173 | Mar 24 20:55:38 cwc: 10.2.0.2: Provider ID #5: 0x000004 xx.xx.xx.xx.xx.xx.xx.xx |
||
174 | Mar 24 20:55:38 cwc: 10.2.0.2: Will forward EMMs |
||
175 | 2 | William Peters | }}} |
176 | |||
177 | now to kill oscam press ctrl+c in the console. |
||
178 | |||
179 | Ok tvheadend is now connected to oscam and is able to descramble channels that your card gives you access to. |
||
180 | |||
181 | 7 | Lars Op den Kamp - | ~~At this moment tvheadend does not support EMM updates, this means you have to update your card atleast once a week. |
182 | 2 | William Peters | This can be done by inserting your smartcard for 30 minutes in the retail dvb-c setop box. |
183 | 7 | Lars Op den Kamp - | After that restart oscam.~~ |
184 | 2 | William Peters | |
185 | |||
186 | == For Gentoo users i have an init script == |
||
187 | |||
188 | nano -w /etc/init.d/oscam |
||
189 | {{{ |
||
190 | #!/sbin/runscript |
||
191 | # Copyright 1999-2010 Gentoo Foundation |
||
192 | # Distributed under the terms of the GNU General Public License v2 |
||
193 | # $Header: |
||
194 | |||
195 | CONF="${myservice##*.}" |
||
196 | |||
197 | depend() { |
||
198 | need net |
||
199 | } |
||
200 | |||
201 | start() { |
||
202 | ebegin "Starting oscam" |
||
203 | start-stop-daemon --start --pidfile ${OSCAM_PID} \ |
||
204 | --exec ${OSCAM_BIN} -- ${OSCAM_OPTS} |
||
205 | eend $? |
||
206 | } |
||
207 | |||
208 | stop() { |
||
209 | ebegin "Stopping oscam" |
||
210 | start-stop-daemon --stop --quiet --pidfile ${OSCAM_PID} --signal 2 |
||
211 | eend $? |
||
212 | rm -f ${PIDFILE} |
||
213 | } |
||
214 | }}} |
||
215 | |||
216 | nano -w /etc/conf.d/oscam |
||
217 | {{{ |
||
218 | # /etc/conf.d/oscam: config file for /etc/init.d/oscam |
||
219 | |||
220 | OSCAM_OPTS="-b -c /opt/oscam/etc/" |
||
221 | OSCAM_BIN="/opt/oscam/oscam.bin" |
||
222 | OSCAM_PID="/opt/oscam/oscam.pid" |
||
223 | }}} |