Analogue Nagravision (Syster) encoder

fsphil

Member
Joined
Apr 27, 2017
Messages
112
Reaction score
52
Points
28
My Satellite Setup
Still playing with analogue. Also running a Humax FOXSAT-HDR and a Thomson THS804.
My Location
UK
I have some sort of success with the new version. If I set the checksum for class 15 correct, I get my decoder to kick in. If I set it back to checksum hack table it won't kick in anymore.

I may remove this. I added it to copy how the Premiere VBI data works, but I think the Premiere decoder ignores it anyway.
 

neo7530

Member
Joined
Nov 27, 2019
Messages
14
Reaction score
4
Points
3
Age
45
My Satellite Setup
Cable / Hacktv
My Location
Berlin
My scart terminal is silly. I can get it to kick in and decode as long I have the info message on screen. When I made it dissappear, it descrambler for 2...5sec and then loses its lock.
 

Captain Jack

Burnt out human
Joined
Oct 21, 2006
Messages
11,797
Reaction score
7,980
Points
113
My Satellite Setup
See signature
My Location
North Somerset
msg2[ 1] = 0x76;
On the French decoder, this does not change normal behaviour. Still works with 'good' CWs.

Of the two French C+ boxes I tested, both with the PIC Card, both are kicking stably, but none are descrambling properly.
My latest push should work there. Can you try it?
 

homercartman

Member
Joined
Oct 25, 2019
Messages
42
Reaction score
6
Points
8
My Satellite Setup
Cubsat 50, DVBSky S960, RPi3
My Location
France
Hi @Captain Jack

Just saw your patch with 'pirate1' ecm table.

I will try later this week.
 

Channel Hopper

Suffering fools, so you don't have to.
Staff member
Joined
Jan 1, 2000
Messages
35,536
Reaction score
8,554
Points
113
Age
59
Website
www.sat-elite.uk
My Satellite Setup
A little less analogue, and a lot more crap.
My Location
UK
If you are talking about the German film channel in the 1990s Premiere was piped down cable networks in Switzerland and Austria.
 

homercartman

Member
Joined
Oct 25, 2019
Messages
42
Reaction score
6
Points
8
My Satellite Setup
Cubsat 50, DVBSky S960, RPi3
My Location
France
Hi @Captain Jack

First, there is a problem in my environment that prevents to properly run your hacktv update. This is related to ffmpeg returning an error on
Code:
        if(avfilter_graph_create_filter(&av->vbuffersrc_ctx, vbuffersrc, "in",_filter_args, NULL, vfilter_graph) < 0)

If I add the following patch that basically re-adds the call to avfilter_register_all(), it works.
Code:
diff --git a/ffmpeg.c b/ffmpeg.c
index d0a3136..12f6eaa 100644
--- a/ffmpeg.c
+++ b/ffmpeg.c
@@ -1082,7 +1082,7 @@ int av_ffmpeg_open(vid_t *s, char *input_url)
                enum AVPixelFormat pix_fmts[] = {AV_PIX_FMT_RGB32 };
                        
                AVFilterGraph *vfilter_graph;
-               
+               avfilter_register_all();
                AVBufferSinkParams *buffersink_params;
                const AVFilter *vbuffersrc  = avfilter_get_by_name("buffer");
                const AVFilter *vbuffersink = avfilter_get_by_name("buffersink");

Second: Yay, Nagravision descrambling is ok with my French C+ box and the PIC card, right without any code modification. That's great!

Cheers.
 

Captain Jack

Burnt out human
Joined
Oct 21, 2006
Messages
11,797
Reaction score
7,980
Points
113
My Satellite Setup
See signature
My Location
North Somerset
Thanks - yes, that call is deprecated in the latest libav libraries, so I removed it. I get a warning on compilation here, so I removed it.

Looks like I'd better add it back in for legacy or at least do a version check.
 

homercartman

Member
Joined
Oct 25, 2019
Messages
42
Reaction score
6
Points
8
My Satellite Setup
Cubsat 50, DVBSky S960, RPi3
My Location
France
Also, @Captain Jack @fsphil

Since systeraudio option exists, the descrambled systeraudio level feels really low compared to audio level sent in clear.
With the following patch, descrambled systeraudio level compares much better to clear level, but sometimes saturate.
Maybe some computations are off in ng_invert_audio()?

Code:
+++ b/syster.c
@@ -758,7 +758,7 @@ void ng_invert_audio(ng_t *s, int16_t *audio, size_t samples)
                             s->firlq[s->firx + x] * _firq[x];
                }
                
-               audio[i * 2 + 0] = a >> 15;
+               audio[i * 2 + 0] = a >> 12;
                
                /* Right */
                for(a = x = 0; x < NTAPS; x++)
@@ -767,7 +767,7 @@ void ng_invert_audio(ng_t *s, int16_t *audio, size_t samples)
                             s->firrq[s->firx + x] * _firq[x];
                }
                
-               audio[i * 2 + 1] = a >> 15;
+               audio[i * 2 + 1] = a >> 12;
        }
 }
 

Captain Jack

Burnt out human
Joined
Oct 21, 2006
Messages
11,797
Reaction score
7,980
Points
113
My Satellite Setup
See signature
My Location
North Somerset
@neo7530 found a small fix that resolves issues with some decoders. My Premiere one had some issues locking onto the new version but with this change it's solid.

Line 576: change -48 to -45.

Code:
vbidata_render_nrz(s->lut, s->vbi[s->vbi_seq++], -48, NG_VBI_BYTES * 8, VBIDATA_LSB_FIRST, s->vid->output, 2);
 

fsphil

Member
Joined
Apr 27, 2017
Messages
112
Reaction score
52
Points
28
My Satellite Setup
Still playing with analogue. Also running a Humax FOXSAT-HDR and a Thomson THS804.
My Location
UK
I arrived at -48 through a bit of trial an error with the Premiere box, so it doesn't surprise me if it's wrong. -45 works well too here, so I'll change it in the source.
 

homercartman

Member
Joined
Oct 25, 2019
Messages
42
Reaction score
6
Points
8
My Satellite Setup
Cubsat 50, DVBSky S960, RPi3
My Location
France
Hi @Captain Jack

First of all, thanks for your update with true random CWs with goldcard. It works perfectly.

Second: With the canalpluspl mode, the Spanish keys (country 34) are locking for 0.5 second (audio, 32 line picture shift, but no descrambling) then unlock.
This never happened before and this happens only with canalpluspl mode.
There might be something to keep looking for here. This is encouraging.

Third, the following patch is still required:
Code:
diff --git a/ffmpeg.c b/ffmpeg.c
index d0a3136..12f6eaa 100644
--- a/ffmpeg.c
+++ b/ffmpeg.c
@@ -1082,7 +1082,7 @@ int av_ffmpeg_open(vid_t *s, char *input_url)
                enum AVPixelFormat pix_fmts[] = {AV_PIX_FMT_RGB32 };
                     
                AVFilterGraph *vfilter_graph;
-            
+               avfilter_register_all();
                AVBufferSinkParams *buffersink_params;
                const AVFilter *vbuffersrc  = avfilter_get_by_name("buffer");
                const AVFilter *vbuffersink = avfilter_get_by_name("buffersink");


Cheers and happy 0x07E4!
 
Last edited:

Captain Jack

Burnt out human
Joined
Oct 21, 2006
Messages
11,797
Reaction score
7,980
Points
113
My Satellite Setup
See signature
My Location
North Somerset
I pushed the patch for that avfilter thing but need to put a proper fix in.

I suspect Spanish keys reply with 0A byte, which means "no" and the decoder goes "okay....".

Are there are recordings from Spanish C+ channels (there were a few)? I don't have any Spanish keys but it would be good to get a collection of ECMs and control words that work with as many keys as possible. Though with monthly key changes, it's a big ask.

Do you have any more C+ France recordings? Doesn't have to be from C+ itself - any Syster encrypted channel will do. Trying to see if any of my French keys can be activated or are already active.

The only thing with French keys is that its ATR instructs the decoder to permute the whole line for SECAM and not just the active area in PAL. This means that it will only really work/look decent in SECAM mode.
 

homercartman

Member
Joined
Oct 25, 2019
Messages
42
Reaction score
6
Points
8
My Satellite Setup
Cubsat 50, DVBSky S960, RPi3
My Location
France
Hi @Captain Jack

I'm not aware of Spanish C+ recordings, unfortunately.

As for the C+ France recordings, I'm looking for other cassettes. So far, I don't have any better than the two 10mn VBI extracts I posted some time ago here.

Are those VBI extract unusable at all?
 

Captain Jack

Burnt out human
Joined
Oct 21, 2006
Messages
11,797
Reaction score
7,980
Points
113
My Satellite Setup
See signature
My Location
North Somerset
Sadly, not a lot. Some ECMs were salvageable but they didn't work on my French cards.

We found yesterday that Canal+ Poland sent 06 11 messages to the card when it was broadcasting in the clear and the card (Polish one) responded. '11' means index or key to use within the card. Interestingly, most cards we tried did respond to those messages and they could be used for conditional access (just change mode to 0x72).

I am now interested to see whether this is the case for C+ France and Premiere clear transmissions - whether they were sending 06 xx messages to the cards that responded, regardless of subscription levels. This could potentially allow us to use more cards ('keys') with HackTV.

I also remembered that the French VBI document contains some ECM samples from scrambled and clear transmissions - I will plug them in and see if any work on any of my cards.
 

Szycha881

New Member
Joined
Jun 20, 2018
Messages
9
Reaction score
4
Points
3
Age
33
My Satellite Setup
HotBird 13E, nc+ receiver
My Location
Poland
Okay, according to @homercartman French docs written by Zebulon, now we know that "11" was used for soft encryption, so it means that we probably found Holy Grail :D

All the Polish keys we have (@Captain Jack and mine) give the same respond (and it's not 0A at all) to the specific questions, so hacktv should work with every key when "06 11" will be included
 

Captain Jack

Burnt out human
Joined
Oct 21, 2006
Messages
11,797
Reaction score
7,980
Points
113
My Satellite Setup
See signature
My Location
North Somerset
Yes, thanks to @fsphil for amending the code to allow this.

I also have all my French keys working in SECAM mode with this.
 

Captain Jack

Burnt out human
Joined
Oct 21, 2006
Messages
11,797
Reaction score
7,980
Points
113
My Satellite Setup
See signature
My Location
North Somerset
@homercartman do you have any official French keys? I'd be interested in seeing whether random control words will work on yours. I tested a few on mine and they worked. The only one that doesn't is the grey key that came with Syster+ TNT box as it was never activated.
 

homercartman

Member
Joined
Oct 25, 2019
Messages
42
Reaction score
6
Points
8
My Satellite Setup
Cubsat 50, DVBSky S960, RPi3
My Location
France
@Captain Jack
Yes, I have several FR grey keys and ES white keys. Some of them have subscriptions (dates are visible via MESS button) , some don't.

I think I tested pirate mode with FR keys and from what I saw, the descrambler didn't lock.
I might need to check again...
To be 100% sure of the tests to be done:

- What cmdline should I test them with ?
- Is it expected to always work ?
 

Captain Jack

Burnt out human
Joined
Oct 21, 2006
Messages
11,797
Reaction score
7,980
Points
113
My Satellite Setup
See signature
My Location
North Somerset
I haven't pushed that version yet - still working on it. I am not sure whether ES white keys will work but worth seeing if it at least locks the decoder.
 
Top