{"action":"opened","issue":{"url":"https://api.github.com/repos/miguelbalboa/rfid/issues/398","repository_url":"https://api.github.com/repos/miguelbalboa/rfid","labels_url":"https://api.github.com/repos/miguelbalboa/rfid/issues/398/labels{/name}","comments_url":"https://api.github.com/repos/miguelbalboa/rfid/issues/398/comments","events_url":"https://api.github.com/repos/miguelbalboa/rfid/issues/398/events","html_url":"https://github.com/miguelbalboa/rfid/issues/398","id":336778925,"node_id":"MDU6SXNzdWUzMzY3Nzg5MjU=","number":398,"title":"Timeout in communication.","user":{"login":"Vepox","id":15816910,"node_id":"MDQ6VXNlcjE1ODE2OTEw","avatar_url":"https://avatars3.githubusercontent.com/u/15816910?v=4","gravatar_id":"","url":"https://api.github.com/users/Vepox","html_url":"https://github.com/Vepox","followers_url":"https://api.github.com/users/Vepox/followers","following_url":"https://api.github.com/users/Vepox/following{/other_user}","gists_url":"https://api.github.com/users/Vepox/gists{/gist_id}","starred_url":"https://api.github.com/users/Vepox/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Vepox/subscriptions","organizations_url":"https://api.github.com/users/Vepox/orgs","repos_url":"https://api.github.com/users/Vepox/repos","events_url":"https://api.github.com/users/Vepox/events{/privacy}","received_events_url":"https://api.github.com/users/Vepox/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-06-28T21:02:23Z","updated_at":"2018-06-28T21:02:23Z","closed_at":null,"author_association":"NONE","body":"<!-- BEGIN - This is a comment just for you visible\r\n\r\n### Step 0: Are you in the right place?\r\nGitHub issues only for **bugs** or **improvements** of the library. All other topics, e.g. hardware/programming, will be closed.\r\n\r\nFor general support from the community, see [Arduino Forum](https://forum.arduino.cc/) or [StackOverflow](https://stackoverflow.com/questions/tagged/mifare).\r\n\r\nPlease use the following template to give us as mutch information as you can.\r\n\r\nEND - This is a comment just for you visible -->\r\n\r\n### Step 1: Describe your environment\r\n\r\n * OS version: Win 10\r\n * Arduino IDE version: 1.8.5\r\n * MFRC522 Library version: 1.4.0 <!-- comment: important! v1.x.x or master-branch? -->\r\n * Arduino device: Arduino Uno r3\r\n * MFRC522 device: RC-522..?\r\n  \r\n### Step 2: Describe the problem\r\n\r\nIf I try mfrc522.PCD_Authenticate(... Key ...) twice in a row, the second time it will always timeout.\r\n\r\nIn my case, I try two different Keys:\r\nmfrc522.PCD_Authenticate(...0xFFFFFFFFFFFF...)\r\nand then the correct Key:\r\nmfrc522.PCD_Authenticate(...0x6F6F6F6F6F6F...)\r\n\r\nAs said, second attempt will always fail, ignoring the fact that the second attempt is using the correct Key.\r\n\r\nIf I try the second line first (with the correct Key) it succeeds! Not however, if I fail to authenticate right before.\r\n\r\n  \r\n#### Relevant Code:\r\n\r\n```arduino\r\n    byte status = mfrc522.PCD_Authenticate(MFRC522::PICC_CMD_MF_AUTH_KEY_A, trailerBlock, &stdKeyObj, &(mfrc522.uid));\r\n  if (status == MFRC522::STATUS_OK) {\r\n    return STANDARDSCHLUESSEL;\r\n  } else {\r\n    Serial.println(mfrc522.GetStatusCodeName(status)); // Timeout\r\n  }\r\n  \r\n  status = mfrc522.PCD_Authenticate(MFRC522::PICC_CMD_MF_AUTH_KEY_A, trailerBlock, &encrKeyObj, &(mfrc522.uid));\r\n  if (status == MFRC522::STATUS_OK) {\r\n    return EIGENERSCHLUESSEL;\r\n  } else {\r\n     Serial.println(mfrc522.GetStatusCodeName(status)); // Timeout\r\n  }\r\n\r\n///////////////////////////////////////////////////////////////////////////////////\r\n\r\n  byte status = mfrc522.PCD_Authenticate(MFRC522::PICC_CMD_MF_AUTH_KEY_A, trailerBlock, &encrKeyObj, &(mfrc522.uid));\r\n  if (status == MFRC522::STATUS_OK) {\r\n    return EIGENERSCHLUESSEL;\r\n  } else {\r\n     Serial.println(mfrc522.GetStatusCodeName(status)); // OK\r\n  }\r\n\r\n status = mfrc522.PCD_Authenticate(MFRC522::PICC_CMD_MF_AUTH_KEY_A, trailerBlock, &stdKeyObj, &(mfrc522.uid));\r\n  if (status == MFRC522::STATUS_OK) {\r\n    return STANDARDSCHLUESSEL;\r\n  } else {\r\n    Serial.println(mfrc522.GetStatusCodeName(status)); \r\n  }\r\n```\r\n"}}
{"actor":{"display_login":"Vepox"}}