B4R Library MFRC522 - RFID reader / writer

Discussion in 'B4R Libraries' started by Erel, May 22, 2016.

  1. henry montoya

    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.
     
  2. Erel

    Erel Administrator Staff Member Licensed User

    V1.01 uploaded to the first post. Fixes a compatibility issue with ESP8266.
     
    Peter Simpson and Cableguy like this.
  3. amarnath

    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.
     
  4. Erel

    Erel Administrator Staff Member Licensed User

    Please start a new thread for any question you have.
     
  5. Beja

    Beja Expert Licensed User

  6. Erel

    Erel Administrator Staff Member Licensed User

    You should see this table:

    [​IMG]
     
    Beja likes this.
  7. Beja

    Beja Expert Licensed User

    Thanks Erel..

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

    Erel Administrator Staff Member Licensed User

    If I remember correct I just followed this table when building the example.
     
    Johan Hormaza and Beja like this.
  9. Beja

    Beja Expert Licensed User

    Thanks..
    Understand but what can we do with natural erosion factors
     
  10. falbertini

    falbertini Member Licensed User

    Hello Erel can you post wire connect for ESP32 on your example and needed code modified ?

    Very Thanks.
     
    Johan Hormaza likes this.
  11. Erel

    Erel Administrator Staff Member Licensed User

    Johan Hormaza likes this.
  12. falbertini

    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?

    Code:
    '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(
    2122"rfid_CardPresent")
        rfid.LogVersion
    End Sub

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

    Erel Administrator Staff Member Licensed User

    Try it with the attached library (v1.02). It is based on the latest version of the open source project.
     

    Attached Files:

  14. falbertini

    falbertini Member Licensed User

    Perfect, now it works. Thank you.
     
  15. Beja

    Beja Expert Licensed User

    Code:
    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.
     
  16. Erel

    Erel Administrator Staff Member Licensed User

    Yes. You will see the logs in the IDE.
     
    Beja likes this.
Loading...
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice