chafon-rfid
chafon-rfid copied to clipboard
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
Could you please explain the usage of the examples in brief ?
Thanks
By default the examples try to connect to a reader over the network, but you can also use serial.
The error you are getting BrokenPipeError: [Errno 32] Broken pipe
in single-read.py
implies that your device is not accessible at the hard-coded IP 192.168.1.190
. You need to change this on line 18 to the address of the reader, or use serial communication instead (if your reader is connected that way), e.g.
transport = SerialTransport(device='/dev/ttyUSB0')
Hope that helps
Hi Will,
When I am trying to run a single-read.py I am finding this error.
<base.CommandRunner object at 0xb64707f0>
Traceback (most recent call last):
File "code3.py", line 21, in
I was used serial communication instead transport e.g. transport = SerialTransport(device='/dev/ttyUSB0')
Could you explain where and how to solve the problem?
Thank you
This : <base.CommandRunner object at 0xb64707f0> is because I have written runner = CommandRunner(transport) print(runner)
@anas-gif normally you should open a separate issue unless you are sure your problem is related. But since I didn't close this issue yet, let's continue here.
Could you post the output of dmesg | grep tty
? It may be that /dev/ttyUSB0
is not the correct device name, but the output should indicate which serial ports you have in use.
[ 0.000000] Kernel command line: coherent_pool=1M 8250.nr_uarts=1 cma=64M cma=256M video=HDMI-A-1:1920x1080M@60,margin_left=48,margin_right=48,margin_top=48,margin_bottom=48 smsc95xx.macaddr=DC:A6:32:57:19:19 vc_mem.mem_base=0x3ec00000 vc_mem.mem_size=0x40000000 console=tty1 root=PARTUUID=d9b3f436-02 rootfstype=ext4 elevator=deadline fsck.repair=yes rootwait quiet splash plymouth.ignore-serial-consoles [ 0.000258] console [tty1] enabled [ 0.434975] fe201000.serial: ttyAMA0 at MMIO 0xfe201000 (irq = 34, base_baud = 0) is a PL011 rev2 [ 0.438246] fe215040.serial: ttyS0 at MMIO 0x0 (irq = 37, base_baud = 62500000) is a 16550 [ 4.914043] usb 1-1.2: cp210x converter now attached to ttyUSB0
I have replaced /dev/ttyUSB0 by /dev/ttyAMA0 and the programme no post nothing.
I connecte my RFID with Raspberry by wires TXD of RFID with RXD of Raspberry and RXD of RFID with TXD of Raspberry. And I connecte my RFID also with Raspberry by cable USB (UHF RFID Desktop Reader and Writer Modèle: CF-RU5202) you can see the http://fr.chafontech.com/rfid-uhf-reader/uhf-reader-and-writer/diy-uhf-rfid-reader.html
can you help me please
Hi @wabson
I have the same issue while trying to connect to RU6403 reader via network. In the example single-reader.py I've changed IP address and port of reader and Im getting BrokenPipeError: [Errno 32] Broken pipe
on line reader_info = ReaderInfoFrame(runner.run(get_reader_info))
.
I checked connectivity using tools included in reader's SDK and successfully connected to reader
I'm not very experienced in TCP connections, so any help in debugging that issue will be very helpful.
please try auto_connect=True in transport.py or manually connect with socket.