GithubHelp home page GithubHelp logo

chafon-rfid's People

Contributors

wabson avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

chafon-rfid's Issues

Chafon RU-6403

I've found your repo as I'm trying to connect to a chafon 6403 reader
I've only been able to write a socket to the reader on port 27011 ip 192.168.0.250 and get the device name I set up with a at command. Afterwards I tried to send a well formated command for getting reader info 0x04 0xff 0x21 (which is displayed as ! in the screen shot) but no answer from the device!.
The example below is calculated with the checksum function I found in your code.
Previously I tried with mine but it was not working also.

image

I saw a previous post of someone trying also to use the same reader but nohing more to be sure that the reader works well or not with your code.
The chafon 6402 appears to be in the working device list, I hope that the 6403 could also work?
Do you think/know if your code can run for that device?

I tried to run the get-reader-info first but I got an error.

Which value may I add in order to let the coding working better?

The issue I've is the folowing (I've added trace comment in the code)
image

Perhaps because the device is not declared in the class ReaderType?
image

Which value could fit? How can I calculate it?
Thanks a lot for reading

Reader doesn't reach promised range

Hello guys
What are your expperience on these RFID-Module's range? I got my RFID reader from Chafon up and running but the range is too short. On their website it is stated that it can reach 15mbut mine barely did 5m.

Response must be at least 5 bytes error Raspi

Hey guys,

Congrats on this awesome project!

I am using the Product Model:CF-RU5112 through serial port (directly connected to gpio txd/rxd) on the raspberry pi 3b.
I installed the libs and enabled serial connection through raspi-config but when i try to get reader info:


sudo python3 get-reader-info.py /dev/ttyS0
sudo python3 get-reader-info.py /dev/ttyAMA0

I am gettting unkown reader type: response must be at least 5 bytes.

Any idea what i am missing? Btw. The device shows a red light, i assume once it does a read the light will turn green for a sec.

enable 4 antenna in scanning

Hi, I've been working on continuous-read.py from example folder and working good so far, everything is working I'm able to update the scanned cards through google spreadsheet. Im using a reader with capable of connecting 4 antenna, however the continous-read.py only works with a single antenna connected to it. Is there a way to tweak on the script so that 4 antennas can work at the same time?

Thank you.

Getting broken pipe error

Hi Will,

When I am trying to run a single-read.py in the example I am getting the following error.

File "single-read.py", line 21, in
reader_info = ReaderInfoFrame(runner.run(get_reader_info))
File "{PYTHONPATH}:$(pwd)/chafon_rfid/base.py", line 31, in run
self.transport.write(command.serialize())
File "{PYTHONPATH}:$(pwd)//chafon_rfid/transport.py", line 33, in write
self.write_bytes(byte_array)
File "{PYTHONPATH}:$(pwd)//chafon_rfid/transport.py", line 55, in write_bytes
self.socket.sendall(byte_array)
BrokenPipeError: [Errno 32] Broken pipe

Could you please explain the usage of the examples in brief ?

Thanks

Reading multiple tags using the IDENTIFY command

We have a project where we want to read multiple tags at once.
Using the Chafom Reader.exe program on Windows and connected via USB to a CF-RU5309 (I think) it all works as expected.

But my code based on this library running on an Arduino Nano talking to a custom board via USB which talks to the reader via serial only reads 1 tag at a time (it briefly read 2 tags but that seems to have been an anomaly).

Per the SDK, I send an Identify command 0x53, 0x57, 0x00 ,0x03 ,0xFF ,0x01, 0x53 per the manual and I get back 1 tag.

Their Reader.exe software sends 0x53, 0x57, 0x00 ,0x06 ,0xFF ,0x01, 0x00, 0x00, 0x00, 0x50 which appears to contain dummy data (the last 3 0x00 bytes) which (a) is different and (b) doesn't work for me at all.

Has anyone had any success with using serial comms to talk to their reader?
I know this is kinda outdated tech but the project I'm working on requires USB for output from the board and serial to talk to the RFID reader.

Any help would be greatly appreciated...

ValueError: 16 is not a valid ReaderType

I'm getting this error when first trying to request info from the reader:

ValueError: 16 is not a valid ReaderType

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "main.py", line 16, in
main()
File "main.py", line 10, in main
reader_info = ReaderInfoFrame(runner.run(get_reader_info))
File "/home/dylan/ProgrammingProjects/HomeAutomation/inventory/lib/python3.8/site-packages/chafon_rfid/base.py", line 90, in init
self.type = ReaderType(self.data[2])
File "/usr/lib/python3.8/enum.py", line 304, in call
return cls.new(cls, value)
File "/usr/lib/python3.8/enum.py", line 595, in new
raise exc
File "/usr/lib/python3.8/enum.py", line 579, in new
result = cls.missing(value)
File "/usr/lib/python3.8/enum.py", line 608, in missing
raise ValueError("%r is not a valid %s" % (value, cls.name))
ValueError: 16 is not a valid ReaderType

I'm using this reader: https://www.aliexpress.com/item/32848525319.html?spm=a2g0s.9042311.0.0.7a934c4dVwbCiA

connected over USB via the interface board on the same page.

I've tried to strip my code down to what I think is the absolute minimum to connect and get the info based on the examples. It looks like this:

from chafon_rfid.base import CommandRunner, ReaderCommand, ReaderInfoFrame
from chafon_rfid.command import CF_GET_READER_INFO, G2_TAG_INVENTORY
from chafon_rfid.transport_serial import SerialTransport

def main():
  get_reader_info = ReaderCommand(CF_GET_READER_INFO)
  get_inventory_uhfreader18 = ReaderCommand(G2_TAG_INVENTORY)
  transport = SerialTransport(device='/dev/ttyUSB1')
  runner = CommandRunner(transport)
  reader_info = ReaderInfoFrame(runner.run(get_reader_info))
  print('Reader info: type %s version %d.%d, power %d dB ' % (reader_info.type.name, reader_info.firmware_version[0], reader_info.firmware_version[1], reader_info.power))
  print('Frequency info: region %s, %.1f-%.1f MHz' % (reader_info.frequency_band.name, reader_info.get_min_frequency(), reader_info.get_max_frequency()))


if __name__ == "__main__":
    main()

I initially attempted to solder some wires to the reader via the connections on the edges. They are separate from the serial cable it is connected to now but I definitely scorched the edge connections a little before I gave up on soldering it, broke down and ordered the interface board. So I'm concerned there may be some hardware damage and I'm getting garbage data.

However, I tried connecting to another USB serial port for an unrelated device and it gave me a different error a bit earlier in the connection:

ValueError: Checksum does not match

which makes me hopeful that might not be the issue.

Another possibility that's occurred to me is just that the format is a little different. I do have the specs for the reader and I'm a programmer by trade (though not a specialist in Python) so I'm not averse to trying to patch the library.

Broken Pipe How To Solve

Traceback (most recent call last):
File "get-reader-info.py", line 46, in
print_reader_info(sys.argv[1])
File "get-reader-info.py", line 32, in print_reader_info
reader_info = get_reader_info(runner)
File "get-reader-info.py", line 15, in get_reader_info
reader_info = ReaderInfoFrame(runner.run(get_reader_info))
File "/usr/local/lib/python3.8/dist-packages/chafon_rfid/base.py", line 31, in run
self.transport.write(command.serialize())
File "/usr/local/lib/python3.8/dist-packages/chafon_rfid/transport.py", line 33, in write
self.write_bytes(byte_array)
File "/usr/local/lib/python3.8/dist-packages/chafon_rfid/transport.py", line 55, in write_bytes
self.socket.sendall(byte_array)
BrokenPipeError: [Errno 32] Broken pipe

Connection without interface board

I feel really dumb to ask this but how can I connect the CF-MU804 to PC or microcontroller without the interface board from Chafon? I found the pinout on their website so theoretically I can just connect the right pins into a Rs232 adapter right? Or are there any power issues?

Command for setting individual antenna RF power?

I can see that you're adjusting the RF power setting for the reader in the continuous-read.py example, but do you happen to know what the command frame is for adjusting the RF power setting per antenna please?

I've been provided a copy of a Windows SDK for a UHFReader288MP type reader which allows the RF power for each antenna to be set independently, and their included C# user manual references this ability too, but I can't find any reference to the byte command that achieves this functionality.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.