BRI Programming COMPANY CONFIDENTIAL Jim Peternel Introduction Provide general overview of the Basic Reader Interface (BRI). Will not cover every command. Will cover most commonly used features. Will not cover commands that are not part of the IV7 or serial reader interface. COMPANY CONFIDENTIAL Slide 2 Overview Overview of available interfaces to Intermec readers Supported Tag Types Tag memory map Tag Singulation BRI Protocol BRI Features and Commands COMPANY CONFIDENTIAL Slide 3 Supplementary Documents For a full reference document on the BRI download: “BRI Basic Reader Interface, Programmer’s Reference Manual” COMPANY CONFIDENTIAL Slide 4 Please Ask Questions At Any Time COMPANY CONFIDENTIAL Slide 5 Application Development Overview Currently four approaches Basic Reader Interface (BRI) Intermec Developer Library (IDL) Low Level Reader Protocol (LLRP) Currently IF61 reader ONLY Application Layer Events (ALE) Currently IF61 reader ONLY COMPANY CONFIDENTIAL Slide 6 Basic Reader Interface (BRI) Intermec reader interface Simple ASCII only interface, human readable. Provides a simple command/reply operations and asynchronous event messages. No drivers. Available on all Intermec readers Can be run from any platform, OS. COMPANY CONFIDENTIAL Slide 7 Intermec Developer Library (IDL) RFID Class Easy to use and free Requires drivers from Intermec Available on Intermec readers Java, .Net (e.g. C#, VB) Runs on Win32, Windows Mobile, PPC 2003 Also runs on Linux using Windows Mono drivers (IF61) COMPANY CONFIDENTIAL Slide 8 Low Level Reader Protocol (LLRP) EPC Global Standard Interface. Currently IF61 only. Future release planned for the IV7/CV30 XML “based” HOWEVER… Binary interface to reader. Complex to use. Provides access to many low level features in the reader. COMPANY CONFIDENTIAL Slide 9 Application Layer Events (ALE) EPC Global Standard Interface. Currently IF61 only. Report based interface. Available on the IF61 only. ALE Store and Forward application comes standard with the IF61. COMPANY CONFIDENTIAL Slide 10 TAG TYPES Identifier Air-protocol(s) Description MIXED ISO180006B, UCODE119 types only G1, G2 and v1.19 tags only It is recommended that G1 mode be used in place of MIXED ( MIXED mode is kept for backward compatibility only ) G1/ISO6BG1 ISO180006B ISO6B G1 tag G2/ISO6BG2 ISO180006B ISO6B G2 tag ICODE119 UCODE119 Phillips v1.19 (ISO6B emulating EPC tag ID’s) V119 UCODE119 UCODE119 Phillips v1.19 (ISO6B emulating EPC tag ID’s) EPCC1G1 EPCC1G1 EPCglobal UHF Class 1 Gen 1 EPCC1G2 EPCC1G2 EPCglobal UHF Gen2 COMPANY CONFIDENTIAL Slide 11 EPCC1G2 Memory Map Bank 3 UID Optional ? Bytes Bank 2 TID 4+ Bytes (not necessarily unique) Bank 1 Header info Bytes 0-3 EPC Code Bytes 4-15 Bank 0 Kill Password 4 Bytes Access Password 4 Bytes COMPANY CONFIDENTIAL Slide 12 Tag Singulation The following is a simplification of the process Reader sends RESET to all tags Reader tells all tags to roll a random number in the range of zero to Q. That number is the tags slot or position in line. COMPANY CONFIDENTIAL Slide 13 Tag Singulation Reader sends RESET to all tags Reader tells all tags to roll a random number in the range of zero to Q. That number is the tags slot or position in line. Assume Q=4 which means 16 slots 7 5 10 15 2 5 COMPANY CONFIDENTIAL 1 Slide 14 Tag Singulation Slots 0 Looking at the 16 slots Empty slots are wasted time 1 1 2 2 3 4 5 6 7 Empty Slot 5 5 7 8 9 10 Tag in Slot 11 10 12 13 14 15 COMPANY CONFIDENTIAL 15 Slide 15 Tag Singulation Once tag is read by the reader it remains quiet for the rest of the singulation process If tag momentarily looses power it will reset and talk again. This is very bad when trying to read a large number of tags. Tags regularly loose power as they pass an antenna. Tag Persistence helps resolve this issue (Sessions) COMPANY CONFIDENTIAL Slide 16 Comments or Questions COMPANY CONFIDENTIAL Slide 17 Basic Reader Interface COMPANY CONFIDENTIAL Slide 18 BRI Protocol Consists of the following Command and Response Asynchronous events BRI is not case sensitive unless you are calculating checksums. Terminology Carriage Return, CR Line Feed, LF <CRLF> COMPANY CONFIDENTIAL Slide 19 BRI Protocol Sending command: BRI_COMMAND + <CRLF> ATTRIB IDTRIES<CRLF> Response: ETX is: OK><CRLF> ResponseLine<CRLF>ResponseLine<CRLF>…OK><CRLF> ATTIRB IDTRIES=1<CRLF>OK><CRLF> COMPANY CONFIDENTIAL Slide 20 BRI Protocol Some other examples Send: ATTRIB IDTRIES=B1<CRLF> Response: ERR<CRLF>OK><CRLF> Send: ATTRIB IDTRIES=1<CRLF> Response: OK><CRLF> COMPANY CONFIDENTIAL Slide 21 BRI Protocol Asynchronous Event Messages EVT:<Type> <Event Details><CRLF> For example EVT:TAG H010203040506070809101112<CRLF> Event messages are NOT followed by an OK><CRLF> COMPANY CONFIDENTIAL Slide 22 BRI Error Responses If a command is invalid reader returns ERR Typo, invalid parameters, missing keyword, etc ERR<CRLF>OK><CRLF> Checksum error returns CKERR CKERR<CRLF>OK><CRLF> COMPANY CONFIDENTIAL Slide 23 RF Module Events All Platforms (depends on FW version) EVT:TRIGGER ExampleTrigger GPIO 15 EVT:RADIO DUTY_CYCLE TIMELEFT xxx EVT:TAG H112210101122334411221122 EVT:THERMAL OVERTEMP <degrees> EVT:THERMAL NORMAL <degrees> IF61 EVT:RESET Handheld (IM4 based platforms) EVT:BATTERY LOW COMPANY CONFIDENTIAL Slide 24 BRI Reader Module Information Commands ATTRIBUTE Commands READ Commands WRITE Commands COMPANY CONFIDENTIAL GPIO Commands ACCESS Commands Slide 25 Reader Module Information Commands VER Returns all version information VER IM5 RFID Reader Ver 9.39 Basic Reader Interface Version 3.12 FCC 915MHz CC014 Copyright (C) 2009 Intermec Technologies Corp. OK> COMPANY CONFIDENTIAL Slide 26 Reader Module Information Commands BRIVER Returns BRI version Basic Reader Interface Version S HWID Returns serial and configuration number CN-000000 SN-000000 HWREGION Region setting (RF regulatory region) ETSI 302-208 865Mhz COMPANY CONFIDENTIAL Slide 27 Reader Module Information Commands HWPROD Hardware platform IM5, IM4 HWVER Hardware version 2B0 SWVER Version of firmware running in the RF module 6.33 COMPANY CONFIDENTIAL Slide 28 Testing communication link PING command Returns OK><CRLF> COMPANY CONFIDENTIAL Slide 29 BRI ATTRIBUTES Allow you to configure the reader. Select antennas, set tag type, etc. Not all attributes are available on all reader platforms IF61 you cannot set baud rate, TTY, echo, or checksums. We do add new attributes as we add more features to the readers. When issuing attribute commands you must always include the keyword ATTRIB. COMPANY CONFIDENTIAL Slide 30 ATTRIB Command Structure To GET an attribute value: ATTRIB <Name><CRLF> For example: ATTRIB IDTRIES<CRLF> Will return: IDTRIES=1<CRLF>OK><CRLF> To SET an attribute value: ATTRIB <Name> =<value><CRLF> For example: ATTRIB IDTRIES=2 <CRLF> Will return: OK><CRLF> COMPANY CONFIDENTIAL Slide 31 ATTRIB Command The ATTRIB command will list all attributes available on that reader platform. Not all attributes are available on all reader platforms. COMPANY CONFIDENTIAL Slide 32 List of ATTRIBUTES Frequently Used Attributes Lesser Used Attributes ANTS=1 TAGTYPE=EPCC1G2 FIELDSTRENGTH=30DB,30DB,30DB,3 0DB INITIALQ=4 IDTRIES=1 ANTTRIES=3 TIMEOUTMODE=OFF IDTIMEOUT=100 ANTTIMEOUT=50 SESSION=1 SCHEDULEOPT=0 RDTRIES=3 WRTRIES=3 INITTRIES=1 NOTAGRPT=ON IDREPORT=ON CHKSUM=OFF TTY=OFF ECHO=OFF XONXOFF=OFF BAUD=115200 FIELDSEP=" " DENSEREADERMODE=OFF LOCKTRIES=3 SELTRIES=1 UNSELTRIES=1 RPTTIMEOUT=0 COMPANY CONFIDENTIAL Slide 33 Communication Attributes Serial readers only. Cannot be set when using the IDL drivers. ATTRIB BAUD Default value is 115200. ATTRIB TTY=ON/OFF ATTRIB ECHO=ON/OFF For applications, its best to leave this OFF. COMPANY CONFIDENTIAL Slide 34 Communication Attributes ATTRIB XONXOFF=ON/OFF Default is OFF ATTRIB CHKSUM=ON/OFF To disable checksums use the following command: ATTRIB CHKSUM=OFFC9 Where C9 is the checksum for that command. Checksums ARE case sensitive so this command must be entered in upper case as shown above! COMPANY CONFIDENTIAL Slide 35 Report Attribute Settings ATTRIB IDREPORT=ON Reader will return the ECP ID for each tag read or written to. Default is ON. attrib idreport=off OK> r ant 1 OK> attrib idreport=on OK> r ant H000000000000000000000000 1 OK> COMPANY CONFIDENTIAL Slide 36 Report Attribute Settings ATTRIB NOTAGRPT=ON Returns NOTAG message when no tag is found. Default is ON. r NOTAG OK> attrib notagrpt=off OK> r OK> COMPANY CONFIDENTIAL Slide 37 Attribute Settings: TAGTYPE Can have multiple tag types separated by a comma ATTRIB TAGTYPE=EPCC1G2,ISO6BG2 Multiple tag types slows down the reader. ATTRIB TAGTYPE=MIXED does NOT enable epcc1g2 tag type. It is only enables ISO tag types. COMPANY CONFIDENTIAL Slide 38 Attribute Settings: FIELDSTRENGTH Sets the RF power level per port. Reader controls max and min values so you cannot violate your local regulations Min value = 15 dbi Max value = country specific Can be set in DB ATTRIB FIELDSTRENGTH=30db,30db,30db,30db Can be set as a % of max strength or in DB ATTRIB FIELDSTRENGTH=100,100,100,100 COMPANY CONFIDENTIAL Slide 39 Attribute Settings ATTRIB ANTS ATTRIB ANTS=1,2,3,4 Sets all four antennas as active ATTRIB ANTS=4 Gets/Sets active antennas Sets antenna 4 as active ATTRIB ANTS=2,4 Sets antennas 2 and 4 as active COMPANY CONFIDENTIAL Slide 40 Attribute Settings: INITIALQ Gets/Sets the initial number of tag slots used in the anti-collision algorithm. # of slots = 2^Q Once a collision is detected the reader will automatically adjust the Q value upward. For best performance you want to minimize the number of empty slots. COMPANY CONFIDENTIAL Slide 41 Attribute Settings: INITIALQ ATTRIB INITIALQ = 4 INITIALQ=4 means 16 slots are created. INITIALQ=1 means 1 slot is created. Only good for one tag. INITIALQ=0 means no slots are created. All tags respond immediately. Only good for one tag. COMPANY CONFIDENTIAL Slide 42 Attribute Settings: RDTRIES Is used when reading fields READ HEX(1:4,2) READ HEX(3:0,16) Not used when reading just the EPCID ATTRIB RDTRIES=3 COMPANY CONFIDENTIAL Slide 43 Attribute Settings: WRTRIES Is used when writing fields WRITE HEX(1:4,2)=H0102 WRITE HEX(3:0,12)=0102030405060708090A0B ATTRIB WRTRIES=3 COMPANY CONFIDENTIAL Slide 44 Attribute Settings: SESSION ATTRIB SESSION=<value> Sets tag persistence What is persistence? When a tag momentarily loses power during the tag reading process, will it remember if its already been read? Persistence sets the length of time a tag will remember its been read. Critical when reading a large number of tags COMPANY CONFIDENTIAL Slide 45 Attribute Settings: SESSION Session = 0 No persistence Best for reading single tags Best for making tags/second measurements Session = 1 Max 5 seconds persistence. With Intermec readers we have found session one provides the most consistent read rates when reading large numbers of tags. Session = 2 and Session = 3 Share the same persistence features. Min persistence time of 2 seconds. COMPANY CONFIDENTIAL Slide 46 Attribute Settings: TIMEOUTMODE ATTRIB TIMEOUTMODE=ON/OFF Enables the use of timeouts instead of tries. Attrib SCHEDOPT=1 overrides this attribute. Timeouts are the preferred mode. COMPANY CONFIDENTIAL Slide 47 Attribute Settings: IDTIMEOUT ATTRIB IDTIMEOUT=<value> Time defined in milliseconds Total time the reader will try to read tags. This time is an approximate value. ATTRIB IDTIMEOUT=2000 Reader will read tags for 2 seconds. COMPANY CONFIDENTIAL Slide 48 Attribute Settings: ANTTIMEOUT ATTRIB ANTTIMEOUT=<value> Time defined in milliseconds Time the reader will try to read tags on an antenna before switching to the next antenna. After time expires the reader will switch to the next antenna. ANTTIMEOUT cannot exceed IDTIMEOUT Idtimeout=1000 and anttimeout=2000: means reader will read for a total of 1 second on the first antenna. COMPANY CONFIDENTIAL Slide 49 Attribute Settings: IDTRIES ATTRIB IDTRIES=<value> Sets the number of times to cycle through the antennas. No time associated with tries, the more tags in the field the longer the read will take. I recommend IDTRIES=1 COMPANY CONFIDENTIAL Slide 50 Attribute Settings: ANTTRIES ATTRIB ANTTRIES=<value> Sets the number of inventory rounds to run before switching antennas. I recommend ANTTRIES=1 COMPANY CONFIDENTIAL Slide 51 Attribute Settings: INITTRIES ATTRIB INITTRIES=<value> Sets the number of times to cycle through IDTRIES or IDTIMEOUT. Functions as a multiplier INITITRIES x IDTRIES INITTRIES x IDTIMEOUT I recommend INITTRIES=1 NO advantage to setting it higher than one. COMPANY CONFIDENTIAL Slide 52 Tries vs. Timeouts ????? Depends on what you are trying to do. Timeouts are better when you are reading a large number of tags. Will talk about this more later. For EPCC1G2 I’ve found that TRIES don’t matter much, just set them to ONE. IDTRIES=1 ANTTRIES=1 INITTRIES=1 COMPANY CONFIDENTIAL Slide 53 Attribute Settings: SCHEDOPT ATTRIB SCHEDOPT=0/1 Controls how the reader cycles through the antennas. Originally added to make readers more responsive to commands while reading very large groups of tags when in continuous read mode. More important for all readers EXCEPT the IF61. COMPANY CONFIDENTIAL Slide 54 Attribute Settings: SCHEDOPT SCHEDOPT = 0 Disabled Reader will use attributes as defined. COMPANY CONFIDENTIAL Slide 55 Attribute Settings: SCHEDOPT SCHEDOPT = 1 Enabled During continuous reads, reader will check for incoming commands and execute them. Makes reader more responsive when reading a large number of tags. COMPANY CONFIDENTIAL Slide 56 Attribute Settings: SCHEDOPT SCHEDOPT = 1 Overrides ATTRIB TIMEOUTMODE=OFF Will use IDTIMEOUT, ANTTIMEOUT if they are non-zero. Disable timeouts by setting one or both to zero If IDTIMEOUT=0 will uses IDTRIES If ANTTIMEOUT=0 will use ANTTRIES I recommend setting ANTTIMEOUT=0 and ANTTRIES=1 COMPANY CONFIDENTIAL Slide 57 CASE 1: ATTRIB SCHEDOPT=0 Settings TIMEOUTMODE=ON IDTIMEOUT=0 ANTTIMEOUT=0 READ…. Do nothing COMPANY CONFIDENTIAL Slide 58 CASE 2: ATTRIB SCHEDOPT=0 Settings TIMEOUTMODE=ON IDTIMEOUT != 0 ANTTIMEOUT=0 READ…. while (IDTIMEOUT not elapsed) { foreach antenna { //execute one inventory round } } COMPANY CONFIDENTIAL Slide 59 CASE 3: ATTRIB SCHEDOPT=0 Settings TIMEOUTMODE=ON IDTIMEOUT=0 ANTTIMEOUT != 0 READ… foreach antenna { while (ANTTIMEOUT not elapsed) { //execute one inventory round } } COMPANY CONFIDENTIAL Slide 60 CASE 4: ATTRIB SCHEDOPT=0 Settings TIMEOUTMODE=ON IDTIMEOUT < ANTTIMEOUT ANTTIMEOUT != 0 READ… foreach antenna { while (IDTIMEOUT not elapsed) { //execute one inventory round } } COMPANY CONFIDENTIAL Slide 61 CASE 5: ATTRIB SCHEDOPT=0 Settings TIMEOUTMODE=ON IDTIMEOUT>=ANTTIMEOUT ANTTIMEOUT != 0 READ… while (IDTIMEOUT not elapsed) { foreach antenna { while (ANTTIMEOUT not elapsed) { //execute one inventory round if (tag found) restart ANTTIMEOUT timer if (IDTIMEOUT timer elapsed) break; } if (IDTIMEOUT timer elapsed) break; } } COMPANY CONFIDENTIAL Slide 62 CASE 6: ATTRIB SCHEDOPT=1 If (IDTIMEOUT != 0) { while (IDTIMEOUT not elapsed) { foreach antenna { If (ANTTIMEOUT != 0) { While (!ANTTIMEOUT) { //Execute one inventory round } } else { Foreach ANTTRY { //Execute one inventory round } } } } COMPANY CONFIDENTIAL Slide 63 CASE 7: ATTRIB SCHEDOPT=1 If (IDTIMEOUT == 0 && IDTRIES>0) { foreach IDTRY { foreach antenna { If (ANTTIMEOUT != 0) { While (!ANTTIMEOUT) { //Execute one inventory round } } else { Foreach ANTTRY { //Execute one inventory round } } } } COMPANY CONFIDENTIAL Slide 64 Data Field Definitions Optional fields of tag specific data that can be added to READ and WRITE commands. Will be returned with the EPCID. The following fields are READ ONLY: ANT COUNT Antenna that tag was read on. Values: 1,2,3,4 Number of times tag was read. TIME Time stamp of when tag was first read in milliseconds. Not a real time but an internal timer that is reset when reader is powered up. COMPANY CONFIDENTIAL Slide 65 Data Field Definitions TAGID EPCID Memory Bank 1 TAGTYPE Memory bank 2 Returns the tag type, EPCID, ISO6BG1, ISO6BG2…etc. RSSI Return Signal Strength Intensity Range: -128 dbm to 0 dbm. Example READ ANT COUNT RSSI… COMPANY CONFIDENTIAL Slide 66 Comments or Questions COMPANY CONFIDENTIAL Slide 67 Reading Tags COMPANY CONFIDENTIAL Slide 68 Reading Tags READ, RD, R 4 read modes to choose from REPORT=DIRECT REPORT=NO REPORT=EVENT REPORT=EVENTALL COMPANY CONFIDENTIAL Slide 69 Read Mode: REPORT=DIRECT Good for reading small number of tags Good for mapping RF Field Returns tag list after command completes Length of read depends on attrib settings: IDTRIES, ANTTRIES, IDTIMEOUT, ANTTIMEOUT COMPANY CONFIDENTIAL Slide 70 Read Mode: REPORT=DIRECT Examples Standard Read READ ANT COUNT … READ ANT COUNT …REPORT=DIRECT Read with filter Read where HEX(1:4,2)=H1111 Read with filter and fields Read COUNT where HEX(1:4,2)=H1111 TIME ANT COMPANY CONFIDENTIAL Slide 71 How Tries Work: READ REPORT=DIRECT Antenna 1 InitTries=1 Antenna 1 Antenna 1 IDTries=1 AntTries=1 IDTries=2 AntTries=1 Antenna 2 Send TAG RESET AntTries=2 AntTries=2 AntTries=3 AntTries=3 ATTRIB ANTS=1,2 ATTRIB INITRIES=1 ATTRIB IDTRIES=2 Antenna 2 Antenna 2 ATTRIB ANTTRIES=3 AntTries=1 AntTries=1 AntTries=2 AntTries=2 AntTries=3 AntTries=3 COMPANY CONFIDENTIAL STOP Slide 72 How Timeouts & Tries Work: READ REPORT=DIRECT Send TAG RESET Antenna 1 Antenna 2 InitTries=1 IDTIMEOUT=1000 READ ON ANT 1 READ ON ANT 2 Antenna 3 ATTRIB ANTS=1,2,3 ATTRIB INITRIES=1 READ ON ANT 3 ATTRIB IDTIMEOUT=1000 ATTRIB ANTTRIES=1 COMPANY CONFIDENTIAL Slide 73 Read Mode: REPORT=NO Good for reading large number of tags. Good for seeing how many times a tag can be read. Must POLL for tag list. READ POLL Provides best reading performance. You must STOP the read when you are finished. READ STOP R STOP RD STOP COMPANY CONFIDENTIAL Slide 74 Read Mode: REPORT=NO Examples Standard Read Read with filter READ ANT COUNT …REPORT=NO Read where HEX(1:4,2)=H1111 REPORT=NO Read with filter and fields Read COUNT where HEX(1:4,2)=H1111 REPORT=NO COMPANY CONFIDENTIAL Slide 75 Read Mode: REPORT=NO READ POLL Returns tag list from reader. Clears tag list in reader Must be sent BEFORE sending READ STOP. Can be sent as often as you want while the reader is reading. COMPANY CONFIDENTIAL Slide 76 How Tries Work: READ REPORT=NO,EVENT Antenna 1 InitTries=1 Antenna 1 Antenna 1 IDTries=1 AntTries=1 IDTries=2 AntTries=1 Antenna 2 Send TAG RESET AntTries=2 AntTries=2 ATTRIB ANTS=1,2 AntTries=3 AntTries=3 ATTRIB INITRIES=1 ATTRIB IDTRIES=2 Antenna 2 Antenna 2 ATTRIB ANTTRIES=3 AntTries=1 AntTries=1 AntTries=2 AntTries=2 AntTries=3 AntTries=3 COMPANY CONFIDENTIAL Slide 77 How Timeouts & Tries Work: READ REPORT=NO or EVENT Send TAG RESET Antenna 1 Antenna 2 InitTries=1 IDTIMEOUT=1000 READ ON ANT 1 READ ON ANT 2 Antenna 3 ATTRIB ANTS=1,2,3 ATTRIB INITRIES=1 READ ON ANT 3 ATTRIB IDTIMEOUT=1000 ATTRIB ANTTRIES=1 COMPANY CONFIDENTIAL Slide 78 Read Mode: REPORT=EVENT Good for reading large number of tags. Tags will be returned asynchronously as events: EVT:TAG H0102030405060708090A0B Tags will be returned one time only when first seen. You must STOP the read when you are finished. Only on IF61 Release 2 will the performance equal REPORT=NO COMPANY CONFIDENTIAL Slide 79 Read Mode: REPORT=EVENT Examples Standard Read Read with filter READ ANT COUNT …REPORT=EVENT Read where HEX(1:4,2)=H1111 REPORT=EVENT Read with filter and fields R COUNT where HEX(1:4,2)=H1111 REPORT=EVENT COMPANY CONFIDENTIAL Slide 80 Read Mode: REPORT=EVENTALL Tags will be returned each time they are seen. Tags will be returned as asynchronous events EVT:TAG H0102030405060708090A0B Good for testing purposes. Warning, you can get over whelmed by tags. NOT good for reading large number of tags. COMPANY CONFIDENTIAL Slide 81 Read Mode: REPORT=EVENTALL Examples Standard Read Read with filter READ ANT COUNT …REPORT=EVENTALL Read where HEX(1:4,2)=H1111 REPORT=EVENTALL Read with filter and fields R COUNT where HEX(1:4,2)=H1111 REPORT=EVENTALL COMPANY CONFIDENTIAL Slide 82 Accessing Tag Memory What if you want to read/write memory other than the EPC code? Field Types TAGID HEX String (STR) Bit Integer (INT) COMPANY CONFIDENTIAL Slide 83 Accessing Tag Memory TAGID refers to memory bank 2 Typically read only (locked by manufacturer). Can be 4 bytes or 8 bytes long READ TAGID H0102030405060708090A0B H01020304 H0102030405060708090A0B H0102030405060708 COMPANY CONFIDENTIAL Slide 84 Accessing Tag Memory HEX(Memory Bank:Start Address,Length) READ HEX(3:0,7) READ HEX(3:0,7) HEX(2:0,2) H0102030405060708090A0B H01020304050607 H0102030405060708090A0B H01020304050607 H0102 READ HEX(3:0,7) HEX(2:0,2) ANT H0102030405060708090A0B H01020304050607 H0102 4 COMPANY CONFIDENTIAL Slide 85 Accessing Tag Memory String(Memory Bank,Start Address,Length) READ STR(3:0,10) READ STR (3:0,5) STR(3:5,5) H0102030405060708090A0B HELLOWORLD H0102030405060708090A0B HELLO WORLD READ STR (3:0,10) HEX(2:0,2) ANT H0102030405060708090A0B HELLOWORLD H0102 4 COMPANY CONFIDENTIAL Slide 86 Accessing Tag Memory Bit(Memory Bank,Start Bit,Length in Bits) Can only be used in a WHERE clause. Cannot be used for reading or writing data. r where bit(1:127,1)=B0 COMPANY CONFIDENTIAL Slide 87 Accessing Tag Memory Read all tags r H11223344486B1F95F8D40002 H11223344486B1F95F8D40003 H11223344486B1F95F8D40001 H11223344486B1F95F8D40004 Read only odd EPC IDs… r where bit(1:127,1)=B1 H11223344486B1F95F8D40003 H11223344486B1F95F8D40001 COMPANY CONFIDENTIAL Slide 88 Accessing Tag Memory Read only even EPC IDs… r where bit(1:127,1)=B0 H11223344486B1F95F8D40002 H11223344486B1F95F8D40004 Read only even EPC IDs… r where bit(1:127,1)=B0 H11223344486B1F95F8D40002 H11223344486B1F95F8D40004 COMPANY CONFIDENTIAL Slide 89 Accessing Tag Memory Read only EPC IDs that end with the last two bits set… r where bit(1:126,2)=b11 H11223344486B1F95F8D40003 Read only EPC IDs that end in 4… r where bit(1:124,4)=b0100 H11223344486B1F95F8D40004 COMPANY CONFIDENTIAL Slide 90 Accessing Tag Memory Integer(Memory Bank,Start Address,Length) 1 byte: 0 to 255 2 byte: 0 to 65,535 3 byte: 0 to 16,777,215 4 byte: 0 to 4,294,967,295 READ INT(1:6,1) H0102030405060708090A0B 5 COMPANY CONFIDENTIAL Slide 91 Comments or Questions COMPANY CONFIDENTIAL Slide 92 Writing to Tags COMPANY CONFIDENTIAL Slide 93 Writing to Tags WRITE, WR, W Must write even number of bytes (2,4,6,…) Must start write on even memory boundaries (0,2,4,…) Writes all tags found! Each field written will return a status message. COMPANY CONFIDENTIAL Slide 94 Writing to Tags Write command can return 6 possible messages. <EPCID> WROK <EPCID> WRERR Write failed ERR Write succeeded Invalid command format (typo?) NOTTAG No tags were found COMPANY CONFIDENTIAL Slide 95 Writing to Tags <EPCID> MEMOVRN This error indicates the address used in the write command was not valid. <EPCID> PVERR This error indicates a missing or invalid password was used. Memory is protected and a password must be used with the write. <EPCID> PWERR Tag does not enough power to complete the write. COMPANY CONFIDENTIAL Slide 96 Writing to Tags READ WRITE EPCID=H112233445566778899AABB H0102030405060708090A0B H0102030405060708090A0B WROK<CRLF>OK><CRLF> W HEX(1:12,2)=H0101 STR(3:0,4)=”GOOD” INT(3:6,1)=7 H1234567890ABCDEF WROK WROK H1234567890ABAAAA WROK WRERR H1234567890ABBBBB PVERR PVERR COMPANY CONFIDENTIAL Slide 97 Writing to Tags When programming EPCID’s make sure there is only one tag present or they will all be programmed with the SAME EPCID. If necessary use a WHERE clause to singulate a tag for reading or writing… W HEX(1:4,2)=H0102 WHERE HEX(1:10,2)=H0102 COMPANY CONFIDENTIAL Slide 98 Reading and Writing Large Amounts of Data The larger the amount of data you want to read/write, the more likely it will fail (air protocol issues) Best to break the large field up into small fields If one small field fails you only have to READ/WRITE that field, not ALL of the data. Much more efficient overall. COMPANY CONFIDENTIAL Slide 99 Reading and Writing Large Amounts of Data READ HEX(3:0,64) H0102030405060708090A0B RDERR If this fails, you must reread all 64 bytes. READ HEX(3:0,16) HEX(3:16,16) HEX(3:32,16) HEX(3:48,16) H0102030405060708090A0B H<> RDERR H<> H<> Only need to reread 16 bytes of data COMPANY CONFIDENTIAL Slide 100 Comments or Questions COMPANY CONFIDENTIAL Slide 101 GPIO and TRIGGERS (General Purpose Input Output) COMPANY CONFIDENTIAL Slide 102 General Purpose Input Output GPI (General Purpose Inputs) There are 4 inputs Attach motion sensors Use to start and stop reading/writing GPO (General Purpose Outputs) There are 4 outputs Attach light bars, buzzers Send signal to start/stop conveyors COMPANY CONFIDENTIAL Slide 103 General Purpose Input Output READGPIO Returns the current GPI states as a decimal value representing the GPI mask READGPIO 15<CRLF>OK><CRLF> If you need to monitor the GPI states its better to use a trigger. COMPANY CONFIDENTIAL Slide 104 General Purpose Input Output WRITEGPIO=<value> Sets the GPO state Defined as a decimal value representing the binary mask WRITEGPIO=15 WRITEGPIO=8 Used to turn on light bars, buzzers, etc. COMPANY CONFIDENTIAL Slide 105 Triggers Creates, displays, and deletes trigger events that are based on the GPI states. You can create up to 10 triggers. Used by the BRI to create asynchronous event messages. Can be used in conjunction with motion sensors to START and STOP reading/writing processes. COMPANY CONFIDENTIAL Slide 106 Triggers Syntax TRIGGER RESET TRIGGER [RESET|DELETEALL| <“NAME”> <GPIO|GPIOEDGE> <MASK> <VALUE> FILTER <DELAY> [ACTION “MACRO_NAME”]] Deletes/clears all triggers, trigger events. TRIGGER DELETEALL Deletes all triggers. Does not remove trigger events. COMPANY CONFIDENTIAL Slide 107 Triggers <“Name”> Is the name the user wants to identify the trigger by. Must be in quotes. “mytrig_On” “motion_OFF” “A” “B” COMPANY CONFIDENTIAL Slide 108 Triggers GPIO Indicates level type trigger Trigger “mytrigger” gpio 1 1 filter 0 Fires whenever the level is met Fires continuously Reader will only send trigger event when you send TRIGGERREADY or TRIGGERWAIT Avoid using this type! COMPANY CONFIDENTIAL Slide 109 Triggers GPIOEDGE Indicates edge type trigger Trigger “mytrigger” gpioedge 1 1 filter 0 Fires only once, when state is met. Use this type of trigger! Do not need to use TRIGGERREADY or TRIGGERWAIT COMPANY CONFIDENTIAL Slide 110 Triggers <MASK> <VALUE> <Mask> is AND’ed with actual GPI state mask If that result equals the <VALUE> then the trigger fires. Integer value representing Binary masking of GPI’s. GPI 1 = 1110 = decimal mask 14 GPI 2 = 1101 = decimal mask 13 GPI 3 = 1011 = decimal mask 11 GPI 4 = 0111 = decimal mask 7 COMPANY CONFIDENTIAL Slide 111 Triggers <MASK> <VALUE> Warning based on wiring of GPI’s and GPO’s the binary masks may be reversed. Also valid for IF61, IF5 and IF30 GPI 1 = 0001 = decimal mask 1 GPI 2 = 0010 = decimal mask 2 GPI 3 = 0100 = decimal mask 4 GPI 4 = 1000 = decimal mask 8 COMPANY CONFIDENTIAL Slide 112 Triggers FILTER <DELAY> Used with level (GPIO) triggers Determines how long the reader will hold that state on. For GPIOEDGE triggers set this to ZERO [ACTION “MACRO_NAME”]] Allows the trigger to call a user defined macro. Macro name is in quotes. More on this in macro section COMPANY CONFIDENTIAL Slide 113 Macros SET MyMacroName = “R ANT COUNT” SET With no parameters will display all macros in memory SET MyMacroName= Creates macro Deletes that macro PRINT $<NAME> Displays macro COMPANY CONFIDENTIAL Slide 114 Macros SET MyMacroFilter=“WHERE HEX(1:4,2)=H0102” $MyMacroName Will execute that macro. READ $MyMacroFilter Will execute a READ using the filter defined in the macro READ WHERE HEX(1:4,2)=H0102 COMPANY CONFIDENTIAL Slide 115 Macros WRITE hex(1:6,4)=h01020304 $MyMacroFilter Will execute a WRITE using the filter defined in the macro WRITE hex(1:6,4)=h01020304 WHERE HEX(1:4,2)=H0102 Multi command macros Use semi-colon to separate commands Set mymacro=“attrib ants=1;read;attrib ants=2,read” COMPANY CONFIDENTIAL Slide 116 Triggers with ACTION Macros Macros can be called from triggers using the ACTION keyword Set mymacro=“read ant count time” Trigger “mytrigger” gpioedge 1 1 filter 0 ACTION “mymacro” Whenever this trigger fires the macro mymacro will be executed. COMPANY CONFIDENTIAL Slide 117 Comments or Questions COMPANY CONFIDENTIAL Slide 118 EPCC1G2 Memory Map Bank 3 UID Optional ? Bytes Bank 2 TID 4+ Bytes (not necessarily unique) Bank 1 Header info Bytes 0-3 EPC Code Bytes 4-15 Bank 0 Kill Password 4 Bytes Access Password 4 Bytes COMPANY CONFIDENTIAL Slide 119 Command: KILLTAG Permanently disables tag Tag will not respond to any reader! KILLTAG [TAGTYPE=<tagtype list>] [WHERE <data condition>] [PASSWORD=<kill>] You must program KILL password and protect it before you can use the KILLTAG command Kill password cannot be nulls (0x00) COMPANY CONFIDENTIAL Slide 120 Command: KILLTAG W HEX(0;0,4)=H01020304 PROTECT ON HEX(0:0,4) PASSWORD=H01020304 KILLTAG WHERE PASSWORD=H01020304 KILLTAG WHERE EPCID=H3003000000FF8600000D0569 PASSWORD=H01020304 COMPANY CONFIDENTIAL Slide 121 Command: ERASE Allows you to perform a block erase of an EPCC1G2 tag. ERASE [DATA FIELD] [READ FIELD] [TAGTYPE = <tag type list>] [WHERE <data condition>] [PASSWORD=<“access_password”>] COMPANY CONFIDENTIAL Slide 122 Command: ERASE ERASE HEX(1:4,6) ERASEOK<CRLF>OK><CRLF> ERASEERR<CRLF>OK><CRLF> PVERR<CRLF>OK><CRLF> PWERR<CRLF>OK><CRLF> COMPANY CONFIDENTIAL Slide 123 ACCESS Password Access passwords control WRITE access to memory banks. You must program a valid, non null access password before you can PROTECT or LOCK a tag. Access password is located at membank 0, bytes 4-8. You must PROTECT the password before it becomes active. COMPANY CONFIDENTIAL Slide 124 ACCESS Password Reading Access password R HEX(0,4,4) reads the access password if its not protected Returns PVERR if protected R HEX(0,4,4) password=h11111111 reads the access password if it is protected Set Access Password W HEX(0:4,4)=H11111111 COMPANY CONFIDENTIAL Slide 125 Command: PROTECT ON “Locks” entire memory bank so that it cannot be written to with out the proper password. When passwords are protected you cannot read or write them with out the password. Cannot use keywords such as EPCID, TAGID For example the following will NOT work PROTECT ON EPCID PASSWORD=H11111111 Returns ERR COMPANY CONFIDENTIAL Slide 126 Command: PROTECT ON Two types of protection Reversible Permanent Protect Access Password You must protect Access password before it becomes active. PROTECT ON HEX(0:4,4) PASSWORD=H11111111 COMPANY CONFIDENTIAL Slide 127 Command: PROTECT ON Protect Memory Bank 1, EPCID PROTECT ON HEX(1:4,2) PASSWORD=H11111111 Now you can read EPC ID but not write to it. Entire memory bank is protected COMPANY CONFIDENTIAL Slide 128 Command: PROTECT OFF Setting PROTECT OFF PROTECT OFF HEX(1:4,2) PASSWORD=H11111111 Now you can write EPC ID. COMPANY CONFIDENTIAL Slide 129 Command: PROTECT Permanent Is irreversible! Protecting ACCESS password PROTECT ON PERMANENT HEX(0:4,4) PASSWORD=H11111111 Password cannot be unprotected. COMPANY CONFIDENTIAL Slide 130 Command: PROTECT Permanent You can also unlock a memory bank permanently so that it can never be protected PROTECT OFF PERMANENT HEX(0:4,4) PASSWORD=H11111111 Password cannot be protected. PROTECT OFF PERMANENT HEX(1:4,2) PASSWORD=H11111111 EPC bank cannot be protected. COMPANY CONFIDENTIAL Slide 131 Locking Tags LOCK Command Valid for ISO 18000-6B tags. To lock or protect EPCglobal Gen 2 tags use PROTECT Irreversible LOCK STRING(18,5)=”HELLO” Successful lock Locking error LCKOK<CRLF> LCKERR<CRLF> Data already locked PVERR<CRLF> Always write data first, verify its correct, then LOCK. ATTRIB LOCKTRIES COMPANY CONFIDENTIAL Slide 132 Other Useful Commands COMPANY CONFIDENTIAL Slide 133 Other Useful Commands REPEAT <value> Will repeat the last READ or WRITE command <value> number of times Avoid using this in an application READ ANT COUNT TIME H0102030405060708090A0B<CRLF>OK><CRLF> REPEAT 2 H0102030405060708090A0B<CRLF>OK><CRLF> H0102030405060708090A0B<CRLF>OK><CRLF> COMPANY CONFIDENTIAL Slide 134 Other Useful Commands RESET Performs a warm boot of the reader module. FACDFLT Restores factory default settings. COMPANY CONFIDENTIAL Slide 135 Comments or Questions COMPANY CONFIDENTIAL Slide 136