SasGwyDLK2 1Spe010000Approved
SasGwyDLK2 1Spe010000Approved
SasGwyDLK2 1Spe010000Approved
CONFIDENTIAL
Nagravision is a member of the Kudelski Group of Companies.
This document is the intellectual property of Nagravision and contains confidential and privileged information.
The reproduction, modification, or communication to third parties (or to other than the addressee) of any part of this
document is strictly prohibited without the prior written consent from Nagravision.
CONFIDENTIAL
Nagravision SMS Gateway
All trademarks and registered trademarks are the property of their respective owners.
This document is supplied with an understanding that the notice(s) herein or any other contractual
agreement(s) made that instigated the delivery of a hard copy, electronic copy, facsimile or file transfer
of this document are strictly observed and maintained.
Any recipient of this document, without exception, is subject to a Non-Disclosure Agreement (NDA) and
access authorization.
Copyright © 2014 Nagravision. All rights reserved. Confidential and privileged information. 2
CONFIDENTIAL
Owner: Fabiano Galimberti
Contents
Contents........................................................................................................3
List of tables..................................................................................................5
List of figures.................................................................................................6
Preface..........................................................................................................7
1. Introduction...........................................................................................9
2. System overview..................................................................................11
2.1 Purpose of the SMSgw......................................................................................11
2.2 Communication protocols..................................................................................11
2.2.1 Layers........................................................................................................11
2.2.2 TCP/IP protocol...........................................................................................11
2.2.3 Device_IO protocol......................................................................................12
2.2.4 SMSgw protocol...........................................................................................12
2.3 Device_IO communication.................................................................................12
2.3.1 Overview....................................................................................................12
2.3.2 Establishing a connection with a Device_IO server...........................................13
2.3.3 Data exchange between client and server.......................................................14
2.3.4 Closing a connection with a Device_IO server..................................................14
2.3.5 Rules of use................................................................................................14
2.3.6 Messages format.........................................................................................14
2.3.7 Message_1 (connect to the CAS)...................................................................14
2.3.8 Message_2 (answer 1 from the CAS).............................................................14
2.3.9 Message_3 (answer from the CAS)................................................................15
2.3.10 Message_5 (Cmd message from the SMS or the CAS)......................................15
3. SMS-SMSgw connections......................................................................16
3.1 Overview.........................................................................................................16
3.2 EMM/Control command flow...............................................................................16
3.3 Usage.............................................................................................................17
3.3.1 Source identifier..........................................................................................17
3.3.2 Transaction number.....................................................................................17
3.3.3 Keeping the SMS connection alive..................................................................17
3.3.4 Establishing the SMS connection....................................................................17
4. SMS commands.....................................................................................18
4.1 Specification....................................................................................................18
4.1.1 Commands and responses............................................................................18
4.1.2 Asynchronous by nature...............................................................................18
4.2 Metrics............................................................................................................18
4.3 Time and date..................................................................................................18
4.4 Identifiers........................................................................................................19
4.5 Special notes...................................................................................................19
4.5.1 event_name and product_name filler rule......................................................19
4.5.2 event_name and product_name overwriting rule.............................................20
4.5.3 Price overwriting rule...................................................................................20
4.6 Addressing modes usage...................................................................................20
4.7 Command handling...........................................................................................22
4.7.1 Products.....................................................................................................22
4.8 Headers..........................................................................................................24
4.8.1 Root header................................................................................................25
4.8.2 Address header – EMM cmd..........................................................................26
4.8.3 Address header – Control cmd.......................................................................30
4.8.4 Address header – Operation cmd...................................................................30
4.8.5 Errors due to abnormal operational conditions.................................................31
4.9 EMM commands (0nn).......................................................................................32
4.9.1 Command 2: Add Product.............................................................................32
4.9.2 Command 4: Product Suspension..................................................................34
4.9.3 Command 5: Product Reactivation.................................................................35
4.9.4 Command 6: Product Cancellation.................................................................36
4.9.5 Command 7: All Products Cancellation............................................................37
4.9.6 Command 10: Add Event Product..................................................................38
4.9.7 Command 20: Suspend Subscriber ICC..........................................................40
4.9.8 Command 21: Reactivate Subscriber ICC........................................................41
4.9.9 Command 23: Suspend All ICC Features.........................................................42
4.9.10 Command 24: Reactivate All ICC Features......................................................43
4.9.11 Command 25: Suspend All ICC Features With Delay........................................44
4.9.12 Command 35: Create Operator......................................................................45
4.9.13 Command 36: Cancel Operator.....................................................................46
4.9.14 Command 46: Set Segments.........................................................................47
4.9.15 Command 47: Set Alphanum Zip Code...........................................................48
4.9.16 Command 48: Set Zip Code..........................................................................49
4.9.17 Command 50: Cancel ICC.............................................................................50
4.9.18 Command 51: Initialize Smart Card...............................................................51
4.9.19 Command 52: Pair the ICC With the STB........................................................52
4.9.20 Command 53: Clear PIN Code.......................................................................53
4.9.21 Command 69: Send Generic IRD Command....................................................54
4.9.22 Command 79: Force Tune.............................................................................57
4.9.23 Command 84: Send PRM Credentials..............................................................59
4.9.24 Command 96: Purge PPV and IPPV Records....................................................61
4.9.25 Command 99: Send Generic IRD Command II.................................................62
4.9.25.1 Example: an STB with a Nagravision CAK..................................................63
4.9.25.2 Example: an STB with a native MG CAK....................................................63
4.10 CONTROL commands (1nn)...............................................................................65
4.10.1 Command 104: Create ICC in Call Collector....................................................66
4.10.2 Command 105: Cancel ICC in Call Collector....................................................67
4.10.3 Command 110: EMM Cleanup........................................................................68
4.10.4 Command 122: Set Network.........................................................................69
4.10.5 Command 123: Trigger Broadcast of Conditional EMM......................................71
4.10.6 Command 125: Set Subscriber Private Data....................................................72
4.10.7 Command 126: Assign Virtual UA to NUID......................................................73
4.10.8 Command 127: Get all products....................................................................74
4.11 Internal CAS commands (7nn)...........................................................................75
4.12 MACRO EMM commands (9nn)...........................................................................75
4.12.1 Command 902: Activate Smart card Without Return Path.................................76
4.12.2 Command 903: Add List of Products...............................................................78
4.12.3 Command 904: Cancel List of Products...........................................................80
4.12.4 Command 905: Add Enhanced List of Products................................................81
4.12.5 Command 908: Set Families of Products.........................................................85
4.12.6 Command 909: A-la-carte management.........................................................87
4.12.7 Commands 910 to 919: Reserved for Internal CAS Actions...............................90
4.12.8 Command 925: Set a-la-carte services...........................................................91
4.13 OPERATION commands (10nn and 20nn)............................................................93
4.13.1 Command 1000: Acknowledge Command.......................................................93
4.13.2 Command 1001: Non-acknowledged Command...............................................94
4.13.3 Command 1002: No Command......................................................................95
4.13.4 Command 1003: Acknowledge Command with Virtual UA.................................96
4.13.5 Command 1004: Acknowledge command with data..........................................97
4.13.6 Command 2000: EMM via Portal Acknowledge command..................................99
4.13.7 Command 2001: EMM via Portal Negative-Acknowledge command...................100
5. Error codes.........................................................................................101
5.1 Table of Error codes........................................................................................101
5.2 Table of Error code extensions..........................................................................104
7. ASCII Table........................................................................................110
8. Examples............................................................................................113
8.1 Device_IO connection establishment.................................................................113
8.2 Example of command 52.................................................................................117
Glossary.....................................................................................................119
Data formats..............................................................................................120
List of tables
Table 4-1: Identifiers....................................................................................................19
Table 5-1: Error codes................................................................................................103
Table 5-2: Error code extensions..................................................................................107
Table 7-1: ASCII Table................................................................................................112
Listing 8-1: Device_IO connection................................................................................113
Listing 8-2: Example of command 52............................................................................117
List of figures
Figure 2-1: CAS overview..............................................................................................11
Figure 2-2: SMSgw protocol – communication layers........................................................11
Figure 2-3: Device_IO connection establishment and data exchange phases........................13
Figure 3-1: Connections between the SMS and the SMSgw................................................16
Figure 3-2: Multi SMS connections..................................................................................16
Figure 4-1: Buffer of command 69 sent by the SMS..........................................................56
Figure 8-1: Entire network packet.................................................................................118
Preface
Audience
This guide is directed at the following persons:
The customer’s personnel involved in the management of the SMS – CAS interface
SMS vendors’ personnel involved in the development of the interface between the SMS and
the CAS
Nagravision’s personnel involved in the CAS (marketing, customer support, developer, test
team)
Related Documents
[1] “Information technology – Syntactic meta-language – Extended BNF” (ISO/IEC
14977:1996)
[2] “Conditional Access Kernel – IRD Command Specification” (Nagravision)
Document History
Change logs
Version 2.1 – Issue 1.0.0, October 2014
Added error code NUID_BLACKLISTED for sms 126
Version 1.1 - Issue 1.1.0, June 2013
Added SMS 123 to trigger the broadcast of conditional offers (defined with CAS Console).
Version 1.1 - Issue 1.0.0, February 2013
Replaced family products with ‘a-la-carte’ products
Added SMS 127, 1004, 909, 925
Updated description of SMS 908
Version 1.0 - Issue 1.3.0, January 2012
Remove SMS 909
Rework descriptions related to 'A-la-carte' products
Version 1.0 - Issue 1.2.2, January 2012
Add a new error code 79 indicating that a command is not supported.
Version 1.0 - Issue 1.2.1, October 2011
Update SMS operation command ‘1003-Acknoledge Command with Virtual UA’ to return NUID
in addition of VUA.
Version 1.0 - Issue 1.2.0, October 2011
Add SMS control command ‘126-Assign Virtual UA to NUID’.
Add SMS operation command ‘1003-Acknoledge Command with Virtual UA’.
Update the definition of SMS commands 51 and 52.
Add new error codes for SMS commands 51, 902 and 122.
Version 1.0 - Issue 1.1.0, August 2011
Remove all references to callbacks, IPPV and credit.
Remove the broadcast modes and SA address sizes not supported by DLK
Version 1.0 – Issue 1.0.0, July 2011
First version based on Merlin 3.0 SMS Gateway Interface. Compared to Merlin 3.0, DLK system
supports a subset of SMS commands and product types.
Document Reviewers
Reviewer’s Name Function Review Date Reviewed Version
Paul-Jean Cagnard System Architect
Document Approvers
Name Function Approval Approved Version
Date
Jordi Porta Head of SAS 04.06.2013 1.0.0P
1. Introduction
This document presents the interface that interconnects an SMS and the Nagravision conditional
access system (CAS). It provides the connection specifications, the communication protocol and
the commands used in the interface. This issue illustrates only the set of commands fully
supported and tested by the DLK CAS standard delivery.
Chapter 8: Examples
Chapter 8 provides listings demonstrating a Device_IO connection process and a command
transmitted in a network packet.
A note on licenses
This document lists and describes all the commands supported by the Nagravision CAS
interface. However, the use of individual commands depends on the business licenses acquired
by the customer (i.e. the site operator). Make sure you have the appropriate license before
using a command.
2. System overview
This chapter presents different aspects of the system related to the SMS Gateway interface.
SMS Set-Top-Box
SMS
CAS Set-Top-Box
2.2.1 Layers
There are three communication layers. The lowest is the TCP/IP level and the most abstract is
the level of the SMSgw protocol. Between those two is the Device IO layer whose role is to
gather commands from the TCP/IP stream.
S M S g a te w a y c o m m a n d
D e v ic e IO
T C P / IP
TCP/IP is a stream-based protocol. The application-oriented messages are joined together and
there is no separator between these messages. When reading an application-oriented message
using OS primitives from a stream like TCP/IP, we may face one of the following three
possibilities:
The message is incomplete (only n bytes of the data have been read).
The message is complete (only the expected message has been read).
More than the expected message has been read.
The diagrams below show these three possibilities. We assume that the TCP/IP stream contains
two application-oriented messages M1 and M2:
M1 M2 TCP/IP stream
M1’ M1’’ M2
M1 M2
M1 M2’ M2’’
Device_IO is a protocol used above TCP/IP to exchange data as a buffer of known size. It
consists of a fixed-size header followed by the application data. The header has a size of two
bytes and the application data is a stream of n bytes.
Header section Length (2 bytes) Payload section Application data (n bytes)
The header is a two-byte hexadecimal value that corresponds to the number of bytes in the
payload section.
Warning
The header indicates only the length of the payload section. The first transmitted byte
is the most significant byte of the “Length” value”.
2.3.1 Overview
In the following description, the commands involved (open, send, receive, listen, and close)
are those of the underlying transport protocol used (TCP/IP). Device_IO does not redefine these
commands. The names used below (open, send, receive, listen, and close) are generic
names representing the corresponding available system calls. Consequently, the calls described
below only show their Device_IO parameters. The transport protocol parameters (such as
socket pointers) are not shown in the generic description of the calls.
To open a communication with a Device_IO server, an application must call the Device_IO
server. Two parameters must be provided:
The name of the machine on which the server is running;
The (TCP/IP) port number corresponding to the Device_IO server.
Once TCP communication with the server has been established, the name of the target service
must be communicated (message_1) to the Device_IO server in order to establish a link
between the calling client and the requested service.
As a reply, the server must send one or two messages. The first message (message_2) contains
the connection status and, when the communication attempt has been successful, a second
message (message_3) specifies whether the call has been accepted or rejected.
TCP connection
Connec
Message_1
tion
establis
Message_2 h.
phase
Message_3
Ti
m
e
Data
exchan
ge
Message_5 (ex: cmd 51)
phase
Message_5 (cmd 1000-ACK)
After the communication link is established, messages can be exchanged (message_5) between
the client (here: the SMS) and the Device_IO server.
If, for any reason, the SMS does not receive either message_2 or message_3 within a specified
time-out period (e.g.: 30 seconds) when the communication is established, the SMS should
close the communication and retry later. The same rule applies if the connection status returned
by message_2 is different than “SUCCESS” or if the answer code returned by message_3
indicates that the call is rejected.
There are four different message types in the Device_IO protocol. The next sections present the
different messages and the way they should be used.
This is the first message sent by the client (the SMS) to the Device_IO server.
Message_1
Syntax Size (byte) Format Description
Len 2 hex Message length in bytes (see section 2.2.3).
op_mode 1 r_hex Data transfer operation mode
0 = Normal data transfer
ob_name_len 1 hex Length of the object name attribute (in bytes).
ob_name ob_name_len text Name of the applicative service with which the
connection should be established.
Ob_name is a string of bytes at least one byte long
and at most 32 bytes long:
1 <= ob_name_len <= 32. This name is compulsory
but its content is up to the client (ex: “SMS_GWY”).
This message is a response from the Device_IO server to the client (in this case: the SMS); the
message validates the connection.
Message_2
Syntax Size (byte) Format Description
Len 2 hex Message length in bytes. In this case, the
length is always 1 byte.
connect_status 1 r_hex Connection status. Refer to the table below for
applicable values.
Connect_status
Value Identifier Description
0 CONNECT_FAILURE The connection has failed for any unexpected reason
6 SUCCESS The operation has been successfully completed.
This message is a response from the Device_IO server, which validates the connection with the
other process (in our case: the SMSgw).
Message_3
Syntax Size (byte) Format Description
len 2 hex Message length in bytes. In this case, the
length is always 1 byte.
answer_code 1 r_hex 0: call accepted
1: call rejected
Note
The content of this section is command–specific: refer to the format described in
sections 4.9 to 4.12.8.
3. SMS-SMSgw connections
3.1 Overview
The figure below illustrates the connections used by the SMS and the Nagravision SMSgw. As
depicted in the figure, a connection can be seen as a data channel. On the same channel,
commands follow one direction, while the opposite direction is followed by the corresponding
responses (ack or nack). An ack response means that the incoming command is correctly
formatted and it has been successfully processed. A nack response means that either the
format or the data structure of the command is not appropriate or that the command has
encountered problems during processing in the system.
Several SMS may be connected to the same port, as shown in the following figure:
SMS 1
Command port
SMS 2
SMS 3
Each connection established between the SMS and the Nagravision CAS has a source identifier.
Each connection must have its own source identifier and it is not possible for two connections to
share the same source identifier at any given time. The source identifier of a connection is given
by field source_id in the header of each message sent from the SMS to the CAS.
Each transaction number used must be unique during the life of the corresponding connection.
The transaction number is given by a field in the header of each message sent from the SMS to
the CAS. Transaction numbers are necessary to determine which commands have been
processed successfully (ack, command 1000) and which commands have not (nack, command
1001).
During periods of inactivity on the SMS-CAS interface, the SMS must periodically send command
1002 on command port (EMM/Control) to the CAS. The main reason for that recommendation is
that intelligent network devices (such as switches or firewalls) may not keep idle TCP
connections open indefinitely. Nagravision recommends that command 1002 be sent every 5
minutes on command port.
Each time the SMS opens a connection on either the EMM/Control port, it must first generate
command 1002.
4. SMS commands
4.1 Specification
The SMS sends commands to the CAS. In response, the CAS sends acknowledgment messages
back to the SMS. Of course, the acknowledgment messages are reported on the same
communication channel as the corresponding commands.
Note
The system will not behave as expected if the following values are not handled
correctly:
– transaction_id
– source_id
– dest_id
The protocol used between the SMS and the CAS is asynchronous. Several SMS commands may
be sent before acknowledgement messages are received. In other words, there is no need to
wait for the acknowledgement of a command before sending the next commands to the CAS.
Important
The SMS may receive the acknowledgement messages in a different order than the
order in which the corresponding commands have been sent. However, for an
individual smart card, the sequence of EMMs follows the sequence of SMS commands.
Please also note that at the end of the transmission chain, i.e. at the device (smart
card or Set Top Box / CAK), the sequence of commands is not guaranteed.
4.2 Metrics
Metric Value range (typical)
Connection The EMM/Control port may accept up to 10 connections each.
SMS commands The CAS can process from 4 up to 10 SMS EMM and control commands
per second over the EMM/Control channel, with actual figures depending
on the capacity of the CAS hardware.
Note
Those metrics depend on factors such as system architecture and processing power;
they are provided here merely as an order of magnitude.
Although product validity dates are generally expressed in UTC, if the IMS product definition
specifies that validity dates are in local time and if the validity dates are specified by the SMS,
then the validity dates provided by the SMS will be interpreted in the subscriber’s local time.
Therefore, for fields begin_date and end_date in SMS commands 2, 902, 903 and 905, the
comment must be changed so as to specify generally in UTC rather than UTC.
4.4 Identifiers
This section contains descriptions of all identifiers used throughout this document.
ID Definition
circuit_id A number uniquely identifying a video/audio/data stream.
command_id The identifier of an SMS command. The content of this field forms part of the
command. The value of command_id is covered by the SMS documentation
for all commands, which is covered by the IMS or CC documentation.
Conditional_add_id Identifier of the conditional add product to be broadcast.
dest_id The identifier of the addressed SMS command. It is entered at system
configuration.
Host_id STB id for a point of development (POD).
IMS_event_id An IMS-generated identifier for individual events. It is entered using the IMS
editor or generated when the EPG data feed is processed.
IMS_product_id The identifier of a product in the IMS. It is the only product identifier known
to the IMS.
MOP_PPID The identifier of the management operator (MOP). This identifier is provided
by Nagravision at system configuration.
Network_id DVB network identifier.
POD_id Point of development identifier (i.e. PCMCIA module).
Service_id DVB service identifier.
SMS_product_id A product identifier for use by the SMS. It is provided and managed by the
SMS. It is entered into the system by the SMS Gateway through commands
300, 303, 305 or 307.
source_id An identifier specifying the source of SMS commands. This identifier is
entered into the system at system configuration.
STB serial number The hardware serial number of the STB.
STU_number This Nagravision STB number is used to identify the STB in the CA system,
for pairing purposes.
Transport_id DVB transport identifier.
Table 4-1: Identifiers
The event_name or product_name field is characterized by its fixed size length. The useful
section of the field is a string of (ASCII printable) characters. The remaining part of the field
must be padded with space characters (value: 0x20).
Because the previous version of the SMS Gateway document indicated that the field must be
padded with series of 0x00 bytes, the CAS will continue to accept incoming SMS commands
that follow the 0x00-padded format. However, any new development in the SMS must follow the
rule regarding the space characters.
When the SMS uses filler character 0x00, the drawback for the CAS system is that the traces of
the incoming SMS command become corrupted in the log file are corrupted. This is because the
value 0x00 is considered as an end-of-string indicator.
On the other hand, the 0x00 byte does not affect the individual CAS applications processing the
SMS commands.
The purpose of the event_name or product_name data provided in the SMS command is for the
STB menu to show a description of the available product.The CAS shall be configured to work in
one of the two following modes:
Mode 1, in which the SMS controls the product name:
The event or product name provided by the SMS (commands 10, 902, 903 and 905)
is used to prepare the EMM data. If the length of the product name is equal to 0, the
product name will be taken from the CAS database.
Note that for SMS command 2 and for subscription products in commands 902, the
event name cannot be specified and it is therefore always taken from the IMS.
Mode 2, in which the IMS controls the product name:
The product name provided by the SMS is ignored. It is overwritten by the
corresponding value that is available in the CAS database.
The price of a product is usually provided by the SMS (as in command 10 for instance).
Remember: this price is a value that will be displayed by the STB to inform the end user about
the cost of a given product, i.e. it is for information purposes only. However, when the SMS
cannot provide the price value, the CAS can replace it with a value set in the IMS database. The
operational mode is configurable in the CAS.
Note
This is not applicable to subscription products.
Important
For SMS commands in global addressing mode, the smart card records are not
updated in the CAS database, except if a special feature is enabled to update the
CAS database under global addressing. If this feature is enabled, only a subset of the
SMS commands accepted with global addressing will trigger a CAS database update.
The table below provides the addressing modes supported for each SMS command.
Addressing mode
CID Description Unique Shared Global
EMM commands (0nn)
2 Add Product X X X
4 Product Suspension X
5 Product Reactivation X
6 Product Cancellation X X X
7 All Products Cancellation X X
Addressing mode
CID Description Unique Shared Global
10 Add Event Product X X X
20 Suspend Subscriber ICC X X
21 Reactivate Subscriber ICC X X
23 Suspend all ICC features X X
24 Reactivate all ICC features X X
25 Suspend all ICC features with Delay X X
35 Create Operator X
36 Cancel Operator X
46 Set Segments X X
47 Set Aphanum Zip Code X
48 Set Zip Code X
50 Cancel ICC X
51 Initialize Card X
52 Pair the ICC with the STB X
53 Clear PIN Code X
69 Send Generic IRD Command X X
79 Force Tune X X
84 Send PRM Credentials X X
96 Purge PPV and IPPV Records X
99 Send Generic IRD Command II X X
Control commands (1nn)
104 Create ICC On Call Collector X
105 Cancel ICC On Call Collector X
110 EMM cleanup X
122 Set Network X
123 Trigger Broadcast of Conditional EMM X X
125 Set Subscriber Private Data X
126 Assign Virtual UA to NUID X
127 Get all products X
Macro EMM commands (9nn)
902 Activate Smart Card Without Return Path X
903 Add List of Products X X X
904 Cancel List of Products X X X
905 Add Enhanced List of Products X X X
908 Set Families of Products X
909 A-la-carte management X
925 4.6.1 Set a-la-carte services 4.6.2
Note
If the SMS Gateway receives an SMS command it does not supported either generally
or for the given addressing mode (shared or global), the SMS command will be
rejected with a ‘BAD_COMMAND_SYNTAX’ error code and an
‘EXTERNAL_SYSTEM_ERROR’ error code extension.
Note
The SMS command will be rejected with a ‘BAD_PRODUCT_TYPE’ error code and a
‘NO_EXTENDED_ERROR_CODE’ error code extension in the following cases:
• The product type is not supported for the SMS command (e.g.: PPV products
cannot be added using SMS command 2).
• The product type is incompatible with the addressing mode (e.g.: rental PPV
products cannot be added in shared or global addressing mode).
Note
The SMS command will be rejected with a ‘NOT_AUTHORIZED’ error code and a
‘NO_EXTENDED_ERROR_CODE’ error code extension in the following cases:
• The product PA type is not consistent with the MOP PA type (e.g.: subscription
products under PA per Operator cannot be added to a MOP to which PA per Operator
does not apply).
• The product PA type is incompatible with the addressing mode (e.g.: subscription
products under PA per Operator cannot be added in shared or global addressing
mode).
4.7.1 Products
The table below shows the different kinds of products available in DLK and the commands that
can be used to handle each of them.
SMS commands Product
Cmd Label
SUB
Flexible Sub
PPV
Short term sub
A la carte
ID
2 Add Product X X
SMS commands Product
Cmd Label
SUB
Flexible Sub
PPV
Short term sub
A la carte
ID
4 Product Suspension X X
5 Product Reactivation X X
6 Product Cancellation X X X X
7 All Products Cancellation X X X X X
10 Add Event Product X X
78 Refresh Smart Card X X
902 Activate Smart Card Without Return P V V
Path
903 Add List of Products P V
904 Cancel List of Products X X X X
905 Add Enhanced List of Products P P V V
908 Set Families of Products X 1
1
Only available for subscription products associated to a family before the migration to the ‘a-la-carte’
product. After the migration, only the SMS commands 909 and 925 should be used to manage ‘a-la-carte’
product.
4.8 Headers
Any message has the following structure:
Root header common to all commands
(see section 4.8.1 Root header below)
Address EMM CTRL Operation
header 4.8.2 4.8.3 4.8.4
Command body cmd 0nn cmd 1nn cmd 10nn and 20nn
4.9 4.9.25 4.12.5
The next section details the internal structure of the three modules (root header, address
header and command body).
4.8.1 Root header
The error codes (nack messages) applicable to this part of the command are listed below.
Important
As indicated in the table above, the format of the bitmap field is r_text. However, it
does not contain a regular string: it is not a text field, such as “this is a sentence with
characters and 1 2 3 4 numerical values”. The data in the bitmap field is a sequence
of hexadecimal numbers encoded in a text format. Consequently, the field will only
accept alpha characters A, B, C, D, E, F representing the numbers 10 to 15 in a
hexadecimal form.
As an example – the CAS will accept the following bitmap value:
A0BCD12A29327B9F. In this example, bitmap_length is equal to 8.
Note
The broadcast_start_date is always used by the SAS, except when handling family
products (in which case it is replaced by the current start date). If it is in the past
then it is set to the current date and time, otherwise it is used as is. The
broadcast_end_date is always ignored (unless the SAS has been explicitely configured
to use it) and rather computed using the broadcast_start_date and adding the
duration specified in the broadcasting profile associated to the SMS command
(association between SMS command and broadcasting profile is configurable at SAS
level). It is recommended to set the broadcast_start_date in the past or to the
current date and time. This allows a better control of the EMM bandwidth. Please do
not confuse the broadcast period that specifies the period when the EMM are
broadcasted, with the right validity period that specifies when a right is valid. The error
codes (nack messages) applicable to this part of the command are listed below.
The error codes (nack messages) applicable to this part of the command are listed below.
The error codes (nack messages) applicable to this part of the command are listed below.
Usage Note
For new development, it is advised to use SMS command 905 (Add Enhanced List of
Products) instead of SMS command 2.
The SMS uses this command to add a service entitlement in a smart card for a certain product.
Important
Command 2 must not be used to authorize a PPV. Command 10 should be used
instead.
SMS command 2 will be rejected if the MOP is suspended (by means of SMS
command 20) or if the SOP is suspended (by means of SMS command 23).
Usage Note
It is not advised to use this command for new developments. Use command 20
(Suspend Subscriber ICC) instead.
The SMS uses this command to suspend a service or PPV entitlement in a smart card for a
certain product.
The end user will not be able to watch the corresponding services or PPVs until the SMS sends a
product reactivation command. Command 4 may be used when there is a payment problem
with the end user.
Important
This command shall not be used for A-la-carte subscription products.
Usage Note
It is not advised to use this command for new developments. Use command 21
(Reactivate Subscriber ICC) instead.
The SMS uses this command to reactivate a service or PPV entitlement in a smart card in cases
where the entitlement has previously been suspended with command 4 (Product Suspension).
The end user will then be able to watch the corresponding services or PPVs again.
Important
This command shall not be used for A-la-carte subscription products.
Copyright © 2014 Nagravision. All rights reserved. Confidential and privileged information. 35
CONFIDENTIAL
Owner: Fabiano Galimberti
CONFIDENTIAL
Nagravision SMS Gateway
Usage Note
It is not advised to use this command to cancel more than one product at once. Use
command 904 (Cancel List of Products) instead.
The SMS uses this command to remove an entitlement from a smart card for a certain product.
This command is applicable to entitlements that have been purchased through the SMS.
Important
When several instances of the same product are created on the smart cards,
command 6 cancels all instances of this product.
This SMS command will be rejected if the MOP is suspended (by means of SMS
command 20) or if the SOP is suspended (by means of SMS command 23). This
important fact applies only to products within a product family (A la carte subscription
products).
Copyright © 2014 Nagravision. All rights reserved. Confidential and privileged information. 36
CONFIDENTIAL
Owner: Fabiano Galimberti
CONFIDENTIAL
Nagravision SMS Gateway
The SMS uses this command to remove all types of entitlements from a smart card.
Copyright © 2014 Nagravision. All rights reserved. Confidential and privileged information. 37
CONFIDENTIAL
Owner: Fabiano Galimberti
CONFIDENTIAL
Nagravision SMS Gateway
Usage Note
For new development, it is advised to use SMS command 905 – Add Enhanced List of
Products – instead of SMS command 10.
The SMS uses this command to add an entitlement to an event product in a smart card. Event
products are typically movies showing on a certain channel at a certain date and time.
Important
The purge mechanism will delete event products when the event product date meets
the purge date condition.
PPV entitlements recorded in the end user’s smart card should be deleted using either
a background EMM cleanup command or SMS command 96 (Purge PPV and IPPV
Records).
The CAS does not alter the data in the event_name field of the command. The data
is transmitted as it is in the smart card. The STB then displays the data as it displays
the EIT (Event Information Table) data. Consequently, the SMS must format this
string in accordance with the specification of the character set used by the STB.
The event_name string must also include control characters. Consequently,
the number of displayable characters is reduced accordingly.
This SMS command will be rejected if the MOP is suspended (by means of SMS
command 20) or if the SOP is suspended (by means of SMS command 23).
Copyright © 2014 Nagravision. All rights reserved. Confidential and privileged information. 38
CONFIDENTIAL
Owner: Fabiano Galimberti
Field Error codes Error code extensions
IMS_product_id BAD_PRODUCT_STATUS CANCELLED_PRODUCT
IMS_product_id BAD_PRODUCT_STATUS SUSPENDED_PRODUCT
IMS_product_id BAD_PRODUCT_STATUS INVALID_PURCHASE_DATE
IMS_product_id BAD_PRODUCT_TYPE DRAFT_PRODUCT
IMS_product_id PPV_PURCHASE_NOT_ALLOWED NO_EXTENDED_ERROR_CODE
length_event_name BAD_COMMAND_SYNTAX LENGTH_TOO_LONG
length_event_name BAD_COMMAND_SYNTAX BAD_NUMBER_FORMAT
price BAD_COMMAND_SYNTAX BAD_PRICE_FORMAT
UA UA_NOT_FOUND NO_EXTENDED_ERROR_CODE
UA CANCELLED_CARD NO_EXTENDED_ERROR_CODE
UA SUSPENDED_CARD NO_EXTENDED_ERROR_CODE
UA UA_LOCKED_WHILE_EXCHANGED NO_EXTENDED_ERROR_CODE
UA EXCHANGED_CARD NO_EXTENDED_ERROR_CODE
None DATABASE_ERROR BAD_PARAM_IN_CASDB
MOP_PPID INVALID_PPID ISD_MOP_NOT_FOUND
MOP_PPID SUSPENDED_MOP NO_EXTENDED_ERROR_CODE
MOP_PPID DATABASE_ERROR DATA_ERROR
4.9.7 Command 20: Suspend Subscriber ICC
SAS replaces original MOP by SOP no
The SMS uses this command to suspend all entitlements in a smart card for an individual MOP.
However, depending on the configuration of the head end, viewing the “free access” services
may or may not be possible once the relevant MOP is suspended.
Important
In order to reactivate a MOP, the SMS must use command 21.
The SMS can still continue to send EMM command to a deactivated smart card (no error will be
returned).
The SMS uses this command to reactivate all entitlements for an individual MOP.
Copyright © 2014 Nagravision. All rights reserved. Confidential and privileged information. 41
CONFIDENTIAL
Owner: Fabiano Galimberti
CONFIDENTIAL
Nagravision SMS Gateway
The SMS uses this command to suspend all features in a smart card, i.e. all entitlements to
services and PPVs, as well as entitlements to free access services.
Important
In order to reactivate smart card features, the SMS should use command 24.
The SMS can still continue to send EMM commands to a deactivated smart card (this will not
cause any errors).
UA UA_NOT_FOUND NO_EXTENDED_ERROR_CODE
UA CANCELLED_CARD NO_EXTENDED_ERROR_CODE
UA EXPIRED_CARD NO_EXTENDED_ERROR_CODE
UA UA_LOCKED_WHILE_EXCHANGED NO_EXTENDED_ERROR_CODE
UA EXCHANGED_CARD NO_EXTENDED_ERROR_CODE
Copyright © 2014 Nagravision. All rights reserved. Confidential and privileged information. 42
CONFIDENTIAL
Owner: Fabiano Galimberti
CONFIDENTIAL
Nagravision SMS Gateway
The SMS uses this command to reactivate all entitlements to services and PPVs in a smart card,
as well as the entitlements to the free access services.
UA UA_NOT_FOUND NO_EXTENDED_ERROR_CODE
UA CANCELLED_CARD NO_EXTENDED_ERROR_CODE
UA EXPIRED_CARD NO_EXTENDED_ERROR_CODE
UA UA_LOCKED_WHILE_EXCHANGED NO_EXTENDED_ERROR_CODE
UA EXCHANGED_CARD NO_EXTENDED_ERROR_CODE
Copyright © 2014 Nagravision. All rights reserved. Confidential and privileged information. 43
CONFIDENTIAL
Owner: Fabiano Galimberti
CONFIDENTIAL
Nagravision SMS Gateway
The SMS uses this command to schedule a smart card suspension. At the date and time
specified, command 25 suspends all features in a smart card, i.e. all entitlements to services
and PPVs, as well as the entitlements to free access services.
Important
To reactivate smart card features, the SMS should use command 24.
The SMS can still continue to send EMM commands to a deactivated smart card (this will not
cause any errors).
UA CANCELLED_CARD NO_EXTENDED_ERROR_CODE
UA EXPIRED_CARD NO_EXTENDED_ERROR_CODE
UA UA_LOCKED_WHILE_EXCHANGED NO_EXTENDED_ERROR_CODE
UA EXCHANGED_CARD NO_EXTENDED_ERROR_CODE
Copyright © 2014 Nagravision. All rights reserved. Confidential and privileged information. 44
CONFIDENTIAL
Owner: Fabiano Galimberti
CONFIDENTIAL
Nagravision SMS Gateway
The SMS uses this command to add a new MOP zone in a smart card.
This command is used only when there are several operators sharing device (smart card or Set
Top Box / CAK) for independent Pay-TV operations.
For the relevant operator, this command must precede any other command such as command 2
(Add Product).
The SMS can send this command several times without damaging the entitlements already
stored in the smart card.
Important
In a single-MOP environment, this command should not be used because each new
smart card already contains a pre-defined MOP zone for the unique operator.
The purpose of this command is not to render a smart card pristine: this
command does not perform any cleanup in the smart card.
With a foreign smart card, SMS command 35 will be rejected.
Copyright © 2014 Nagravision. All rights reserved. Confidential and privileged information. 45
CONFIDENTIAL
Owner: Fabiano Galimberti
CONFIDENTIAL
Nagravision SMS Gateway
The SMS uses this command to remove a MOP zone and all its associated data from a smart
card.
Important
This command will indirectly remove all entitlements and the entire record currently
stored in the device (smart card or Set Top Box / CAK) for a given operator.
Copyright © 2014 Nagravision. All rights reserved. Confidential and privileged information. 46
CONFIDENTIAL
Owner: Fabiano Galimberti
CONFIDENTIAL
Nagravision SMS Gateway
The SMS use this command to set or update the segments in the device (smart card or Set Top
Box / CAK).
Note
The segments can be used to address a subset of all the subscribers.
This command contains only the segment changes, and therefore the segments not
specified in the command remain unchanged.
The method to reset a segment is to set to 0 the segment subcategory of the given
segment category.
Copyright © 2014 Nagravision. All rights reserved. Confidential and privileged information. 47
CONFIDENTIAL
Owner: Fabiano Galimberti
CONFIDENTIAL
Nagravision SMS Gateway
The SMS uses this command to set or update the zip code on the device (smart card or Set Top
Box / CAK). Command 47 is also used when the subscriber moves to a different location.
Note
The zip code is used for blackouts.
Copyright © 2014 Nagravision. All rights reserved. Confidential and privileged information. 48
CONFIDENTIAL
Owner: Fabiano Galimberti
CONFIDENTIAL
Nagravision SMS Gateway
The SMS uses this command to set or update the zip code of the smart card. The zip code
information is primarily used for blackout.
Important
For countries that use a different zip code scheme (such as zip codes with more than
five digits or alphanumeric zip codes), the operator should create a lookup table that
translates the local zip code format into zip code format of the SMS.
Copyright © 2014 Nagravision. All rights reserved. Confidential and privileged information. 49
CONFIDENTIAL
Owner: Fabiano Galimberti
CONFIDENTIAL
Nagravision SMS Gateway
The SMS uses this command to permanently disable a device (smart card or Set Top Box /
CAK). Command 50 is sent when a device is taken out of operation (for instance, when a device
is reported to be stolen, lost, or damaged).
The SMS is not allowed to use a cancelled device again because the device is not recoverable
after the cancellation operation.
The UA is flagged as cancelled and deactivated in the CAS database. For that reason, any
incoming commands addressed to this device will remain unacknowledged by the CAS system.
Important
The effect of this command in the smart card is not reversible. In other words, the
device will be permanently decommissioned.
Copyright © 2014 Nagravision. All rights reserved. Confidential and privileged information. 50
CONFIDENTIAL
Owner: Fabiano Galimberti
CONFIDENTIAL
Nagravision SMS Gateway
The SMS uses this command to initialize the MOP zone of a new device.
The SMS must issue this command prior to any other command except in the 2 following cases:
SMS targets a virtual UA: SMS ‘126-Assign Virtual UA to NUID’ shall first issue to link
virtual UA to NUID.
System manages multiple networks: SMS ‘122-Set Network’ shall be issued before this
command to allow routing generated EMM on the network of the targeted device (UA or
virtual UA).
The CAS will reject all other commands it receives before processing of command 51
successfully completes.
The initialization of a device can occur several times and has no effect on the entitlements
stored in the device.
Important
The purpose of this command is not to reset the device content, i.e. this command
does not perform any cleanup in the device.
This command does not refurbish a smart card in any way.
This command creates the MOP specified in its header. Therefore, even when the
command has SOP privileges, the PPID of the MOP must be specified in the header of
the command (rather than the PPID of the SOP).
Copyright © 2014 Nagravision. All rights reserved. Confidential and privileged information. 51
CONFIDENTIAL
Owner: Fabiano Galimberti
CONFIDENTIAL
Nagravision SMS Gateway
The SMS uses this command to pair a smart card with the STB.
This command is mandatory and must be sent before any services can be authorized.
Before pairing can take place, the smart card must have been previously initialized with
command 51.
Important
For virtual UA, this command was no effect on the device. IRDSN will be stored in
CAS database only.
STU_number is a 14-digit string representing a decimal value.
STU_number can be in one of the following formats:
– A 10-digit string followed by 4 space characters, ranging from “0000000000 ” to
“4294967295 ”
– A 14-digit string ranging from 00000000000000 to 00004294967295
The un-pairing action is performed with the same command, with STU_number set
to “0000000000” or 00000000000000.
The value of STB_number as provided in the command coming from the SMS must
not include any checksum.
Copyright © 2014 Nagravision. All rights reserved. Confidential and privileged information. 52
CONFIDENTIAL
Owner: Fabiano Galimberti
CONFIDENTIAL
Nagravision SMS Gateway
The SMS uses this command to reset the PIN code of the STB to its default factory value. In
other words, the new PIN code value to which this command forces the STB is not always 0000.
Also, note that it is the design of individual STBs that determine which features or menus will be
protected by the PIN code.
Important
For STBs with a Nagravision CAK and when strong pairing is used:
– Unlike the other commands described in this document, command 53 is sensitive to
the pairing status of the smart card and the STB: when the SMS sends command 53 to
an individual STB, it will only work if the STB is paired with its smart card.
– The pairing function is achieved with command 52.
Copyright © 2014 Nagravision. All rights reserved. Confidential and privileged information. 53
CONFIDENTIAL
Owner: Fabiano Galimberti
CONFIDENTIAL
Nagravision SMS Gateway
The SMS uses this command to send an IRD command to a decoder. The decoder will execute
an operation based on the instruction in the IRD command (e.g.: set the network ID, force
tune, etc.). In other words, this command is not intended to modify the data in the device
(smart card or Set Top Box / CAK), but rather to have the decoder execute an action. To
complement command 69, the CAS provides a secure transport mechanism between the head
end and the STB.
Important
This command is applicable to native Nagravision STBs with a CAK. For other STBs,
refer to command 99 (section 4.9.25).
For STBs with a Nagravision CAK when strong pairing used: unlike the other
commands described in this document, command 69 takes into consideration the
pairing status of the smart card and the STB: command 69, when sent to an
individual STB, will work only if the STB is paired with its smart card. The pairing
takes place using command 52.
The data structure that the CAS sends to the STB is described below. The SMS Gateway
computes fields “sequence_number” and “checksum” for the convenience of the SMS: the SMS
does not provide these two parameters.
command_body{
sequence_number 32 uimsbf
command_id 8 uimsbf
operation 8 uimsbf
for (i=0;i<N;i++){
data 8 uimsbf
}
checksum 8 uimsbf
}
As explained above, the purpose of an IRD command is to provide the decoder with a message
that will instruct the decoder to execute an action (e.g.: reset the PIN code). The command_id
and operation parameters provided to the decoder contain two indexes that indicate which
subroutine the decoder should execute.
Nagravision provides STB manufacturers with a list of command_id and operation values for
a list of specific actions. This document is entitled “Conditional Access Kernel – IRD Command
Specification” (see reference [2]).
Copyright © 2014 Nagravision. All rights reserved. Confidential and privileged information. 54
CONFIDENTIAL
Owner: Fabiano Galimberti
Command 69: Send Generic IRD Command
Field Size Format Description
command_id 4 r_num command_id = 0069
IRD_command_id 3 r_num The command_id field of IRD command_body.
Range: 000 to 255
IRD_operation 3 r_num The operation field of IRD command_body.
Range: 000 to 255
IRD_data_length 2 r_num Length of the useful portion of the IRD_data
field, in bytes. Range: 00 to 48
IRD_data 96 r_text Hexadecimal data coded in the ASCII format.
The string must be transferred in full
(96 characters representing 48 bytes).
However, only the first IRD_data_length bytes
on the left will be included in the data field of
the IRD
command_body.
In this example, IRD_data_length is 6. The following figure shows the detailed string of
bytes in the buffer that should be sent by the SMS. Note that the remaining byte of field
IRD_data must be filled with zero characters (0x30 in a hexadecimal form).
The SMS uses this command to force the STB to tune to a given TV program (i.e. a service).
The SMS identifies this service using three parameters. For a detailed description, refer to the
DVB specifications.
network: the DVB network of the service
transport: the transport ID of the service within the network
service: the program number to which the STB must tune within the transport
Important
For backward compatibility, the CAS supports the following fields in both a decimal
and a hexadecimal data format:
– Network_id
– Transport_id
– Service_id
The SMS provides data in either a decimal (mode 1 as illustrated below) or a
hexadecimal format (mode 2). The default CAS package complies with mode 1. For
mode 2, a special CAS package should be installed.
Important
For STB with a Nagravision CAK when strong pairing used: unlike the other
commands described in this document, command 79 takes into account the pairing
status of the smart card and the STB: command 79 will work only if the STB is paired
with its smart card.
The SMS uses this command to send credentials to the PRMLib hosted on a decoder. The PRMLib
will execute an operation based on the credentials instruction (ex: provide a VOD license to
STB, etc.). In other words, this command is not intended to modify the data of the device
(smartcard or Set Top Box / CAK), but it is intended to start an action executed by the decoder.
The CAS provides with this command a secure transport mechanism between the head-end and
the STB.
Important
This command can only be used to send a PRM credentials to a STB having a
Nagravision CAK (i.e. it cannot be used with MediaGuard STB without Nagravision
CAK). The CAS does check the STB context to accept or reject this SMS command.
This command carries the credentials using IRD commands. Thus this command can
only be processed once the STB is correctly paired with the device (smart card or Set
Top Box / CAK). The pairing means either “strong pairing” or “secured channel”.
The pairing function is achieved with command 52.
Important
As indicated in the table above, the format of the credentials field is r_text. However,
it does not contain a regular string: it is not a text field, such as “this is a sentence
with characters and 1 2 3 4 numerical values”. The data in the bitmap field is a
sequence of hexadecimal numbers encoded in a text format. Consequently, the field
will only accept alpha characters A, B, C, D, E, F representing the numbers 10 to 15
in a hexadecimal form.
As an example – the CAS will accept the following credential value:
A0BCD12A29327B9F. In this example, credentials_len is equal to
8.
List of error codes:
Field Error codes Error code extensions
command_id BAD_COMMAND_SYNTAX EXTERNAL_SYSTEM_ERROR
command_id BAD_COMMAND_SYNTAX BAD_NUMBER_FORMAT
credentials_op_id BAD_COMMAND_SYNTAX BAD_NUMBER_FORMAT
credentials_len BAD_COMMAND_SYNTAX BAD_NUMBER_FORMAT
credentials BAD_COMMAND_SYNTAX BAD_DATA_FORMAT
UA UA_NOT_FOUND NO_EXTENDED_ERROR_CODE
UA CANCELLED_CARD NO_EXTENDED_ERROR_CODE
UA UA_LOCKED_WHILE_EXCHANGED NO_EXTENDED_ERROR_CODE
UA EXCHANGED_CARD NO_EXTENDED_ERROR_CODE
4.9.24 Command 96: Purge PPV and IPPV Records
SAS replaces original MOP by SOP no
The SMS uses this command to purge individual smart cards from PPV, SUB, EPR or IND record
data that match a deletion condition. The two examples below illustrate how this command
works:
Example 1: to purge old PPV records stored in device (smart card or Set Top Box / CAK) when
end users complain that their device is full.
Example 2: to prevent useless PPV records from filling up the device (smart card or Set Top Box
/ CAK). This can be seen as a preventive cleanup task. In this example, each time an end user
calls the SMS center for additional credit, the SMS will issue command 96.
The SMS is responsible for correctly managing these parameters: the CAS system cannot verify
the coherence of these parameters.
The SMS uses this command to send an IRD command to a decoder. The decoder will execute
an operation based on the instruction in the IRD command (e.g.: set the network ID, force
tune, etc.). In other words, this command is not intended to modify the data in the device
(smart card or Set Top Box / CAK), but rather to have the decoder execute an action. To
complement command 99, the CAS provides a secure transport mechanism between the head
end and the STB.
Important
Use this command to send an IRD command to an STB with a CAK.
For native Nagravision STBs with a CAK, IRD commands can only be processed once
the STB is correctly paired with the smart card (here the term “pairing” means either
“strong pairing” or “secure channel”).
For STBs with a Nagravision CAK when strong pairing is used: unlike the other
commands described in this document, command 99 takes into consideration the
pairing status of the smart card and the STB: command 99 will work only if the STB
is paired with its smart card.
Important
As indicated in the table above, the format of the IRD_data field is r_text. However, it
Copyright © 2014 Nagravision. All rights reserved. Confidential and privileged information. 62
CONFIDENTIAL
Owner: Fabiano Galimberti
does not contain a regular string: it is not a text field, such as “this is a sentence with
characters and 1 2 3 4 numerical values”. The data in the IRD_data field is a
sequence of hexadecimal numbers encoded in a text format. Consequently, the field
will only accept alpha characters A, B, C, D, E, F representing the numbers 10 to 15
in a hexadecimal form.
As an example – the CAS will accept the following IRD_data_byte value:
A0BCD12A29327B9F. Therefore, the value of IRD_data_length is 8.
The following describes the structure of the data sent to the STB. The SMS gateway computes
fields sequence_number and checksum for the SMS: the SMS does not provide these two
parameters.
command_body{
sequence_number 32 uimsbf
command_id 8 uimsbf
operation 8 uimsbf
for (i=0;i<N;i++){
data 8 uimsbf
}
checksum 8 uimsbf
}
As explained above, the purpose of an IRD command is to provide a message that will instruct
the decoder to execute an action (e.g.: set the network ID). The command_id and operation
parameters provided to the decoder contain two indexes that indicate which subroutine the
decoder should execute.
Nagravision provides STB manufacturers with a list of command_id and operation values for
a list of specific actions. This document is entitled “Conditional Access Kernel – IRD Command
Specification” (see reference [2]).
The following describes the structure of the data sent to the STB. The SMS Gateway computes
field sequence number (named index in the MG terminology) for the SMS: the SMS does not
provide this parameter.
command_body{
type 8 uimsbf
sequence_number 8 uimsbf
for (i=0;i<N;i++){
data 8 uimsbf
}
}
As explained above, the purpose of an IRD command is to provide a message that will instruct
the decoder to execute an action (e.g.: reset the PIN code). The type parameter provided to
the decoder contain an index that indicate which subroutine the decoder should execute.
Nagravision provides STB manufacturers with a list of type values for a list of specific actions.
This document is entitled “Mediaguard DVB Header Specification & Clear EMM Specification”.
4.10 CONTROL commands (1nn)
Commands of the 1nn series are used to set the data that is related to a subscriber but not sent
to the device (smartcard or Set Top Box / CAK). The data provided in 1nn commands is stored
in the CAS database. This means that the data is persistent.
4.10.1 Command 104: Create ICC in Call Collector
The SMS uses this command to create a new ICC record in the CAS database.
Important
This command is redundant with respect to command 51: Initialize Smart Card. This
command is supported solely for the sake of backward compatibility with SMS
packages operating under DN2 systems. Consequently, new SMS–CAS interfaces
should not use this command.
The SMS uses this command to cancel an existing device record in the CAS database. This
command should be issued when the device is deleted from the SMS database.
Important
The end user’s records in the CAS database are cancelled. As a result of this
command, the CAS will accept no more SMS commands.
The SMS uses this command to delete all EMMs in the CAS and EMM broadcaster for an
individual device (smart card or Set Top Box / CAK). This command should be used when a
discrepancy is suspected between the SMS customer data and the EMMs for this customer.
Command 122 sets or updates the CAS network ID and the STB context associated with the
ICC.
In an advanced broadcast system, there are several data paths for the EMMs. The CAS network
ID is one of the CAS parameters that allow setting this data path.
In non-Nagravision native STBs, the external format of the EMMs is different. The STB context
value allows the CAS system to specify the appropriate EMM external format.
Note
If the device does not yet exist in the SAS database, this command will create an
entry for the device.
When several CAS networks or STB contexts are applicable to a single head end, this
command must be the first command issued by the SMS for a new device. Otherwise,
the EMMs generated by the SMS commands will either not be routed to the
appropriate CAS network or not be processed by the STB (the EMMs will be in the
wrong external format).
If the CAS network changes, the EMMs that are still broadcast over the previous CAS
network will not move to the new CAS network.
This command triggers the start of the broadcast of a conditional add product previously built
using a tool such as CAS Console.
Note
The conditional add product must previously be defined using a tool such as CAS
Console.
The conditional add product is tested in U and S addressing modes using CAS
Console; CAS Console then builds the EMM in G (global) addressing mode. The EMM
is not broadcast until this SMS command triggers the start of the broadcast.
The SMS uses this command to store subscribers’ private data in the CAS database. The data is
provided in a string. The format of that string is specified by the SMS. The CAS is only used for
storing the data: it does not check the format or content of the data, neither does it process on
the data in any way. This command is typically used to store the account number.
Important
When the SMS issues this command, any previous value stored in the CAS database
is overwritten by the new value.
The subscriber data is not altered by the CAS. The data is stored as it is in the CAS
database.
The subscriber data must only contain printable characters.
There is no SMS command provided for retrieving the subscribers’ private data.
The SMS uses this command to associate a Virtual UA to NUID and get this one in the
acknowledgment command returned by CAS (see SMS ‘1003-Acknoledge Command with Virtual
UA’).
The CAS assigns a virtual UA to NUID (and stores the link into CAS database) if NUID is not
already linked to virtual UA. Else, it returns the virtual UA already linked to NUID.
Important
This command shall be sent for the devices without smart card only. And it shall be
the first SMS command sent. The device could not be initialized if this command is
not sent before.
The SMS uses this command to request a list of all the products owned by a subscriber for the
MOP indicated in the root header field MOP_PPID.
That information comes from the CAS database. If the command can be executed successfully,
the acknowledgement and result is provided with SMS command 1004 "Acknowledge command
with data".
The device suspended flag (type 0x00). Only present if the device is suspended.
One product properties block for each product (type 0x01). This block contains:
o The product suspended flag (type 0x03). Only present if the product is
suspended.
o The a-la-carte product services (type 0x04). Only present if the product is an
a-la-carte product.
o The start date (type 0x05). Only present for a-la-carte products.
o The end date (type 0x06). Only present for a-la-carte products.
The example of SMS command 1004 shows a typical answer for this SMS command.
Important
Read the Important note under command 2, 10, 13, 48, 49, 52, 61, 100, 101
If the CAS must generate a negative acknowledgement (i.e. nack) upon processing
this SMS command, the body of the command will be truncated to 999 characters
long before being inserted in field ‘command_section’ of the negative
acknowledgement.
Usage Note
For new development, it is advised to use SMS command 905 (Add Enhanced List of
Products) instead of SMS command 903.
The SMS uses this command to add a list of new products (service products, non-impulsively
purchasable event products and package products) in a smart card.
Important
Read the Important note under command 2, 10, 13, 48, 49, 52, 61, 100, 101
If the CAS must generate a negative acknowledgement (i.e. nack) upon processing
this SMS command, the body of the command will be truncated to 999 characters
long before being inserted in field ‘command_section’ of the negative
acknowledgement.
The SMS uses this command to cancel a list of products (entitlements of services or/and PPV)
from a device (smart card or Set Top Box / CAK).
Important
Read the Important note under command 6.
The SMS uses this command to add a list of new products (service products, non-impulsively
purchasable event products and package products) into a device (smart card or Set Top Box /
CAK).
Important
Read the Important note under commands 2, 10 and 903.
A “re-hit purchase” is a case where customers purchase a product through the SMS,
and later complain that they do not have access to the requested product. The SMS
command is issued a second time. The SMS/SAS must make sure that the subscriber
will only have access to the same content and validity period as initially granted by
the first SMS command.
If the CAS must generate a negative acknowledgement (i.e. nack) upon processing
this SMS command, the body of the command will be truncated to 999 characters
long before being inserted in field ‘command_section’ of the negative
acknowledgement.
Copyright © 2014 Nagravision. All rights reserved. Confidential and privileged information. 81
CONFIDENTIAL
Owner: Fabiano Galimberti
Command 905: Add Enhanced List of Products
Field Size Format Description
command_id 4 r_num command_id = 0905
nb_of_products 2 r_num Number of products provided in this command.
Range: 00 to 99
for(i=0; i<nb_of_products; i++) { A counter.
IMS_product_id 12 num IMS product ID
Range: 000000000000 to 004294967295
purchase_mode 1 r_text A flag specifying whether the product purchase is a new
purchase (P) or a re-hit of the product ®.
This flag is only used with Merlin smart cards: it is ignored
with Aladin smart cards (the value is overwritten as P).
This flag is only applicable to multi-instance products
where the validity dates are specified by the SMS (Flexible
Subscription and PPT by points products). With other
product types (regular subscriptions and PPT by coins
products), the flag is ignored.
With Flexible Subscription and PPT by points, the SMS
command handling is as follows:
A new purchase creates a new instance of
the product.
A re-hit retrieves the active instances of the product
in the smart card and recreates the latest
purchased instance of the product. If no active
instance is found, then the SMS command will be
handled as a new purchase.
begin_date 8 YYYYMM Subscription begin date (generally in UTC). The
DD subscription is not valid before this date.
begin_time 6 HHMMSS Subscription begin time (generally in UTC). The
subscription is not valid before this time.
end_date 8 YYYYMM Subscription end date (generally in UTC). The subscription
DD is not valid after this date.
end_time 6 HHMMSS Subscription end time (generally in UTC). The subscription
is not valid after this time.
length_product_name 2 r_num The length of valid data in the product_name field. It
must not exceed 30 bytes. This is due to storage
limitations in the smart card.
product_name 32 Text The product name as displayed in the PPV purchase history
in the STB user interface. The number of characters must
match the length specified in length_product_name. The
remaining bytes should be padded with space characters.
See special note in section 4.5.1.
price 5 num The price of the product. Range: 000.00 to 999.99
}
nb_of_ppv 2 r_num The number of PPV products included in this command.
Range: 00 to 99
Continued…
Command 905: Add Enhanced List of Products (continued)
Field Size Format Description
for(i=0; i<nb_of_ppv; i++) { A counter.
IMS_product_id 12 Num The IMS product ID.
Range: 000000000000 to 004294967295
purchase_mode 1 r_text A flag specifying whether the product purchase is a new
purchase (P) or a re-hit of the produ®(R).
This flag is only used with Merlin smart cards: it is ignored
with Aladin smart cards (the value is overwritten as P).
This flag is only applicable to multi-instance products
where the validity dates are specified by the IMS (N of M
products) or computed by the SAS at purchase time
(rental PPVs and PPFPs), as well as to coin products. With
rental DVR products, the flag is ignored and the SMS
command is handled as a new purchase. With other
product types (short-term subscriptions and PPVs), the
flag is ignored.
With N of M products, the SMS command is handled as
follows:
A new purchase creates a new instance of
the product.
A re-hit retrieves the latest purchased instance in
the smart card and recreates the same instance
of the product. If no instance is found, then the
SMS command will be handled as a new purchase.
With rental PPV and PPFP products, the SMS command is
handled as follows:
A new purchase creates a new instance of
the product.
A re-hit retrieves the active instance of the product
in the smart card and recreates the same instance
of the product. If no active instance is found, then
the SMS command will be handled as a new
purchase.
With coin products, the SMS command is handled as
follows:
A new purchase adds the amount of credit
associated with the product to the credit level in
the smart card.
A re-hit sets the credit figure in the smart card to
the current absolute value of the smart card credit
level.
length_product_name 2 r_num The length of valid data in the product_name field. It
must not exceed 30 bytes. This is due to storage
limitations in the smart card.
product_name 32 text The product name as displayed in the PPV purchase history
in the STB user interface. The number of characters must
match the length specified by length_product_name. The
remaining bytes should be padded with space characters.
See special note in section 4.5.1.
price 5 num The price of the product. Range: 000.00 to 999.99
}
List of error codes:
Field Error codes Error code extensions
command_id BAD_COMMAND_SYNTAX EXTERNAL_SYSTEM_ERROR
UA UA_NOT_FOUND NO_EXTENDED_ERROR_CODE
UA CANCELLED_CARD NO_EXTENDED_ERROR_CODE
UA SUSPENDED_CARD NO_EXTENDED_ERROR_CODE
UA UA_LOCKED_WHILE_EXCHANGED NO_EXTENDED_ERROR_CODE
UA EXCHANGED_CARD NO_EXTENDED_ERROR_CODE
MOP_PPID INVALID_PPID ISD_MOP_NOT_FOUND
MOP_PPID SUSPENDED_MOP NO_EXTENDED_ERROR_CODE
MOP_PPID DATABASE_ERROR DATA_ERROR
nb_of_products BAD_COMMAND_SYNTAX BAD_NUMBER_FORMAT
IMS_product_id BAD_COMMAND_SYNTAX BAD_IMS_PRODUCT_ID_FORMAT
IMS_product_id PRODUCT_NOT_FOUND NO_EXTENDED_ERROR_CODE
IMS_product_id BAD_PRODUCT_TYPE PPV_PRODUCT
IMS_product_id BAD_PRODUCT_TYPE RECULAR_PRODUCT
IMS_product_id BAD_PRODUCT_TYPE DRAFT_PRODUCT
IMS_product_id BAD_PRODUCT_STATUS CANCELLED_PRODUCT
IMS_product_id BAD_PRODUCT_STATUS SUSPENDED_PRODUCT
IMS_product_id BAD_PRODUCT_STATUS INVALID_PURCHASE_DATE
IMS_product_id PPV_IN_THE_PAST NO_EXTENDED_ERROR_CODE
IMS_product_id PRODUCT_INCONSISTENT NO_EXTENDED_ERROR_CODE
IMS_product_id PPV_PURCHASE_NOT_ALLOWED NO_EXTENDED_ERROR_CODE
begin_date BAD_COMMAND_SYNTAX BAD_DATE_FORMAT
purchase_mode BAD_COMMAND_SYNTAX BAD_PURCHASE_MODE
begin_date BAD_COMMAND_SYNTAX BAD_DATE_SEQUENCE
begin_time BAD_COMMAND_SYNTAX BAD_TIME_FORMAT
end_date BAD_COMMAND_SYNTAX BAD_DATE_FORMAT
end_date BAD_COMMAND_SYNTAX BAD_DATE_SEQUENCE
end_time BAD_COMMAND_SYNTAX BAD_TIME_FORMAT
length_product_name BAD_COMMAND_SYNTAX LENGTH_TOO_LONG
length_product_name BAD_COMMAND_SYNTAX BAD_NUMBER_FORMAT
price BAD_COMMAND_SYNTAX BAD_PRICE_FORMAT
4.12.5 Command 908: Set Families of Products
SAS replaces original MOP by SOP no
This command is for managing a-la-carte products but using the syntax of the subscription
family products as they were defined in Merlin 3.0 or earlier..
The SMS uses this command to specify an exhaustive list of services (identified by their
products ID) for a subscriber. The subscriber will only be granted access to products listed
within the relevant product family. In other words, if a subscriber previously had access to a
product and the product was later removed from the list, the customer would then be denied
access to this product.
No dates are supported for this command: the services are immediately available and will be
available until a cancel command is issued (either another 908 with less services or one of SMS
commands supporting a-la-carte products such as SMS 7, 909 or 925).
Important
This SMS command will be rejected if the MOP is suspended (by means of SMS
command 20) or if the SOP is suspended (by means of SMS command 23).
Note that each "service" (also called service_index in this command) may represent one or
several channels, depending on how the services were configured in IMS.
This operation works in two different ways, depending on whether the renew field is set
to Y or N. If renew option is set to N:
o If the new expiration date is the same as the previous one and renew is not set,
this operation has no effect.
o If the new expiration date is earlier than (or equal to) the schedule date, all
scheduled services are immediately cancelled.
o If the new expiration date is earlier than (or equal to) the current date, all
services (scheduled or not) are immediately cancelled.
If the renew option is set, two use cases are supported (other cases are rejected):
o Case 1: The previous TE is expired. in that case the new TE is in the future and
all services that belonged to the subscriber before this expiration, the expired
services (if any) re immediately renewed and will be available until the new
expiration date.
o Case 2: The previous TE is not expired and the new TE is the same. This case
means that a 'rehit' operation is done, resending the full a-la-carte
Define or modifies the scheduled date of an a-la-carte product. This determines the date
when the next product updates (add/cancel scheduled) will occur.
If the new schedule date is earlier than (or equal to) the current date and the expiration
date is in the future, all scheduled services become immediately available.
If the new schedule date is later (or equal to) the expiration date, all scheduled services
are cancelled.
Add a service immediately. The service will be available immediately and will be
available until the expiration date defined with the 'Set expiration date' operation.
Cancel a service immediately. The service will immediately be cancelled. It will also be
cancelled if it was scheduled to start at the date defined by the 'Set schedule date'
operation.
Add a service at the schedule date. The subscriber will only be able to access the service
at the scheduled date, and it will be available until the expiration date is reached (which
is infinite if it has never been defined).
If the schedule is earlier than or equal to the current date, the command is rejected.
If the schedule date is earlier than or equal to the current date, the operation is
rejected.
The order of operations is important and the result will be the same as if each operation had
been issued sequentially in consecutive SMS 909 commands. It is however much more efficient
to regroup multiple operations for the same UA in a single command.
Notes
if the expiration date has never been set, any add/cancel operation will be rejected. The
value 1.1.2038 00:00:00 defines an infinite product duration.
if the schedule date has never been set, any schedule command will be rejected. The
value 1.1.2038 00:00:00 cancels the schedule date.
This command defines completely and exhaustively the contents of the a-la-carte product of a
subscriber, including the dates.
Note that each "service" may represent one or several channels, depending on how the services
were configured in IMS.
Important
This SMS command will be rejected if the MOP is suspended (by means of SMS
command 20) or if the SOP is suspended (by means of SMS command 23).
An expiration date of 1.1.2038 00:00:00 means 'infinite duration'
A schedule date of 1.1.1992 00:00:00 means there is no schedule date. In that case
there must not be any services listed as scheduled
If the schedule date is higher than or equal to the expiration date, it is considered as
1.1.1992, i.e. schedule date is disabled
Bitmap =
3E4 Length_bitmap = 0003
3 E 4
Bitmap 00 11 11 10 01 00
12 34 56
Service Nr 7 8 ….
The CAS and the SMS use this command to acknowledge a command issued by the other side of
the interface. Field “transaction_number” identifies the corresponding command that has been
processed successfully.
Important
Fields IMS_product_id and SMS_product_id are no longer applicable since the
series of cmd 3nn is not supported by the interface. Consequently, these fields will
be set to 000000000000 and 000000000000 respectively.
The command specified could not be completed because it is either REJECTED or POSTPONED. A
rejected command is a consequence of a mistake in the command format or in the command
processing. A postponed command is a consequence of a CAS system that is busy.
Important
When a command is POSTPONED, the SMS should resubmit the command after a
delay of 60 min. Note that the resubmitted command should be identified with a new
transaction id.
The SMS should send this command in the following two conditions:
While the SMS opens a channel.
While there is no activity, i.e. no command to send or receive. The period should be 5 min.
The CAS uses this command to acknowledge the SMS command ‘126-Assign Virtual UA to NUID’
issued by the SMS and to return the virtual UA that SAS has linked to given NUID.
Field “transaction_number” identifies the corresponding command that has been processed
successfully.
This command is a positive acknowledgement returned in answer to some SMS commands such
as SMS 127 (the description of the SMS command mention this point explicitly when SMS 1004
is used as a response instead of the usual SMS commands 1000 or 2000). In addition to
signaling that the command was processed succsessfully, it also returns additional information
to the SMS.
The returned information varies depending on the input command. The exact list of information
that can be returned is indicated in the section describing the command.
Value - the value itself. The value format is described in tha table below depending on
its tag. Its length was provided in the Length part of the triplet.
Important
Tags which are not supported by the SMS shall be ignored. This allows upgrading the
CAS with new information without necessarily having to modify the SMS whenever
new tags are deployed.
The following command 1004 is returned in answer to an SMS 127 "Get all products":
000052758050001000214121211220121004735963126000680000010101000B02000400004E
200300010101000D020004000061A804000340C002
A suspended smartcard
o services 1 and 5 will be available next update (service 1 replaces service 12)
The CAS uses this command to acknowledge a command issued by the SMS when the
broadcasting mode specified in the Address Header of the EMM command or control command is
of type E (EMM via Portal). Field “transaction number” identifies the corresponding command
that has been processed successfully.
Important
As indicated in the table above, the format of the emm_data field is r_text. However,
it does not contain a regular string: it is not a text field, such as “this is a sentence
with characters and 1 2 3 4 numerical values”. The emm_data field contains a
sequence of hexadecimal numbers encoded in a text format. Consequently, the field
will only accept alpha characters A, B, C, D, E, F representing the numbers 10 to 15 in
a hexadecimal form.
As an example – the CAS will accept the following data:
A0BCD12A29327B9F. Therefore, the value of emm_data_length is 8.
4.13.7 Command 2001: EMM via Portal Negative-Acknowledge command
The command specified could not be completed because it is either REJECTED or POSTPONED. A
rejected command is a consequence of a mistake in the command format or in the command
processing. A postponed command is a consequence of a CAS system that is busy.
An error code is always followed by an error code extension (possibly extension 0000:
NO_EXTENDED_ERROR_CODE). The error codes and extensions available are indicated in the
following tables.
Reasons:
The SMS command ‘126-Assign Virtual UA
to NUID’ was not sent
Or the given virtual UA is not the virtual UA
returned in the acknowledgment of the
SMS 126.
NUID_OUT_OF_RANGE 0077 NUID is out of range for the operator.
NO_VUA_AVAILABLE 0078 All vUA defined in the system were already assigned
to NUID. A new range of vUA shall be deployed.
COMMAND_NOT_SUPPORTED 0079 The sent SMS command is not supported.
DATE_MISMATCH 0081 A check to ensure date consistency failed. The error
extension sometimes provides more information to
identify which date was being checked.
NUID_BLACKLISTED 0084 An NUID was blacklisted and therefor the pairing is
not done
Table 5-1: Error codes
5.2 Table of Error code extensions
6.1 Definitions
The mandatory information to allow a CAS to fully recognize an individual customer is:
UA Unique address of the smart card. This is a 12-digits long number that
uniquely identifies the smart card. The first 10 digits represent the address
itself; the last 2 digits are a checksum allowing the SMS to verify the
number given by the customer. The preferred (but not mandatory) format
is:
nn nnnn nnnn cc This number is printed and bar-coded on the smart card and is normally
accessible through a set-top box menu on the TV screen.
CA-S/N Conditional access serial number. This is a 12-digits long number that
uniquely identifies the set-top box for the conditional access system. The
first 10 digits represent the serial number; the last 2 digits are a checksum
allowing the SMS to verify the number given by the customer. The
preferred (but not mandatory) format is:
nn nnnn nnnn cc This number may be printed (and possibly bar-coded) on a sticker on the
set-top box and is normally accessible through a set-top box menu on the
TV screen.
This number may differ (and usually differs) from the manufacturing S/N,
which identifies the set-top box for the manufacturer himself. We had to
use a common format throughout the system and different numbers for all
set-top boxes whatever the format chosen by the manufacturer.
The pairing operation links a smart card with a set-top box. The pairing operation is mandatory.
Without the pairing operation, the end user’s STB does not work and IRD commands cannot be
forwarded by the smart card to the STB.
On the other hand, the set-top box manufacturer has the responsibility to provide files
containing the list of set-top boxes effectively produced. Those files must contain a list or range
of CAS/N. If needed by the customer, those files may provide a link between the CAS/N and the
manufacturing S/N for each box, but this is not requested by the Nagravision system.
Nagravision may possibly provide the range of CAS/N allocated for each manufacturer but has
no view on what is effectively produced.
No IP Options
TCP - Transport Control Protocol
Source Port: Destination Port: Sequence Number:1090
Ack Number:
ff-fms Offset:
Reserved: 20000 sms_gateway
Code: 55595
Window: Checksum: Urgent Pointer: No TCP Options
1524200407
TCP Data Area:
Extra bytes (Padding): 5 (20 bytes)
%000000
%010000 Ack
8760
0x11EB
0
No more data.
......00 00 00 00 00 00
FCS - Frame Check Sequence
FCS (Calculated):0x62217FDC
Copyright © 2014 Nagravision. All rights reserved. Confidential and privileged information. 114
CONFIDENTIAL
Owner: Fabiano Galimberti
Packet #4 Flags: Status:
0x00
0x01
Packet Length:69
Timestamp:18:04:12.485934 10/09/2001
Ethernet Header
Destination:08:00:2B:C5:7E:2A
Source:00:C0:F0:3D:7F:9D
Protocol Type:0x0800 IP
IP Header - Internet Protocol Datagram Version:4
Header Length:5 (20 bytes) Type of Service:%00000000
Precedence: Routine,Normal Delay,Normal Throughput,Normal Reliability Total Length:51
Identifier:63599
Fragmentation Flags: %010 Do Not FragmentLast Fragment Fragment Offset:0 (0 bytes)
Time To Live:128
Protocol:6 TCP - Transmission Control Protocol
Header Checksum:0x80E2 Source IP Address:192.168.0.31
Dest. IP Address:192.168.0.3
No IP Options
TCP - Transport Control Protocol
No more data.
......00 00 00 00 00 00
FCS - Frame Check Sequence
FCS (Calculated):0xB161CF21
Packet #7 Flags:
0x00
Status:0x01 Packet Length:64
No more data.
......00 00 00 00 00 00
FCS - Frame Check Sequence
FCS (Calculated):0x22659BEF
Copyright © 2014 Nagravision. All rights reserved. Confidential and privileged information. 117
CONFIDENTIAL
Owner: Fabiano Galimberti
Whole network packet, interpreted:
—— END OF DOCUMENT ——
Glossary