--- cpr-m02.pl 2010/07/12 11:46:21 84 +++ cpr-m02.pl 2010/07/12 12:00:39 85 @@ -14,7 +14,7 @@ use IO::Socket::INET; -my $debug = 2; +my $debug = 0; my $tags_data; my $tags_security; @@ -288,14 +288,14 @@ } sub cpr { - my ( $hex, $description ) = shift; + my ( $hex, $description ) = @_; my $bytes = str2bytes($hex); my $len = pack( 'c', length( $bytes ) + 3 ); my $send = $len . $bytes; my $checksum = cpr_m02_checksum($send); $send .= $checksum; - warn ">> ", as_hex( $send ), "[$description]\n"; + warn ">> ", as_hex( $send ), "\t\t[$description]\n"; $port->write( $send ); my $r_len = $port->read(1); @@ -314,17 +314,17 @@ Time::HiRes::sleep 0.050; } -#cpr( 'FF 52 00', 'detect boud rate' ); +# FF = COM-ADDR any -#cpr( '00 65', 'software version' ); +cpr( 'FF 52 00', 'Boud Rate Detection' ); -cpr( 'FF 65', 'get ? info' ); +cpr( 'FF 65', 'Get Software Version' ); -cpr( 'FF 69 00', 'get reader info' ); +cpr( 'FF 66 00', 'Get Reader Info - General hard and firware' ); -cpr( 'FF B0 01 00', '?' ); +cpr( 'FF 69', 'RF Reset' ); -cpr( 'FF 69', '?' ); +cpr( 'FF B0 01 00', 'ISO - Inventory' ); #cpr( '', '?' );