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