7 our @EXPORT = qw( hex2bytes as_hex hex_tag $debug );
9 use Data::Dump qw(dump);
13 Biblio::RFID - perl tools to use different RFID readers for library use
17 our $VERSION = '0.03';
24 Main idea is to develop simple API to reader, and than provide useful
25 abstractions on top of it to quickly write applications to respond on
26 tags which come in range of RFID reader using L<Biblio::RFID::Reader>.
28 Writing support for new RFID readers should be easy.
29 L<Biblio::RFID::Reader::API> provides documentation on writing support
30 for different readers.
32 Currently, two serial RFID readers based on L<Biblio::RFID::Reader::Serial>
39 L<Biblio::RFID::Reader::3M810>
43 L<Biblio::RFID::Reader::CPRM02>
47 There is also simple read-only reader using shell commands in
48 L<Biblio::RFID::Reader::librfid>.
50 For implementing application take a look at L<Biblio::RFID::Reader>
52 C<scripts/RFID-JSONP-server.pl> is example of such application. It's local
53 interface to RFID reader and JSONP REST server.
55 C<examples/koha-rfid.js> is jQuery based JavaScript code which can be inserted
56 in Koha Library System to provide overlay with tags in range and
57 check-in/check-out form-fill functionality.
59 Applications can use L<Biblio::RFID::RFID501> which is some kind of
60 semi-standard 3M layout or blocks on RFID tags.
66 Formatting functions are exported
70 my $bytes = hex2bytes($hex);
75 my $str = shift || die "no str?";
82 warn "## str2bytes( $str ) => $b => ",as_hex($bytes) if $debug;
88 print as_hex( $bytes );
94 foreach my $str ( @_ ) {
95 my $hex = uc unpack( 'H*', $str );
96 $hex =~ s/(..)/$1 /g if length( $str ) > 2;
100 return join(' | ', @out);
105 print hex_tag $8bytes;
109 sub hex_tag { uc(unpack('H16', shift)) }
113 We are installing L<perldoc/warn> handler to controll debug output
114 based on C<$Biblio::RFID::debug> level
119 $SIG{'__WARN__'} = sub {
120 my $msg = join(' ', @_);
121 if ( $msg =~ m/^(#+)/ ) {
123 return if $l > $debug;
131 =head1 HARDWARE SUPPORT
135 L<Biblio::RFID::Reader::3M810>
139 L<Biblio::RFID::Reader::CPRM02>
143 L<Biblio::RFID::Reader::librfid>
148 Dobrica Pavlinusic, C<< <dpavlin at rot13.org> >>
150 L<http://blog.rot13.org/>
154 Please report any bugs or feature requests to C<bug-rfid-biblio at rt.cpan.org>, or through
155 the web interface at L<http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Biblio-RFID>. I will be notified, and then you'll
156 automatically be notified of progress on your bug as I make changes.
163 You can find documentation for this module with the perldoc command.
166 perldoc Biblio::RFID::Reader
167 perldoc Biblio::RFID::Reader::API
170 You can also look for information at:
174 =item * RT: CPAN's request tracker
176 L<http://rt.cpan.org/NoAuth/Bugs.html?Dist=Biblio-RFID>
178 =item * AnnoCPAN: Annotated CPAN documentation
180 L<http://annocpan.org/dist/Biblio-RFID>
184 L<http://cpanratings.perl.org/d/Biblio-RFID>
188 L<http://search.cpan.org/dist/Biblio-RFID/>
193 =head1 ACKNOWLEDGEMENTS
196 =head1 LICENSE AND COPYRIGHT
198 Copyright 2010 Dobrica Pavlinusic.
200 This program is free software; you can redistribute it and/or modify
201 it under the terms of the GNU General Public License as published by
202 the Free Software Foundation; version 2 dated June, 1991 or at your option
205 This program is distributed in the hope that it will be useful,
206 but WITHOUT ANY WARRANTY; without even the implied warranty of
207 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
208 GNU General Public License for more details.
210 A copy of the GNU General Public License is available in the source tree;
211 if not, write to the Free Software Foundation, Inc.,
212 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
217 1; # End of Biblio::RFID