I've searched a lot but I'm not able to find some C# simple sdk that lets me write and read in a nfc mifare 1k classic tags.
Could you give me some help please?
Thanks a lot.
Just check my library for ACR122u readers. It also supports insert/discard events. It is so simple to use it. Basically you create a class and register two events to that class. Afterwards, call the Watch function. It watches the changes on your device.
//Initializing
NFCReader NFC = new NFCReader();
//Inserted Event
NFC.CardInserted += new NFCReader.CardEventHandler(...Some function);
//Ejected Event
NFC.CardEjected += new NFCReader.CardEventHandler(... Some function);
//Enabling Event Watching
NFC.Watch();
If any change occurs, it calls the related event. You handle what you want to do there.
public void Card_Inserted()
{
try
{
if (NFC.Connect())
{
//Do stuff like NFC.GetCardUID(); ...
}
else
{
//Give error message about connection...
}
}
catch (Exception ex)
{
//Something went wrong
}
}
public void Card_Ejected()
{
//Do stuff...
NFC.Disconnect();
}
See the related repo and links for more information.
Medium introduction tutorial: https://medium.com/@hakbas/nfcreader-a-very-simple-nfc-library-for-c-that-supports-insert-and-discard-events-93db29f79b5
Github address: https://github.com/h4kbas/NfcReader
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With