551 085 02

 

 

Licence channel

A licence channel can hold licences for applications such as VIGO or Visual VIGO. It can hold licences for up to 5 different applications, and can handle a total of 25 users. For example, a licence channel can hold a 10-user licence for VIGO and a 15-user licence for Visual VIGO, or 5-user licences for 5 different applications.

 

The purpose of the licence channel is to provide licence and user information to the licensed applications in a safe way, by means of an advanced authentication system, known by the code in the licence channel and the application.

 

User information is stored in so-called slots. A licence channel holds 25 slots.

 

Licences can be easily retrieved over the Internet, and stored in the licence channel. This is done by means of the Channel Configuration utility in VIGO.

 

By default, all DPI's are delivered with one free licence for VIGO. Besides this, it is also possible to order DPI's holding a VIGO licence for additional users, and/or licences for other applications.

 

Licences are related to the serial number of the device, in which the licence channel is located. Therefore, it is not possible to move a licence from one device to another.

 

An application that requires a licence, must provide a means of selecting the licence channel in which the application's licence is to be found. It must also provide a means of selecting which slot to use.

 

Please contact PROCES-DATA A/S for further details if you are planning to develop a PC or Process-Pascal application that will require a licence.

 

Variables in a Licence Channel

RegNo.

Identifier

Memory type

Read out

Type

0

LicenceInfo

Flash Read/Write

--------

Record

1

Challenge

RAM ReadWrite

--------

Record

2

Slots

RAM ReadWrite

--------

Array

3

 

 

 

 

4

 

 

 

 

5

 

 

 

 

6

 

 

 

 

7

 

 

 

 

8

ReserveTimer

RAM ReadWrite

Decimal

Real

9

 

 

 

 

10

ReservePreset

EEPROM RPW

Decimal

Real

11

Reservation

RAM ReadWrite

Binary

Boolean

12

 

 

 

 

13

 

 

 

 

14

ChType

PROM ReadOnly

--------

Record

15

ChError

RAM ReadOnly

--------

Record

 

 

RegNo. 0: LicenceInfo

This variable is a record having the following structure:

 

Byte8 = Array[1..8] of Byte;

 

LicenceType = Record

 

ApplicationName:

String[19];

 

NoOfUsers:

Integer;

 

ApplicationData:

Integer;

 

LicenceCode:

LongInteger;

End;

 

LicenceInfo: Record

 

MAC:

Byte8;

 

NoOfWrites:

LongInteger;

 

SerialNo:

LongInteger;

 

Licences:

Array[1..5] of LicenceType;

END;

 

 

 

LicenceInfo holds all the licences managed by the licence channel. To read the variable safely with authentication, the complete variable must be read in one operation. To do this, the application will perform the following:

1: Reserve the licence channel by a Test-And-Set operation on Reservation.

2: Write KeyIndex and Random to Challenge.

3: Read and verify LicenceInfo.

4: Release the licence channel by resetting Reservation.

 

It is only possible to store the complete LicenceInfo variable, not individual parts of it. When writing to LicenceInfo, the values of MAC, NoOfWrites and SerialNo are ignored.

 

MAC

A MAC is an 8 byte long "Message Authentication Code", which is calculated by the licence channel code when the complete LicenceInfo variable is read. To be sure the message is authentic, the application reading LicenceInfo must also calculate the MAC, and compare the result to the retrieved LicenceInfo.MAC value. A MAC is calculated on the basis of Challenge and all data in LicenceInfo, except the MAC itself.

 

NoOfWrites

The value of NoOfWrites is incremented each time a write to LicenceInfo is performed.

 

SerialNo

SerialNo holds the serial number of the device, in which the licence channel is located.

 

Licences

Licences hold the up to 5 licences managed by the licence channel. A licence consists of the following fields:

ApplicationName: The name of the application requiring a licence to run, for example VIGO.

NoOfUsers: The maximum number of users of the application. The value of this variable defines, how many slots are reserved for this application.

ApplicationData: This variable can hold information used by the application. Visual VIGO uses this variable to hold the permitted number of objects.

LicenceCode: The value of this variable is used by the application to check whether the licence is valid. It is calculated on the basis of NoOfUsers, ApplicationData, SerialNo and a secret key, known only by the application itself.

 

RegNo. 1: Challenge

This variable is a record having the following structure:

 

Challenge: Record

 

KeyIndex:

WORD;

 

Random:

Byte8;

End;

 

Refer to LicenceInfo for information on the use of this variable.

 

KeyIndex

KeyIndex holds a value, by means of which the licence channel can calculate the authentication key used by the application. This way, the actual authentication key can be kept secret, as it is never sent over any network.

 

Random

Random is an 8 byte random value generated by the application, and sent to the licence channel prior to reading LicenceInfo.

 

RegNo. 2: Slots

This variable is an array having the following structure:

 

FromApplicationType =Record

 

KeyIndex:

WORD;

 

Random:

Byte8;

 

RMAC:

Byte8;

End;

 

ToApplicationType = Record

 

MAC:

Byte8;

 

ApplicationInfo:

LongInteger;

 

UserName:

String[15];

End;

 

SlotType = Record

 

ToApplication:

ToApplicationType;

 

FromApplication:

FromApplicationType;

End;

 

Slots: Array[1..25] of SlotType;

 

Each user of each application has a slot, holding the name of the user, application specific data and variables, helping the application to ensure that no other users are using the same slot.

 

The application ensures that LicenceInfo is unchanged, and that no others are using the same slot, by means of a sequence consisting of a write to FromApplication, followed by a read from ToApplication.

 

ToApplication

A MAC is a "Message Authentication Code", calculated on the basis of FromApplication.KeyIndex, FromApplication.Random, LicenceInfo.NoOfWrites and other variables. The value of the MAC is checked by the application.

 

ApplicationInfo is a variable that can be used freely by the application. The value of ApplicationInfo does not affect the value of the MAC.

 

The licence administrator can key in the name of the person who is intended to use this slot in UserName. This can be done using the channel configuration utility in VIGO. The value of UserName does not affect the value of the MAC.

 

FromApplication

Prior to reading ToApplication, the application writes KeyIndex, Random and RMAC to FromApplication.

 

The value of KeyIndex is used by the licence channel to calculate the authentication key used by the application. It does not have to be the same key as the one used to read LicenceInfo.

 

Random is an 8 byte random value generated by the application.

 

RMAC must have the same value as ToApplication.MAC. If this is the case, the licence channel will calculate a new value of ToApplication.MAC as a result of writing to FromApplication. This new value is checked later by the application. This technique ensures that the application and the user using this slot, will discover if another application is writing to it.

 

 

RegNo. 8: ReserveTimer

 

 

ReserveTimer:

Timer;

 

 

ReserveTimer is automatically preset with the value from ReservePreset, each time the channel is reserved (Reservation Boolean set True by TestAndSet). If the ReserveTimer reaches zero before Reserva­tion is cleared, the Reserva­tion Boolean will be cleared automatically, and the error Reservation timeout will be generated.

 

 

RegNo. 10: ReservePreset

 

 

ReservePreset:

Real;

Factory setting: 10.0 seconds

 

Preset value for ReserveTimer. Refer to ReserveTimer and Reservation for a further description.

 

RegNo. 11: Reservation

 

 

Reservation:

Boolean;

 

 

This variable is used to reserve the licence channel prior to reading LicenceInfo. Reservation = True indicates, that the licence channel is reserved. The variable must be set True with the TestAndSet function, to reserve the channel. A TestAndSet access to the Reservation Boolean resulting in a reservation, will pre-set the ReserveTimer with the value found in ReservePreset. When the channel is no longer needed, it must be released again by setting Reservation = False.

 

The Reservation Boolean will be cleared automatically and a Reservation Timeout error will be generated, if the ReserveTimer reaches zero before Reservation is cleared.

 

 

RegNo. 14: ChType

This variable is a record having the following structure:

 

ChType: Record

 

ChannelType:         Word;

 

Exist:               Bit16;

 

Functions:           Bit16;

End;

 

The ChType variable indicates what type of channel this is, how many channel registers are used, and what functions this channel offers.

 

ChType has the following values:

 

ChannelType  = 32803   (Licence Channel)

 

Exist  =

Bit no

15

 

 

 

 

 

 

 

7

 

 

 

 

 

 

0

Value

1

1

0

0

1

1

0

1

0

0

0

0

0

1

1

1

 

Functions =

Bit no

15

 

 

 

 

 

 

 

7

 

 

 

 

 

 

0

Value

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

 

 

 

No meaning of the flags in Functions is defined.

 

RegNo. 15:ChError

This variable is a record having the following structure:

 

ChError: Record   

 

His:                  Bit8;

 

Act:                  Bit8;

End;

 

 

ChError for Licence channel

 

7

6

5

4

3

2

1

0

 

 

 

 

 

 

 

 

 

 

 

 

EEPROM_Error_In_ReservePreset

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Not used

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Not used

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Not used

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Reservation Timeout

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Not used

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Not used

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Device error

 

 

 

 

 

 

 

 

 

 

 

Bit 0

This bit is set TRUE if the self-test finds an error in the data memory (EEPROM) for the variable. EEPROM fault is only set at power-up. If the corresponding variable is accessed, Act error in the P-NET response is set.

This error can occur if the power disappears when writing to EEPROM, so a rewrite to the variable can maybe solve the problem.

Bit 4

Reservation Timeout is generated if the Reservation boolean is cleared because the Reservation timer reached zero. The error is cleared in ChError.Act by writing to the Reservation variable

Bit 7

Device error. If this bit is set, the rest of the bits have no meaning because a device error can cause random error codes on the individual channels (see also "Service channel").