Hi I have problem on my RaspberryPI with MfRC522 in Iot.Device.Bindings library. The method ListenToCardIso14443TypeA always returns false. I have a similar application in Node.js and it works perfectly fine.
GpioController gpioController = new GpioController();
int pinReset = 21;
SpiConnectionSettings connection = new(0, 1);
connection.ClockFrequency = 10_000_000;
SpiDevice spi = SpiDevice.Create(connection);
MfRc522 mfrc522 = new(spi, pinReset, gpioController, false);
bool res;
Data106kbpsTypeA card;
do
{
res = mfrc522.ListenToCardIso14443TypeA(out card, TimeSpan.FromSeconds(2));
if (res)
{
Console.WriteLine("card");
}
else
{
Console.WriteLine("No card.");
}
Thread.Sleep(res ? 0 : 1000);
}
while (!res);
Have anyone similar issue and were able to fix that?
Resolved I changed:
To the:
And it has started working.