#rfid #embedded-hal #mifare

no-std mfrc522

A platform agnostic driver to interface the MFRC522 (RFID reader/writer)

10 releases (6 breaking)

0.7.0 Jan 13, 2024
0.6.1 Nov 4, 2023
0.6.0 May 19, 2023
0.5.0 Mar 20, 2023
0.1.0 Jan 17, 2018

#1 in #rfid

Download history 112/week @ 2023-11-04 123/week @ 2023-11-11 78/week @ 2023-11-18 83/week @ 2023-11-25 50/week @ 2023-12-02 76/week @ 2023-12-09 63/week @ 2023-12-16 76/week @ 2023-12-23 35/week @ 2023-12-30 84/week @ 2024-01-06 269/week @ 2024-01-13 120/week @ 2024-01-20 406/week @ 2024-01-27 44/week @ 2024-02-03 117/week @ 2024-02-10 164/week @ 2024-02-17

736 downloads per month
Used in 3 crates

MIT/Apache

620KB
1.5K SLoC

Rust MFRC522 driver

This is a no_std driver for the MFRC522, an ISO/IEC 14443 A/MIFARE reader/writer IC. This repository is an extension of japaric/mfrc522 and the new home of the mfrc522 crate. For more information on the background of this repository, go here.

What works:

  • SPI communication with the MFRC522
  • Anticollision loop
  • Select for 4-byte and 7-byte UIDs
  • Mifare Classic authentication
  • Reading/writing data
  • Configurable timeout
  • Non-blocking API + support for the interrupt pin
  • Mifare Ultralight C 3DES authentication (no support planned)

Examples

In the examples/ directory, you can find an example for the Raspberry Pi and BeagleBone Black. The BeagleBone example fully demonstrates the available functionality.

This code has also been tested with the STM32L476 Nucleo board, if an extra example for this use-case would be required, please open an issue.

License

Licensed under either of

at your option.

Contribution

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.

Dependencies