Skip to content

jahntheman/OSEmu

 
 

Repository files navigation

OSEmu
======

Here is a working sample for a simple (micro) emu.
It includes the basic needed cs357x (camd35 UDP) functionality, and is very simple and compact.


Build: 
======

- Put a SoftCam.Key file into the source code directory (for example from skystar.org).
  Note: This does not apply for Mac OSX and Android, SoftCam.Key cannot be integrated on these systems at the moment. 
  
- Run `make` to compile OSEmu.

  Info: If you want to cross-compile OSEmu search for the "simpleemu" script by gorgone.


Run:
====

- (optional) OSEmu does not require, but will make use of "SoftCam.Key" if available. 
             "SoftCam.Key" is searched in:
              - /var/keys
              - The folder specified with the "-c <folder>" option.
              

- You may use the program with the following options:

  -a <user>:<password> (set the cs357x user and password) [REQUIRED]
  -p <portnumber> (set the cs357x port) [REQUIRED]
  -c <folder> (set the folder where SoftCam.Key is searched)
  -b (start OSEmu in background/daemon mode)
  -v (log debug information)
  -l <logfile> (write logs to this file)
  -e (enable emm au) 
      - Viaccess3: Needs M0 key; oscam clients must be version r10584 or newer, and the OSEmu reader must have set "emmcache = 1,1,2,1".
      - Irdeto2: Needs M0 and M3/4/5/6 key
      - PowerVU: Needs AU key
  -L (only allow local connections from localhost)
  -i (show OSEmu version info and exit)
  -r <stream source port>:<relay port> (enables stream relay server)
  -s <stream source host> (set stream relay source server host; default: 127.0.0.1)
  -t <stream source user>:<strean source password> (set stream relay source user and password; default: none)

  Examples:
    /usr/bin/OSEmu -a user:password -p 11000 -b
    /usr/bin/OSEmu -a user:password -p 11000 -b -c /usr/keys -l /var/log/osemu.log -e
    /usr/bin/OSEmu -a user:password -p 11000 -b -r 8001:17999

OSCam reader config for OSEmu
=============================

[reader]
label                         = OSEmu
protocol                      = cs357x
device                        = 127.0.0.1,11000
user                          = user
password                      = password
caid                          = 090F,0500,1801,0604,2600,FFFF
ident                         = 090F:000000;0500:000000,023800,021110,007400,007800;1801:000000,007301,001101,002111;0604:000000;1010:000000;2600:000000;FFFF:000000;
group                         = 1
emmcache                      = 1,1,2,1


BISS/ConstCW config
===================

Syntax for keys in SoftCam.Key: (key number can be '00' or '01')
F <service id><ecm pid> <key number> <key>

Example:

	service id: 2222
	ecm pid: 1111
	key: 0102030405060708

	F 22221111 00 0102030405060708
	
Important:
	The correct ecm pid is only available when using oscam dvbapi.
	For example:
			oscam (dvbapi) <-> OSEmu
			oscam (dvbapi) <-> oscam <-> OSEmu
			
	When using another client like cccam, the ecm pid seen by OSEmu will always be '1FFF'
	For example:
			cccam <-> oscam <-> OSEmu
			cccam <-> OSEmu
	In this case the above example key line needs to be changed to:
	F 22221FFF 00 0102030405060708


	When using cccam clients for BISS/ConstCW create a second reader with no ident line:
	
[reader]
label                         = OSEmu-BISS
protocol                      = cs357x
device                        = 127.0.0.1,11000
user                          = user
password                      = password
caid                          = 2600,FFFF
group                         = 2

PowerVU config
==============

Keys in SoftCam.Key:

	P <groupid><srvid> <nb> <key>
	Where:	
		groupid = any 4 hex digits of your choice for this group (leading zeros are optional)
		srvid = SID (Service ID) of channel in hex with leading zeros to make 4 hex digits.
		nb = key number (00/01)
		key = ecm key

	Example groupid=0x1, sid=0x1234, keys 00 and 01:
	P 00011234 00 11223344556677
	P 011234 01 22334455667788

	Example groupid=0x2, sid=0x34, keys 00 and 01:
	P 00020034 00 00112233445566
	P 0020034 01 00223344556677

	For channels with the same srvid the correct key will be detected automatically, but each key needs a unique groupid.
	P 009E0234 01 11223344556677
	P 00040234 01 22334455667788
	P 013E0234 01 33445566778899
	
	WARNING - duplicate <groupid><srvid> are not allowed anymore - only the last instance will be used!

	AU keys:
	P <groupid> <UA> <key>
	example:
	P 009E 11223344 11223344556677
	P 009E 44332211 22334455667788
	P 0004 22334455 33445566778899
	P 013E 00112233 00112233445566

	Multiple UA keys are allowed for each group and each UA will update ALL ecm keys in the group.

	NOTE: in order to work, the ecm keys must be "seeded" in the file for each SID you want to update since the UA has no information about sids. 
	So to add a key that is unknown, enter a dummy key to get updated, for example:

	P 00010004 00 00000000000000000
	P 00010004 01 00000000000000000

	Also note: Duplicate powervu keys are no longer allowed (unnecessary since duplicate SIDs should now have a unique group ID.) 
	So, if there are any duplicates, only the last key in the file will be used. 
	This also means that as new keys are found and appended to the file, they will automatically replace earlier keys.


For PowerVU the Stream Relay must be used:

IMPORTANT:
	The stream relay needs a fast CPU. Not every STB is fast enough.
	If you encounter problems like suttering, likely your CPU is too slow.

	For OSEmu it is required that the "Include ECM in http streams" setting is enabled.
	If your image supports it (openpli, openatv), you can find it here:
	OpenWebif -> Settings -> Customize
	
	If your image does not support it, the only option is to use oscam-emu.
	OSEmu's stream relay will NOT work without "Include ECM in http streams".
	
	Switch to oscam-emu if the option is not available.
	

Channel Config:
1. Go to the OpenWebif and click on the "Stream" button for the channel you want to add.
2. Download and save the .m3u file.
3. Open the .m3u file with a text edior and get the stream link. It looks like this:
	http://stb:8001/1:0:19:0123:3EF:1:C00000:0:0:0:
4. Replace the port (8001) with the relay port (default: 17999) and the host name ("stb") with 127.0.0.1
	http://127.0.0.1:17999/1:0:19:0123:3EF:1:C00000:0:0:0:
5. Add the new stream link to your channel list (for example with DreamBoxEdit)

IMPORTANT:
	Do NOT use the correct Transponder ID/Network ID/Namespace for the stream link.
	Use Transponder ID: "11", Network ID: "22" and Namespace: "33".
	Set Service Type to "1", and enter the correct Service ID for the channel.

Note: 
	When using DreamBoxEdit:
	
	A. Go to the list in the middle "Bouquet details".
	B. Right click on a channel, select "IPTV and other streaming services", select "Add".
	C. Select "DVB/TS".
	D. Chosse a name and use the new stream link as URL.
	E. Use the "Service ID" of the original channel. You can find it in the left list ("Services")
	

Drecrypt2 info:
===============

OSemu cannot support Drecrypt2 because no client will send the overcrypt EMMs to it.
Support for Drecryp2 is available in oscam-emu.

Tandberg config:
===============

Keys in SoftCam.Key:

T <entitlement> 01 <key>

for example (entitlement = 1234):
T 00001234 01 1122334455667788

leading zeros maybe be skipped. same key as above:
T 1234 01 1122334455667788

AU support not possible, only with oscam-emu.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C 96.0%
  • C++ 3.6%
  • Other 0.4%