broughtong / LibMercuryRFID

Library for interacting with the Mercury API RFID Library from Python
MIT License
3 stars 2 forks source link

Troubles compiling with Python #4

Open Rihebou opened 6 years ago

Rihebou commented 6 years ago

I tried to compile the rfid_test.py on linux while I connected the RFID reader with the antenna(The RFID reader detects well the tags on windows with the URA) But when I compile the rfid_test.py It shows me: Creating reader: Ok Connecting to reader: Ok Getting Saved Region: Ok Initialising read plan: Ok Setting Read Plan: Ok Adding read listener: Ok Adding Exception Listener: Ok Error:No antenna or invalid antenna Error:No antenna or invalid antenna Error:No antenna or invalid antenna Error:No antenna or invalid antenna Error:No antenna or invalid antenna Error:No antenna or invalid antenna Error:No antenna or invalid antenna Error:No antenna or invalid antenna and this Error continues! Could anyone help me please? My antenna works well and I don't understand if there is any incompatibility with this code. The problem is with the function startReader : "reader = rfid.startReader("tmr:///dev/rfid", myCallback)" Thank you in advance

Rihebou commented 6 years ago

In fact, I checked the file "tmr:///dev/rfid" and found that is empty so the devic URI is empty and the function StartReader can't work, but have you any idea what must contain the file rfid in dev?

MFernandezCarmona commented 6 years ago

Hi, A few considerations before. What you compile is a cpp library with python interfaces that is later loaded. If you just clone the code and launch test_rfid.py it won't work. Given that, did you launched install.sh as root? If so, do you have the rule /etc/udev/rules.d/64-persistant-rfid.rules ?

The address "tmr:///dev/rfid" basically points to the virtual file at /dev/rfid created by the rules above. If that rule fails, you should be able to use a common ttyACM file (usually at /dev/ttyACM0 or /dev/ttyACM1)

Hope it helps,

Rihebou commented 6 years ago

Yes I launched the install.sh as root and I have the rule /etc/udev/rules.d/64-persistant-rfid.rules. But I hae always the problem of antenna invalid