简体   繁体   English

从RFID阅读器获取数据

[英]Getting data from an RFID reader

I have a an RFID reader with very scant documentation. 我有一个RFID阅读器,文档很少。 It has some wires hanging out and they come from a connector with "+12V", "GND", "NC" , "COM" (or CDM) , "NO", "SW", "D0" , "D1" pins. 它有一些电线伸出,它们来自带有“ + 12V”,“ GND”,“ NC”,“ COM”(或CDM),“ NO”,“ SW”,“ D0”,“ D1”引脚的连接器。

I don't know what they are but "+12V" and "GND" are for voltage and ground. 我不知道它们是什么,但“ + 12V”和“ GND”用于电压和地。 Probably D0 and D1 are for I2C communication. D0和D1可能用于I2C通信。

The unit works fine (beeps while reading from RFID card etc) but I'd like to get the info of the cards to a laptop using a serial (COM) port. 该设备工作正常(在从RFID卡读取等时发出蜂鸣声),但我想使用串行(COM)端口将卡的信息发送到笔记本电脑。 I don't want to damage the serial port of my laptop. 我不想损坏笔记本电脑的串行端口。 How would I go about trying to receive data from the RFID reader. 我将如何尝试从RFID阅读器接收数据。 I can try on another Windows XP laptop which is expendable. 我可以尝试使用另一台可消耗的Windows XP笔记本电脑。

My guess is to connect the D0 and D1 to the serial port but which pins do I connect? 我的猜测是将D0和D1连接到串行端口,但是我应该连接哪些引脚? What about the voltage? 电压呢? I am familiar with RX and TX port usage. 我熟悉RX和TX端口的用法。 I just want to know that I can get data off the RFID reader and if so I'll write a more robust com send/receive C program. 我只想知道我可以从RFID阅读器中获取数据,如果可以,我将编写一个更强大的com send / receive C程序。

D0 stands for Data Low pin. D0代表数据低电平引脚。 D1 stands for Data High pin. D1代表数据高电平引脚。

From the description of yours, you might be using Wiegand based RFID reader. 根据您的描述,您可能正在使用基于Wiegand的RFID阅读器。 The pin connection present here RFID reader. 此处的引脚连接为RFID阅读器。 The pins D0 and D1 are used to send data to controller. 引脚D0和D1用于将数据发送到控制器。

  1. When D0 and D1 are both Low or 0 that means no data is transmitting. 当D0和D1均为Low0 ,表示no data在传输。
  2. When D0 is Low and D1 is high (1) then the output 0 is transmitting. 当D0为Low而D1为high (1)时,输出0正在发送。
  3. When D0 is High and D1 is Low then the output 1 is transmitting. 当D0为High且D1为Low ,输出1正在发送。
  4. When D0 and D1 are both High or 1 that means no data is transmitting. 当D0和D1均为High1 ,表示no data在传输。

So when you connect these two pins to some controller, it has to monitor the data from these two pins and has to determine the output (logic 0 or 1) based on the above four points. 因此,当将这两个引脚连接到某个控制器时,它必须监视来自这两个引脚的数据,并且必须根据以上四个点确定输出(逻辑0或1)。 After controller reading all the data from D0 and D1 (may be 96 or 128 consecutive bits), you need to decode that binary data into ASCII first and then you can extract card number from that data. 控制器从D0和D1读取所有数据(可能是96或128个连续位)后,您需要先将该二进制数据解码为ASCII,然后才能从该数据中提取卡号。

Well you'll first need to make the RS232 connector. 那么,您首先需要制作RS232连接器。 Your pins are as follows: 您的密码如下:

+12V: Hot voltage supply GND: Ground + 12V:热电源GND:接地

^^Connect those to a power 12V power supply. ^^将它们连接到12V电源。

NC: Normally closed COM: Common NO: Normally open SW: Switch D0: Data 0 D1: Data 1 NC:常闭COM:通用NO:常开SW:开关D0:数据0 D1:数据1

There should be at least some documentation with the device as to which pins communicate. 设备上至少应有一些有关针脚通信的文档。 Look up RS232 9 pin wiring to see what you should solder where. 查找RS232 9针接线,看看应该在哪里焊接。

Then you'll need a Serial communication program that can send or at least receive communications from the device. 然后,您将需要一个可以从设备发送或至少接收通信的串行通信程序。 Putty would be your best bet. 油灰将是您最好的选择。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM