B4R Library MFRC522 - RFID reader / writer

henry montoya

Member
Licensed User
Hello.
Someone knows if it is possible to extend the reading range of this module with some antenna and how to do it.
Many thanks for all your contributions.
 

amarnath

Member
Licensed User
hi there i am developing an app using b4a and i want to connect rfid em-18 with my android app
right now i am using
1 atmel at89c2051-24pu
2 uart wifi module
3 b4a

task is my android app should be able to read all the data from rfid reader and my android app should be able to write all the data to rfid module

please send me rfid library or any other details to do so

thanks in advance
waiting for answer.
 

Beja

Expert
Licensed User
Thanks Erel..

Any visual or more clear Schematics for this example?
Something like this .
Thanks
 

falbertini

Member
Licensed User
Hi Erel, I tried with the Arduino IDE 1.8.5 with ESP32 and MFRC522 using, for example, an old version of the library selectable from IDE (es. 1.3.6) and i get the error "WARNING: Communication failure, is the MFRC522 properly connected" while with the latest version of the library MFRC522 1.4.3 i don't have the error. Using the rMFRC522.zip library in B4R with ESP32 i get the same error as if the library were not aligned with the latest version available. How can I have library B4R rMFRC522.zip updated to the latest version of the Arduino library MFRC522 1.4.3?

B4X:
'depends on rRandomAccessFile and rMFRC522 libraries

' Pin schema :

'ESP32   MFRC522
' 18       SCK
' 19       MISO
' 21       SDA
' 22       RST
' 23       MOSI
' GND      GND
' 3v3      3v3

Sub Process_Globals
    Public Serial1 As Serial
    Private rfid As MFRC522
    Private bc As ByteConverter
End Sub

Private Sub AppStart
    Serial1.Initialize(115200)
    Log("AppStart")
    rfid.Initialize(21, 22, "rfid_CardPresent")
    rfid.LogVersion
End Sub

Sub rfid_CardPresent (UID() As Byte, CardType As Byte)
    Log("UID: ", bc.HexFromBytes(UID))
End Sub
Thanks
 

Beja

Expert
Licensed User
B4X:
Sub rfid_CardPresent (UID() As Byte, CardType As Byte)
   Log("UID: ", bc.HexFromBytes(UID))
End Sub
Hi Erel
Pardon my ignorance.. Where's the UID value logged? Does the arduino have to stay connected to the computer and the value is displayed on the PC screen?
Thanks.
 

petr4ppc

Active Member
Licensed User
Dear friends,

please for help,
I am using PIN connection for Wemos D1 mini
I have board: Wemos D1 R1


I am using this code:

B4X:
Sub Process_Globals
   Public Serial1 As Serial
   Private rfid As MFRC522
   Private bc As ByteConverter
End Sub

Private Sub AppStart
   Serial1.Initialize(115200)
   Log("AppStart")
   rfid.Initialize(10, 9, "rfid_CardPresent")
   rfid.LogVersion
End Sub

Sub rfid_CardPresent (UID() As Byte, CardType As Byte)
   Log("UID: ", bc.HexFromBytes(UID))
End Sub
I get in LOGS this result:
Firmware Version: 0xEE = (unknown)
What I am doing wrong please?
Thank you
p4ppc

I have board settings:
boardselector.jpg
 

petr4ppc

Active Member
Licensed User
Thank you for your answer,

after uploading program to ESP8266 (Wemos D1R1 board) module via USB I see in LOGs (B4R) that program is STARTED and I see this text:
Firmware Version: 0xEE = (unknown)
I have checked wires and everything is OK. I have tried run it with connected and diconnected RESET pin, but nothing happen.
I have tried NODE V3 board, there is the same situation.

I am testing boards only in B4R not in Arduino.
Tommorow I go to buy second RFID board , because I want have certain that rfid board is OK.
In actual RFID board is led fleshing, everything looks OK.

Thank you very much,
p4ppc
 
Top