-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ID-3LA Reader read gibberish #1
Comments
Have you configured the serial port on the Pi. It's something I don't mention in the documentation that I should add. See the following for instructions: http://www.microcasts.tv/episodes/2014/08/08/configure-the-serial-port-on-the-raspberry-pi/ If you've done that and are still having issues just let me know. |
I've already done that. Here is an example of what I get: https://dl.dropboxusercontent.com/u/57843365/Capture.PNG |
Another thing I just remembered is the format selection. If Pin 7 is left floating you'll get garbage. It needs to be tied to GND for the ASCII format to be used by the module. If floating you could get Wiegand26 output which would likely read as garbage. |
It's grounded. Specifically I've pin 11 on 3.3V, pin 9 on RX and pin 7 and pin 1 to GND. |
Can you send me the contents of your rfid.py file, the URL to where you bought the sensor and tag from, and a picture of your connections? Sounds like you have everything right so not sure what could be going on. |
ID-3LA: http://grobotronics.com/rfid-reader-id-3la-125-khz.html Connections: https://dl.dropboxusercontent.com/u/57843365/April_30__2015_at_0758PM.jpeg rfid.py: import sys |
The picture cuts off so I can't see where all the connections go on the Pi from the module. Can you send a picture that shows all of the connections? Seems like everything is good. I'm not an antenna expert so is it possible that is an issue? I've only ever used the ID modules that have built-in antennas. |
I don't think that neither the antenna or the connections is wrong, because it works fine on an Arduino. Could be this a problem of PuTTY and its encoding? |
That's right. Sorry, I forgot you mentioned it working on Arduino. I guess it's possible it could be PuTTY related but probably not likely. Can you test it with the Pi connected directly to a monitor just to rule that out? Also, we can try eliminating my code and just trying a straight serial read with the following code run as sudo: import serial
port = serial.Serial("/dev/ttyAMA0", baudrate=9600, timeout=0.2)
while True:
rcv = port.readline()
if len(rcv) > 10:
print "Tag detected: " + rcv If you still get gibberish there then something else must be going on. Maybe even a baud issue even though the module says its 9600. |
Wow. It seems that with the straight serial read works! |
Interesting! The library basically does the exact same thing except it tries to be helpful and strip out certain parts like the checksum and leading/trailing stuff. I'd be interested to see the output if you called https://github.com/sidwarkd/ucasts_pi/blob/master/python/ucasts.py#L315-L316 to print out |
I've connected the ID-3LA (with external antenna) to my Raspberry Pi, and using your script I tried to read an 125 KHz RFID Tag. The script seems to be working, it identifies the card, but the "tag" variable returns a gibberish value instead of a hexadecimal. What did I do wrong?
P.S. I've tried to read via ID-3LA connected to an Arduino and it works fine.
The text was updated successfully, but these errors were encountered: