How to get PowerVu AutoRoll working with Oscam and Dreambox

kebien

Registered
Messages
1,329
It should be the same way for any receiver that uses oscam

The location of the files and folders,however,might be different in other receivers
 

percivjr

Registered
Messages
461
It should be the same way for any receiver that uses oscam

The location of the files and folders,however,might be different in other receivers

Yes, just managed to get it working on VU+ Duo 2/OpenPli following these instructions.
 

percivjr

Registered
Messages
461
Well, i am running into a weird error.

I have the following lines : (changed ua and key)

P 002E 00232323 ABCD5C0307A700 ;Channel 1
P 002F 00232323 ABCD5C0307A700 ;Channel 2

It will autoroll channel 1, but not channel 2. If i swap the lines (put channel 2 line first) and restart oscam, oscam will autoroll channel 2, and never auto roll channel 1..

What the heck is up?!?!? Obviously the lines are right, being if i swap the order, i can get both channels to work.

Any thoughts???

Did you ever find a solution to this?

If not, I'm thinking of creating a Mickey Mouse script which looks, say every 5 minutes, at the end of Softcam.Key for the appearance of newly-rolled keys (which conveniently include the UA). Then look for an instance of that UA in the keys proper.

The plan is to invent an 'autoroll group' which links all providers using the same key, and appending it to the end of the key comments, i.e 3456 in the example below. Next, update all the relevant keys in that group.

P 1234 00 11223344556677 ; some comment :3456
P 1234 01 22334455667788 ; some comment :3456
P 1234 12345678 33445566778899 ; some comment :3456
P 2345 00 44556677889900 ; some comment :3456
P 2345 01 556677889900AA ; some comment :3456
P 2345 12345678 33445566778899 ; some comment :3456
 

kebien

Registered
Messages
1,329
but the comment you must add it manually for it to work,right?

I would not check for newly rolled keys,I would just use the comment (channel name) to group them together,and update the key.
You would also need to restart oscam after you update softcam.key,which will produce a freeze every 5 minutes,how will you fix that?

What you could do,is to check softcam.key file checksum every 5 minutes ( o whenever you consider appropiate),keep a copy,when checksum changes,you know the file has been updated and then fire the script to update the keys.
Still oscam has to restart to read the new keys.
 
Last edited:

percivjr

Registered
Messages
461
but the comment you must add it manually for it to work,right?

Yes. Having re-read what I wrote, maybe it's not that clear. What I was trying to say is that the 'auto-roll group' would be a number (or could be the provider name, as you say) which is manually added to the end of the key line as a comment - the same group number/name would be used for all SIDs using the same keys. Just needs to be added once. I've re-written the example to try to better illustrate it.

P AAAA 00 11111111111111 ; Some provider :3456
P AAAA 01 22222222222222 ; Some provider :3456
P AAAA 12345678 33333333333333 ; Some provider :3456
P BBBB 00 11111111111111 ; Some provider :3456
P BBBB 01 22222222222222 ; Some provider :3456
P BBBB 12345678 33333333333333 ; Some provider :3456

P CCCC 00 44444444444444 ; Another provider :4567
P CCCC 01 55555555555555; Another provider :4567
P CCCC 87654321 66666666666666 ; Another provider :4567
P DDDD 00 44444444444444 ; Another provider :4567
P DDDD 01 55555555555555 ; Another provider :4567
P DDDD 87654321 66666666666666 ; Another provider :4567

You would also need to restart oscam after you update softcam.key,which will produce a freeze every 5 minutes,how will you fix that?

I would only restart oscam following an actual key change. I'm assuming that I'd need to be tuned to the channel for the auto-roll to work and, if the key has changed, I guess the screen would have gone black anyway. But if that assumption is wrong, I could just manually restart.

Still oscam has to restart to read the new keys.

Yes, that's what I've always believed. I'm new to PV and just got auto-roll working yesterday and only experienced one auto-roll, so I'm no expert. I set the whole thing going with expired keys, went for dinner, came back 30 minutes later and found to my amazement that that there had just been an auto-roll and the channel was working. Now I'd certainly not manually re-started oscam. Obviously I need to re-check.

Anyway, thanks for your comments.
 

kebien

Registered
Messages
1,329
When oscam autoroll on its own,it writes and read from softcam.key
But if you are running a script after autoroll happens,and write to softcam.key again,you need to restart oscam to read new keys.

I would submit a patch to oscam to read softcam.key every time it changes,in this case,you would not need to restart to load new keys.
 

moke

Registered
Messages
6
Mr. kebien, if you can do that should look oscam all files necessary for the proper operation autorool bwtv channels on 13E. Thank you very much!
 

harshy

Registered
Messages
746
I followed the instructions here can't get it to autoroll on s;s maybe I have to leave it overnight.
 

zayden

Registered
Messages
61
Yes. Having re-read what I wrote, maybe it's not that clear. What I was trying to say is that the 'auto-roll group' would be a number (or could be the provider name, as you say) which is manually added to the end of the key line as a comment - the same group number/name would be used for all SIDs using the same keys. Just needs to be added once. I've re-written the example to try to better illustrate it.

P AAAA 00 11111111111111 ; Some provider :3456
P AAAA 01 22222222222222 ; Some provider :3456
P AAAA 12345678 33333333333333 ; Some provider :3456
P BBBB 00 11111111111111 ; Some provider :3456
P BBBB 01 22222222222222 ; Some provider :3456
P BBBB 12345678 33333333333333 ; Some provider :3456

P CCCC 00 44444444444444 ; Another provider :4567
P CCCC 01 55555555555555; Another provider :4567
P CCCC 87654321 66666666666666 ; Another provider :4567
P DDDD 00 44444444444444 ; Another provider :4567
P DDDD 01 55555555555555 ; Another provider :4567
P DDDD 87654321 66666666666666 ; Another provider :4567

I like some ideas here and I think we can concatenate further. If we can set oscam to investigate a key further by setting sid to 0x0000 like this..
Code:
P 0000 00 11223344556677:AAAA,BBBB,CCCC,DDDD:101W3920; Some Remark Perhaps
then we can lump sids together with a single key followed by a descriptive string. And the UA would look very similar
Code:
 P 0000 12345678 123456789ABCD:AAAA,BBBB,CCCC,DDDD:101W3920: Some Remark Perhaps
such that only that key with the same identifier is updated.

What do you think ?
 

zayden

Registered
Messages
61
This modification will significantly reduce softcam file size thereby saving trees and reducing our carbon footprint.

Well maybe not, but it will make the file smaller and less redundant.
 

zayden

Registered
Messages
61
You could also put the sids where oscam already expects to find at least one and separate by comma.
Code:
 P AAAA,BBBB,CCCC,DDDD 00 11223344556677:101W3920 ; Some Remark Perhaps
There may be endless ways to do the same thing I guess only the programmers would see what makes the most sense.
 

kebien

Registered
Messages
1,329
Think about it.
Oscam add this as a comment
Code:
P 006D 01 FFFA91Exxxxxxx ; added by OSEmu Sun Jan 10 08:56:13 2016 UA: 00xxxxxx
Where the last comment is the UA.
You can simply copy the key for this UA ,group all other SIDs of the channel in the trasponder,and create a new line for each SID using the key in memory.
You can use
Code:
grep -E (which look for a specific string,other cmds can be used)   and **** (append) into SoftCam.key
Problem solved.
You outline in the script which UA to group with the SIDs you want.Can be some work to fill in the groups,if you have a big amount of emm keys.
But hey,looks way better than change the way oscam work at the source.



No matter if SID is the same as in another group of channels,since oscam will read he next equal SID if key is not valid.

Why suggesting to change oscam source by adding more comments?
It is not necessary.
And not sure there is any problem with the size of softcam.key,has been really big like this for years.
In my view,making SID field all 0000,and at the same time add tons of relevant comments (comments are all irrelevant at this time,is just a tag),is change one thing for another same.
 
Last edited:

kebien

Registered
Messages
1,329
Let's do something
Open a new thread about making autoroll script for dreambox and we all collaborate
Forget about changing oscam,it migh eventually get updated after we can produce a workable solution.
But meanwhile,the script can be useful
 

joeuser

Registered
Messages
199
I have already implemented this in my latest patch. I am waiting for some people to test with various sats, then it will be available on github soon.

In my patch, each key is prefixed with a group ID:
groupid (4 hex digits) + sid (4 hex digits)

P 00010001 00 xxxxxxxxxxxxxx
P 00010001 01 yyyyyyyyyyyyyy
P 00010002 00 xxxxxxxxxxxxxx
P 10003 00 rrrrrrrrrrrrrr
P 010003 01 sssssssssssssss
P 00020001 00 zzzzzzzzzzzzzz

Leading zeros for groupid are not required (but make reading easier.
Leading zeros for sid ARE required.

for each UA it uses just the group ID:

P 0001 xxxxxxx yyyyyyyyyyyyyyyyyyyy
P 001 zzzzzzz qqqqqqqqqqqqqqqqqqqq
P 1 wwwwwww vvvvvvvvvvvvvvvvvvv

...etc for as many UA keys you have, again leading zeros not required

If any UA finds a key, it will update all keys for that group (even if they are on a different sat...)

But, in order to work, the 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, ie:

P 00010004 00 00000000000000000
P 00010004 01 00000000000000000
 
Last edited:

kebien

Registered
Messages
1,329
Great,joeuser
I opened a thread about this for those interested in starting from 0 (or not) with dreambox and linux.
See if you can hint others if there is interest and gets any replies.
I tried to use whatever oscam is already providing,as not everybody is able to submit solutions to repository.
And I think is easy enough
 

zayden

Registered
Messages
61
Hi joe I think you may run into some problems with this approach if an unintended UA decrypts and updates the wrong group.

As far as the dummy keys go maybe you could alter your code to allow for multiple sids per line/key so it looks like this
Code:
 P GGGG SID1,SID2,SID3,...SIDx 01 KEY
This has the double benefit of simplifying key entry and maintenance for the end user and for having the code make only a single line key modification.
 

joeuser

Registered
Messages
199
Maybe (big maybe!) simpler if you just use powervu, but remember, osemu/oscam-emu is used for other encryption systems as well and it must remain compatible. Changing the basic structure of the key file requires making a special parser and special data structure just for powervu keys. As implemented now, that is not necessary. It is really not difficult to cut and paste lines and I believe my format is easier and easier to read since you do not have to add all the sids to each key. I have 12 UAs for one provider and 12 channels - just imagine what that would look like with your format compared to mine...

I just need to add some logging and debug logging, then I will upload to git - maybe late tomorrow night if I have time.
 
Last edited:

zayden

Registered
Messages
61
I don't get it ? You've added a new "group" field to the softcam so how is my suggestion any different ?
 

zayden

Registered
Messages
61
If you have 12 UA's for 12 channels presumably you would have 24 entries. I would have 13 entries for the same representation. I must have missed what you meant.
 
Top