简体   繁体   English

RFID阅读器和PHP之间的通信

[英]Communication between RFID reader and PHP

I have to develop an application for read RFID tag in a PHP Application. 我必须在PHP应用程序中开发一个用于读取RFID标签的应用程序。

For this, I bought a reader RFID : http://idtronic-rfid.com/industrial-readers/bluebox-uhf-controller/controller-cx-2ch/ 为此,我买了一个RFID阅读器: http : //idtronic-rfid.com/industrial-readers/bluebox-uhf-controller/controller-cx-2ch/

This reader connects to my PC with RJ45. 该阅读器通过RJ45连接到我的PC。

I installed a WAMP Server on my PC for run the website. 我在PC上安装了WAMP服务器以运行该网站。

Now, since the website, i have to demand to the RFID reader, to read all RFID Tags in his zone, and return the data to the website. 现在,从网站开始,我必须要求RFID读取器读取他所在区域中的所有RFID标签,并将数据返回到网站。

Have you an idea of how I can do this ? 您知道我该怎么做吗?

I have read on the net that the read port (com4 for example) is a solution, but i'm not sure that's the good way of proceed. 我已经在网上阅读到读取端口(例如,com4)是一种解决方案,但是我不确定这是进行操作的好方法。

Can you help me please ? 你能帮我吗 ?

You have to check the documentation of you external module to understand exactly how you can communicate with it (which port do you have to read, etc.). 您必须检查外部模块的文档以确切了解如何与之通信(必须读取哪个端口等)。 Then, you should be able to communicate with this module using the Direct I/O package (see the documentation ). 然后,您应该能够使用Direct I / O包与此模块进行通信(请参阅文档 )。 It is not included anymore by default in PHP so you'll have to install it manually on your system. PHP默认不再包含它,因此您必须在系统上手动安装它。

That's said, keep in mind that: 就是说,请记住:

  • This kind of solution will probably not be portable accross OS. 这种解决方案可能不会跨OS移植。 If you develop under windows and plan to deploy later on a Linux server, you will probably have to rewrite some parts of the code. 如果您在Windows下进行开发并计划稍后在Linux服务器上进行部署,则可能必须重写部分代码。
  • PHP is a web language, probably not the best choice for communication between a software and a hardware peripheral. PHP是一种网络语言,可能不是软件与硬件外围设备之间进行通信的最佳选择。 You should maybe consider C, C++ or even Python as an alternative. 您也许应该考虑使用C,C ++甚至Python作为替代方案。

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

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