SparkFun Forums 

Where electronics enthusiasts find answers.

Have questions about a SparkFun product or board? This is the place to be.
#201217
Hello!

I have set up the Simultaneous RFID Reader (SRTR) with an Arduino Shield and am able to run the example Arduino programs to read and write tags. I am now moving on to using the Mercury C API, however I have not connected a USB UART Serial connection to the SRTR board, and am looking at using the usb connection on the Arduino board. I am first testing via the Universal Reader Assistant software to make sure I have the communication working before starting to use the Mercury C API, but when trying to connect I get a timeout. I am assuming there needs to be some Arduino program loaded onto the board that forwards serial communication from the Arduino board through the shield to the SRTR? Any guidance would be greatly appreciated, thanks!

Aaron
#201230
Thanks! Do you think this can be adapted to use SoftwareSerial? I am running the following sketch, but the Universial Reader assistant still is not seeing it.
Code: Select all
#include <SoftwareSerial.h> //Used for transmitting to the device
SoftwareSerial softSerial(2, 3); //RX, TX

void setup() {
  Serial.begin(115200);
  softSerial.begin(38400);
}

void loop() {
  if (Serial.available()) {      // If anything comes in Serial (USB),
    softSerial.write(Serial.read());   // read it and send it out softSerial (pins 2 & 3)
  }

  if (softSerial.available()) {     // If anything comes in softSerial (pins 2 & 3)
    Serial.write(softSerial.read());   // read it and send it out Serial (USB)
  }
}
#201235
It is in the right direction, but this will not work yet. After reboot the RFID reader speed is in 115K speed and that does not work well for RX on softserial. So after start, you first need to check whether the speed is max 38400 (I don't advice a higher speed). if not, then connect on 115K with softserial, set the speed on the reader to 38400, reset the softserial speed to the new speed. I can try create something in a couple of hours. I just hope that the URA is not sending another speed once connected.

regards,
Paul
#201250
OK.. got something that works, but make sure to read the comments. I have posted it on https://github.com/paulvha/ThingMagic/t ... assthrough.

It has been tested against the standard demo.c example from the Mercury API, accept for the addition mentioned in point 2. This was running on Ubuntu 18.04. I have not been able to connect using the URA on windows 10. I suspect a driver issue with he CH340. Search on "CH340 driver windows 10" will show a list of people suffering the same issue. more work needed on that I assume

regards,
Paul
#201251
Paul, thank you for the insight and the deep dive into answering the original question! I'll play around with your arduino sketch, but sounds like the longer term, more stable solution would be to get a FTDI USB to TTY serial adapter and solder it to the SRTR and connect that way. I am assuming this would eliminate some of the variable baud rate headache?
#201282
One final question, I purchased the FTDI USB adapter and everything works great communicating with the RFID reader over this interface when the reader is powered directly from USB through the adapter. However, as soon as I plug in the RFID reader as a shield to the arduino board, I no longer can communicate via the reader's FTDI to USB breakout board. Any thoughts?
#201283
pin 0 and 1 on the shield are ALSO connected to the UART/USB connection. On the Arduino pin 0 and 1 are also connected to the USB (for Arduino). When you put the switch to HW, which you have to do to communicate using the UART/USB, you get a conflict. Make sure that Pin 0 and 1 are NOT connecting to the Arduino (cut them off or bend them so they do NOT connect).
regards
Paul
#201300
FYI, I ended up uploading an empty sketch to the arduino and this did not perform the Serial.connect function which left the Rx/Tx pins unused on the shield and allowed for the UART/USB connection of the reader to be used. Working through now making sure the reader is powered from the shield vs from the UART/USB connection. Thanks again for all the support.