RIDEC 5000 Protocol
SERIAL COMMUNICATION PROTOCOL V1.4X
The communication is made through a serial protocol in ASCII format, according to the programming, 8 bits, no parity, one stop bit, no handshake and 9600 baud. The bite of the CRC is transmitted if this selected the protocol RS485
CONTINOUS READ COMMAND
It is used to configure the RIDEC5000 for continous reading of the tags near the reader antenna. The reader returns nothing when there is no tag near the antenna, and the tag memory contents when it is correctly read.
Where xx is the block number to be returned in hex format (00 to 3F).
RIDEC5000 Answer:
-
For block number 00, 8 bytes (corresponding to the complete serial number)+CRC+CR+LF.
-
For blocks between 0x01 and 0x0F, 4 bytes (corresponding to the block) +CRC+CR+LF.
-
For blocks between 0x10 and 0x1F, the whole tag content (as selected in the block reading param.)+CRC+CR+LF.
-
For block number 0x20, 8 bytes (corresponding to the complete serial number) +CRC+CR+LF.
-
For blocks between 0x21 and 0x2F, 4 bytes (corresponding to the block) +CRC+CR+LF.
-
For blocks between 0x30 and 0x3F, the whole tag content (as selected in the block reading param.)+CRC+CR+LF.
If there is not any detected tag, the RIDEC5000 will not return anything. The RIDEC5000 leaves continous read when it receives any character throug the serial port.
READ COMMAND
The RIDEL5000 attempts the reading of a tag once. If the block number ranges between 0x00 and 0x1F, the RIDEC5000 will try to read the tag. If the tags is correctly read, it will return its contents. If there is no tag, nothing will be returned. In both cases, the RIDEC5000 will wait for a new command.
If the block number ranges between 0x20 and 0x3F, the RIDEC5000 will wait for a tag to be correctly read, returning ist contents, and waiting for a new command.
Command: rxx
Where xx is the block number to be returned in hex format (00 to 3F).
RIDEC5000 Answer:
-
For block number 00, 8 bytes (corresponding to the complete serial number) +CRC+CR+LF.
-
For blocks between 0x10 and 0x1F, the whole tag content (as selected in the block reading param.)+CRC+CR+LF.
-
For block number 0x20, waits for the tag and returns 8 bytes (corresponding to the complete serialnumber) +CRC+CR+LF.
-
For blocks between 0x21 and 0x2F, it waits for the tag, and returns 4 bytes (corresponding to the block) +CRC+CR+LF.
-
For blocks between 0x30 and 0x3F, the whole tag content (as selected in the block reading param.).
If there is no tag detected, the RIDEC5000 will return the sequence N+CR+LF, and it will wait for a new command.
CRC CALCULATION
The CRC value is calculated as the Exclusive or of 5A and all the received data (not including CR or LF).
I/O PORT CONTROL
The reader includes 4 ports configurables as inputs or outputs, under software control.
Command (ASCII CHARACTER): pxy
Where x define, in a bitwise mode, the direction of the corresponding port (1 means output and 0 means input). The LSB corresponding to the port 0. As an example, x=2 (hexadecimal) or 0010 (binary), will configure the ports 0, 2 and 3 as inputs and port 1 as output.
The parameter y define, in a bitwise mode, the logic level if the port is configured as an output. If it is an input, a 1 will configure the input with an internal pull-up.
Answer:
The reader will answer with the string: xyzw
Where x and y are the operators sent with the command, z corresponds to the logic level of the outputs, and w corresponds to the logic level of the inputs.
VERSION COMMAND
It returns the RIDEC5000 version information.
Command: x
RIDEC5000 Answer:
Version number+CR+CF.
WRITE COMMAND
It writes the four bytes (32 bits) corresponding to the selected block. It returns the answer from the tag, if the writing is succesful.
Command: wyyxxxxxxxx
Where yy is the block number to be written (from 0x00 to 0x0F), and x are the data corresponding to the selected block (4 data 8 bits each). It is important to consider the following information.
The block 00 and 01 correspond to the serial number, so they are read only.
The block number 02 contains the write permission data for the different blocks of the tag. They have to be carefuly writen, in order not to permanently disable the tag for writing.
RIDEC5000 Answer:
If the writing is succesful, the RIDEC5000 will answer Yw+CR +CF.
If there is any error, or there is not any tag present, the RIDEC5000 will answer Nw +CR +CF.
RESET QUIET
This command resets a tag with the QUIET mode active. The QUIET bit is in the block 3, byte 0, bits 3 and 4. A 11 written to this position, will put the tag in QUIET state. It will stay in this mode until a Reset Quiet command is received.
Command: q
The RIDEC5000 will not send any answer.
|