beautypg.com

3 writing tag data – Baracoda Barcode Reader User Manual

Page 66

background image

DualRunners – Communication Protocol v1.3

- 66 -

Data Capture

for Workforce

in Motion

4.3 Writing tag data

4.3 Writing tag data

4.3 Writing tag data

4.3 Writing tag data

a)

Communication diagram

The following diagram shows what needs to be done in order to write the contents of a Mifare 4K tag:

Terminal

BRRT or BDR Reader

b)

Data sent from the terminal to the reader

For every sector that needs to be modified, the terminal needs to send a write command to the reader. It is

recommended to verify what parts of the tag data have been modified and send only the differing sectors.

In order to write a sector, the terminal needs to send to the reader a Write data command to the reader. This

command is described in the communication protocol guide of the reader; its code ID is 0x82. In the example

the user intends to modify sector 0 (zero) and then 39 (thirty-nine), so the format of the command will be as

follows (in hexadecimal):

DE 00 38 82 00 00 00 03 00 00 30 xx .. xx

where:

-

DE: prefix

-

00 38: data length (56 bytes will follow)

-

82: command ID (write tag data)

-

00 00: protocol mask (it’s best to specify 00 00 for Mifare cards)

-

00: timeout for the response (0 means use default = 5s)

-

03: card type (Mifare 4K)

-

00: start sector (0)

-

00 30: data length (48 bytes)

-

xx .. xx: 48 bytes of data to be written in sector 0


As soon as the reader has confirmed that the data has been written (please check the next section), the
developer can proceed to writing sector 39 (next page):







Send write command to

reader

Confirm that data has been

written