Hey Fediverse,
I might need some help from someone using #chatGPT

I try to read #RFID-Tags classified as #NTAG213 with the #RC522-Reader. But it won't work.

Basically all I need is a #python-script, that gives back the ID from the tag.

This should not be too complicated for AI, right? (Or for someone who is experienced in that field).

@thinkpad what does not work? Do you have an error message?

@rena2019 i created a #phoniebox (based on https://github.com/MiczFlor/RPi-Jukebox-RFID ) and the existing script is able to read the MIFARE classic protocol.
I guess, it should not be too hard to modify the script (probably https://github.com/MiczFlor/RPi-Jukebox-RFID/blob/develop/scripts/Reader.py.experimental ) so it can detect the type of the protocol (either classic or the desired ntag213) and then read the ID.

Some notes are written in this thread (german)
https://forum-raspberrypi.de/forum/thread/58651-phoniebox-rc522-mit-mifare-ultralight-ntag213/

You have some hints, how to make it work?

GitHub - MiczFlor/RPi-Jukebox-RFID: A Raspberry Pi jukebox, playing local music, podcasts, web radio and streams triggered by RFID cards, web app or home automation. All plug and play via USB. GPIO scripts available.

A Raspberry Pi jukebox, playing local music, podcasts, web radio and streams triggered by RFID cards, web app or home automation. All plug and play via USB. GPIO scripts available. - MiczFlor/RPi-J...

GitHub
@thinkpad You want to read the UID only, right? Or do you also want to read the memory? Reading the UID should be the same (depends on the number of Bytes of the UID). But reading out the memory is different
@thinkpad hmmm, wird die Karte denn im Feld überhaupt erkannt? Hatte mal vor knapp 10 Jahren Probleme mit so einem #RC522 https://regnerischernachmittag.wordpress.com/2013/08/03/5euro-rfidnfc-modul-rc522-zum-auslesen-von-mifare-tags/
5Euro RFID/NFC Modul RC522 zum Auslesen von Mifare Tags

Das RFID-RC522 Modul stellt wohl den günstigsten Einstieg in die RFID/NFC-Welt dar. Ab ~5 EUR (inkl. Versand) kann man es bei verschiedenen (chinesischen) eBay Verkäufern erwerben. Herz der Platine…

Regnerischer Nachmittag

@rena2019 ich will nur die UID lesen können. Diese wird dann mit der entsprechenden Playlist verknüpft.

Das ausprobieren ist schon etwas her, aber ich meine, ich habe mit irgendeinem Test-Skript auch meine gewünschten Tags erkennen können. Mir fehlt halt das Wissen, um die Erkennung integrieren zu können.

Ich bräuchte einen Hint zu: wie integriere ich die Fallunterscheidung beim Lesen? Sowie zu: wie lese ich nur die UID des gewünschten Tags

@thinkpad wenn du die Reader.py.experimental in Reader.py umbenennst, sollte er doch bei Zeile 65 https://github.com/MiczFlor/RPi-Jukebox-RFID/blob/develop/scripts/Reader.py.experimental#L65 vorbeikommen und die UID auslesen. Wenn im Log ein "Card detected." ausgegeben wird hat er zumindest die Karte im Feld erkannt. Sag mal Bescheid ob er bis dahin kommt. Dann kann man weiter sehen
RPi-Jukebox-RFID/scripts/Reader.py.experimental at develop · MiczFlor/RPi-Jukebox-RFID

A Raspberry Pi jukebox, playing local music, podcasts, web radio and streams triggered by RFID cards, web app or home automation. All plug and play via USB. GPIO scripts available. - MiczFlor/RPi-J...

GitHub
@rena2019 danke. Wird ein paar Tage dauern, bis ich wieder testen kann.