Command 0xD811 - Start Send File to Device (Secured)

The host uses this command to start sending secured files to the device for storage or processing. It is similar to Command 0xD812 - Start Send File to Device (Unsecured), but is used to send a different subset of file types that impact device security and require some form of authentication from the host. Refer to Table 206 to determine which file type requires a secure command. All files require the command to be authorized via a secure wrapper. In some cases, files include additional signatures within the file structure itself. This command is paired with Command 0xD821 - Start Get File from Device, which the host can use to retrieve files. However, some file types are “one way only” and cannot be retrieved using that command after the host sends them to the device.

1

Sequence of Events — Step 1

The host uses Command 0xE001 - Get Challenge to establish a secure session with the device.

2

Sequence of Events — Step 2

The host determines which file type it will send to the device (see section 6.7.1 About Files), and either opens an existing file in its file system for reading, or begins constructing it.

3

Sequence of Events — Step 3

The host constructs Command 0xD811 - Start Send File to Device (Secured) per Table 212.

4

Sequence of Events — Step 4

The host constructs Command 0xEEEE - Send Secured Command to Device using the previously constructed command as the payload, and sends that command to the device as a Request Message to start the process of uploading a file.

Sub-steps and notes for building the secured wrapper:

  • Use Command 0xEF11 - Get Key Info to gather information about the key to use to secure the message payload(s). Because this command requires a MAC, use key slot 1111.

  • Build the Security Parameters Type portion of the wrapper with:

    • Security Operation Type populated with the following values:

      • Operation Type = Command Authorization Using MAC

      • Operation Algorithm = CMAC

      • Operation Cipher = AES-256

      • Padding = One and zeros

      • MAC Block Size with any number

    • Key Information Type populated with the key information gathered earlier.

5

Sequence of Events — Step 5

The device sends a Response Message so the host knows it can begin sending the file.

6

Sequence of Events — Step 6

The host sends a Data File Message to the device. If the device does not receive file data within a reasonable period of time, it times out and stops listening for the data file.

7

Sequence of Events — Step 7

The device checks to make sure the File ID and the length and hash of the File Payload match with the values the host specified in this command.

8

Sequence of Events — Step 8

The device repeats the same Response Message, this time with the Message Reference Number set to the same value the host used in the Data File Message.

Table - Request Data for Command 0xD811 - Start Send File to Device (Secured)

Tag
Len
Value / Description
Typ
Req
Default

Beginning of any wrappers, at minimum including Request Message

D811 = Command 0xD811 - Start Send File to Device (Secured)

81

04

File ID from Table 206

B

R

A2

var

File transfer properties

T

R

/81

Var

Length of File Payload

This is the length of the File Payload parameter in the Data File Message the host sends to the device.

B

R

/82

01

Hash Checksum Type

  • 0x04 = SHA-256

B

R

/83

20

Hash Checksum Anticipated checksum calculated against the File Payload, according to the standard specified in Hash Checksum Type.

B

R

A3

var

File Description The host should populate this value to help identify the file using Command 0xD825 - Get File Info from Device.

T

R

/81

var

File Name Maximum length 32 bytes Reserved for future use. Leave empty.

B

O

Null

/82

var

File Label Maximum length 16 bytes Reserved for future use. Leave empty.

B

O

Null

/83

var

File Version Maximum length 7 bytes Reserved for future use. Leave empty.

B

O

Null

/84

var

File Date Maximum length 20 bytes Reserved for future use. Leave empty.

B

O

Null

87

01

Reserved for future use. Leave empty.

B

O

Null

End of any wrappers, at minimum including Request Message

Table - Response Data for Command 0xD811 - Start Send File to Device (Secured)

Tag
Len
Value / Description
Typ
Req
Default

Beginning of any wrappers, at minimum including Response Message

D811 = Command 0xD811 - Start Send File to Device (Secured)

No parameters.

End of any wrappers, at minimum including Response Message

If the request started successfully, the Request Status in the message wrapper is OK, Started / Running, All good / requested operation was successful.

For additional support, please contact MagTek Support.

Table - Request Example

Example (Hex)

AA 00 81 04 01 04 D8 11 84 81 8F EE EE A1 19 81 05 03 03 06 02 08 84 00 85 00 A8 0A 81 02 11 02 82 00 86 00 88 00 A9 00 82 04 FF FF FF F0 83 08 C9 65 45 F2 97 69 85 B1 84 4E D8 11 81 04 00 00 03 00 A2 2B 81 04 00 00 02 99 82 01 04 83 20 87 A4 B3 54 61 C5 CB D3 1D DC BA 9D 65 25 5A D4 6A 22 FA 51 5E FD 65 87 AF AC A8 8C 4F AF 80 9B A3 14 38 31 30 38 33 30 33 30 33 30 33 30 33 33 33 30 33 30 87 01 01 9E 10 7D E4 27 C8 A0 70 72 08 19 0A 1E 0A 3F 48 BB F1

Table - Response Example

Example (Hex)

AA 00 81 04 82 0C D8 11 82 04 00 00 00 00

Last updated