From 1574b1d00240346f7d398a46a5bcac6aaff07bf7 Mon Sep 17 00:00:00 2001 From: vladko312 <37411315+vladko312@users.noreply.github.com> Date: Fri, 10 Dec 2021 22:52:58 +0300 Subject: [PATCH 01/13] Added ALPHA 8F328P-U pin layout Pins from the back side were used as on the front MOSI and MISO are marked as D0 and D1 just like D0/RX and D1/TX, but they do not seem to be directly connected. MOSI is directly connected to D11# and MISO is connected to D12#, the same code works with any of the two pins for each signal --- README.rst | 35 ++++++++++++++++++----------------- 1 file changed, 18 insertions(+), 17 deletions(-) diff --git a/README.rst b/README.rst index eb29033..30b96fa 100644 --- a/README.rst +++ b/README.rst @@ -153,28 +153,29 @@ The following table shows the typical pin layout used: | SPI SCK | SCK | 13 / ICSP-3 | 52 | D13 | ICSP-3 | 15 | ICSP3 | SPI-3 | +-----------+----------+-------------+---------+---------+-----------------+-----------+---------+---------+ -+-----------+---------------+--------------------------+ -| | ESP8266 | Teensy | -| +---------------+--------+--------+--------+ -| | Wemos D1 mini | 2.0 | ++ 2.0 | 3.1 | -+-----------+---------------+--------+--------+--------+ -| Signal | Pin | Pin | Pin | Pin | -+===========+===============+========+========+========+ -| RST/Reset | D3 | 7 | 4 | 9 | -+-----------+---------------+--------+--------+--------+ -| SPI SS | D8 | 0 | 20 | 10 | -+-----------+---------------+--------+--------+--------+ -| SPI MOSI | D7 | 2 | 22 | 11 | -+-----------+---------------+--------+--------+--------+ -| SPI MISO | D6 | 3 | 23 | 12 | -+-----------+---------------+--------+--------+--------+ -| SPI SCK | D5 | 1 | 21 | 13 | -+-----------+---------------+--------+--------+--------+ ++-----------+---------------+--------------------------+-------------+ +| | ESP8266 | Teensy | 8F328P-U | +| +---------------+--------+--------+--------+-------------+ +| | Wemos D1 mini | 2.0 | ++ 2.0 | 3.1 | ALPHA | ++-----------+---------------+--------+--------+--------+-------------+ +| Signal | Pin | Pin | Pin | Pin | Pin [5]_ | ++===========+===============+========+========+========+=============+ +| RST/Reset | D3 | 7 | 4 | 9 | D9# [1]_ | ++-----------+---------------+--------+--------+--------+-------------+ +| SPI SS | D8 | 0 | 20 | 10 | D10# [2]_ | ++-----------+---------------+--------+--------+--------+-------------+ +| SPI MOSI | D7 | 2 | 22 | 11 | MOSI / D11# | ++-----------+---------------+--------+--------+--------+-------------+ +| SPI MISO | D6 | 3 | 23 | 12 | MISO / D12# | ++-----------+---------------+--------+--------+--------+-------------+ +| SPI SCK | D5 | 1 | 21 | 13 | SCK | ++-----------+---------------+--------+--------+--------+-------------+ .. [1] Configurable, typically defined as RST_PIN in sketch/program. .. [2] Configurable, typically defined as SS_PIN in sketch/program. .. [3] The SDA pin might be labeled SS on some/older MFRC522 boards. .. [4] Source: `#111 `_ . +.. [5] Pin names from the back (empty) side of the board were used as more definitive. Important: If your micro controller supports multiple SPI interfaces, the library only uses the **default (first) SPI** of the Arduino framework. From 8458aeeddfa055abb196914ecfa381a17eb6f003 Mon Sep 17 00:00:00 2001 From: Brian Helterline Date: Sun, 5 Jun 2022 16:56:01 -0700 Subject: [PATCH 02/13] Update ReadNUID.ino Fixed decimal helper function --- examples/ReadNUID/ReadNUID.ino | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/ReadNUID/ReadNUID.ino b/examples/ReadNUID/ReadNUID.ino index ba6b892..ffc924e 100644 --- a/examples/ReadNUID/ReadNUID.ino +++ b/examples/ReadNUID/ReadNUID.ino @@ -123,7 +123,7 @@ void printHex(byte *buffer, byte bufferSize) { */ void printDec(byte *buffer, byte bufferSize) { for (byte i = 0; i < bufferSize; i++) { - Serial.print(buffer[i] < 0x10 ? " 0" : " "); + Serial.print(' '); Serial.print(buffer[i], DEC); } } From 6a55d3a5f4dd04941c6c8b236d763e7095d22dbb Mon Sep 17 00:00:00 2001 From: Rotzbua Date: Tue, 17 Jan 2023 12:42:01 +0100 Subject: [PATCH 03/13] Create dependabot.yml --- .github/dependabot.yml | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 .github/dependabot.yml diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 0000000..a0d0f87 --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,15 @@ +# To get started with Dependabot version updates, you'll need to specify which +# package ecosystems to update and where the package manifests are located. +# Please see the documentation for all configuration options: +# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates + +version: 2 +updates: + - package-ecosystem: "github-actions" # See documentation for possible values + directory: "/" # Location of package manifests + schedule: + interval: "monthly" + timezone: "Europe/Berlin" + time: "05:00" + labels: + - "github-actions-dependencies" From 94975bbd1477f549da78d8b1a90d96bc9fbe237d Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 17 Jan 2023 11:42:27 +0000 Subject: [PATCH 04/13] Bump actions/checkout from 2 to 3 Bumps [actions/checkout](https://github.com/actions/checkout) from 2 to 3. - [Release notes](https://github.com/actions/checkout/releases) - [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md) - [Commits](https://github.com/actions/checkout/compare/v2...v3) --- updated-dependencies: - dependency-name: actions/checkout dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- .github/workflows/autoreview.yml | 2 +- .github/workflows/test.platformio.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/autoreview.yml b/.github/workflows/autoreview.yml index 367b690..6aa7dd6 100644 --- a/.github/workflows/autoreview.yml +++ b/.github/workflows/autoreview.yml @@ -5,7 +5,7 @@ jobs: misspellcheck: runs-on: ubuntu-20.04 steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - name: Run misspell with reviewdog uses: reviewdog/action-misspell@v1 #with: diff --git a/.github/workflows/test.platformio.yml b/.github/workflows/test.platformio.yml index 4117b59..ee63619 100644 --- a/.github/workflows/test.platformio.yml +++ b/.github/workflows/test.platformio.yml @@ -31,7 +31,7 @@ jobs: # example: AccessControl steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - name: Cache pip uses: actions/cache@v2 with: From 7314529c8c70fdccc70425ab1ec9dfecb4ca720a Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 17 Jan 2023 19:46:56 +0000 Subject: [PATCH 05/13] Bump actions/cache from 2 to 3 Bumps [actions/cache](https://github.com/actions/cache) from 2 to 3. - [Release notes](https://github.com/actions/cache/releases) - [Changelog](https://github.com/actions/cache/blob/main/RELEASES.md) - [Commits](https://github.com/actions/cache/compare/v2...v3) --- updated-dependencies: - dependency-name: actions/cache dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- .github/workflows/test.platformio.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test.platformio.yml b/.github/workflows/test.platformio.yml index ee63619..4fc2ddc 100644 --- a/.github/workflows/test.platformio.yml +++ b/.github/workflows/test.platformio.yml @@ -33,13 +33,13 @@ jobs: steps: - uses: actions/checkout@v3 - name: Cache pip - uses: actions/cache@v2 + uses: actions/cache@v3 with: path: ~/.cache/pip key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }} restore-keys: ${{ runner.os }}-pip- - name: Cache PlatformIO - uses: actions/cache@v2 + uses: actions/cache@v3 with: path: ~/.platformio key: ${{ runner.os }}-${{ hashFiles('**/lockfiles') }} From 1e73cd34d977c5fe17fa5f2e2e8174650a572028 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 17 Jan 2023 19:51:10 +0000 Subject: [PATCH 06/13] Bump actions/setup-python from 2 to 4 Bumps [actions/setup-python](https://github.com/actions/setup-python) from 2 to 4. - [Release notes](https://github.com/actions/setup-python/releases) - [Commits](https://github.com/actions/setup-python/compare/v2...v4) --- updated-dependencies: - dependency-name: actions/setup-python dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- .github/workflows/test.platformio.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test.platformio.yml b/.github/workflows/test.platformio.yml index 4fc2ddc..257a646 100644 --- a/.github/workflows/test.platformio.yml +++ b/.github/workflows/test.platformio.yml @@ -44,7 +44,7 @@ jobs: path: ~/.platformio key: ${{ runner.os }}-${{ hashFiles('**/lockfiles') }} - name: Set up Python - uses: actions/setup-python@v2 + uses: actions/setup-python@v4 - name: Install PlatformIO run: | python -m pip install --upgrade pip From af76d16ee177be77c32ec5573b597b5d49c8cf1a Mon Sep 17 00:00:00 2001 From: Rotzbua Date: Tue, 29 Aug 2023 08:42:02 +0200 Subject: [PATCH 07/13] feat(dependabot): group dependency updates --- .github/dependabot.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/dependabot.yml b/.github/dependabot.yml index a0d0f87..590d1ad 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -13,3 +13,7 @@ updates: time: "05:00" labels: - "github-actions-dependencies" + groups: + github-actions: + patterns: + - "*" From f6bde80f6cb9ea0041a717bb42f72e19554f1159 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sun, 1 Oct 2023 03:02:51 +0000 Subject: [PATCH 08/13] Bump the github-actions group with 1 update Bumps the github-actions group with 1 update: [actions/checkout](https://github.com/actions/checkout). - [Release notes](https://github.com/actions/checkout/releases) - [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md) - [Commits](https://github.com/actions/checkout/compare/v3...v4) --- updated-dependencies: - dependency-name: actions/checkout dependency-type: direct:production update-type: version-update:semver-major dependency-group: github-actions ... Signed-off-by: dependabot[bot] --- .github/workflows/autoreview.yml | 2 +- .github/workflows/test.platformio.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/autoreview.yml b/.github/workflows/autoreview.yml index 6aa7dd6..ba26d0a 100644 --- a/.github/workflows/autoreview.yml +++ b/.github/workflows/autoreview.yml @@ -5,7 +5,7 @@ jobs: misspellcheck: runs-on: ubuntu-20.04 steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Run misspell with reviewdog uses: reviewdog/action-misspell@v1 #with: diff --git a/.github/workflows/test.platformio.yml b/.github/workflows/test.platformio.yml index 257a646..b1c7dd4 100644 --- a/.github/workflows/test.platformio.yml +++ b/.github/workflows/test.platformio.yml @@ -31,7 +31,7 @@ jobs: # example: AccessControl steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Cache pip uses: actions/cache@v3 with: From 3eaa1e32bc514d36f915b879726fa278a88325b3 Mon Sep 17 00:00:00 2001 From: Rotzbua Date: Sat, 30 Dec 2023 00:51:11 +0100 Subject: [PATCH 09/13] bump version to 1.4.11 --- changes.txt | 5 ++++- library.json | 2 +- library.properties | 2 +- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/changes.txt b/changes.txt index 97e05b9..85946fd 100644 --- a/changes.txt +++ b/changes.txt @@ -1,6 +1,9 @@ -- Add changes to unreleased tag until we make a release. -xxxxx , v1.4.11 +xxxxx , v1.4.12 + +30 Dec 2023, v1.4.11 +- fix: documentation 1 Nov 2021 , v1.4.10 - fix: timeout on Non-AVR boards; feat: Use yield() in busy wait loops @greezybacon diff --git a/library.json b/library.json index 7bb6459..9cd0e27 100644 --- a/library.json +++ b/library.json @@ -1,6 +1,6 @@ { "name": "MFRC522", - "version": "1.4.10", + "version": "1.4.11", "license": "Unlicense", "keywords": "rfid, spi", "description": "Arduino RFID Library for MFRC522 (SPI). Read/Write a RFID Card or Tag using the ISO/IEC 14443A/MIFARE interface.", diff --git a/library.properties b/library.properties index 92ef73b..b081816 100644 --- a/library.properties +++ b/library.properties @@ -1,5 +1,5 @@ name=MFRC522 -version=1.4.10 +version=1.4.11 author=GithubCommunity maintainer=GithubCommunity sentence=Arduino RFID Library for MFRC522 (SPI) From 13eaed7934dc1c76a6c1ac9fb18bcfc049192c31 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 1 Jan 2024 04:04:38 +0000 Subject: [PATCH 10/13] Bump the github-actions group with 1 update Bumps the github-actions group with 1 update: [actions/setup-python](https://github.com/actions/setup-python). Updates `actions/setup-python` from 4 to 5 - [Release notes](https://github.com/actions/setup-python/releases) - [Commits](https://github.com/actions/setup-python/compare/v4...v5) --- updated-dependencies: - dependency-name: actions/setup-python dependency-type: direct:production update-type: version-update:semver-major dependency-group: github-actions ... Signed-off-by: dependabot[bot] --- .github/workflows/test.platformio.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test.platformio.yml b/.github/workflows/test.platformio.yml index b1c7dd4..26e8493 100644 --- a/.github/workflows/test.platformio.yml +++ b/.github/workflows/test.platformio.yml @@ -44,7 +44,7 @@ jobs: path: ~/.platformio key: ${{ runner.os }}-${{ hashFiles('**/lockfiles') }} - name: Set up Python - uses: actions/setup-python@v4 + uses: actions/setup-python@v5 - name: Install PlatformIO run: | python -m pip install --upgrade pip From 7bd7a6eb87a3ec03ec7a0ce5c9bd86036ea6103c Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 1 Feb 2024 04:16:40 +0000 Subject: [PATCH 11/13] Bump the github-actions group with 1 update Bumps the github-actions group with 1 update: [actions/cache](https://github.com/actions/cache). Updates `actions/cache` from 3 to 4 - [Release notes](https://github.com/actions/cache/releases) - [Changelog](https://github.com/actions/cache/blob/main/RELEASES.md) - [Commits](https://github.com/actions/cache/compare/v3...v4) --- updated-dependencies: - dependency-name: actions/cache dependency-type: direct:production update-type: version-update:semver-major dependency-group: github-actions ... Signed-off-by: dependabot[bot] --- .github/workflows/test.platformio.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test.platformio.yml b/.github/workflows/test.platformio.yml index 26e8493..488db12 100644 --- a/.github/workflows/test.platformio.yml +++ b/.github/workflows/test.platformio.yml @@ -33,13 +33,13 @@ jobs: steps: - uses: actions/checkout@v4 - name: Cache pip - uses: actions/cache@v3 + uses: actions/cache@v4 with: path: ~/.cache/pip key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }} restore-keys: ${{ runner.os }}-pip- - name: Cache PlatformIO - uses: actions/cache@v3 + uses: actions/cache@v4 with: path: ~/.platformio key: ${{ runner.os }}-${{ hashFiles('**/lockfiles') }} From 7cd29b7d775cbf527dea3690201e986802eb7f81 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9opold=20Gravier?= Date: Thu, 15 Feb 2024 19:08:00 +0100 Subject: [PATCH 12/13] Removed unused variable key from examples --- examples/ChangeUID/ChangeUID.ino | 7 ------- examples/FixBrickedUID/FixBrickedUID.ino | 7 ------- examples/MinimalInterrupt/MinimalInterrupt.ino | 2 -- examples/ReadNUID/ReadNUID.ino | 8 -------- 4 files changed, 24 deletions(-) diff --git a/examples/ChangeUID/ChangeUID.ino b/examples/ChangeUID/ChangeUID.ino index eb7b8c8..82c5665 100644 --- a/examples/ChangeUID/ChangeUID.ino +++ b/examples/ChangeUID/ChangeUID.ino @@ -35,19 +35,12 @@ MFRC522 mfrc522(SS_PIN, RST_PIN); // Create MFRC522 instance /* Set your new UID here! */ #define NEW_UID {0xDE, 0xAD, 0xBE, 0xEF} -MFRC522::MIFARE_Key key; - void setup() { Serial.begin(9600); // Initialize serial communications with the PC while (!Serial); // Do nothing if no serial port is opened (added for Arduinos based on ATMEGA32U4) SPI.begin(); // Init SPI bus mfrc522.PCD_Init(); // Init MFRC522 card Serial.println(F("Warning: this example overwrites the UID of your UID changeable card, use with care!")); - - // Prepare key - all keys are set to FFFFFFFFFFFFh at chip delivery from the factory. - for (byte i = 0; i < 6; i++) { - key.keyByte[i] = 0xFF; - } } // Setting the UID can be as simple as this: diff --git a/examples/FixBrickedUID/FixBrickedUID.ino b/examples/FixBrickedUID/FixBrickedUID.ino index 8530d41..d1f3654 100644 --- a/examples/FixBrickedUID/FixBrickedUID.ino +++ b/examples/FixBrickedUID/FixBrickedUID.ino @@ -32,19 +32,12 @@ MFRC522 mfrc522(SS_PIN, RST_PIN); // Create MFRC522 instance -MFRC522::MIFARE_Key key; - void setup() { Serial.begin(9600); // Initialize serial communications with the PC while (!Serial); // Do nothing if no serial port is opened (added for Arduinos based on ATMEGA32U4) SPI.begin(); // Init SPI bus mfrc522.PCD_Init(); // Init MFRC522 card Serial.println(F("Warning: this example clears your mifare UID, use with care!")); - - // Prepare key - all keys are set to FFFFFFFFFFFFh at chip delivery from the factory. - for (byte i = 0; i < 6; i++) { - key.keyByte[i] = 0xFF; - } } void loop() { diff --git a/examples/MinimalInterrupt/MinimalInterrupt.ino b/examples/MinimalInterrupt/MinimalInterrupt.ino index 37ec436..23273cf 100644 --- a/examples/MinimalInterrupt/MinimalInterrupt.ino +++ b/examples/MinimalInterrupt/MinimalInterrupt.ino @@ -37,8 +37,6 @@ MFRC522 mfrc522(SS_PIN, RST_PIN); // Create MFRC522 instance. -MFRC522::MIFARE_Key key; - volatile bool bNewInt = false; byte regVal = 0x7F; void activateRec(MFRC522 mfrc522); diff --git a/examples/ReadNUID/ReadNUID.ino b/examples/ReadNUID/ReadNUID.ino index ffc924e..8e7fd0e 100644 --- a/examples/ReadNUID/ReadNUID.ino +++ b/examples/ReadNUID/ReadNUID.ino @@ -38,8 +38,6 @@ MFRC522 rfid(SS_PIN, RST_PIN); // Instance of the class -MFRC522::MIFARE_Key key; - // Init array that will store new NUID byte nuidPICC[4]; @@ -48,13 +46,7 @@ void setup() { SPI.begin(); // Init SPI bus rfid.PCD_Init(); // Init MFRC522 - for (byte i = 0; i < 6; i++) { - key.keyByte[i] = 0xFF; - } - Serial.println(F("This code scan the MIFARE Classsic NUID.")); - Serial.print(F("Using the following key:")); - printHex(key.keyByte, MFRC522::MF_KEY_SIZE); } void loop() { From 0ff12a1c0afd414a5340930b14a2960bb543c28f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9opold=20Gravier?= Date: Mon, 26 Feb 2024 10:40:57 +0100 Subject: [PATCH 13/13] Fixed broken links --- doc/PICCMemoryLayout.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/PICCMemoryLayout.md b/doc/PICCMemoryLayout.md index 944d905..7b85e36 100644 --- a/doc/PICCMemoryLayout.md +++ b/doc/PICCMemoryLayout.md @@ -10,8 +10,8 @@ The **MIFARE Classic** chips and protocol is described in the datasheets: * Mini: http://www.idcardmarket.com/download/mifare_S20_datasheet.pdf The **MIFARE Ultralight** chip and protocol is described in the datasheets: - * Ultralight: https://www.nxp.com/documents/data_sheet/MF0ICU1.pdf - * Ultralight C: https://www.nxp.com/documents/short_data_sheet/MF0ICU2_SDS.pdf + * Ultralight: https://www.nxp.com/docs/en/data-sheet/MF0ICU1.pdf + * Ultralight C: https://www.nxp.com/docs/en/data-sheet/MF0ICU2_SDS_32.pdf ## MIFARE Classic 1K (MF1S503x)