background image

-10-

v7.0

Usage

5. Usage

 •

The maximum operational range is about 7 cm for a card and 5 cm for a tag or a sticker. A target beyond this distance 

will not be detected, or the communications with it will be full of errors. Some RF-related registers in the module can be 

trimmed to try to improve this range, but it is not really recommended. 

 •

Besides, the minimum range is of a few mm. A card which is closer than this to the RFID/NFC module’s antenna could not 

be detected. 

 •

Optimal results are obtained when the card is placed parallel to the surface of the antenna, still and at a distance of 1 cm. 

 •

It is advised to execute one

 init()

 function each time that we need to do some RFID operation, just like shown in the 

examples. That will reset the module to the correct configuration and avoid problems. 

 •

As shown in the examples, it is good to use “if’s” to control which functions are executed. For example, if the 

authenticate() 

function was not successful, it does not make sense to execute one

 read()

 after that. Also, if the 

init()

 function was 

not successful, or if it did not deliver an UID and a valid ATQ-A, it does not make sense to execute an 

authenticate()

 

afterwards. All functions should deliver ‘0’ when executed correctly. 

 •

When any of the functions does not deliver a successful execution, it is advised to end the loop and start the RFID/NFC 

process from the beginning (from the 

init()

 function). 

 •

A typical read or write process can take around 80 ms. Make sure the card remains 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 can control a 

LED (built-in or external) or a buzzer for this goal. 

 •

After a successful operation, it is advised to execute a short delay (e.g. 2 seconds) to let the user take his card away. This way 

we avoid to execute the same operation more than one time. 

 •

The RFID/NFC antenna should be located in an accessible and comfortable place for the user. 

 •

The RFID/NFC antenna, the RFID/NFC module, the battery or Waspmote are not waterproof, so an enclosure is mandatory 

when the system is going to work outdoors. The antenna should be fixed really close to the wall of the enclosure. Metallic 

enclosures are not advised. 

 •

In general, avoid placing the RFID/NFC antenna near metallic objects, since the communication range could decrease. 

 •

It can be a good idea to place the antenna near the top of the enclosure, in parallel with the ground. This way the user can 

just let the card lie still on top of the case for a while. Wherever the antenna is, do not forget to indicate in your enclosure 

where it is. 

 •

Use the Waspmote’s Expansion Board to enable another communication module to transmit certain (or all) RFID/NFC 

operations to another device or to a data center. 

 •

Use a micro SD card to store certain (or all) RFID/NFC operations. This can be a security back up. 

 •

Add one Meshlium device to your ecosystem for advanced features such as Linux OS tools, MySQL data base storing system, 

WiFi and Ethernet connectivity, remote web server or higher computing speed.

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: