Tvheadend oscam ziggo » History » Version 18
William Peters, 2010-10-29 12:22
update Expected output filename
1 | 1 | William Peters | This article describes how to build and configure oscam. |
---|---|---|---|
2 | 10 | William Peters | |
3 | 9 | William Peters | Note that this oscam configuration is configured to work with Ziggo as provider. |
4 | It might work with other providers, but that needs to be confirmed. |
||
5 | 1 | William Peters | |
6 | Make sure you have cmake and subversion installed, these are required for checking out and building oscam. |
||
7 | |||
8 | create the required directories |
||
9 | |||
10 | {{{ |
||
11 | mkdir -p /opt/oscam/src/ |
||
12 | }}} |
||
13 | |||
14 | Now we need to checkout the oscam source code using SVN |
||
15 | |||
16 | {{{ |
||
17 | 17 | William Peters | svn co http://streamboard.gmc.to/svn/oscam /opt/oscam/src/ |
18 | 1 | William Peters | }}} |
19 | |||
20 | 17 | William Peters | Now we need to configure oscam |
21 | 1 | William Peters | {{{ |
22 | cd /opt/oscam/src/ |
||
23 | 17 | William Peters | ./config.sh |
24 | }}} |
||
25 | |||
26 | This is my configuration |
||
27 | {{{ |
||
28 | Addons: |
||
29 | [*] WEBIF |
||
30 | [*] HAVE_DVBAPI |
||
31 | [*] IRDETO_GUESSING |
||
32 | [*] CS_ANTICASC |
||
33 | [*] WITH_DEBUG |
||
34 | [ ] CS_WITH_DOUBLECHECK |
||
35 | [*] CS_LED |
||
36 | [*] CS_LOGHISTORY |
||
37 | |||
38 | Protocols: |
||
39 | [*] MODULE_CAMD33 |
||
40 | [*] MODULE_CAMD35 |
||
41 | [*] MODULE_CAMD35_TCP |
||
42 | [*] MODULE_NEWCAMD |
||
43 | [*] MODULE_CCCAM |
||
44 | [*] MODULE_RADEGAST |
||
45 | [*] MODULE_SERIAL |
||
46 | [*] MODULE_MONITOR |
||
47 | [*] MODULE_CONSTCW |
||
48 | |||
49 | Reader: |
||
50 | [*] READER_NAGRA |
||
51 | [*] READER_IRDETO |
||
52 | [*] READER_CONAX |
||
53 | [*] READER_CRYPTWORKS |
||
54 | [*] READER_SECA |
||
55 | [*] READER_VIACCESS |
||
56 | [*] READER_VIDEOGARD |
||
57 | [*] READER_DRE |
||
58 | [*] READER_TONGFANG |
||
59 | }}} |
||
60 | |||
61 | Now compile oscam |
||
62 | {{{ |
||
63 | 1 | William Peters | make |
64 | }}} |
||
65 | 2 | William Peters | |
66 | 18 | William Peters | After oscam is built you should have a file like 'oscam-1.00-unstable_svnxxxx-i686-pc-linux' in /opt/oscam/src/Distribution/. |
67 | 2 | William Peters | We need to copy this file to an alternate location |
68 | |||
69 | {{{ |
||
70 | cd /opt/oscam/src/Distribution/ |
||
71 | 18 | William Peters | cp ./oscam-1.00-unstable_svnxxxx-i686-pc-linux /opt/oscam/oscam.bin |
72 | 2 | William Peters | }}} |
73 | |||
74 | Ok, the binaries are installed :) |
||
75 | Now we need to configure oscam first create the configuration directories |
||
76 | |||
77 | {{{ |
||
78 | mkdir -p /opt/oscam/etc/ |
||
79 | mkdir -p /opt/oscam/etc/cw/ |
||
80 | }}} |
||
81 | |||
82 | Note: /opt/oscam/etc/cw/ is used for caching keys. |
||
83 | |||
84 | Now, create oscam.conf in /opt/oscam/etc/oscam.conf |
||
85 | |||
86 | 1 | William Peters | {{{ |
87 | [global] |
||
88 | 14 | William Peters | usrfile = /opt/oscam/oscamuser.log |
89 | logfile = /opt/oscam/oscam.log |
||
90 | cwlogdir = /opt/oscam/etc/cw |
||
91 | disablelog = 0 |
||
92 | disableuserfile = 0 |
||
93 | usrfileflag = 0 |
||
94 | clienttimeout = 2000 |
||
95 | fallbacktimeout = 1500 |
||
96 | clientmaxidle = 120 |
||
97 | failbantime = 0 |
||
98 | bindwait = 120 |
||
99 | netprio = 0 |
||
100 | clientdyndns = 0 |
||
101 | resolvedelay = 2 |
||
102 | unlockparental = 0 |
||
103 | nice = -1 |
||
104 | serialreadertimeout = 1000 |
||
105 | maxlogsize = 10 |
||
106 | waitforcards = 1 |
||
107 | preferlocalcards = 1 |
||
108 | saveinithistory = 0 |
||
109 | readerrestartseconds = 5 |
||
110 | lb_mode = 0 |
||
111 | lb_save = 0 |
||
112 | lb_nbest_readers = 1 |
||
113 | lb_nfb_readers = 1 |
||
114 | lb_min_ecmcount = 5 |
||
115 | lb_max_ecmcount = 500 |
||
116 | lb_reopen_seconds = 900 |
||
117 | resolvegethostbyname = 0 |
||
118 | 1 | William Peters | |
119 | [monitor] |
||
120 | 14 | William Peters | port = 988 |
121 | nocrypt = |
||
122 | aulow = 120 |
||
123 | hideclient_to = 0 |
||
124 | monlevel = 0 |
||
125 | appendchaninfo = 0 |
||
126 | 1 | William Peters | |
127 | [newcamd] |
||
128 | 14 | William Peters | port = 15050@0604:000000 |
129 | key = 0102030405060708091011121314 |
||
130 | allowed = |
||
131 | keepalive = 1 |
||
132 | mgclient = 0 |
||
133 | |||
134 | [webif] |
||
135 | httpport = 15080 |
||
136 | httpuser = username |
||
137 | httppwd = password |
||
138 | httprefresh = 0 |
||
139 | httpallowed = 127.0.0.1,YourIpRange |
||
140 | httphideidleclients = 0 |
||
141 | httpreadonly = 0 |
||
142 | 1 | William Peters | }}} |
143 | |||
144 | Now create oscam.server in /opt/oscam/etc/oscam.server |
||
145 | |||
146 | {{{ |
||
147 | [reader] |
||
148 | Label = Ziggo |
||
149 | Device = /dev/ttyUSB0 |
||
150 | mhz = 600 |
||
151 | cardmhz = 600 |
||
152 | Protocol = mouse |
||
153 | EMMCache = 1,3,2 |
||
154 | Group = 1 |
||
155 | caid = 0604:0000 |
||
156 | rsakey = 3C8633AAC0D367533DEC7BB2EEEDEB8CA3ADA52E58B99BB34672783277A1DAAC3B6106AD0909774E031B2A6E30195B437683AD0FC599B87D08CEA47BE1B6C76A |
||
157 | boxkey = 1122334455667788 |
||
158 | fallback = 0 |
||
159 | }}} |
||
160 | |||
161 | Now create oscam.user in /opt/oscam/etc/oscam.user |
||
162 | |||
163 | {{{ |
||
164 | [account] |
||
165 | user = tvheadend |
||
166 | pwd = tvheadend |
||
167 | uniq = 0 |
||
168 | group = 1 |
||
169 | ident = 0604:000000 |
||
170 | caid = 0604 |
||
171 | au = Ziggo |
||
172 | }}} |
||
173 | |||
174 | 14 | William Peters | Now you need to change the owner and group of /opt/oscam to nobody (because you should run oscam as a unprivileged user) |
175 | |||
176 | {{{ |
||
177 | chown -R nobody:nobody /opt/oscam |
||
178 | }}} |
||
179 | |||
180 | 1 | William Peters | Ok, if everything is configured correctly we can test the oscam installation |
181 | |||
182 | {{{ |
||
183 | /opt/oscam/oscam.bin -c /opt/oscam/etc/& touch /opt/oscam/oscam.log ; tail -f /opt/oscam/oscam.log ; killall oscam.bin |
||
184 | 2 | William Peters | }}} |
185 | |||
186 | this should create some output like this |
||
187 | |||
188 | {{{ |
||
189 | ------------------------------------------------------------------------------- |
||
190 | 14 | William Peters | >> OSCam << cardserver started at Thu Oct 28 11:06:01 2010 |
191 | 2 | William Peters | ------------------------------------------------------------------------------- |
192 | 14 | William Peters | 2010/10/28 11:06:01 B73DF6C0 s version=1.00-unstable_svn, build #, system=i686-pc-linux, nice=-1 |
193 | 2010/10/28 11:06:01 B73DF6C0 s client max. idle=120 sec, debug level=0 |
||
194 | 2010/10/28 11:06:01 B73DF6C0 s max. logsize=10 Kb |
||
195 | 2010/10/28 11:06:01 B73DF6C0 s client timeout=2000 ms, fallback timeout=1500 ms, cache delay=0 ms |
||
196 | 2010/10/28 11:06:01 B73DF6C0 s auth size=4788 |
||
197 | 2010/10/28 11:06:01 B73DF6C0 s Cannot open file "/opt/oscam/etc//oscam.services" (errno=2) |
||
198 | 2010/10/28 11:06:01 B73DF6C0 s userdb reloaded: 0 accounts freed, 2 accounts loaded, 0 expired, 0 disabled |
||
199 | 2010/10/28 11:06:01 B73DF6C0 s signal handling initialized (type=sysv) |
||
200 | 2010/10/28 11:06:01 B73DF6C0 s can't open file "/opt/oscam/etc//oscam.srvid" (err=2), no service-id's loaded |
||
201 | 2010/10/28 11:06:01 B73DF6C0 s can't open file "/opt/oscam/etc//oscam.tiers" (err=2), no tier-id's loaded |
||
202 | 2010/10/28 11:06:01 B73DF6C0 s can't open file "/opt/oscam/etc//oscam.provid" (err=2), no provids's loaded |
||
203 | 2010/10/28 11:06:01 B73DF6C0 s can't open file "/opt/oscam/etc//oscam.ird" (errno=2) irdeto guessing not loaded |
||
204 | 2010/10/28 11:06:01 B73DF6C0 s monitor: initialized (fd=7, port=988) |
||
205 | 2010/10/28 11:06:01 B73DF6C0 s camd33: disabled |
||
206 | 2010/10/28 11:06:01 B73DF6C0 s camd35: disabled |
||
207 | 2010/10/28 11:06:01 B73DF6C0 s cs378x: disabled |
||
208 | 2010/10/28 11:06:01 B73DF6C0 s newcamd: initialized (fd=8, port=15050, crypted) |
||
209 | 2010/10/28 11:06:01 B73DF6C0 s CAID: 0604 |
||
210 | 2010/10/28 11:06:01 B73DF6C0 s provid #0: 000000 |
||
211 | 2010/10/28 11:06:01 B73DF6C0 s cccam: disabled |
||
212 | 2010/10/28 11:06:01 B73DF6C0 s radegast: disabled |
||
213 | 2010/10/28 11:06:01 B73DF6C0 s http thread started |
||
214 | 2010/10/28 11:06:01 B73DF6C0 s creating thread for device /dev/ttyUSB0 slot 0 |
||
215 | 2010/10/28 11:06:01 B73DF6C0 s waiting for local card init |
||
216 | 2010/10/28 11:06:01 B7375280 r reader thread started (thread=B7375280, device=/dev/ttyUSB0, detect=cd, mhz=600, cardmhz=600) |
||
217 | 2010/10/28 11:06:01 B76EA280 h HTTP Server listening on port 15080 |
||
218 | 2010/10/28 11:06:04 B7375280 r card detected |
||
219 | 2010/10/28 11:06:08 B7375280 r ATR: 3B 9F 21 0E 49 52 44 45 54 4F 20 41 43 53 20 56 35 2E 37 9A |
||
220 | 2010/10/28 11:06:09 B7375280 r Maximum frequency for this card is formally 6 Mhz, clocking it to 6.00 Mhz |
||
221 | 2010/10/28 11:06:10 B7375280 r detect irdeto card |
||
222 | 2010/10/28 11:06:10 B7375280 r caid: 0604, acs: 6.08, country code: NLD |
||
223 | 2010/10/28 11:06:10 B7375280 r providers: 4, ascii serial: xxxxxxxxxxx, hex serial: XXXXXX, hex base: XX |
||
224 | 2010/10/28 11:06:13 B7375280 r active providers: 4 (xxxxxx,xxxxxx,xxxxxx,xxxxxx) |
||
225 | 2010/10/28 11:06:13 B7375280 r found cardsystem |
||
226 | 2010/10/28 11:06:14 B7375280 r entitlements for provider: 1, id: XXXXXX |
||
227 | 2010/10/28 11:06:14 B7375280 r chid: 0001, date: 2004/08/16 - 2004/09/15 |
||
228 | 2010/10/28 11:06:14 B7375280 r chid: 000B, date: 2004/08/16 - 2004/09/15 |
||
229 | 2010/10/28 11:06:14 B7375280 r chid: FFE0, date: 2004/08/16 - 2004/08/20 |
||
230 | 2010/10/28 11:06:14 B7375280 r chid: 0384, date: 2004/08/16 - 2004/09/15 |
||
231 | 2010/10/28 11:06:14 B7375280 r chid: 000D, date: 2004/08/16 - 2004/09/15 |
||
232 | 2010/10/28 11:06:19 B7375280 r [irdeto-reader] ready for requests |
||
233 | 2010/10/28 11:06:19 B73DF6C0 s init for all local cards done |
||
234 | 2010/10/28 11:06:19 B73DF6C0 s anti cascading disabled |
||
235 | 2010/10/28 11:06:19 B736E280 c client connected to 15050 port |
||
236 | 2010/10/28 11:06:19 B7367280 c client connected to 15050 port |
||
237 | 2010/10/28 11:06:19 B7367280 c Connection closed to client |
||
238 | 2010/10/28 11:06:19 B736E280 c Connection closed to client |
||
239 | 2010/10/28 11:06:19 B7367280 c thread B7367280 ended! |
||
240 | 2010/10/28 11:06:19 B736E280 c thread B736E280 ended! |
||
241 | 12 | William Peters | }}} |
242 | 2 | William Peters | |
243 | 1 | William Peters | Oscam is now running on serverip:15050. |
244 | Open your tvheadend web interface. |
||
245 | Go to Configuration -> Code Word Client |
||
246 | Click Add Entry |
||
247 | Doubleclick 'hostname' type your server ip or hostname that is runnin oscam. |
||
248 | 2 | William Peters | Doubleclick 'port' type the port number (if you made no changes to config files it should be 15050). |
249 | 11 | William Peters | Doubleclick 'username' type the username as configured in oscam.user. |
250 | 2 | William Peters | Doubleclick 'password' type the password as configured in oscam.user. |
251 | Doubleclick 'DES key' here you can insert your DES key. If you haven't changed it in oscam.conf (you should!) then this should be: 01:02:03:04:05:06:07:08:09:10:11:12:13:14 |
||
252 | 16 | William Peters | Check 'Update Card', ~~at this moment tvheadend does not support EMM updates this option won't be used anyway~~ support for Irdeto EMM updates was added in r4359. |
253 | 5 | William Peters | Now check Enabled and click 'Save Changes' |
254 | |||
255 | When you click Save Changes you will see something like this in the system logs |
||
256 | |||
257 | {{{ |
||
258 | 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 |
||
259 | Mar 24 20:55:38 cwc: 10.2.0.2: irdeto card |
||
260 | 2 | William Peters | Mar 24 20:55:38 cwc: 10.2.0.2: Provider ID #1: 0x000000 xx.xx.xx.xx.xx.xx.xx.xx |
261 | Mar 24 20:55:38 cwc: 10.2.0.2: Provider ID #2: 0x000001 xx.xx.xx.xx.xx.xx.xx.xx |
||
262 | Mar 24 20:55:38 cwc: 10.2.0.2: Provider ID #3: 0x000002 xx.xx.xx.xx.xx.xx.xx.xx |
||
263 | Mar 24 20:55:38 cwc: 10.2.0.2: Provider ID #4: 0x000003 xx.xx.xx.xx.xx.xx.xx.xx |
||
264 | Mar 24 20:55:38 cwc: 10.2.0.2: Provider ID #5: 0x000004 xx.xx.xx.xx.xx.xx.xx.xx |
||
265 | Mar 24 20:55:38 cwc: 10.2.0.2: Will forward EMMs |
||
266 | 7 | Lars Op den Kamp - | }}} |
267 | 2 | William Peters | |
268 | 7 | Lars Op den Kamp - | now to kill oscam press ctrl+c in the console. |
269 | 2 | William Peters | |
270 | Ok tvheadend is now connected to oscam and is able to descramble channels that your card gives you access to. |
||
271 | |||
272 | ~~At this moment tvheadend does not support EMM updates, this means you have to update your card atleast once a week. |
||
273 | This can be done by inserting your smartcard for 30 minutes in the retail dvb-c setop box. |
||
274 | After that restart oscam.~~ |
||
275 | |||
276 | |||
277 | == For Gentoo users i have an init script == |
||
278 | |||
279 | nano -w /etc/init.d/oscam |
||
280 | {{{ |
||
281 | 15 | William Peters | #!/sbin/runscript |
282 | 2 | William Peters | # Copyright 1999-2010 Gentoo Foundation |
283 | # Distributed under the terms of the GNU General Public License v2 |
||
284 | # $Header: |
||
285 | |||
286 | 14 | William Peters | depend() { |
287 | 2 | William Peters | use net |
288 | } |
||
289 | |||
290 | start() { |
||
291 | 14 | William Peters | ebegin "Starting oscam" |
292 | start-stop-daemon \ |
||
293 | --start \ |
||
294 | --user $OSCAMUSER \ |
||
295 | --name $OSCAMNAME \ |
||
296 | 2 | William Peters | --exec $OSCAMBIN -- $OSCAMOPTS |
297 | eend $? |
||
298 | } |
||
299 | |||
300 | stop() { |
||
301 | 14 | William Peters | ebegin "Stopping oscam" |
302 | 2 | William Peters | start-stop-daemon --stop --signal 2 --name $OSCAMNAME |
303 | eend $? |
||
304 | } |
||
305 | }}} |
||
306 | |||
307 | nano -w /etc/conf.d/oscam |
||
308 | 1 | William Peters | {{{ |
309 | # /etc/conf.d/oscam: config file for /etc/init.d/oscam |
||
310 | 14 | William Peters | |
311 | OSCAMOPTS="-b -c /opt/oscam/etc/" |
||
312 | OSCAMUSER="nobody" |
||
313 | OSCAMNAME="oscam.bin" |
||
314 | OSCAMBIN="/opt/oscam/${OSCAMNAME}" |
||
315 | 1 | William Peters | }}} |