osrts / osrts-raspberry

UNMAINTAINED
5 stars 2 forks source link

RFID Reader - Error creating a serial #6

Open VanQz opened 6 years ago

VanQz commented 6 years ago

Hi,

I have gotten a uhf rfid serial based on your documentation i have gotten a same one in the following link, https://www.aliexpress.com/item/UHF-RFID-card-reader-6m-long-distance-range-with-8dbi-Antenna-RS232-RS485-Wiegand-Read-Integrative/32800798716.html

however when i connect to the pi and started running, i am getting an error saying "Error creating the serial" i checked the reader.py and the configuration is similar where speed is 9600 and port is /dev/ttyUSB0 but still unable to create the serial

Is there any ways i can troubleshoot this issue?

Thanks

GuillaumeDeconinck commented 6 years ago

Hello,

Honestly like that I have no idea. I guess you have tried other USB ports ? Also, try to adapt the code connecting to the USB port to the port where the antenna is actually connected.

One more suggestion I have is to try to connect the antenna to a Windows PC and use the application provided by the vendor to see if it works correctly. This application allows you to configure the antenna (strength of signal, etc.). It also allows you to test the antenna in the "read" panel.

Best regards

VanQz commented 6 years ago

ive asked the vendor for the software to read and write with the anntenna but they did not respond will be able to provide the application

On Sat, 11 Aug 2018 at 23:35, Guillaume Deconinck notifications@github.com wrote:

Hello,

Honestly like that I have no idea. I guess you have tried other USB ports ? Also, try to adapt the code connecting to the USB port to the port where the antenna is actually connected.

One more suggestion I have is to try to connect the antenna to a Windows PC and use the application provided by the vendor to see if it works correctly. This application allows you to configure the antenna (strength of signal, etc.). It also allows you to test the antenna in the "read" panel.

Best regards

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/osrts/osrts-raspberry/issues/6#issuecomment-412282679, or mute the thread https://github.com/notifications/unsubscribe-auth/AbtRhGZGiSPBTWYpemp4_0dXZCGM1QjTks5uPvm0gaJpZM4VyYhK .

GuillaumeDeconinck commented 6 years ago

I uploaded it for you: https://drive.google.com/file/d/1tIopbfm1-ItcSdVPGRsAZdN0IGaSjBfk/view?usp=sharing Use the RFIDDemo3203.exe

VanQz commented 6 years ago

what are your settings as using single tag at card type, the read demo panel would not show anything. with multi tag it would show and on the pi itself when i try using pyserial to open a serial connection and started scanning the cards that were included it does not show any hex value or data [image: image.png]

On Sat, Aug 11, 2018 at 11:44 PM Guillaume Deconinck < notifications@github.com> wrote:

I uploaded it for you:

https://drive.google.com/file/d/1tIopbfm1-ItcSdVPGRsAZdN0IGaSjBfk/view?usp=sharing Use the RFIDDemo3203.exe

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/osrts/osrts-raspberry/issues/6#issuecomment-412283217, or mute the thread https://github.com/notifications/unsubscribe-auth/AbtRhHBVdWH3x3OY6BJHJ6xL4PpAUG3Bks5uPvvlgaJpZM4VyYhK .

VanQz commented 6 years ago

i managed to get the hex value but as i follow AB CD 0x 0x 0x 0x DC BA it wouldnt work. i understand that it is [num] [colour] so the 0x 0x 0x 0x would be [num] [num] [num] [colour]? i tried with AB CD 0a 01 00 00 DC BA but wouldnt work and it would stop at 0A because the escape code is \n but the decimal is 10. how would i be able to proceed if i want to use the number 10

GuillaumeDeconinck commented 6 years ago

Hey there,

Glad to see that you manage to make it work, or at least on Windows with the vendor's program.

We did the format in an other way (which honestly now I don't really know if it makes any sense):

For a blue/Saturday tag with number 10, you would write on the tag: AB CD 01 00 00 01 00 DC BA So yes, it's hexadecimal but we don't use it like that. In fact, in the end, we just concatenate, as strings, the second part of each of the 4 bytes (more precisely bytes 4-5-6-7 (counting from 1)).

So here we concatenate those parts (I have highlighted them with brackets) AB CD 01 0[0] 0[0] 0[1] 0[0] DC BA. That makes 0010, which as an integer makes 10.

Honestly, now that I have more experience, it is not really logical nor convenient... But yeah, ahah

Note that I say "blue/Saturday" because one color = one day in our case. I don't think there's a lot to change in the source code to allow the separation of those two (and thus to allow the usage of any color during any day).

Moreover, I don't think it's mentioned in the repos, but I just remembered recently that our thesis is available freely. It gives a little more info (maybe that's where you found the reference to the antennas we used ?) https://dial.uclouvain.be/memoire/ucl/object/thesis:10620/datastreams

Best regards

VanQz commented 6 years ago

Hi,

thanks for the explanation.

as followed in your thesis, i've made changes to the tag and still the information being read by the reader is still different. the following is the tag hex value, split data and tag_id

AB CD 01 00 00 00 08 DC BA

[[171, 205, 1, 171, 205, 1, 171, 205, 1, 171, 205, 1, 171, 205, 1]] | 171_2051171205

apparently the data is repeating itself and the tag number is not showing. Any ways i can toubleshoot this?

Thanks for your help!