258 |
|
|
259 |
my $data = read_file( $path ); |
my $data = read_file( $path ); |
260 |
|
|
261 |
print "write_tag $tag = $data\n"; |
$data = substr($data,0,16); |
262 |
|
|
263 |
|
my $hex_data = unpack('H*', $data) . ' 00' x ( 16 - length($data) ); |
264 |
|
|
265 |
|
print "write_tag $tag = $data ",dump( $hex_data ); |
266 |
|
|
267 |
cmd( |
cmd( |
268 |
"D6 00 26 04 $tag 00 06 00 04 11 00 01 61 61 61 61 62 62 62 62 63 63 63 63 64 64 64 64 00 00 00 00 FD3B", "write $tag", |
"D6 00 26 04 $tag 00 06 00 04 11 00 01 $hex_data 00 00 00 00 FD3B", "write $tag", |
269 |
"D6 00 0D 04 00 $tag 06 AFB1", sub { assert() }, |
"D6 00 0D 04 00 $tag 06 AFB1", sub { assert() }, |
270 |
) foreach ( 1 .. 3 ); # XXX 3M software does this three times! |
) foreach ( 1 .. 3 ); # XXX 3M software does this three times! |
271 |
|
|
275 |
rename $path, $to; |
rename $path, $to; |
276 |
print ">> $to\n"; |
print ">> $to\n"; |
277 |
|
|
278 |
|
delete $tags_data->{$tag}; # force re-read of tag |
279 |
} |
} |
280 |
|
|
281 |
exit; |
exit; |