MiniSmart II
37
Definitions
Block 0 Data
1.
This Block data are 64 bytes data - FM File Format Definition
2.
The Format is:
<6 byte PCI , NONPCI> <1 byte File Type> <1 byte Mode> <2 byte file
descriptor length> <2 byte block head size (byte)> <2 byte block tail size (byte)> <2 byte
Package size (in byte)> <2 byte Package Numbers> <4 bytes Block 3 data First Package
Start Address> <Surplus bytes Reserved>
The Start 6 bytes is a magic text to identify if this file is for PCI or Non-PCI:
For PCI file, it is “PCI ” (Hex is 50 43 49 20 20 20)
For Non-PCI file, it is “NONPCI” (Hex is 4E 4F 4E 50 43 49)
<1 byte File Type>:’A’- Application, ’B’-Bootloader
<1 byte Mode>: ‘P’-Plaintext, ‘A’-AES, ‘T’-TDES
2 byte file descriptor length (LenL LenH) – The length of rest “File Descriptor”, it
always be 56.
2 byte block head size (byte) (SizeL SizeH):
It is -512 bytes (Block 1 Data: Version and Device Name…, and Block 2 Data:
FM Check Value).
2 byte block tail size (byte) (SizeL SizeH):
It is 256 bytes (Random Number).
2 byte package size (in byte) (SizeL SizeH) – The byte size of package (m)
2 byte Package Numbers (NumberL NumberH) (N)
4 bytes Block 3 data First Package Start Address(Little Endian Mode)
Surplus bytes - Reserved
Block 1 Data
1.
This Block data are 256 bytes data.
2.
The 256 bytes data Format:
01 10 8 Bytes String “Version” + 8 Bytes Application Version need Ascii Code Data
(Version 0.99.003
Hex: 56 65 72 73 69 6F 6E 20 30 2E 39 39 2E 30 30 33)
Device need save the Version Number 1
02 x + x Bytes Device Name n need Ascii Code Data (UniPay II
Hex: 55 6E 69 50
61 79 20 49 49)
Device need verify the Device Name. If it is not attributed to the device, response
Error.
03 04 + 4 bytes Bootloader Version Number data (from 0x00 00 00 00, 0x00 00 00 01,
…, to 0xFF FF FF FF)
04 01 + 1 byte Encryption Mode
Block 2 Data
1.
This Block data are 256 bytes data - Firmware Check Value