339 |
my $hex_uid = as_hex($uid); |
my $hex_uid = as_hex($uid); |
340 |
|
|
341 |
cpr( "FF B0 23 01 $hex_uid 00 04", "Read Multiple Blocks $hex_uid" ); |
cpr( "FF B0 23 01 $hex_uid 00 04", "Read Multiple Blocks $hex_uid" ); |
342 |
# cpr( "FF B0 2B 01 $hex_uid", "Get System Information $hex_uid" ); |
cpr( "FF B0 2B 01 $hex_uid", "Get System Information $hex_uid", sub { |
343 |
|
my $data = shift; |
344 |
|
|
345 |
|
warn "# data ",as_hex($data); |
346 |
|
|
347 |
|
my $DSFID = substr($data,5-2,1); |
348 |
|
my $UID = substr($data,6-2,8); |
349 |
|
my $AFI = substr($data,14-2,1); |
350 |
|
my $MEM_SIZE = substr($data,15-2,2); |
351 |
|
my $IC_REF = substr($data,17-2,1); |
352 |
|
|
353 |
|
warn "# split ",as_hex( $DSFID, $UID, $AFI, $MEM_SIZE, $IC_REF ); |
354 |
|
|
355 |
|
}); |
356 |
} |
} |
357 |
|
|
358 |
|
|
362 |
|
|
363 |
cpr( 'FF B0 01 00', 'ISO - Inventory', sub { |
cpr( 'FF B0 01 00', 'ISO - Inventory', sub { |
364 |
my $data = shift; |
my $data = shift; |
365 |
|
if (length($data) < 5 + 2 ) { |
366 |
|
warn "# no tags in range\n"; |
367 |
|
return; |
368 |
|
} |
369 |
my $data_sets = ord(substr($data,3,1)); |
my $data_sets = ord(substr($data,3,1)); |
370 |
$data = substr($data,4); |
$data = substr($data,4); |
371 |
foreach ( 1 .. $data_sets ) { |
foreach ( 1 .. $data_sets ) { |