Академический Документы
Профессиональный Документы
Культура Документы
Version 1.0
Release 4
Index
Chapter 1
Overview
1-1
Introduction
1-1-1 About LynxCrypt100 CAS_SMS
1-1-2 LynxCrypt100 CAS_SMS System Architecture
1-1-3 LynxCrypt SMS 100 System Block Diagram
1-2
Block Diagram of the SMS Interface system
1-2-1 Brief description of the SMS Interface system
1-2-2 Block Diagram of Database and Open SMS Interface
1-2-3 Lynx100 Subscription management System (SMS) Specification
1-2-4 The Lynx100 SMS Client Software operation menu
1-2-5 Snapshot of the Operation list in SMS Client
1-3 Link Function Communications Protocol
1-4 Interface Commands and SMS Operations List
1-5 ASCII Code
Chapter 2
Interface Link Commands
2-1 Introduction
2-2 Get System Time (70)
2-3 Get Headend Status and Version (71)
Chapter 3
Subscription Management Command
3-1 Introduction
3-2 Stop/Resume Card (20)
3-3 Add Customer ( 21)
3-4 Edit Customer ( 22)
3-5 Delete Customer (23)
3-6 Add/Update Card (24)
3-7 Exchange Card (25)
3-8 Delete Card ( 26)
3-9 Add Subscription (27)
3-10 Cancel Subscription (28)
Chapter 4
Chapter 5
Chapter 6
Operand Definition
Chapter 7
Return Code Definition
Appendix A The Execution Note of the SMS System
Chapter 1
Overview
1-1
Introduction
This Interface specification is provided for a third party who wants to link their billing
system to Lynx100 CAS/ SMS system.
In the linking situation, both Lynx100 SMS database and 3 rd party billing database are
working simultaneously.
This interface is implemented with executable .exe software, called SMS Agent.exe,
which runs in Lynx100 CAS SMS server. The Interface Agent software listens to the
interface port, which is RS232 COM port, processes the link command from the billing
system, and returns a command response message to the billing system.
The Interface Agent software processes the link command from the billing system. The
process operations include parsing the command, transferring the data structure to match
Lynx100 SMS database, accessing the database, waiting the response from Lynx100 SMS
database, and finally translating the response message to follow the specification for the
billing system.
The main function of interface is to provide link transaction commands and responses to
the billing system to synchronize the pay-tv base authorization subscription in both ends.
Other link transactions will be added based on customer requests in the future.
The Billing system is not supposed to refresh STBs authorization. This task is
performed by the Lynx100 CAS SMS system.
The reader must study the document thoroughly before trying to link the systems.
This specification provides a complete description of all the transactions that make up the
interface between LynxCrypt100 CAS/SMS System and any third partys billing system.
This document explains protocols, transactions, and commands required for the interface.
Examples are added for better understanding.
1-2
The EMM packet includes the instant authorization, the normal refresh authorization, the
OSD/Mail messages, the STB Control commands, as well as some special ECM packages.
The SMS Client Stations read and write the database to initialize the SMS system data,
to define the subscriber information structure, channel provider, channel, and package, and
finally make a subscription bill by combining structured subscribers information,
purchased packages, and purchased dates of subscription. It also edits OSD/Mail messages
to be sent to a unique STB or a district (or group) of STB or all STBs.
The SMS Interface Agent works as SMS Client station but implements interface to a 3rd
party billing system, instead.
The transaction between SMS Interface Agent and the Billing system are a variety of
commands from the billing system as well as return code and data responded from the SMS
interface Agent.
1-2-2
10
1-2-3
11
12
13
**The first character following a CR is assumed to be the start of the next transaction.
Each Data Block is composed differently for each command and is described in detail in
the relative command section in this document.
**The second field AP can be an accumulating Add checksum or a static Approvecode,
which is used to confirm a correct communication.
**The Approvecode can be configured in the SMS Agent Config.inf configuration file, and
is default to ASCII characters 12 (value=4950(dec.)).
15
[Flexibility]
16
- Billing Agent
701234567812CR
( Operation description)
1.Billing Agent sends command to
SMS Agent)
The data string appearing in the COM port is 3730313233343536373831320D in
hexadecimal value or 55484950515253545556495013 in decimal value.
2. SMS Agent processes the
command.
00701234567812CR ----------
- Billing Agent
701234567823CR
( Operation description)
1.Billing Agent sends command to
SMS Agent)
18
The table in the next page lists the commands that the SMS (Interface) Agent can support
now or in the future.
20
Command List
Code
SMS
SMS
Billing
SMS
See
Client
Agent
Agent
Default
Page
70
71
20
Add Customer
21
Edit Customer
22
Delete Customer
23
Add Card
24
Exchange Card
25
Delete Card
26
Add Subscription
27
Cancel Subscription
28
Update Subscription
29
:Must, : Optional, Y: supported; X: Not support : Per Request : in newer version;
21
SMS
Client
SMS
Agent
Billing
Agent
SMS
Default
Operator Account
--
System Log
--
Date Format
--
COM port
--
Operator Code
--
Operator Name
--
Send Interval
--
--
--
Enable/Disable Fingerprint
Left
System Parameters
--
Basic Setting operations ( Billing System must match with SMS System)
District Setting
X
Postal code Setting
ID Type Setting
Channel Setting
Package Setting
Provider Setting
22
See
Page
Operation List
Code
SMS
SMS
Billing
SMS
See
Client
Agent
Agent
Default
Page
Renew Subscription
Finish Subscription
Stop Subscription
Change Sub_Name
Change Sub_Alias
Change Sub_sex
Change Sub_IDType
Change Sub_ID
Change Sub_District
Change Sub_Postal
Change Sub_address
Change Sub_Phone
Change Sub_Mobile
Change Sub_Email
Delete STB
Sub_STB_Slave
Temporarily STOP/Resume
Advanced Operation command
23
Char
Dec
Hex
Description
NUL
SOH
STX
ETX
^@
^A
^B
^C
00
01
02
03
00
01
02
03
null
start of heading
start of text
end of text
EOT
ENQ
ACK
BEL
^D
^E
^F
^G
04
05
06
07
04
05
06
07
end of transmission
enquiry
acknowledge
bell
BS
TAB
LF, NL
VT
FF, NP
^H
^I
^J
^K
^L
08
09
10
11
12
08
09
0A
0B
0C
backspace
horizontal tab
line feed, new line
vertical tab
form feed, new page
CR
SO
SI
DLE
^M
^N
^O
^P
13
14
15
16
0D
0E
0F
10
carriage return
shift out
shift in
data link escape
DC1
DC2
DC3
DC4
NAK
^Q
^R
^S
^T
^U
17
18
19
20
21
11
12
13
14
15
device control 1
device control 2
device control 3
device control 4
negative acknowledge
24
SYN
ETB
^V
^W
22
23
16
17
CAN
EM
SUB
ESC
^X
^Y
^Z
^[
24
25
26
27
18
19
1A
1B
cancel
end of medium
substitute
escape
FS
GS
RS
US
SPACE
^\
^]
^^
^_
28
29
30
31
32
1C
1D
1E
1F
20
file separator
group separator
record separator
unit separator
space
127
7F
delete
DEL
1
2
3
4
1
2
3
4
SOH
STX
ETX
EOT
33
34
35
36
21 !
22 "
23 #
24 $
65 41 A
66 42 B
67 43 C
68 44 D
97 61 a
98 62 b
99 63 c
100 64 d
5
6
7
8
9
5
6
7
8
9
ENQ
ACK
BEL
BS
TAB
37
38
39
40
41
25
26
27
28
29
69
70
71
72
73
101
102
103
104
105
10
11
12
13
A
B
C
D
LF
VT
FF
CR
14
15
16
17
18
E
F
10
11
12
SO
SI
DLE
DC1
DC2
%
&
'
(
)
45
46
47
48
49
E
F
G
H
I
65
66
67
68
69
e
f
g
h
i
42 2A *
43 2B +
44 2C ,
45 2D -
74 4A J
75 4B K
76 4C L
77 4D M
106 6A j
107 6B k
108 6C l
109 6D m
46
47
48
49
50
78
79
80
81
82
110
111
112
113
114
2E
2F
30
31
32
.
/
0
1
2
4E
4F
50
51
52
25
N
O
P
Q
R
6E
6F
70
71
72
n
o
p
q
r
19
20
13
14
DC3
DC4
51
52
33 3
34 4
21
22
23
24
15
16
17
18
NAK
SYN
ETB
CAN
53
54
55
56
35
36
37
38
5
6
7
8
85
86
87
88
55
56
57
58
U
V
W
X
117
118
119
120
75 u
76 v
77 w
78 x
25
26
27
28
29
19
1A
1B
1C
1D
EM
SUB
ESC
FS
GS
57
58
59
60
61
39
3A
3B
3C
3D
9
:
;
<
=
89
90
91
92
93
59
5A
5B
5C
5D
Y
Z
[
\
]
121
122
123
124
125
79
7A
7B
7C
7D
y
z
{
|
}
30
31
1E
1F
RS
US
62
63
3E
3F
>
?
94
95
5E
5F
^
_
126
127
7E
7F
26
27
Chapter 2
2-1 Introduction
The Billing system uses the Interface Link command to link with the SMS system..
The Interface Link commands include:
SMS
Client
SMS
Agent
Billing
Agent
SMS
Default
70
71
See
Page
1-2
70
3-10
[Sample transaction]
Get System Time (70)
70|00000123|
If the return serial number is 00000123.
[Response Format]
The following table lists the format of SMS100 Interfaces response to the Get System
Time command.
Command
Byte (location in Data Block)
1-2
3-4
70
5-12
13-18
Current Date(YYMMDD)
19-24
Current Time(HHMMSS)
[Sample Response]
Get System Time (70)
00|70|00000123|091225|235959| where represents with the Date 2009/12/25, and the Time
23:59:59
1-2
71
3-10
11-12
Device Type
[Sample transaction]
Get Headend Status (71)
71|00000123|IA|
[Device Type]
DB: Database
IA: SMS Interface Agent
DI: Database & SMS Interface Agent
[Response Format]
The following table lists the format of SMS Interfaces response to the Get Headend Status
& Version command.
Command
Byte (location in Data Block)
1-2
3-4
71
5-12
13-14
15-17
18-22
Status, 5 digit/char
[Sample responses]
30
Device is in error
Chapter 3
3-1 Introduction
This chapter describes the commands for subscription management and updating customer.
Command List
Code
SMS
Client
SMS
Agent
Billing
Agent
SMS
Default
20
Add Customer
21
Edit Customer
22
Delete Customer
23
Add/Update Card
24
Exchange Card
25
Delete Card
26
Add Subscription
27
Cancel Subscription
28
Command Description
Subscription Management Command
32
See
Page
Stop/Resume Card
Code
20
Description
A command to temporarily stop a card
of Customer, and resume later.
- When stop, all authorization on the
card will be temporarily stopped, this
card will lose all its services
(everything gets disabled).
-When resume, all authorization stopped
by the last stop card command on the
card will be recovered.
- All subscriptions of the card are not
changed in the database.
Command with fields:
Return Serial number
mode, where 0: Stop; 1: Resume
Card no.
Return: Return Serial number
Add Customer
21
Edit Customer
22
33
See
Page
23
24
Exchange Card
25
34
26
Customer,
- Places into cardstore, and the card no.
is recycled.
- All subscription on the card will be
canceled. This card lose all its services
(everything gets disabled)
Command with fields:
Return Serial number
Card no. (STB Address)
Return: Return Serial number
Add Subscription
27
Cancel Subscription
28
1-2
20
3-10
11
Mode, 1 digit
12-21
[Definition]
Mode
0: Stop,
1: Resume
[Sample transactions]
Stop Card (20)
20|00000123|0|0000056789|
Or
^---- 0: Stop Card mode
Resume Card (20)
20|00000123|1|0000056789|
^---- 1: Resume Card mode
36
1-2
00
3-4
20
5-12
13
Mode, 1 digit
[Definition]
The 8 digits Return serial number is the same as the one of sending command.
[Sample Responses]
Stop/ Card (20)
00|20|00000123|0|
Or Resume Card (20)
00|20|00000123|1|
Restrictions
None.
37
[Support]
LynxCrypt100 SMS V2.2 , V2.5, V3.2 and V3.5
[Format]
The following table lists the format of the Add Customer command.
Command
Byte (location in Data Block)
1-2
21
3-10
21-24
[Definition]
|
->|
39
[Response Format]
The following table lists the format of SMS100 Interface Agents response to the Add
Customer command.
Command
Byte (location in Data Block)
1-2
00
3-4
21
5-12
[Definition]
Where 8 digits return serial number is the same as the one of sending command.
[Sample Response]
Add Customer (21)
00|21|00000123|
Restrictions
None.
40
1-2
22
3-10
21-24
[Definition]
[Sample transactions one]
SMS_Agent_Config.inf document.
Edit Customer (22)
22|00000123|0000012345|0001|JEFF CHEN
| 20 characters
Return serial number is 00000123
Customer No. is 0000012345
District no. is 0001.
41
|
-> |
30 characters
-> |
1-2
00
3-4
22
5-12
[Definition]
Where 8 digits Return serial number is the same one of sending command.
[Sample Response]
Edit Customer (22)
00|22|00000123|
Restrictions
42
1-2
23
3-10
11-20
[Definition]
[Sample transactions]
43
[Response Format]
The following table lists the format of SMS100 Interface Agents response to the Delete
Customer command.
Command
Byte (location in Data Block)
1-2
00
3-4
23
5-12
[Definition]
Where 8 digits return serial number is the same one of sending command.
[Sample Response]
Delete Customer (23)
00|23|00000123|
Restrictions
44
1-2
24
3-10
11-20
21-30
31-32
[Response Format]
The following table lists the format of SMS100 Interface Agents response to the Add Card
command.
Command
Byte (location in Data Block)
1-2
00
3-4
24
5-12
[Definition]
Where 8 digits Return serial number is the same as the one of sending command.
[Sample Response]
Add Card (24)
00|24|00000123|
Restrictions
46
1-2
25
3-10
11-20
21-30
31-40
[Sample transaction]
1-2
00
3-4
25
5-12
[Definition]
Where 8 digits return serial number is the same as the one of sending command.
[Sample Response]
Exchange Card (25)
00|25|00000123|
Restrictions
48
1-2
26
3-10
11-20
49
[Response Format]
The following table lists the format of SMS100 Interface Agents response to the Delete
Card command.
Command
Byte (location in Data Block)
1-2
00
3-4
26
5-12
[Definition]
The 8 digits return serial number is the same as the one of sending command.
[Sample Response]
Delete Card (26)
00|26|00000123|
Restrictions
None
50
1-2
27
3-10
11-24
25-34
35-40
41-46
47-??
[Definition]
Service Begin Date: YY/MM/DD
Service End Date: YY/MM/DD
The list of Package No.: Up to 150 packages can list.
Length of the package no. is default to 3 digits. The length can be configured in the SMS
Agent Config.inf document.
51
[Response Format]
The following table lists the format of SMS100 Interface Agents response to the Add
Subscription command.
Command
Byte (location in Data Block)
1-2
00
3-4
27
5-12
52
[Definition]
Return code: 00 means the command was processed OK.
Return code: 15 means the command was processed with Error.
[Sample Response]
Add Subscription (27)
00|27|00000123|--- represents add subscription successfully.
Restrictions
1. The Order Number of an Add Subscription command must not exist in the SMS database,
that is to say, the Order number of an Add Subscription command must be a new one.
In SMS database definition, a subscriber can own multiple cards; a card can be
authorized with multiple active subscription orders at the same time. So an Add
Subscription command must point out the existing card number and a new order number.
1-2
28
3-10
11-24
25-34
[Definition]
[Sample transactions]
Cancel Subscription (28)
28|00000123|20091200005678|0000056789|
Return serial number is 00000123
Order (Bill) No. is 20091200005678
Card number (STB Address) is 0000056789
This subscription bill will be canceled.
[Response Format]
The following table lists the format of SMS100 Interface Agents response to the Cancel
54
1-2
00
3-4
28
5-12
[Definition]
Return code: 00 means the command was processed OK.
Return code: 15 means the command was processed with Error.
[Sample Response]
Cancel Subscription (28)
00|28|00000123| --- represents cancel subscription successfully.
Restrictions
1. The Order number in this Cancel Subscription command must be same with the order
number of existing subscription order (bill) that this command wants to cancel.
In SMS database definition, a subscriber can own multiple cards; a card can be
authorized with multiple active subscription orders at the same time. So a Cancel
Subscription command must point out the order number and the card number.
2. The Order Number of an Add Subscription command must not exist in the SMS database,
that is to say, the Order number of an Add Subscription command must be a new one.
Chapter 4
55
4-1 Introduction
This chapter briefly describes the operations that SMS Client software configures the SMS
system. These operations are not supported for the billing software.
Code
SMS
Client
SMS
Agent
Billing
Agent
SMS
Default
--
System Log
--
Date Format
--
COM port
--
Operator Code
--
Operator Name
--
Send Interval
--
--
--
System Parameters
--
--
--
Enable/Disable Fingerprint
--
--
--
--
--
--
08
Access Code
Chapter 5
56
See
Page
5-1 Introduction
This chapter describes the operations and commands used to configure the SMS data
structure for the subscriber information and the service.
Code
Description
10
Delete channel
11
Package Setting
Add/Change Package
14
Delete Package
15
57
Page
Command List
Topic
Code
Description
10
Delete channel
11
Validate channel
12
13
Add/Change Package
14
Delete Package
15
Validate Package
16
17
Package Setting
Chapter 6
Operand Definition
58
Page
Bytes
Controlled
by
Lynx100
SMS
Client
Return Code
0~9 digits
Return serial
0~9 digits
1~20
number
Customer number
Default 10
Order number
1~16
Note 1
Default 14
Card number
10
0~9 digits,
Customer name
0~100
Default 20
District No.
1~10
Yes
0~9 digits
Default 4
Begin Date
0~9 digits
End Date
0~9 digits
Default 3
Yes
0~9 digits
[Date/Time]
In this specification the date/time format adapts:
Date: YY/MM/DD
Time: HH:MM:SS
[Device Type]
DB: Database
IA: SMS Interface Agent
DI: Database & SMS Interface Agent
[System Version]
V2.2, V2.5,
[Status]
Ready: Device is ready
Down: Device is busy or not ready
Error: Device is in error
[Customer number]
The SMS system uses the Mapping Table in the database to transfer the customer number
used in the billing system and the subscriber number used in the SMS system.
[Order number]
The SMS system uses the Mapping Table in the database to transfer the order number used in
60
[Card number]
The card number used in the billing system must be the same as STB Address used in the
SMS system. For example, operators licensed STB Address range is 0000000001 ~
0000020000
[Channel]
A Channel is defined as a continuous video, radio, or combined pay-tv program. Free channel
isnt supposed to be taken care of.
[Package]
The package is composed of one or more channels. A channel can appear in different package
at the same time.
The length of the package no. in the command operand field is configured in the SMS
Agent Config.inf document.
The channel(s) make up the package is defined by the SMS Client software.
[Subscription]
The subscription data in SMS database includes a lot of fields. However the data supports the
billing interface only includes:
1. Purchased service Begin Date
2. Purchased service End Date
3. Purchased service Package no. list
Above Begin/End Date adapt format: YY/MM/DD.
[Customer Information]
Customer information data is stored in the SMS database and defined by SMS Client
software. The data supports the billing interface includes:
Slave STB amount, customer name, district no., and phone no.,
Other informations are not supported, including ID_type no., ID, postal code no. customer
address, sex, mobile phone no., Email address, and customer alias.
61
Chapter 7
Topic
Value
Description
00
Timeout
11
12
13
14
Error
15
30
31
32
33
34
Checksum error
35
36
37
38
39
50
51
52
53
54
55
56
57
58
59
60
61
63
Q3. Add/Update card. This command always fails with error 60. Does STB address have to
be in your database? or can I add new STB's. Here is an example of the command and
response:
Sent: 2400000001000000005600000129340073<cr>
Rcvd: 60240000000144<cr>
Ans: Yes, the STB address has to be in the SMS database.
The SMS database is initialized by purchase condition, for example, 5000, 10000,
20000 etc.
65
Q5. I noticed that order number for commands 27 and 28 has to be unique. Would it be
possible to reuse same order number after Cancel Subscription (28) is sent?
For example
command 27 Order No 001 -> command 28 Order No 001 -> command 27 Order No 001.
Right now I get an error on third command.
I already had to split commands so each command is going to send one subscription. That
way we can Cancel any subscription at any time. But we don't have a way to store all those
Order numbers. Any comments on this?
Ans:
1. The Order number in this Cancel Subscription command must be same with the order
number of existing subscription order (bill) that this command wants to cancel.
In SMS database definition, a subscriber can own multiple cards; a card can be
authorized with multiple active subscription orders at the same time. So a Cancel
Subscription command must point out the order number and the card number.
2. The Order Number of an Add Subscription command must not exist in the SMS database,
that is to say, the Order number of an Add Subscription command must be a new one.
3. We strongly suggest to use Stop/Resume command to process the authorization of the
customer if does not give one customer number with multiple card number (STB address).
In this application, operator can add all orders with long term subscription, for example,
giving 5-year or 10-year order, and then use the Stop/Resume command to response the
paying and non-paying. Operators billing system must handle the actual operating records
about subscriber information and subscription bill.
66
67
SMS_Agent_Config.inf
[LenParams]
Return_Code=2
Return_serial_number=8
Customer_number=10
Order_number=14
Card_number=10
Slave_STB_Amount=2
68
[AgentParams]
COM=1
Ver=2.2
AgentActive=True
ApproveCode=91
AutoSave=True
TestMode=False
Protocol=RS232
TCPPort=209
DBConnectTimeOut=
Baud_Rate=9600
Parity=None
Parity_Check=False
Byte_Size=8
Stop_Bits=1
Explanation of SMS_Agent_Config.inf
[LenParams] => The length of parameter, in digit
Return_Code=2 => 2 digits
Return_serial_number=8 => 8 digits
Customer_number=10 => 10 digits
Order_number=14
Card_number=10
Slave_STB_Amount=2
Customer_name=20
District_No=4
Begin_Date=6
End_Date=6
Package_No_List=3
69
Billy :
AgentGldsCommandSQL ServerSQL
SQLAgentGldsSQL
SQLAgent
Glds Error Code
Billy :
Agent DB Connect Time Out
2011/10/14 Added
1. To conform to the following rule from the definitions of our Agent definitions.
1) Must connect with the Agent first, to ensure the connection with RS232 is successfully.
2) Sending Commands needs step by step (AddCustomer AddCard AddSubscription),
each step can go next step only when the preceding step was successful. Otherwise
sending commands will be rejected to process.
3) Sending commands must conform the following rules:
70
c. When sending commands and AddCard were successful, the customers card
needs to be marked to indicate the sending and AddCard were successful, and no
need to send again.
d. If AddCard is unsuccessful, AddSubscription wont be processed.
e. When AddCard and AddSubscription were successful and received the successful
message from Agent, the order needs to be marked to indicate the sending
procedure was successful, and no need to send again.
4) After sending the data, the procedure needs to determine whether there is the
unsuccessful sending data. If yes, the data needs to be resend. Resending must conform
the following rules:
a. Check the customers side to see whether there is the unsuccessful sending data. If
yes, repeat step 3.a - 3.e to send (AddCustomer AddCard AddSubscription).
b. Check the customers card with corresponding customer to see whether there is
the unsuccessful sending card. Only if the customer sent the command
successfully, repeat step 3.c - 3.e to send (AddCard AddSubscription).
c. Check the customers authorization with corresponding customers card to see
whether there is the unsuccessful sending authorization. Only if sending
commands and AddCard were successful, repeat step 3.e to send (AddSubscription).
71
2)when using AddCard command, if the customers card has already existed in the database, Agent will
not build customers card and deem that the customers card is established successfully, and then it will return
success. On the other hand, if the customers card is used by other customer, it will return error code 61
72
73
74