From: Markus Grüneis Date: Thu, 23 Apr 2009 17:22:11 +0000 (+0000) Subject: - added comments on door key printer i/o and mifare-read output formatting X-Git-Url: https://git.realraum.at/?a=commitdiff_plain;h=02329ab3fb38d1f22f7c910be92ae4388a132b01;p=svn42.git - added comments on door key printer i/o and mifare-read output formatting --- diff --git a/reader.pl b/reader.pl index 966b001..48e9df5 100755 --- a/reader.pl +++ b/reader.pl @@ -14,6 +14,7 @@ while (<$keys>) $good{$code}=$comment; } + while (sleep 1) { open $fh,'/flash/realraum/mifare-read 0 2>&1 |'; @@ -40,3 +41,45 @@ while (sleep 1) } } + +############################################################### +# mifare-read +# +# writes: +# UID=<4 byte in hex, upper-case> +# +# +############################################################### +# /dev/ttyUSB0: door key printer +# +# +# Ok +# Ok, closing now +# Already closed +# Already opened +# close forced manually\nOk +# open forced manually\nOk +# Error: .* +# .* be: unknown command +# Operation in progress +# open/close took too long! +# last open/close operation took to long! +# +# commands: +# c ... close +# response: "Ok", "Already closed", "Error: .*" +# o ... open +# response: "Ok", "Already opened", "Error: .*" +# s ... status +# response: "Status: closed|opened|<->, opening|waiting|closing|idle" +# or "Error: .*" +# r ... reset +# "Ok, closing now" or "Error: .*" +# +# open/close will only be accepted if Status: ..., idle +# Reset overrules all other operations in progress +# s will always be accepted +# +############################################################### +# +# \ No newline at end of file