Вы находитесь на странице: 1из 74

Billing Interface Specification of Lynx100

Version 1.0 Release 4

Billing Interface Specification of Lynx100 SMS

Version 1.0
Release 4

Copyright 2009 by Telelynx Inc. All rights reserved.


No part of this document can be copied, reproduced or translated.
It should not be recorded, transmitted or stored in a retrieval system without the prior written
permission of Telelynx Inc.

Billing Interface Specification of Lynx100


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

SMS Configuration Operation


Basic Setting Operation and Command

Chapter 6
Operand Definition
Chapter 7
Return Code Definition
Appendix A The Execution Note of the SMS System

Billing Interface Specification of Lynx100


Version 1.0 Release 4

Chapter 1

Overview

Definition of Key words


The following three items are used in Lynx100 SMS system:
Bill number (or bill no.)
Subscriber number (or subscriber no.)
STB Address (Since Lynx100 is a cardless system, the unique ID is embedded in box)
The following three items are normally used in a Billing system and will be used in this
document.
Order number (or order no.) ---corresponding to Bill number
Customer number (or customer no.) ---corresponding to Subscriber number
Card number (or card no.) ---corresponding to STB Address

Whats new in this version (V1.0, release 4) ?


1. Add new Return Code 61.
2. Make an explanation about SMS Agents response time and the DB Connect Time Out.
3. Make a suggestion of checking status of the RS232 connection and Agent.

Whats new in this version (V1.0, release 2) ?


Remove the red color marks in the Release 1.
The content is same as the Release 1.

Whats new in this version (V1.0, release 1) ?


The following items are new to this version of document (V1.0, release 1):
1. Section 1-3 Link Function Communications Protocol is modified.
2. In Chapter 7, Return Code Definition is updated.
V1.0 Draft: Released for previewing only.
V1.0 release 1: this is the first version of the document. This version mainly provides
interface for a billing system with link transactions to synchronize pay-tv based
authorization subscription in both ends.
The following link transactions are NOT supported in this version:
Channel and Package Setting,
OSD/mail messages,
Time based PPV service.

Billing Interface Specification of Lynx100


Version 1.0 Release 4

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.

Billing Interface Specification of Lynx100


Version 1.0 Release 4
1-1-1 About LynxCrypt100 CAS_SMS
Telelynx introduces a cardless, cost-effective content encryption system, called LynxCrypt
100, to meet the requirement of cable operators who prefer to run a basic, simple encryption
system at the beginning to reduce their front end investment. LynxCrypt 100 uses the
technology of Addressable Software Trap (AST), developed by Telelynx, to encrypt the
channels. LynxCrypt 100 allows operators to shut off the viewing right of subscribers from
the headend.
The set-top box (STB) is programmed in the factory to decode the encryption software from
the transport stream. With this scheme, therefore, any un-authorized STB will not be able
to view any scrambled programs. No smart card is needed in the LynxCrypt 100 system,
leading to a big saving for the operators.
The SMS client software is the main tool to access the database of the Subscriber
Management System. It allows many SMS client accounts to access at the same time. In
other word, many people can do different or same task at different place, at the same time.
Two roles of the SMS client accounts are defined: administrator account and operator
account. The administrator is in charge of the system plan and maintenance; the operator is
assigned to handle daily subscriber information registration, subscription process, and
statistic and statement list. The privileges of the operator can be limited by the administrator.

Billing Interface Specification of Lynx100


Version 1.0 Release 4
1-1-2 LynxCrypt100 CAS_SMS System Architecture
The LynxCrypt 100 cardless Scrambling system head-end includes Re-multiplexers,
Scramblers and QAM modulators, one Data Distributor, and one PC base CA-SMS server to
run LynxCrypt CAS 100 and LynxCrypt SMS 100 applications, and up to a lot of PC base
SMS client stations. Under the coverage of MMDS/CATV, the system operator can deliver
his TV services to authorized subscribers ranging from 2000 up to 1 millions.
The system architecture of LynxCrypt 100 is briefly described in the following diagram.
The DVB compliant scrambling software is built-in into each scrambler; a PC running
Head-end Manager software easily controls the scrambling of the program. A server PC
with built-in SQL database executes encrypted EMMG software to authorize subscribers
package subscriptions. Operators will be able to control each subscriber from the computer in
a simple on-off manner, or sophisticated Subscription Management System (SMS). In the
SMS manner, many SMS client PCs can simultaneously access the database via the network.
The program package is provided to simplify the subscription management.

Billing Interface Specification of Lynx100


Version 1.0 Release 4
1-1-3 LynxCrypt SMS 100 System Block Diagram

Billing Interface Specification of Lynx100


Version 1.0 Release 4

1-2

Block Diagram of the SMS Interface system

1-2-1 Brief description of the SMS Interface system:


Lynx100 CAS SMS system is based on SQL database and adapts client-server structure.
In the Lynx100 system
- The SMS server is a functional SQL server,
- The EMMG is a client, and performs non-stop refreshing authorization to all STBs.
- The SMS Client stations are all clients,
- And the SMS Interface Agent that this document is involved a client, too.
The SMS server receives and saves the input data from the client. Once the SMS data is
confirmed, an embedded CAS and EMMG will secure the data, and deliver the secured
data according to the datas attribute.
The EMMG accesses the database and packs confirmed data into EMM packets and
sends them to an addressed STB through the network. The EMMG sends the authorization
in two manners: instant sending and periodic refresh.

Billing Interface Specification of Lynx100


Version 1.0 Release 4

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.

Billing Interface Specification of Lynx100


Version 1.0 Release 4

1-2-2

Block Diagram of Database and Open SMS Interface

10

Billing Interface Specification of Lynx100


Version 1.0 Release 4

1-2-3

Lynx100 Subscription management System (SMS) Specification:

Subscription management of PAY-TV s subscriber viewing authorization


Base on reliable SQL database and stable Win XP professional or Win Server
Subscriber Size is scaleable from 2,000 up to 1 millions.
Allow multiple SMS clients to access the database at the same time.
Package (tier)- based Subscription.
Max. 150 packages(tiers)
Max. 100 programs per package

---- limited by STB resource


---- limited by STB resource

Support OSD Force Message and TV-Mail


Support real-time temporary Stop/Resume authorization (basic ON/OFF feature)
Support log database to record system operating
Support Billing and Statistics of subscription
Easy Backup of database
Support auto database backup

The outlook of Lynx100 SMS Client software

11

Billing Interface Specification of Lynx100


Version 1.0 Release 4

1-2-4 The Lynx100 SMS Client Software operation menu.

12

Billing Interface Specification of Lynx100


Version 1.0 Release 4

1-2-5 Snapshot of the Operations in the SMS Client

13

Billing Interface Specification of Lynx100


Version 1.0 Release 4

1-3 Link Function Communications Protocol


14

Billing Interface Specification of Lynx100


Version 1.0 Release 4
[Communications Protocol]
The interface between SMS Interface Agent and a billing system is an RS232 cable.
All data are sent as ASCII characters. When SMS100 Interface Agent receives a
message from the billing system, it checks the data, performs the requested action, and
returns a command response or return code.
The transaction procedure between the SMS Agent and the Billing Agent can support
two modes. The first or basic one is based on Wait for Answer mode, which means
Billing Agent sends a Command to SMS Agent, and then wait for the response. The
other (or advanced) mode is Group Command mode, which means Billing Agent
sends a lot of commands once, and wait for the corresponding response, the Return
Serial Number can be used to identify the command and the response.
The RS232 COM port settings for the communication protocol are described as follows:
Speed: 115,200bps.
Data Bit: 8
Checksum: None
Stop bit: 1
Hardware control: None
The RS232 cable is 9-pin D-sub and TX/RX crossover type.
[Format]
The format for SMS100 Interface Agent communication with a billing system is shown as
follows:
-

Data Block, n bytes


AP: represents the Approvecode or Checksum, 2 bytes, is controllable by including
SMS_Agent_Config.inf configuration document.
CR (ASCII Carriage Return, value=13(dec.), 1 byte.

**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

Billing Interface Specification of Lynx100


Version 1.0 Release 4
** The method to calculate the Checksum is the accumulating Add Checksum. The
Checksum is a tailed sum of adding all bytes in the transaction beginning with the first
character and up to, but not including, the Checksum field. The checksum is sent in two
ASCII characters.
[Return Codes]
When the Lynx100 SMS Interface Agent processes a link command, it automatically
returns a command response message to the Billing Agent of the billing system. The SMS
Interface Agents response is in the same format as the transaction from the Billing
Interface Agent: Data Block, Approvecode/Checksum and CR. For all commands, the
response is a 2-byte return code.
[Data Block structure]
The data block structure of the command from the billing Agent is defined as
below:
Command code
+ Return Serial Number
+ n fields regarding this command
The data block structure of the response to the billing Agent is defined as below:
Return (Error) code
+ Return Serial Number
+ n fields regarding this response
[CR]
The CR character (Carriage Return) in the ASCII code is used for the terminator of
the data string.
The value of CR is 13 (decimal) or 0D (hexadecimal). Refer to ASCII code in this
document.
The symbol CR is used to represent the terminator, CR, in all examples of this document.
.

[Flexibility]
16

Billing Interface Specification of Lynx100


Version 1.0 Release 4
The length of commands field can be re-configured within a range. This feature makes a
3rd party billing interface agent easy to implement. The SMS Agent Config.inf document
is open for porting edit. The default of the field length is indicated in every command.
[Checksum]
The process of checksum is described as below.
For data block of character string 7012345678, the operating to the checksum is listed as
below:
The hexadecimal string will be 37 30 31 32 33 34 35 36 37 38.
The Accumulating Add operating is done by hexadecimal adding 37 + 30 + 31 + 32 + 33 +
34 + 35 + 36 + 37 + 38 = 20B(Hex.)
STEPS
37 + 30 = 67
68 + 31 = 98
99 + 32 = CA
CB + 33 =FD
FE + 34 = 131
132 + 35 =166
167 + 36 = 19C
19D + 37 = 1D3
1D4 + 38 = 20B
And then 20B (Hex.) = 523 (Dec.).
And then the lowest two digits, 2 and 3, are used in its ASCII character each.
Then, the above total command will be 701234567823CR

[Communication Flowchart Examples]


17

Billing Interface Specification of Lynx100


Version 1.0 Release 4
Example one:
--- Wait for Answer mode,
--- A = Approvecode, and ASCII characters 12 are used.
SMS Agents ----------------------------

- 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 ----------

3. SMS Agent responds.

The data string appearing in the COM port is 30303730313233343536373831320D in


hexadecimal value or 484855484950515253545556495013 in decimal value.
Example Two:
--- Wait for Answer mode,
--- A = Checksum method is used.
SMS Agents ----------------------------

- Billing Agent
701234567823CR

( Operation description)
1.Billing Agent sends command to
SMS Agent)

The data string appearing in the COM port is 3730313233343536373832330D in


hexadecimal value or 55484950515253545556505113 in decimal value.
2. SMS Agent processes the
command.
00701234567819CR ----------

3. SMS Agents response.

The data string appearing in the COM port is 30303730313233343536373831390D in


hexadecimal value or 484855484950515253545556495713 in decimal value.

18

Billing Interface Specification of Lynx100


Version 1.0 Release 4
[Reference Code of Accumulating Add Checksum]
.
Function ConvertCheckSum(Const CMDStr: String; IsTest: Boolean = False): String;
Var i : Integer;
SumValue : Longint;
begin
//If received CMDStr is terminated by CR, value 0x13.
if IsTest then
// This is the process when Approvecode is used.
Result := Copy(CMDStr, Length(CMDStr) - 2, CheckSumLen)
else begin
//This is the process when Checksum is used
//CMDStr is converted to hexadecimal value, then accumulatively add them.
//The lowest two digits of the resultant are used in its ASCII character.
SumValue := 0;
For i:= 1 to Length(CMDStr) - Length(EndFlag) - CheckSumLen do
SumValue := SumValue + StrToInt( '$' + IntToHex(Ord(CMDStr[i]), 2) );
Result := Copy(IntToStr(SumValue), Length(IntToStr(SumValue)) - 1, CheckSumLen)
end;
end;

1-4 Interface Commands and SMS Operations List


19

Billing Interface Specification of Lynx100


Version 1.0 Release 4
Commands supported in this specification are:
Interface Link Command (in Chapter 2)
Subscription Management Command (in Chapter 3)
SMS Operations supported by Lynx100 SMS system are briefly introduced:
SMS Configuration Operation (in Chapter 4, not supported in this version)
SMS Basic Setting Operation (in Chapter 5, not supported in this version)
SMS Other Operation ((in Chapter 6, not supported in this version)

The table in the next page lists the commands that the SMS (Interface) Agent can support
now or in the future.

20

Billing Interface Specification of Lynx100


Version 1.0 Release 4
The Following table lists the commands that the SMS (Interface) Agent can support now or
in the future.

Command List
Code

SMS

SMS

Billing

SMS

See

Client

Agent

Agent

Default

Page

Interface Link Command


Get System Time

70

Get Headend Status&Version

71

Subscription Management Command


Stop/Resume Card

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

The following commands are not supported in current version.

Update Subscription
29
:Must, : Optional, Y: supported; X: Not support : Per Request : in newer version;

21

Billing Interface Specification of Lynx100


Version 1.0 Release 4
The Following table lists the operations that must be operated via Lynx100 SMS Client.

Operation List in the SMS system


Code

SMS
Client

SMS
Agent

Billing
Agent

SMS
Default

Operator Account

--

System Log

--

Date Format

--

COM port

--

Operator Code

--

Operator Name

--

Send Interval

--

Instant Send count

--

Instant send interval

--

Get FTA Block status

Enable/Disable FTA Block

Get Fingerprint status

Enable/Disable Fingerprint

Set Fingerprint position

Left

Send/ Check OSD Message

Send/ Check Mail Message

SMS Configuration Operation

System Parameters

STB Upgrade Parameters

--

Message Management operations

Basic Setting operations ( Billing System must match with SMS System)

District Setting
X
Postal code Setting

ID Type Setting

STB Model Setting

Channel Setting

Package Setting

Provider Setting

22

See
Page

Billing Interface Specification of Lynx100


Version 1.0 Release 4
The following tables list the operations that must not be operated by Lynx100 SMS
Client when a 3rd party billing system is in operation.

Operation List
Code

SMS

SMS

Billing

SMS

See

Client

Agent

Agent

Default

Page

Subscription Management operations


To Add Customer, Add card(STB Address), Add subscription, and Finish(Delete) /Stop
existing subscription
Add New Subscription

Renew Subscription

Finish Subscription

Stop Subscription

Update Subscriber operations


To change subscribers information, change card, and Stop/Resume card

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

Change the quantity of

Delete STB

Change Subscriber STB

Sub_STB_Slave
Temporarily STOP/Resume
Advanced Operation command

23

Billing Interface Specification of Lynx100


Version 1.0 Release 4

1-5 ASCII Code


ASCII control characters
ASCII reserves the first 32 codes (numbers 031 decimal) for control characters: codes
originally intended not to represent printable information, but rather to control devices (such
as printers) that make use of ASCII, or to provide meta-information about data streams such
as those stored on magnetic tape. For example, character 10 represents the "line feed"
function. ~
Teletypes required that a line of text be terminated with both "Carriage Return" and
"Linefeed".

ASCII Control Code Table


Name

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

Billing Interface Specification of Lynx100


Version 1.0 Release 4
synchronous idle
end of trans. block

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

ASCII printable characters


Code 0x20, the "space" character, and Codes 0x21 to 0x7E, known as the printable characters,
represent letters, digits, punctuation marks, and a few miscellaneous symbols.
ASCII Code Table
Dec Hex Sym
0
0 NUL

Dec Hex Char


32 20

Dec Hex Char


64 40 @

Dec Hex Char


96 60 `

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

Billing Interface Specification of Lynx100


Version 1.0 Release 4
83 53 S
115 73 s
84 54 T
116 74 t

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

Billing Interface Specification of Lynx100


Version 1.0 Release 4
Extension ASCII Code Table

27

Billing Interface Specification of Lynx100


Version 1.0 Release 4

Chapter 2

Interface Link Commands

2-1 Introduction
The Billing system uses the Interface Link command to link with the SMS system..
The Interface Link commands include:

Operation and Command List


Code

SMS
Client

SMS
Agent

Billing
Agent

SMS
Default

Get System Time

70

Get Headend Status&Version

71

Interface Link Command

2-2 Get System Time (70)


28

See
Page

Billing Interface Specification of Lynx100


Version 1.0 Release 4
[Description]
This command allows the billing system to retrieve the current time value in Lynx100
SMS System.
[Format]
The following table lists the format of the Get System Time command.
Command
Byte (location in Data Block)

Description (ASCII Code in Hex.)

1-2

70

3-10

Return serial number, 8 digits

[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)

Description (ASCII Code in Hex.)

1-2

00 (return code of success)

3-4

70

5-12

Return serial number, 8 digits

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

2-3 Get Headend Status and Version (71)


29

Billing Interface Specification of Lynx100


Version 1.0 Release 4
[Description]
This command retrieves the status for all headends on the Lynx100 SMS System.
[Support]
Lynx100 CAS_SMS Version V2.2 and newer
[Format]
The following table lists the format of the Get Headend Status & Version command.
Command
Byte (location in Data Block)

Description (ASCII Code in Hex.)

1-2

71

3-10

Return serial number, 8 digits

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)

Description n (ASCII Code in Hex.)

1-2

00 (return code of success)

3-4

71

5-12

Return serial number, 8 digits

13-14

Device type, 2 digit/char

15-17

Headend version, 3 digit/char

18-22

Status, 5 digit/char

[Sample responses]
30

Billing Interface Specification of Lynx100


Version 1.0 Release 4
Get Headend Status & Version (71)
If the LYNX100s database is not ready:
00|71|00000123|DB|220|Down |
If the LYNX100s SMS Interface Agent is not ready:
00|71|00000123|IA|220|Down |
If the LYNX100 SMS database and Interface Agent run normally:
00|71|00000123|DI|220|Ready|
[Status]
Ready: Device is ready
Down: Device is busy or not ready
Error:

Device is in error

Chapter 3

Subscription Management Command


31

Billing Interface Specification of Lynx100


Version 1.0 Release 4

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

Subscription Management Command


Stop/Resume Card

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

Billing Interface Specification of Lynx100


Version 1.0 Release 4
To Add/Edit/Delete Customer, Add/Exchange/Delete card, Add/Cancel subscription, and
Stop/Resume Customers authorization
Topic

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

A command to add a new Customer.


- add new customer
- Customer Number, Name and District
No. are necessary.
- A unique Customer Number is
necessary to comply with Lynx100
SMS structure, even no subscription is
linked
Command with fields:
Return Serial number
Customer no.
District no.
Customer Name
Return: Return Serial number

Edit Customer

22

A command to update existing


Customers information.
Command with fields:

33

See
Page

Billing Interface Specification of Lynx100


Version 1.0 Release 4
Return Serial number
Customer no.
District no.
Customer name
Return: Return Serial number
A command to delete existing Customer.
Delete Customer

23

- mark customer as deleted,


- removes all cards from customer and
- places into card-store
- All cards lose all their services
(everything gets disabled)
Command with fields:
Return Serial number
Customer no.
Return: Return Serial number

Add / Update Card

24

A command to add a new card to


Customer.
- adding new card to customer
- Subscription is empty in new card.
- Update the slave STB amount of an
existing card.
Command with fields:
Return Serial number
Customer no.
Card no. (STB Address)
Return: Return Serial number

Exchange Card

25

An integrated command to move


existing cards subscription to a new
card and then delete old card.
- used to replace a defective card (or
addressable STB.)
- Old card lose all services.
Command with fields:
Return Serial number
Customer no.
Old card no. (STB Address)
New card no.

34

Billing Interface Specification of Lynx100


Version 1.0 Release 4
Return: Return Serial number
A command to delete a card of
Delete Card

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

Adding subscription to a card.


- It can only happen if card exists before
this command.
Command with fields:
Return Serial number
Order no.
Card no. (STB Address)
Service Begin Date
Service End Date
Service Package no. list
Return: Return Serial number
Cancel one subscription on a card.

Cancel Subscription

28

Command with fields:


Return Serial number
Order no.
Card no. (STB Address)
Return: Return Serial number

3-2 Stop/Resume Card (20)


This command is to temporarily stop and resume authorization of a card.
35

Billing Interface Specification of Lynx100


Version 1.0 Release 4
Description
This is a command to temporarily stop or resume a card of Customer.
- 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.
The unique card number must be included in this command.
[Support]
LynxCrypt100 SMS V2.2 , V2.5, V3.2 and V3.5
[Format]
The following table lists the format of the Stop/Resume Card command.
Command
Byte (location in Data Block)

Description (ASCII Code in Hex.)

1-2

20

3-10

Return serial number, 8 digits

11

Mode, 1 digit

12-21

card number, 10 digits

[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

Billing Interface Specification of Lynx100


Version 1.0 Release 4
Return serial number is 00000123
Card number (STB Address) is 0000056789
[Response Format]
The following table lists the format of SMS100 Interface Agents response to the
Stop/Resume Card command.
Command
Byte (location in Data Block)

Description (ASCII Code in Hex.)

1-2

00

3-4

20

5-12

Return serial number , 8 digits

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.

3-3 Add Customer ( 21)


[Description]

37

Billing Interface Specification of Lynx100


Version 1.0 Release 4
This is a command to add a new Customer.
This command allows you to add new customer information to the SMS
database before giving the subscription.
The information includes a unique Customer Number, customer name, as well
as the District No. that the customer belongs to. If the Billing system does not
support the District No., please set it with default value 0001 to comply
with Lynx100 SMS database structure.
Note: Once a customer number exists, the billing interface agent can not accept
another Add command with same customer number.

[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)

Description (ASCII Code in Hex.)

1-2

21

3-10

Return serial number, 8 digits

11-20 (if default used)

Customer number, 10 digits (default)

21-24

District No. , 4 digits (default)

25-44 (if default used)

Customer name, up o 20 char (default)

[Definition]

[Sample transactions one]

- If all fields adapt default length in the


SMS_Agent_config.inf document.

Add Customer (21)


21|00000123|0000012345|0001|JEFF CHEN
| 20 characters
Or
21|00000123|0000012345|0001|JEFF CHEN|
38

|
->|

Billing Interface Specification of Lynx100


Version 1.0 Release 4
| < 8 chars > |
Return serial number is 00000123
Customer No. is 0000012345
District No. is 0001.
Customer name is JEFF CHEN (default up to 20 characters long, The space at the begin
and the end will be ignored)

[Sample transactions two]

If the length of customer number is set to 30 and all


other fields adapt default length in the
SMS_Agent_config.inf document.

Add Customer (21)


21|00000123|0000012345|0001|JEFF CHEN012345678901234567890|
|
30 characters
-> |
or
21|00000123|0000012345|0001|JEFF CHEN
| < 8 chars > |
Return serial number is 00000123
Customer No. is 0000012345
District No. is 0001.
Customer name is JEFF CHEN (up to 30 characters long, The space at the begin and
the end will be ignored)

39

Billing Interface Specification of Lynx100


Version 1.0 Release 4

[Response Format]
The following table lists the format of SMS100 Interface Agents response to the Add
Customer command.
Command
Byte (location in Data Block)

Description (ASCII Code in Hex.)

1-2

00

3-4

21

5-12

Return serial number , 8 digits

[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

Billing Interface Specification of Lynx100


Version 1.0 Release 4

3-4 Edit Customer ( 22)


[Description]
This is a command to edit Customers information.
The unique Customer number must be included in this command.
- This command allows you to edit the existing customer information: the
customer name and district no.. That is to say, in the command, the customer number must
exist, but the name and district no. can be modified or same.
[Support]
LynxCrypt100 SMS V2.2, V2.5, V3.2 and V3.5
[Format]
The following table lists the format of the Edit Customer command.
Command
Byte (location in Data Block)

Description (ASCII Code in Hex.)

1-2

22

3-10

Return serial number, 8 digits

11-20 (if default used)

Customer number, 10 digits (default)

21-24

District No. , 4 digits (default)

25-44 (if default used)

Customer name, up to 20 char (default)

[Definition]
[Sample transactions one]

If all fields adapted default length in the

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

|
-> |

Billing Interface Specification of Lynx100


Version 1.0 Release 4
Customer name is JEFF CHEN (filled with blanks when name less than 20 characters)

[Sample transactions two]

If the length of customer name is set to 30 and all other

fields adapted default length in the SMS_Agent_config.inf


document.
Edit Customer (22)
22|00000123|0000012345|0001|JEFF CHEN
|
Return serial number is 00000123

30 characters

-> |

Customer No. is 0000012345


District no. is 0001.
Customer name is JEFF CHEN (filled with blanks when name less than 30 characters)
[Response Format]
The following table lists the format of SMS100 Interface Agents response to the Edit
Customer command.
Command
Byte (location in Data Block)

Description (ASCII Code in Hex.)

1-2

00

3-4

22

5-12

Return serial number , 8 digits

[Definition]
Where 8 digits Return serial number is the same one of sending command.
[Sample Response]
Edit Customer (22)
00|22|00000123|

Restrictions

42

Billing Interface Specification of Lynx100


Version 1.0 Release 4

3-5 Delete Customer (23)


[Description]
This is a command to delete existing Customer.
The unique Customer number and order number must be included in this
command.
- Marks customer as deleted,
- Removes all cards from customer and
- Places into cardstore
- All cards loose all their services (everything gets disabled)
- Other fields in database should be filled with default values.
[Support]
LynxCrypt100 SMS V2.2, V2.5, V3.2 and V3.5
[Format]
The following table lists the format of the Delete Customer command.
Command
Byte (location in Data Block)

Description (ASCII Code in Hex.)

1-2

23

3-10

Return serial number, 8 digits

11-20

Customer number, 10 digits (default)

[Definition]
[Sample transactions]

If all fields adapted default length in the


SMS_Agent_config.inf document.

Delete Customer (23)


23|00000123|0000012345|

Return serial number is 00000123

43

Billing Interface Specification of Lynx100


Version 1.0 Release 4
Customer No. is 0000012345

[Response Format]
The following table lists the format of SMS100 Interface Agents response to the Delete
Customer command.
Command
Byte (location in Data Block)

Description (ASCII Code in Hex.)

1-2

00

3-4

23

5-12

Return serial number , 8 digits

[Definition]
Where 8 digits return serial number is the same one of sending command.
[Sample Response]
Delete Customer (23)
00|23|00000123|

Restrictions

44

Billing Interface Specification of Lynx100


Version 1.0 Release 4

3-6 Add/Update Card (24)


Description:
This is a command that adds a new card to this Customer.
It can also be used to edit the slave STB amount of the existing card.
The unique customer number and card number (SMS system calls STB address)
must be included in this command.
[Support]
LynxCrypt100 SMS V2.2, V2.5, V3.2 and V3.5
[Format]
The following table lists the format of the Add/Update Card command.
Command
Byte (location in Data Block)

Description (ASCII Code in Hex.)

1-2

24

3-10

Return serial number, 8 digits

11-20

Customer number, 10 digits (default)

21-30

card number(STB Address), 10 digits

31-32

Slave STB Amount, 2 digit

Order number is not used.


[Definition]

[Sample transactions one]

- If all fields adapt default length in the


SMS_Agent_config.inf document.

Add Card (24)


24|00000123|0000012345|0000056789|00|
Return serial number is 00000123
45

Billing Interface Specification of Lynx100


Version 1.0 Release 4
Customer No. is 0000012345
New Card number (STB Address) is 0000056789
Slave STB Amount is zero, means this customer has only one box. (Has no slave box.)
[Sample transactions two]

- To add a slave box to customers card.


-

If all fields adapt default length in the


SMS_Agent_config.inf document.

Update Card (24)


24|00000123|0000012345|0000056789|01|
Return serial number is 00000123
Customer No. is 0000012345
New Card number (STB Address) is 0000056789
Slave STB Amount is one, means this customer has two boxes. (Has one master box and
one slave box.)

[Response Format]
The following table lists the format of SMS100 Interface Agents response to the Add Card
command.
Command
Byte (location in Data Block)

Description (ASCII Code in Hex.)

1-2

00

3-4

24

5-12

Return serial number , 8 digits

[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

Billing Interface Specification of Lynx100


Version 1.0 Release 4

3-7 Exchange Card (25)


Description
An integrated command to move existing cards subscription to a new card and
then delete old card.
The unique Customer number, and card number (SMS system calls STB address)
must be included in this command.
- used to replace a defective card or cardless STB.
- Old card will lose all services.
[Support]
LynxCrypt100 SMS V2.2, V2.5, V3.2 and V3.5
[Format]
The following table lists the format of the Exchange Card command.
Command
Byte (location in Data Block)

Description (ASCII Code in Hex.)

1-2

25

3-10

Return serial number, 8 digits

11-20

Customer number, 10 digits (default)

21-30

Old card number(STB Address), 10 digits

31-40

New card number(STB Address), 10 digits

Order number is not used.


[Definition]

[Sample transaction]

If all fields adapt default length in the


SMS_Agent_config.inf document.

Exchange Card (25)


25|00000123|0000012345|0000056789|0000066889|
47

Billing Interface Specification of Lynx100


Version 1.0 Release 4
Return serial number is 00000123
Customer No. is 0000012345
Old Card number (STB Address) is 0000056789
New Card number (STB Address) is 0000066889
[Response Format]
The following table lists the format of SMS100 Interface Agents response to the Exchange
Card command.
Command
Byte (location in Data Block)

Description (ASCII Code in Hex.)

1-2

00

3-4

25

5-12

Return serial number , 8 digits

[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

Billing Interface Specification of Lynx100


Version 1.0 Release 4

3-8 Delete Card ( 26)


Description
This is a command that deletes a card of a Customer
- Places into cardstore, card no. is recyclable.
- All subscription on the card will be canceled. This card lose all its services
(everything gets disabled)
The unique order number (SMS system calls Bill number), and card number
(SMS system calls STB address) must be included in this command.
[Support]
LynxCrypt100 SMS V2.2, V2.5, V3.2 and V3.5
[Format]
The following table lists the format of the Delete Card command.
Command
Byte (location in Data Block)

Description (ASCII Code in Hex.)

1-2

26

3-10

Return serial number, 8 digits

11-20

card number(STB Address), 10 digits

Order number is not used.


[Definition]
[Sample transactions one]
Delete Card (26)
26|00000123|0000056789|
Return serial number is 00000123
Card number (STB Address) is 0000056789

49

Billing Interface Specification of Lynx100


Version 1.0 Release 4

[Response Format]
The following table lists the format of SMS100 Interface Agents response to the Delete
Card command.
Command
Byte (location in Data Block)

Description (ASCII Code in Hex.)

1-2

00

3-4

26

5-12

Return serial number , 8 digits

[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

Billing Interface Specification of Lynx100


Version 1.0 Release 4

3-9 Add Subscription (27)


Description
The command adds subscription to a card.
The unique Order number and card number (also named STB address) must be
included in this command.
[Support]
LynxCrypt100 SMS V2.2, V2.5, V3.2 and V3.5
[Format]
The following table lists the format of the Add Subscription command.
Command
Byte (location in Data Block)

Description (ASCII Code in Hex.)

1-2

27

3-10

Return serial number, 8 digits

11-24

Order number, 14 digits (default)

25-34

Card number, 10 digits

35-40

Service Begin Date, 6 digits

41-46

Service End Date, 6 digits

47-??

Service Package No. List (Length of the


package no. is default to 3 digits).

[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

Billing Interface Specification of Lynx100


Version 1.0 Release 4

[Sample transactions one]


Add Subscription (27)
27|00000123|20091200005678|0000056789|091201|100131|001002003|
Return serial number is 00000123
Order (Bill) No. is 20091200005678
Card number (STB Address) is 0000056789
Subscription Service Begin date: 2009/12/01
Subscription Service End date: 2010/01/31
This subscription bill buys three packages; the package No. are 001, 002, and 003.
[Sample transactions two] -- when the length of the package no. is configured to 2.
Add Subscription (27)
27|00000123|20091200005678|0000056789|091201|100131|012233|
Begin date:2009/12/01 <----------------------|
|
|--- End date: 2010/01/31
Return serial number is 00000123
Order (Bill) No. is 20091200005678
Card number (STB Address) is 0000056789
Subscription Service Begin date: 2009/12/01
Subscription Service End date: 2010/01/31
This subscription bill buys three packages, and the package No. are 01, 22, and 33.

[Response Format]
The following table lists the format of SMS100 Interface Agents response to the Add
Subscription command.
Command
Byte (location in Data Block)

Description (ASCII Code in Hex.)

1-2

00

3-4

27

5-12

Return serial number, 8 digits

52

Billing Interface Specification of Lynx100


Version 1.0 Release 4

[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.

3-10 Cancel Subscription (28)


53

Billing Interface Specification of Lynx100


Version 1.0 Release 4
Description
The command cancels subscription of a card.
The unique order (Bill) number and card number (also named STB address)
must be included in this command.
[Support]
[Format]
The following table lists the format of the Cancel Subscription command.
Command
Byte (location in Data Block)

Description (ASCII Code in Hex.)

1-2

28

3-10

Return serial number, 8 digits

11-24

Order number, 14 digits

25-34

Card number, 10 digits

[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

Billing Interface Specification of Lynx100


Version 1.0 Release 4
Subscription command.
Command
Byte (location in Data Block)

Description (ASCII Code in Hex.)

1-2

00

3-4

28

5-12

Return serial number, 8 digits

[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

SMS Configuration Operation

55

Billing Interface Specification of Lynx100


Version 1.0 Release 4

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.

Operation and Command List


Topic

Code

SMS
Client

SMS
Agent

Billing
Agent

SMS
Default

SMS Configuration Operation and Command


Operator Account

--

SMS and Billing system has separate database

System Log

--

each. These operations dont open to the Billing.

Date Format

--

The configuration of the Lynx100 CAS_ SMS is

COM port

--

managed by headend administrator.

Operator Code

--

Operator Name

--

Send Interval

--

Instant Send count

--

Instant send interval

--

System Parameters

These operations dont open to the Billing.

Home Set-Top-Box Control Command


Get FTA Block status

--

The control to the home set-top-box can be is

Enable/Disable FTA Block

--

done and managed by headend administrator.

Get Fingerprint status

--

Enable/Disable Fingerprint

--

Set Fingerprint position

--

STB Upgrade Parameters

--

Stop Home STB

--

Resume Home STB

--

Delete Home STB

--

Reset STBs Parental

08

These operations dont support to the Billing.

Access Code

Chapter 5

Basic Setting Operation and Command

56

See
Page

Billing Interface Specification of Lynx100


Version 1.0 Release 4

5-1 Introduction
This chapter describes the operations and commands used to configure the SMS data
structure for the subscriber information and the service.

5-2 Operations for SMS Client software


The following table lists the operations that the SMS client software uses to configure the
SMS database about the subscriber/customer information and service information. For
more information about operations, please refer to the User Manual of the SMS Client.

SMS Operation List


Topic

Code

Description

Basic Setting Command


District Setting (Default to select first item..)
Add/Change District
Delete District
Postal code Setting (Default to select first item..)
Add/Change Postal code
Delete Postal code
ID Type Setting (Default to select first item..)
Add/Change ID Type
Delete ID Type
STB Model Setting (Default to select first item.)
Add/Change STB Model
Delete STB Model
Provider Setting (Default to select first item..)
Add/Change Provider
Delete Provider
Channel Setting
Add/Change Channel

10

Delete channel

11

add new channel, change channel setting

Package Setting
Add/Change Package

14

Delete Package

15

Add new package, change package


setting

57

Page

Billing Interface Specification of Lynx100


Version 1.0 Release 4
The above operations must be completed by the SMS Client.
The billing system needs to manually synchronize these settings when in uses.
These fields of setting are optional for the billing system and billing agent.
SMS agent will send default value to SMS database if above field is empty.
Default values are listed in the above table.

5-3 Operations for the Billing software (Optional)


The following table lists the commands that the SMS Interface Agent can offer to the
billing system to configure the SMS database about the channel and service package.

Command List
Topic

Code

Description

Basic Setting Command


Channel Setting
Add/Change Channel

10

add new channel, change channel setting

Delete channel

11

Validate channel

12

Retrieve Channel List

13

Retrieve the existing channels list

Add/Change Package

14

Add new package, change package


setting

Delete Package

15

Validate Package

16

Retrieve Package List

17

Package Setting

Retrieve the existing packages list

A Package is the basic unit of subscription bill.


A Package is defined with a number of channels, package price, and valid status.
In a pay-TV system, a channel is an element of a package. The channel normally just
involves scrambling channels.
The package can have just one channel, or have a lot of channels.
The channels in a package can be located in different carrier or in the same one.

Chapter 6

Operand Definition

58

Page

Billing Interface Specification of Lynx100


Version 1.0 Release 4
Fields are in Data Block of link communication, including operator command and a variety
of operands.
The following table describes the definition and specification of the command operands.
Operand Field

Bytes

Controlled
by

Description (ASCII Code in Hex.)

Lynx100
SMS
Client
Return Code

0~9 digits

Return serial

0~9 digits

1~20

0~9 digits, A~Z Characters


(Characters CAPITAL A~Z or
lower case a~z are same here)

number
Customer number

Default 10

Order number

1~16

Note 1

0~9 digits, A~Z Characters

Default 14

Card number

10

0~9 digits, note3.

Slave STB Amount

0~9 digits,

Customer name

0~100

0~9 digits, A~Z,a~z,_,-,@ Characters.


Space is allowed to separate names.
Space is not allowed at the begin and
end. Extension characters are allowed,
such as

Default 20

District No.

1~10

Yes

0~9 digits

Default 4

Begin Date

0~9 digits

End Date

0~9 digits

Package No. List

Default 3

Yes

0~9 digits

Note1: A space is not allowed for customer/card/order numbers.


2. A space is allowed for separating customers names, but is not allowed at the
beginning and end of a name.
3: The card number must be in the licensed & authorized STB Address range.
Explanation
[Return code]
59

Billing Interface Specification of Lynx100


Version 1.0 Release 4
The return code represents the response message of process resulting from SMS Agent and
SMS database. There is a table listing all return codes and describes its meaning.

[Return Serial number]


This is a count up serial number generated by the billing Agent used for transaction
command and response check.
Count up begins from 00000001 to 999999999, and then returns to 00000001.
The SMS Agent must return the same number in its Response.

[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

Billing Interface Specification of Lynx100


Version 1.0 Release 4
the billing system and the bill number used in the SMS system.

[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

Billing Interface Specification of Lynx100


Version 1.0 Release 4
The length in the command operand field is configured in the SMS Agent Config.inf
document.
Note 1.
SMS V2.2 with SMS Agent system will increase two Mapping Tables that map the Billing
systems Customer no. and order no. to SMS systems subscriber no., and bill number,
respectively.
The Mapping Table between Order number and Bill number
Lynx100 SMS uses SO plus 14 digits to compose a Bill number,
for example, SO20091200000123.
However, a 3rd party billing system may use Order number that may have a different
definition, for example, 000001234, or PO1234, or PO-nov-jeff-000123.
The SMS Interface allows either SMS Agent or Billing Agent to handle the transfer task
when they are different.

Chapter 7

Return Code Definition


62

Billing Interface Specification of Lynx100


Version 1.0 Release 4

Topic

Value

Description

Return Error Code


Success

00

Timeout

11

Return serial number error

12

Number was duplicated

13

Length of field error

14

Error

15

System Error Code


Command code error

30

Number was duplicated

31

Number does not exist

32

Connect to server error

33

Execute command error

34

Checksum error

35

Command length is too long

36
37
38
39

Field Error Code


Card No. cant be empty.

50

Customer No. cant be empty.

51

Field Error in Exchange Card

52

Field Error in Delete Card

53

Field Error in Stop/Resume Card

54

Field Error in Add Customer

55

Field Error in Edit Customer

56

Field Error in Delete Customer

57

Field Error in Add Subscription

58

Field Error in Cancel Subscription

59

Field Error in Card No.

60

Card number error

61

63

This Card number is being


used.

Billing Interface Specification of Lynx100


Version 1.0 Release 4

Appendix A The Execution Note of the SMS System


To correctly link with the Billing system, the SMS database should be initialized with the
following setting before linking with the billing system..
Set up the Basic Setting with the following default value:
Adding District Number=01, with District Name=District01
Adding Postal Code Number=01, with Postal Code Name=1
Adding ID Type Number=01, with ID Type Name=1
Adding STB Model number=01, with STB Model Name=TC-8420LT
Adding STB Model number=02, with STB Model Name=TC-8500LT
Adding Provider Number=01, with Provider Name=1

Appendix B Question and Answer


Q1. Add Customer takes about 2-3 minutes to get a reply. Does it really take that long?
Ans: No, we test it in 1 second.

Q2.. If I send Delete Customer(23): can I add it back later?


Ans:
64

Billing Interface Specification of Lynx100


Version 1.0 Release 4
Test-1: Add customer => Add Card => Add subscription => Delete Customer => Add
Customer back (same customer no.)
Result: No.
When Delete customer, the data with that customer number was just marked deleted
flag, but the data and that customer number still exist in the database, so you cant re-use
same customer number. However, the card number can be re-used because Delete Customer
will recycle the card number to card store.
The deleted customer reserves in the database as history data.
add customer
210000000100000000100001Jeffchen8863
00210000000135
add card
2400000002000000001000000000100046
00240000000238
add subscription
270000000320100507-00001000000001010050710050700100200398
00270000000341
del customer
2300000004000000001070
00230000000437 ( Delete customer successfully)
add customer
210000000100000000100001Jeffchen8863
00210000000135
34210000000142 ( Add customer failed)

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

Billing Interface Specification of Lynx100


Version 1.0 Release 4
Return error 60 represents the card number is wrong or not existing in the SMS database.
Above card number 0000012934 is over the range defined in the SMS. To know the
address range, please contact with operator administrator.
Q4. I have to use unique order number to Add Subscription(27). Do I have to use same order
number to cancel it with command 28?
Ans: Yes, you must use same order number.

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

Billing Interface Specification of Lynx100


Version 1.0 Release 4
Q6. What is difference between Add/Cancel Subscription commands and Stop/Resume
commands?
Ans: For authorization point of view, Resume command and Add Subscription command will
authorize services to the card; Stop command and Cancel Subscription command will
de-authorize service to the card.
For SMS database point of view, Stop and Resume do NOT change the database of the
order. It just makes a temporary mark on the authorization of a given card, and then all
services (packages of channel) in this card are de-authorized or re-authorized. In Stop or
Resume operation, the orders (subscription bill) in the cards are not canceled or
added. However, Add Subscription or Cancel Subscription commands will add a new order
(subscription bill) or cancel an existing order (subscription bill).

Q7. What is the advantage of using Stop/Resume command?


Ans: 1. When operation is using its own billing system, 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.
This application of Stop/Resume operation can almost keep a smaller size of used
database after running many years. Smaller database size has a relative faster access time to
the database, as well as faster refreshing time of card's authorization.

67

Billing Interface Specification of Lynx100


Version 1.0 Release 4

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

Billing Interface Specification of Lynx100


Version 1.0 Release 4
Customer_name=20
District_No=4
Begin_Date=6
End_Date=6
Package_No_List=3

[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

Billing Interface Specification of Lynx100


Version 1.0 Release 4
[AgentParams]
COM=1
Ver=2.2
AgentActive=True
ApproveCode=91
AutoSave=True
TestMode=False
Protocol=RS232
TCPPort=209
DBConnectTimeOut
Where, the default is 10;
When set to 10, it means SMS Agent wait for maximum 10 seconds and issue the Undo
command to SQL if SQL connect timeout or SQL no response in time; The SMS Agent will
connect the SQL DB twice per Interface command. In this case the SMS Agent will response
the return code to the SMS Interface after 20sec.
Baud_Rate=9600
Parity=None
Parity_Check=False
Byte_Size=8
Stop_Bits=1

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

Billing Interface Specification of Lynx100


Version 1.0 Release 4
a. When the customer sent the command successfully, the customers log needs to be
marked to indicate the sending was successful, and no need to send again.
b. If sending command is unsuccessful, AddCard and AddSubscription wont be
processed.

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

Billing Interface Specification of Lynx100


Version 1.0 Release 4
5)
After the success of that data has been re-sent, if still unsuccessful data is not sent in the
past, you can send application questions by the operator, after a system to resend the data is
not sent in the past to re-send. Send unsuccessful because most of the reason is because the
communication, send not to repeat the success of information sent is not a problem. When
not constantly re-send the record marked a successful logo can not be successful, we must
analyze the error code returned as the second largest point.

2, the characteristics of return message:


1) when using AddCustomer command, if the customers information has already existed in the database,
Agent will not build customers information and deem that the customers information is established
successfully, and then it will return success. On the other hand, if the customers information is established
unsuccessfully, it will return unsuccessful

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

Billing Interface Specification of Lynx100


Version 1.0 Release 4

73

Billing Interface Specification of Lynx100


Version 1.0 Release 4

74

Вам также может понравиться