My new RFID reader ID12-LA by SparkFun can recognise an RFID tag, but it can't read its tag number - the Arduino IDE outputs the tag as ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ

Any help on how to convert this into a proper ID would be much appreciated - btw I have tried other baud rates; no difference.

Thanks, Raihaan

Edit - the code I'm using is this:

#include <SoftwareSerial.h>

SoftwareSerial rSerial(4,5);

void setup() {

void loop() {
    if (rSerial.available() > 0) {
        int b = rSerial.read();
        Serial.print(" ");

This now returns 255 6 times... Any ideas?


enter image description here

  • 1
    Raihaan, please edit question and format the code as code. To do so, highlight the code and press ctrl-K. Add a blank line before and after the code. Also, use cut and paste when you include the code -- there are some missing characters. Also, where are you getting data from the reader? Do you have one connection for the reader, and one for the IDE, with one or the other not shown in your question? Fix the question. Commented Oct 30, 2016 at 18:35
  • 1
    There is a format selector (I can't quite read the image because of the wire). It should be grounded to select ASCII format.
    – Nick Gammon
    Commented Oct 31, 2016 at 21:17
  • 1
    ÿ is 0xFF (255 in decimal). That is, all 1-bits set. It is also what is returned from Serial.read() if there is no data (actually it returns -1 which is 0xFFFF in this case however that will look like 0xFF if you stuff it into one byte). Possibly there is a gross mismatch in baud rates. An occasional 0-bit will look like a start bit, and then if you get all 1-bits after that, you would get 0xFF returned.
    – Nick Gammon
    Commented Nov 1, 2016 at 5:21

2 Answers 2


If you have one of the regular Arduino models, the hardware UART is connected to pins 0 and 1, which are also used by the USB programmer and in your case obviously your serial monitor, on which you expect to see some output.

Configuring a SoftwareSerial on pins 0 and 1 is probably not going to work at all. If you need the USB programmer to stay connected and the serial monitor for debugging, you have to use different I/O pins and setup your SoftwareSerial accordingly.

I assume that you are aware that the ID12-LA chip only works on the 125 kHz band and is incompatible with common tags running on 13.56 MHz?

  • Ok, so I'e switched the SoftwareSerial pins to 4 and 5, but I'm still not getting an output - is it because I'm not using EM4001 ISO tags?
    – ixRx
    Commented Oct 30, 2016 at 19:50
  • @Raihaan What kind of tags are you using?
    – jarnbjo
    Commented Oct 30, 2016 at 21:47
  • No idea- only ones that advertised themselves as compatible with any RFID reader
    – ixRx
    Commented Oct 31, 2016 at 19:33
  • Except the ID12 says that very specific ones are the only ones compatible - i.e. the EM-4001 ISO tags
    – ixRx
    Commented Oct 31, 2016 at 19:34
  • RFID is an umbrella term for many similar, but otherwise incompatible transmission technologies. There simply are no tags 'compatible with any RFID reader'.
    – jarnbjo
    Commented Nov 1, 2016 at 14:26

You created a SoftwareSerial connection to read from the module and then you're printing what you just read to the same module. You probably want to print to the serial monitor on your PC. You should add Serial.begin(9600); to your setup() and ensure that all print()s are to Serial and not rSerial().

  • Thanks, now it outputs strings, but still quite unusual - 255 13 times - I'm starting to believe the issue is not from the Serial connections but with the actual RFID hardware - either the reader or the tags.
    – ixRx
    Commented Oct 31, 2016 at 19:35
  • @Raihaan Edit the code in your question. Also include your circuit. Commented Oct 31, 2016 at 19:43
  • Done - code has been updated, schematic has been included (from Sparkfun)
    – ixRx
    Commented Oct 31, 2016 at 19:56
  • 1
    Like Nick Gammon has said, you need to connect the FORM pin to GND to select ASCII format. Also connect the RES pin to 5V. Commented Nov 1, 2016 at 1:56
  • How should I select ASCII format? Is this in the serial monitor?
    – ixRx
    Commented Nov 1, 2016 at 6:09

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.