background image

RFID/NFC 13.56MHz

Networking Guide

Summary of Contents for Libelium

Page 1: ...RFID NFC 13 56MHz Networking Guide...

Page 2: ...he module off 16 8 4 Initiating the module 16 8 5 Authenticating a sector 17 8 6 Reading a block 17 8 7 Reading a block with authentication 18 8 8 Writing in a block 18 8 9 Writing in a block with aut...

Page 3: ...3 v7 0 10 Certifications 24 11 Code examples and extended information 25 12 API changelog 28 Index...

Page 4: ...tood as a remote storage unit where we can read and write information without contact Most of the RFID tags are passive which implies that the RFID module must create an electromagnetic field in order...

Page 5: ...e RFID NFC applications the most common are access control security events ticketing public transport equipment and personnel tracking logistics real time inventories marketing information kiosks Figu...

Page 6: ...ol these operations Waspmote is connected to the RFID NFC module through its UART interface The ISO IEC 14443 A Mifare standard offers a 3 pass authentication method to enable secure encrypted communi...

Page 7: ...igfox LoRaWAN Bluetooth Pro Bluetooth Low Energy and RFID NFC Besides the following Industrial Protocols modules are available RS 485 Modbus RS 232 Serial Modbus and CAN Bus Some of the possible combi...

Page 8: ...Sensor Boards Agriculture v30 and Agriculture PRO v30 Incompatible with Watermark and solar radiation sensors Events v30 Incompatible with interruption shift register Gases v30 DIGITAL6 is incompatibl...

Page 9: ...and 6 The first 6 bytes 0 5 are the key A and the last 5 bytes 10 15 are the key B As we will see before reading or writing in any block we must first authenticate us to that sector by providing one...

Page 10: ...mains within the field until the whole process is completed Figure Typical RFID NFC operation Some kind of indicator is strongly advised to let the user know that data exchange was successful Waspmote...

Page 11: ...usands of millions that you find another card like yours Q Can I order or select a specific UID for my card A No the cards UIDs are set in a random way Q I do not know remember the key for a certain b...

Page 12: ...n other sectors One example sector 2 personal general info key only known by all the institutions of the city council sector 3 city s transport info key only known by the bus company sector 4 city s l...

Page 13: ...ange bigger amounts of data Libelium s RFID NFC module supports both operations in a native way RFID 13 56 MHz ISO IEC 14443 A Mifare protocols and NFC NFCIP 1 but Libelium has not implemented softwar...

Page 14: ...nction Brief description bool configureSAM void set internal parameters of the PN532 sendTX uint8_t dataTX uint8_t length uint8_t outLength Send data stored in dataTX getACK void Wait for ACK response...

Page 15: ...ne card s block readWithAuth UID key data ad authenticates one card s sector and reads one block write ad data writes one card s block writeWithAuth UID key data ad authenticates one card s sector and...

Page 16: ...EC 14443 A card in the field does the anti collision loop and selects the card to operate This function is enough for those applications which just require to get the UID of cards since most of the IS...

Page 17: ...TQ inits systems and look for cards state RFID13 authenticate UID 2 key authenticates block number 2 all sector 0 actually of the selected card State of the executed function is stored http www libeli...

Page 18: ...unique identification of a card uint8_t key 6 stores the key or password memset key 0xFF 6 the key by default edit if needed state RFID13 init UID aux inits systems and look for cards state RFID13 aut...

Page 19: ...ards state RFID13 authenticate UID 2 key authenticates the block memset aux 0x00 16 stores 0 s in aux 16 bytes writeAndCheckWithAuth UID key aux 2 authenticates block 2 then writes the content of aux...

Page 20: ...6 stores the new key A uint8_t keyB_new 6 stores the new key B uint8_t config_new 4 0xFF 0x07 0x80 0x00 same cfg memset keyA_old 0xFF 6 the key by default edit if needed memset keyA_new 0x88 6 the ne...

Page 21: ...if the read UID is the same than the original card tr will be true http www libelium com development waspmote examples RFID1356 06 single cards counter 8 17 Searching a UID among a group of UIDs This...

Page 22: ...text aux converts from string to a uint8_t pointer http www libelium com development waspmote examples RFID1356 03 bus ticketing 8 19 Converting from a uint8_t pointer to an integer This function conv...

Page 23: ...d 25 ms write 25 ms So a full read or write in a block process init authenticate read or init authenticate write could take around 75 ms However a standard UID read init can take just 25 ms There is a...

Page 24: ...ifications See below the specific list of regulations passed More info at www libelium com products plug sense Besides Meshlium our multiprotocol router for the IoT is also certified with the certific...

Page 25: ...ut WITHOUT ANY WARRANTY without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE See the GNU General Public License for more details You should have received a copy of...

Page 26: ...ock number 1 and check afterwards state RFID13 writeAndCheck aux 1 if state 0 for int i 0 i sizeof text i clear this variable text i 0 firstDone true check the 16 bytes in block 1 state RFID13 read 1...

Page 27: ...ess happened check the 16 bytes in block 1 state RFID13 read 1 aux if state 0 if the read command was successful we show the data 16 bytes USB print r n Credit after the trip for int i 0 i 16 i if aux...

Page 28: ...28 v7 0 API changelog 12 API changelog Keep track of the software changes on this link www libelium com development waspmote documentation changelog RFID1356...

Reviews: