The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.

NAME

Biblio::RFID::RFID501 - RFID Standard for Libraries

DESCRIPTION

This module tries to decode tag format as described in document

  RFID 501: RFID Standards for Libraries

http://solutions.3m.com/wps/portal/3M/en_US/3MLibrarySystems/Home/Resources/CaseStudiesAndWhitePapers/RFID501/

Goal is to be compatible with existing 3M Alphanumeric tag format which, as far as I know, isn't specificed anywhere. My documentation about this format is available at

http://saturn.ffzg.hr/rot13/index.cgi?hitchhikers_guide_to_rfid

Data model

3M Alphanumeric tag

 0   04 is 00 tt   i [4 bit] = number of item in set    [1 .. i .. s]
                   s [4 bit] = total items in set
                   tt [8 bit] = item type

 1   dd dd dd dd   dd [16 bytes] = barcode data
 2   dd dd dd dd
 3   dd dd dd dd
 4   dd dd dd dd

 5   bb bl ll ll   b [12 bit] = branch [unsigned]
                   l [20 bit] = library [unsigned]

 6   cc cc cc cc   c [32 bit] = custom signed integer

3M Manufacturing Blank

 0   55 55 55 55
 1   55 55 55 55
 2   55 55 55 55
 3   55 55 55 55
 4   55 55 55 55
 5   55 55 55 55
 6   00 00 00 00 

Generic blank

 0   00 00 00 00
 1   00 00 00 00
 2   00 00 00 00

Security

AFI byte on RFID tag is used for security.

In my case, we have RFID door which can only read AFI bytes from tag and issue alarm sound or ignore it depending on value of byte.

0xD7 214

secured item (door will beep)

0xDA 218

unsecured (door will ignore it)

METHODS

to_hash

  my $hash = Biblio::RFID::Decode::RFID501->to_hash( $bytes );

  my $hash = Biblio::RFID::Decode::RFID501->to_hash( [ 'blk1', 'blk2', ... , 'blk7' ] );

from_hash

  my $blocks = Biblio::RFID::Decode::RFID->from_hash({ content => "1301234567" });

blank_3m

blank

  my $blocks = Biblio::RFID::Decode::RFID->blank;