esprfid / esp-rfid

ESP8266 RFID (RC522, PN532, Wiegand, RDM6300) Access Control system featuring WebSocket, JSON, NTP Client, Javascript, SPIFFS
MIT License
1.35k stars 423 forks source link

Rc522 card reading UI has no pop-up window and scanning is abnormal. #506

Closed vvvyky closed 1 year ago

vvvyky commented 2 years ago

The new window does not pop up in the development version rc522 card reading, and the scanning is abnormal. 微信图片_20220518152416

vvvyky commented 2 years ago

Rc522 card reading does not play. Can this problem be solved?

@matjack1

matjack1 commented 2 years ago

@vvvyky I'm sorry but I cannot help you on this as I don't have a Rc522 card reader and I'm not using it in my project :(

windy54 commented 2 years ago

I have fixed this in my local copy,had to set rfid state , Still had some issues which have solved, had to edit (from memory) rfid.esp to set rfidstate to cardswiped I can’t find the post where I pasted the edit! Will do that when I get home. There is a function mfrc522 which reads the card and prints details of debug enabled . I had to set rfidstate in that function

matjack1 commented 1 year ago

@windy54 can you please share the fix that you have found? Thanks!

windy54 commented 1 year ago

in rfid.esp I edited mfrc522Read() to add the line rfidState=cardSwiped

` void mfrc522Read() { if (!mfrc522.PICC_IsNewCardPresent() || !mfrc522.PICC_ReadCardSerial()) { return; } mfrc522.PICC_HaltA(); cooldown = millis() + COOLDOWN_MILIS; for (int i = 0; i < mfrc522.uid.size; ++i) { uid += String(mfrc522.uid.uidByte[i], HEX); }

MFRC522::PICC_Type piccType = mfrc522.PICC_GetType(mfrc522.uid.sak);
type = mfrc522.PICC_GetTypeName(piccType);
rfidState = cardSwiped;

}

`

Steve

Aleks130699 commented 1 year ago

Checked this change and it helps to restore the rc 522 reading, it is also possible that there are problems with at least one more rdm6300 reader, not yet checked

matjack1 commented 1 year ago

@vvvyky @windy54 @Aleks130699 this should have been fixed with this PR: https://github.com/esprfid/esp-rfid/pull/547

I'm going to close this for now, but if you still have problems please let me know! Thank you

windy54 commented 1 year ago

Hi Matteo,, just tried restoring members again and the following records what I did and response.

Captured one reboot when it failed.

Hope this helps

+++++++++++++++++++++++++++ "Fix websocket test "

Erased flash on ESP8266 and started again.

Downloaded debug.bin

restored configuration. restored 140 users and it worked.

Clicked on users and it rebooted

Started again with erasing flash etc.

It loaded some members, paused and the carried on and downloaded all members.

Deleted database via MQTT

Tried to restore database and webpage froze. No serial output No MQTT output Responded to ping requests ove wifi.

Noticed on serial output that it had rebooted with following output:

[ INFO ] Mqtt Publish:{"type":"deletusers","ip":"192.168.4.104","hostname":"esp-rfid"}

ets Jan 8 2013,rst cause:4, boot mode:(3,7)

wdt reset load 0x4010f000, len 1392, room 16 tail 0 chksum 0xd0 csum 0xd0 v3d128e5c ~ld

[ INFO ] ESP RFID v2.0.0-dev Flash real id: 001640E0 Flash real size: 4194304

Flash ide size: 4194304 Flash ide speed: 40000000 Flash ide mode: DIO Flash Chip configuration ok.

logged in and no users had been downloaded

tried restore again and it worked

clicked on users and everything had been downloaded.

+++++++++++++++++++++++++++++++++++++++++++++

Steve

On Mon, 23 Jan 2023 at 21:19, Matteo Giaccone @.***> wrote:

@vvvyky https://github.com/vvvyky @windy54 https://github.com/windy54 @Aleks130699 https://github.com/Aleks130699 this should have been fixed with this PR: #547 https://github.com/esprfid/esp-rfid/pull/547

I'm going to close this for now, but if you still have problems please let me know! Thank you

— Reply to this email directly, view it on GitHub https://github.com/esprfid/esp-rfid/issues/506#issuecomment-1400995090, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABI2YS2AR6BTGFT25GCAA6DWT3YWTANCNFSM5WHQVLRQ . You are receiving this because you were mentioned.Message ID: @.***>

matjack1 commented 1 year ago

Thank you Steve, this is very helpful. Let me try with 100+ users and I'll let you know! We'll keep the discussion in the other issue, that I think is more relevant: https://github.com/esprfid/esp-rfid/issues/557