Forum Rule: Always post complete source code & details to reproduce any issue!
Page 2 of 2 FirstFirst 1 2
Results 26 to 39 of 39

Thread: Teency 3.1 Compatibility with MFRC522 RFID Library

  1. #26
    Senior Member PaulStoffregen's Avatar
    Join Date
    Nov 2012
    Posts
    20,296
    These are the 2 RFID readers I bought for testing. As you can see, neither has been used yet. Maybe now is the time...

    Click image for larger version. 

Name:	rfid.jpg 
Views:	287 
Size:	89.5 KB 
ID:	6505

  2. #27
    Junior Member
    Join Date
    Mar 2016
    Posts
    4
    Got exacly thé same two on my desk! The blue one tested and used successfully with arduino micro & pro mini but not working currently with teensy 3.2
    Red one still untested from me but it has i2c as well which can help at some point.... The blue one only has spi...

  3. #28
    Senior Member PaulStoffregen's Avatar
    Join Date
    Nov 2012
    Posts
    20,296
    Ok, I'm testing now starting with Teensy 2.0 (running at 3.3V) with the blue board.

    Click image for larger version. 

Name:	rfid1.jpg 
Views:	267 
Size:	88.6 KB 
ID:	6508

    I'm running the DumpInfo example. Hopefully that's a good test? I really don't know anything about this lib, so I'm guessing here a bit. I did edit these 2 lines for Teensy 2.0's pins.

    Code:
    #define RST_PIN         7          // Configurable, see typical pin layout above
    #define SS_PIN          0         // Configurable, see typical pin layout above
    The top 3 cards work fine. It doesn't respond at all with the bottom card, which might have a long address or some other difference.

    Here's what I'm seeing from DumpInfo for that blue keychain tag.

    Click image for larger version. 

Name:	rfid2.jpg 
Views:	198 
Size:	134.5 KB 
ID:	6509

    Going to switch to a Teensy 3.2....

  4. #29
    Senior Member PaulStoffregen's Avatar
    Join Date
    Nov 2012
    Posts
    20,296
    Now I've got it wired up to a Teensy 3.2.

    Click image for larger version. 

Name:	rfid3.jpg 
Views:	292 
Size:	128.4 KB 
ID:	6510

    I'm using the default pin config:

    Code:
    #define RST_PIN         9          // Configurable, see typical pin layout above
    #define SS_PIN          10         // Configurable, see typical pin layout above
    It seems to be working fine with Teensy 3.2. Here's what I see with DumpInfo.

    Click image for larger version. 

Name:	rfid4.jpg 
Views:	249 
Size:	131.0 KB 
ID:	6511

    Like with Teensy 2.0, 3 of the 4 tags work. The one labeled "7 byte ID" doesn't work with either board.

  5. #30
    Senior Member PaulStoffregen's Avatar
    Join Date
    Nov 2012
    Posts
    20,296
    What was the problem again? What am I supposed to do to reproduce it?

    DumpInfo certainly seems to work.

  6. #31
    Junior Member
    Join Date
    Mar 2016
    Posts
    4
    Ok i need to re-implement my testing from scratch. Can you confirm me the version of RFID lib and spi lib u use and physical pin setting? Might be a noobs issue from myself i'm afraid...

  7. #32
    Senior Member PaulStoffregen's Avatar
    Join Date
    Nov 2012
    Posts
    20,296
    I tested this library: (the one linked in the OP of this thread)

    https://github.com/miguelbalboa/rfid

    I followed the wiring instructions in the library's readme file, which is shown on that github page if you scroll down. Hopefully you can see in those 2 photos exactly how I connected the wires for each board. I didn't do anything special, only 3.3V power and GND connections, and the 5 connections documented in the "Pin Layout" table in the readme.

    After installing the library, I opened the example from File > Examples > MFRC522 > DumpInfo.

    For Teensy 2.0, I converted Teensy 2.0 to 3.3V, and in DumpInfo, I edited those 2 lines.

    For Teensy 3.2, no hardware mods were used. But I did move the power connection on my breadboard to the 3.3V output. I did not edit DumpInfo for Teensy 3.2. The numbers in the example were already correct.

    I'm not sure what you mean by "spi lib u use and physical pin setting". I did not edit or change anything else. I just used the library exactly as-is for Teensy 3.2. For Teensy 2.0, I did edit those 2 lines in the example, but no other changes were made. Hopefully this helps?

  8. #33
    Junior Member
    Join Date
    Mar 2016
    Posts
    4

    Cool

    OK Paul... Now the dumpinfo works for me too... I'm gonna continue with checking the rest of my software. And no idea why I was struggling. Sorry for that and thanks for your help.... That so simple... I don't understand my initial mistake... Maybe library version?

  9. #34
    Senior Member PaulStoffregen's Avatar
    Join Date
    Nov 2012
    Posts
    20,296
    Glad you got it working. This library has been on my todo list to check for a long time, so it's good that I finally gave it a try.

    Maybe time close that github issue as a final followup?

  10. #35
    Senior Member+ defragster's Avatar
    Join Date
    Feb 2015
    Posts
    9,012
    I got some of those same blue type RFID units. I just scanned cards/tags with my Android phone with a store app (MCT Mifare Classic Tool or NFC Tools) - and they were id'd as 4byte. Would be interesting if you have a phone that worked to scan those 7 byte cards to see them as functional. Even my new LG Android can only ID the cards and not read them like the one from 2 years back that read and wrote them - I understand apple uses proprietary NFC.

    It looks like the file "GitHub\rfid\MFRC522.cpp" expects to read 7 and 10 bytes ID's. I don't have any 7 byte ID's cards.

  11. #36
    Senior Member PaulStoffregen's Avatar
    Join Date
    Nov 2012
    Posts
    20,296
    I can't afford to put a lot more time into this library.

    However, if anyone has a 7 or 10 byte card *and* if this library is able to read it using regular Arduino but not Teensy, I would be willing to investigate if someone sends me the known-good card for testing.
    Last edited by PaulStoffregen; 03-02-2016 at 09:08 AM.

  12. #37
    Senior Member sumotoy's Avatar
    Join Date
    Nov 2012
    Location
    Venezia, Italia
    Posts
    421
    Hello,
    Please do not use my old library, it was a quick & dirty fix of the old bilboa's one because the original was not maintaned for long time but now the original author greatly improve it, it works (I have tested some days ago) but really old and has weak sensitivity.

    I have at list more than 20 cards/blue buttons from ebay in the last 2 years, tested with Teensy 3.2 and
    this library (the new bilboa one), everithing worked as expected in reading, don't try in write mode.
    Some old card I got more than 2 years ago not working, probably different frequency/format ?
    Last edited by sumotoy; 03-04-2016 at 07:39 AM.

  13. #38
    Senior Member
    Join Date
    Nov 2012
    Location
    Chipping Norton, UK
    Posts
    221
    Thanks for all those that have replied since I woke this thread up. I must have missed the subscription email for these updates.


    Quote Originally Posted by PaulStoffregen View Post
    I can't afford to put a lot more time into this library.
    Thanks for having a look Paul, I appreciate your time as ever.


    Quote Originally Posted by sumotoy View Post
    Please do not use my old library
    Thanks for letting me know, that saved me some wasted time


    I will get it hooked up and do some testing. Thanks again to all who have posted.

  14. #39
    Junior Member
    Join Date
    Aug 2016
    Posts
    2
    Could you tell me which Hardware & Lib I need to do RFID reading & writing with Teency 3.1?

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •