Skip to content

Convert the UID read from a project card

When you configure the RFID interface for autonomously reading a card's UID (serial number), you can convert the UID before it's transmitted to the host. To do so, you can use the following options in the RFID interface component of your configuration.

The available options depend on your card type's frequency (if you're unsure, check your frequency here).

13.56 MHz cards

Rotate Bytewise

Use this option to convert MSB first encoding to LSB first or vice versa. This option applies to the binary format of the UID, i.e. the bits (zeros and ones) that the UID ultimately consists of (learn more about encoding). You'll get a mirror reflection of bytes (a byte is a block of 8 bits): The order is reversed, i.e the last byte is read first. The order of bits within a byte is not affected.

Example of applying the option "Rotate Bytewise" to the UID of a 13.56 MHz card in BALTECH ConfigEditor

125 kHz cards

Sample UID

Here, you can enter the UID of a sample project card. This helps you verify if following manipulations convert it into the expected number.

To find the required conversion options using the sample UID:

  1. Enter the UID in decimal encoding as returned by an unconfigured reader.
  2. The UID will be displayed below in binary and hexadecimal format (learn more about encoding). For the conversion, the binary format is relevant.

    Sample UID of a 125 kHz card, converted into binary format in BALTECH ConfigEditor

  3. Convert the expected number into binary format using a converter such as this one.

  4. Use the Bit Stream Manipulation options to convert the UID. The interim result will be displayed at the end of the section.
  5. Compare this interim result in binary format with the expected number in binary format to find out which options you need.

    Bit stream manipuliation of a 125 kHz card in BALTECH ConfigEditor

  6. The converted UID will be displayed below in the original decimal encoding.

  7. If needed, you use the Decimal Stream Manipulation option to further convert the UID.
  8. The final number in decimal format will be displayed at the bottom.

    Decimal stream manipuliation of a 125 kHz card in BALTECH ConfigEditor

Bit Stream Manipulation

These options apply to the binary format of the UID, i.e. the blocks of zeros and ones that the UID ultimately consists of (learn more about encoding).

Rotate Bytewise

Use this option to convert MSB first to LSB first or vice versa. You'll get a mirror reflection of bytes (a byte is a block of 8 bits). The order is reversed, i.e the last byte is read first. The order of bits within a byte is not affected.

Concept of bytewise rotation in BALTECH ConfigEditor

Rotate Bitwise

You'll get a mirror reflection of bits within each byte: The order of bits is reversed, i.e. the last bit is read first. The order of bytes is not affected.

Concept of bitwise rotation in BALTECH ConfigEditor

Extract Subsequence of Bits

Cut out a certain sequence of the UID in binary format.

  • In the First Bit of Subsequence field, enter the position of the first digit you want to keep. Counting starts at position 0.
  • In the Number of Bits field, enter the number of digits you want to keep.

To extract the subsequence in the example below, the First Bit of Subsequence is 7 and the Number in Bits is 11.

Extract subsequence of bits of a 125 kHz card in BALTECH ConfigEditor

Decimal String Manipulation

Extract Subsequence of Digits

Cut out a certain sequence of the UID in decimal format.

  • In the First Digit of Subsequence field, enter the position of the first digit you want to keep. Counting starts at position 0.
  • In the Number of Digits field, enter the number of digits you want to keep.

To extract the subsequence in the example below, the First Digit of Subsequence is 3 and the Number in Bits is 6.

Extract subsequence of digits of a 125 kHz card in BALTECH ConfigEditor

Title