RFID

Config commands

rfid config [(info)]; // returns the config info ie {“config”:”RFID”,”Enabled”:1,”Found”:1,”CS”:4,”Show”:50,”Version”:Clone}
rfid config enable [(on)|off]; // enables or disables it.
rfid config remove; // removes the current config, sets to enable=false;
rfid config default; // removes the current then sets the default configuration.

The default configuration is
{“config”:”RFID”,”Enabled”:1,”Found”:1,”CS”:4,”Show”:50,”Version”:”Clone”}

rfid config show [speed]; // automatically send any card read to the matrix for display. if speed set to 0 turned off. Default speed is 50.

rfid config names; // does rfid config names info;
rfid config names info; // outputs the saved rfid names

{“RFID”:[105,85,195,162],”Name”:”test blue”}
{“RFID”:[121,46,143,131],”Name”:”white card”}

ie if you are listing the name table you don’t get times.

rfid config names save; // saves the name table – needs to be used after ‘load’
rfid config names clear yes; // clears the entirw name table, and saves it.
rfid config names “card_name”; // adds (and saves) a name to the previous card read.
rfid config load [digit1] [digit2] .. [digit10] “card_name”; //loads a rfid uid into the name table, with the supplied name. Does NOT save the table.
ie rfid config load 121 46 143 131 ‘white tag’;

if a tag already exists, it’s name will be updated with either ‘load’ or the previous card name command.

Name limits are – 20 cards, max uid 10 bytes, max name length 15 characters.
From the above you can see you couldn’t name a last read tag ‘clear’, ‘save’, or ‘info’. You can if you want by putting quotes around it ie rfid config names ‘save’; but I don’t think it would be a good idea.

rfid [(read)]; // returns last read rfid tag.

ie {“RFID”:[0,0,0,0],”Name”:”No_Card”,”Time”:0} – if no card has been read
{“RFID”:[121,46,143,131],”Name”:””,”Time”:45044} – card read, no name
{“RFID”:[105,85,195,162],”Name”:”test blue”,”Time”:139036} – card read, had a name.

It will have as many digits in the [] as there are digits in the rfid tag uuid (could be up to (and including) 10).
The time is how long ago the tag was read in ms.

rfid stream [on|off] [ms]; // stream on/off and time. Default is on, 100ms. Min is 50ms.
rfid update [ms]; // update time for events/error checking. Default is 100ms. Min is 50ms.
rfid event s[on|off]; // turn events on/off. Default is on.

Events

#define ebEVENT_RFID_READ_SAME 54
#define ebEVENT_RFID_READ_DIFF 55
#define ebEVENT_RFID_ERROR 213

{“evt”:55,”i”:”RFID Card New”} for a new card

{“evt”:54,”i”:”RFID Card Repeat”} for a card that has been read two (or more) times in a row.

If ‘show’ is on you will also get the text started and finished events from the matrix.

There are a number of error messages, using event id 213. You will get this if you try and add a card and it is full.