| 52 | |
| 53 | = Silence Tag = |
| 54 | |
| 55 | The UID passed must be a string in the reverse byte order that it is recieved in the string assemled by this can be sent directly to the serial port to silence the given RFID tag |
| 56 | |
| 57 | dim silencecommand as string |
| 58 | |
| 59 | Everything but checksum, portion before UID is the ISO15693 silence command for a TI S6350 |
| 60 | Byte 1 is the Start of Frame, always 01 |
| 61 | Byte 2 and 3 is the length of the command including the 2 byte check sum that is added to the end, Least Significant Byte first |
| 62 | Byte 4 and 5 is the node address, leave at 00 as we do not reference nodes |
| 63 | Byte 6 is the command flags, no flags present |
| 64 | Byte 7 is the command, &h60 means it is an ISO15693 command which will be in the data portion of the packet |
| 65 | Byte 8 is the config byte for the reader, &h11 means 100% modulation and 1/4 data mode |
| 66 | Byte 9 is the ISO15693 command flags, &h23 means 2 sub carriers, high data rate, and address flag is set |
| 67 | Byte 10 is the ISO15693 command, &h02 means be quiet |
| 68 | Byte 11-18 are the UID that needs to shut up |
| 69 | Byte 19 and 20 are the checksum that is added later |
| 70 | |
| 71 | An example would be: |
| 72 | |
| 73 | ChrB(&h01) + ChrB(&h14) + ChrB(&h00) + ChrB(&h00) + ChrB(&h00) + ChrB(&h00) + ChrB(&h60) + ChrB(&h11) + ChrB(&h23) + ChrB(&h02) + UID + Checksum |
| 74 | |
| 75 | |
| 76 | = Checksum = |
| 77 | |
| 78 | The checksum used by the TI S6350 is very basic. It is a 2 byte checksum. The first byte is the XOR of the string. The second byte is teh XOR of &hFF and the first byte. |
| 79 | |
| 80 | Here is an example of the code to do this: |
| 81 | |
| 82 | dim checksum as string |
| 83 | dim xornumber1 as integer |
| 84 | dim xornumber2 as integer |
| 85 | |
| 86 | 'Do a XOR of all the bytes of the string for byte 1 of the checksum |
| 87 | 'Do not worry about xornumber having a zero initially, this does not impact the XOR operation |
| 88 | for i as Integer=1 to len(data) |
| 89 | xornumber1 = xornumber1 xor ascB(mid(data,i,1)) |
| 90 | next |
| 91 | |
| 92 | 'calculates byte 2 of the checksum |
| 93 | xornumber2 = &hFF xor xornumber1 |
| 94 | |
| 95 | 'put the two together for the complete checksum |
| 96 | checksum = chrB(xornumber1) + chrB(xornumber2) |