-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Can not wake up PICC #38
Comments
Look at the implementation of
|
@omersiar : could this issue be closed now? |
Yes it can be closed. |
I have the same problem as @omersiar and have looked at the
I know I can just leave out |
Another user, @akellai, has created a fast_reset function, which does exactly what I wanted PICC_WakeupA to do (or expected it to do). It's perhaps a work around, but it works. Since Google led me to this question, I suspect others will find it to, so here is a link to akellai's comment and my own which is an adapted code of akellia's for multiple readers. |
This simple code tries to Wake UP a Halted PICC, but it can not. What is wrong?
include <SPI.h> // RC522 Module uses SPI protocol
include <MFRC522.h> // Library for Mifare RC522 D
define SS_PIN 10
define RST_PIN 9
MFRC522 mfrc522(SS_PIN, RST_PIN); // Create MFRC522 instance.
void setup() {
// put your setup code here, to run once:
Serial.begin(9600); // Initialize serial communications with PC
SPI.begin(); // MFRC522 Hardware uses SPI protocol
mfrc522.PCD_Init(); // Initialize MFRC522 Hardware
}
void loop() {
byte bufferATQA[10];
byte bufferSize[10];
// put your main code here, to run repeatedly:
// Look for new cards
if ( ! mfrc522.PICC_IsNewCardPresent()) {
Serial.println("There is no PICC");
return;
}
// Select one of the cards
if ( ! mfrc522.PICC_ReadCardSerial()) {
Serial.println("Cannot get UID");
return;
}
Serial.println("GOT UID");
mfrc522.PICC_HaltA();
Serial.println("PICC Halted");
delay(100);
Serial.println("Im trying to Wake Up Halted PICC");
mfrc522.PICC_WakeupA(bufferATQA, bufferSize); //wake up PICC which was previously Halted
delay(100);
mfrc522.PICC_RequestA(bufferATQA, bufferSize);
delay(100);
Serial.println("PICC Should Wake Up");
delay(100);
if ( ! mfrc522.PICC_ReadCardSerial()) {
Serial.println("Tried get UID but no luck");
}
delay(1000);
}
The text was updated successfully, but these errors were encountered: