Beruflich Dokumente
Kultur Dokumente
Version 1.5
Release No. Date Revision Description
This is confidential document, not to be duplicated or distributed withour prior written consent from SoftOrb Technology Indonesia
2
Contents
I. Setting Protocol Serial ........................................................................................................................... 4
II. Frame Format Protocol ......................................................................................................................... 4
III. List Command Reader Parkir............................................................................................................. 4
A. Reader INIT........................................................................................................................................ 4
B. Check Balance ................................................................................................................................... 5
C. Deduct ............................................................................................................................................... 6
D. Cancel Deduct Correction ................................................................................................................. 8
E. Get Last Transaction ......................................................................................................................... 8
F. Mifare Command .............................................................................................................................. 9
F.1. Get Card UID................................................................................................................................... 9
F.2. Read Block Mifare ........................................................................................................................ 10
F.3. Write Block Data Mifare ............................................................................................................... 10
G. Read & Write Data .......................................................................................................................... 11
G.1. Read Data .................................................................................................................................... 11
G.2. Write Data ................................................................................................................................... 11
IV. Flow Transaction ............................................................................................................................. 12
V. Response Code, Status Code, & Card Type ......................................................................................... 13
This is confidential document, not to be duplicated or distributed withour prior written consent from SoftOrb Technology Indonesia
3
I. Setting Protocol Serial
• Speed : 38400bps
• Data : 8 bit
• Parity : No
• Stop : 1 bit
Response Frame
Name STX LEN-H LEN-L Resp Data[n] LRC
Values 0x02 0xHH 0xHH 0xHH Data[n] 0xHH
Length. 1-Byte 1-Byte 1-Byte 1-Byte n-Byte(s) 1-Byte
- STX : 0x02
- Data length = response (it must be 1) + Length of data.
LEN-H : Higher byte of data length
LEN-L : Lower byte of data length
- Resp : Response code from reader
- Data[n] : Data Bytes
- LRC : XORing from LEN-H to Data[n]
This is confidential document, not to be duplicated or distributed withour prior written consent from SoftOrb Technology Indonesia
4
COMMAND FORMAT
CMD PARAMETER
EF 01 01 16Bytes Init Key
RESPONSE FORMAT
RESPONSE CODE RESPONSE DATA
See response code table 3Bytes Status Code (See status code table) + 8B MID Reader + TID 4B
Reader
Contoh
Sukses Init:
CMD : EF 01 01 [758F40D46D95D1641448AA19B9282C05]
RSP : 00 00 00 00 02 03 45 67 89 0A BC DE 87 65 43 21
Gagal Init:
CMD : EF 01 01 [11223344556677889900AABBCCDDEEFF]
RSP : 00 01 10 03 (command success but init key is incorrect)
B. Check Balance
Berfungsi untuk melakukan pengecekan saldo terakhir dari kartu prepaid
COMMAND FORMAT
CMD PARAMETER
EF 01 02 [4Bytes Date in BCD ddmmyyyy] + [3Bytes Time in BCD hhnnss 24Hours
Format] + [2Bytes Reader Waiting Timeout BCD]
RESPONSE FORMAT
RESPONSE RESPONSE DATA
See response 3Bytes Status Code (See status code table) + 1Byte Card Type + 8Byte Card
code table Number + 4 Bytes Card Balance in Hex Integer
- Date 6 Bytes BCD, eg:
0x10 0x12 0x20 0x17 = 10 Desember 2017
- Time 3 Bytes BCD, eg:
0x12 0x15 0x40 = 12:15:40 PM
- Reader Waiting Timeout, eg:
0x00 0x10 = 10 seconds
This is confidential document, not to be duplicated or distributed withour prior written consent from SoftOrb Technology Indonesia
5
Contoh
CMD : EF 01 02 [10 12 20 17] [12 15 40] [00 10]
(Date = 10 Des 2017, time=12:15:40PM, Timeout = 10 seconds)
RSP : 00 00 00 00 [01] [1A 2B 3C 4D 5E 6F 77 88] [00 01 86 A0]
(Card Type = 01 (Luminos), Card Number= 1A2B3C4D5E6F7788, Saldo= 0x0186A0 = Rp.
100.000)
C. Deduct
Berfungsi untuk melakukan pemotongan saldo kartu prepaid.
COMMAND FORMAT
CMD PARAMETER
EF 01 03 [4Bytes Date in BCD ddmmyyyy] + [3Bytes Time in BCD hhnnss 24Hours
Format] + [4Bytes Deduct Amount in Hex Integer] + [2Bytes Reader Waiting
Timeout BCD]
- Date 6 Bytes BCD, eg:
0x10 0x12 0x20 0x17 = 10 Desember 2017
- Time 3 Bytes BCD, eg:
0x12 0x15 0x40 = 12:15:40 PM
- Deduct Amount, eg:
0x00 0x00 0x03 0xE8 = 0x3E8 = Rp. 1000
- Reader Waiting Timeout, eg:
0x00 0x10 = 10 seconds
RESPONSE FORMAT
RESPONSE DATA
See response 3Bytes Status Code (See status code table) +
code table [1Bytes Card Type] +
[8Bytes MID Reader] +
[4Bytes TID Reader] +
[7Bytes DateTime in BCD ddmmyyyyhhnnss 24Hours Format] +
[8Bytes No kartu] +
[4Bytes Deduct Amount in Hex Integer] +
[4Bytes Card Remain Balance in Hex Integer] +
[4Bytes Trans Counter per day] +
nBytes Card Log transaction
- 4 Bytes Card balance after deduct transaction succeed
This is confidential document, not to be duplicated or distributed withour prior written consent from SoftOrb Technology Indonesia
6
Contoh tersedia di lampiran log.
Note :
- Berikut beberapa kemungkinan kondisi yang dapat terjadi saat proses deduct gagal
dilakukan :
a. Gagal Proses ke Kartu
Kemungkinan dapat disebabkan karena saldo tidak cukup, kartu rusak, kartu tidak
terdeteksi dll.
b. Lost contact
Kondisi yang terjadi bila saat proses deduct, kartu terangkat sehingga reader tidak
dapat melanjutkan proses ke kartu.
Pada kondisi seperti ini, reader akan mengeluarkan errorcode khusus yang
menandakan aplikasi harus melakukan proses deduct kembali menggunakan kartu
yang sama dengan sebelumnya (kartu yang terjadi lost contact) dan reader tidak
akan dapat melakukan transaksi selanjutnya dengan kartu yang berbeda.
This is confidential document, not to be duplicated or distributed withour prior written consent from SoftOrb Technology Indonesia
7
D. Cancel Deduct Correction
Jika terjadi lost contact / kartu prepaid diangkat sebelum proses deduct selesai, maka reader
secara otomatis menyimpan penanda / flagging yang mengharuskan user untuk tetap
mentapping dengan kartu yang sama, sampai proses deduct selesai dan sukses dikartu
tersebut.
Apabila aplikasi ingin membatalkan flagging tersebut, maka dapat menggunakan command
ini.
COMMAND FORMAT
CMD PARAMETER
EF 01 04 -
RESPONSE FORMAT
RESPONSE CODE RESPONSE DATA
See response code table 3Bytes Status Code (See status code table) + 1Byte Card Type + 8Byte
Card Number
Contoh
Apabila sebelumnya terjadi lost contact saat transaksi:
CMD : EF 01 04
RSP : 00 00 00 00 [01] [1A 2B 3C 4D 5E 6F 77 88]
(Card Type = 01 (Luminos), Card Number= 1A2B3C4D5E6F7788, Card Type dan Nomor
kartu ini adalah kartu yang sebelumnya diindikasikan terjadi lost contact oleh reader)
This is confidential document, not to be duplicated or distributed withour prior written consent from SoftOrb Technology Indonesia
8
COMMAND FORMAT
CMD PARAMETER
EF 01 05
RESPONSE FORMAT
RESPONSE DATA
See response 3Bytes Status Code (See status code table) +
code table [1Bytes Card Type] +
[8Bytes MID Reader] +
[4Bytes TID Reader] +
[7Bytes DateTime in BCD ddmmyyyyhhnnss 24Hours Format] +
[8Bytes No kartu] +
[4Bytes Deduct Amount in Hex Integer] +
[4Bytes Card Remain Balance in Hex Integer] +
[4Bytes Trans Counter per day] +
nBytes Card Log transaction
F. Mifare Command
Fungsi – fungsi yang berkaitan dengan kartu Mifare
COMMAND FORMAT
CMD PARAMETER
EF 01 07 00 + [2Bytes Reader Waiting Timeout BCD]
RESPONSE FORMAT
RESPONSE DATA
See response 3Bytes Status Code (See status code table) + [Card Type 1B] + [7Bytes card
code table UID]
Card Type = 0x41 (‘A’) for card Type A, or 0x4D (‘M’) for Mifare Card
7Bytes card UID = apabila UID kartu kurang dari 7Bytes maka otomatis dipadding 0 didepan.
This is confidential document, not to be duplicated or distributed withour prior written consent from SoftOrb Technology Indonesia
9
F.2. Read Block Mifare
Berfungsi untuk membaca block data Mifare di kartu (mendukung kartu Tipe A dengan dan
kartu Mifare)
COMMAND FORMAT
CMD PARAMETER
EF 01 07 01 + [1Byte Block Address] + [1Byte Key Type] + [6Bytes Login Key] + [2Bytes
Reader Waiting Timeout BCD]
Block Address (Hex Integer) = 0x00 to 0x03F (block 0 to block 63)
Key type (Hex Integer) = 0x0A (key A) or 0x0B (key B)
Login Key (Hex Integer) = eg: FFFFFFFFFFFF (Default Mifare key)
RESPONSE FORMAT
RESPONSE DATA
See response 3Bytes Status Code (See status code table) + [16Bytes card data]
code table
COMMAND FORMAT
CMD GET PARAMETER
EF 01 07 02 + [1Byte Block Address] + [16Bytes Data to Write] + [2Bytes Reader Waiting
Timeout BCD]
Block Address (Hex Integer) = 0x00 to 0x03F (block 0 to block 63)
RESPONSE FORMAT
RESPONSE DATA
See response 3Bytes Status Code (See status code table) + [16Bytes card data]
code table
This is confidential document, not to be duplicated or distributed withour prior written consent from SoftOrb Technology Indonesia
10
G. Read & Write Data
Fungsi - fungsi untuk melakukan proses baca & tulis data ke kartu prepaid
COMMAND FORMAT
CMD PARAMETER
EF 01 08 00 + [1Byte Slot Data] + [1Byte Length of card data to read (Hex
Integer)] + [2Bytes Reader Waiting Timeout BCD]
RESPONSE FORMAT
RESPONSE CODE RESPONSE DATA
See response code table 3Bytes Status Code (See status code table) + 1Byte Card Type +
8Bytes Card Number + [nBytes Card Data]
Slot Data = Nilai diset 0x01
COMMAND FORMAT
CMD PARAMETER
EF 01 08 01 + [1Byte Slot Data] + [1Byte Length of card data to write (Hex
Integer)] + [nBytes card data to write] + [2Bytes Reader Waiting
Timeout BCD]
RESPONSE FORMAT
RESPONSE CODE RESPONSE DATA
See response code table 3Bytes Status Code (See status code table) + 1Byte Card Type + 8Byte
Card Number
Slot Data = Nilai diset 0x01
This is confidential document, not to be duplicated or distributed withour prior written consent from SoftOrb Technology Indonesia
11
IV. Flow Transaction
START
Get Last
Transaction
Response Deduct
Save Data Trans
Deduct to PC Success
Failed
(011005 / 011006)
S
Check
response
Deduct Failed
END
This is confidential document, not to be duplicated or distributed withour prior written consent from SoftOrb Technology Indonesia
12
V. Response Code, Status Code, & Card Type
This is confidential document, not to be duplicated or distributed withour prior written consent from SoftOrb Technology Indonesia
13
Lampiran Log
1. Reader Init
Sukses:
=>EF0101758F40D46D95D1641448AA19B9282C05
<=0000000002034567890ABCDE87654321 (MID = 02 03 45 67 89 0A BC DE, TID = 87 65 43 21)
Gagal (Salah Pin)
=>EF010111223344556677889900AABBCCDDEEFF
<=00011003
2. Check Balance
3. Deduct Rp. 1
=>EF010310122017121550000000010001
(Date/Time = 10 Des 2017, 12:15:50PM, Deduct Rp. 1, Reader Timeout 1 detik)
<=000000000102034567890ABCDE87654321101220171215505710120620170005000000010001D0CC0
0000001CDDDF8D374178432ECDC02FA9E616476DC7D3341B24FCDA12352546FF45B5ADA79F2387FB6
800990EBDAD1EDBCDD3CBA5998E7A746048523759750178AE62DA5355C9CB17AF5F34DFF35865FAF9
60AF4194C5F2B622CCABC9BB09538B076B7F56344ACC65BC7B9B4
Detail Response:
01 = Card Type
02034567890ABCDE = MID Reader
87654321 = TID Reader
10122017121550 = Date/Time (10 Des 2017, 12:15:50PM)
5710120620170005 = Nomor kartu
00000001 = Deduct Amounthex (Rp. 1)
0001D0CC = Sisa Saldo hex (Rp. 118.988)
00000001 = Transaction Number
Data selanjutnya adalah log transaksi untuk settlement:
CDDDF8D374178432ECDC02FA9E616476DC7D3341B24FCDA12352546FF45B5ADA79F2387FB68
00990EBDAD1EDBCDD3CBA5998E7A746048523759750178AE62DA5355C9CB17AF5F34DFF3586
5FAF960AF4194C5F2B622CCABC9BB09538B076B7F56344ACC65BC7B9B4
This is confidential document, not to be duplicated or distributed withour prior written consent from SoftOrb Technology Indonesia
14
4. Get Last Transaction Log
=>EF0105
<=000000000102034567890ABCDE87654321101220171215505710120620170005000000010001D0CC0
0000001CDDDF8D374178432ECDC02FA9E616476DC7D3341B24FCDA12352546FF45B5ADA79F2387FB6
800990EBDAD1EDBCDD3CBA5998E7A746048523759750178AE62DA5355C9CB17AF5F34DFF35865FAF9
60AF4194C5F2B622CCABC9BB09538B076B7F56344ACC65BC7B9B4
Return datanya sama persis formatnya seperti deduct
=>EF010310122017121540000000010001
<=00011007
Ini terjadi jika dua command deduct dikirim masih dalam rentang waktu jeda interval, yaitu 2 detik, ini
untuk proteksi tambahan terhadap double deduct
=>EF010310122017121501000927C00001 (coba deduct dengan amount lebih tinggi dari saldo kartu)
<=000110040157120171019000040007A0F5
Return error dengan tambahan data: Card type, no kartu dan sisa saldo yang tersedia dikartu
=>EF010310122017121505000000010001
<=00011005015712017101900004
Return error dengan tambahan data: Card type dan no kartu
8. Deduct dengan error code terjadinya beda kartu untuk proses correction
=>EF010310122017121505000000010001
<=00011006015712017101900004
Masih lanjutan dari proses di no.7, jika reader ditransaksikan dengan kartu yang berbeda maka akan
muncul error seperti diatas, dengan tambahan data: Expected Card Type & Expected Card Number.
This is confidential document, not to be duplicated or distributed withour prior written consent from SoftOrb Technology Indonesia
15
10. Command Mifare
Get UID
=>EF0107000001
<=00000000410000006F5A04A7 (card Type ‘A’, UID = 0000006F5A04A7)
Read Mifare
(Block 16, key type A, key FFFFFFFFFFFF, reader timeout 1sec)
=>EF010701100AFFFFFFFFFFFF0001
<=0000000000000000000000000000000000000000
Write Mifare
(Block 16, write data 11223344556677889900AABBCCDDEEFF, reader timeout 1sec)
=>EF0107021011223344556677889900AABBCCDDEEFF0001
<=0000000011223344556677889900AABBCCDDEEFF
Read Mifare
(Block 16, key type A, key FFFFFFFFFFFF, reader timeout 1sec)
=>EF010701100AFFFFFFFFFFFF0001
<=0000000011223344556677889900AABBCCDDEEFF
This is confidential document, not to be duplicated or distributed withour prior written consent from SoftOrb Technology Indonesia
16