P
P
PP2015-01-09 05:16:32
PHP
PP, 2015-01-09 05:16:32

How to make friends rfid reader and php application?

In general, there are RFID cards with codes, and there is an arduino uno with an rfid reader connected to it.
Arduino is connected to the computer via usb (com-port).
And the openserver with the web application is installed on the computer.
The browser on the computer is always open and the application is always running on it.

So, it is necessary that when swiping the card on the reader, the application displays the received code from the card.

I assume that some intermediary is needed - a daemon that will listen to the com port and the received data, convert it into an http request for the web server. And the web server sends an ajax request to the client on its own initiative. If this is the right direction, then how to create a demon? Or maybe there are other ways?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
S
Sergey Lerg, 2015-01-09
@Lerg

You can either take the wifi extension for Arduino and run the http daemon directly on it, or rewrite the reader on some other network-enabled platform (raspberry pi, for example).
If it's still Arduino, then make a script in Python or something else that can listen to the COM port and work with the network. As soon as a signal comes from the device, send an HTTP request to the main server with the script so that it registers it in the database or somewhere else (the term AJAX does not apply here).
And in the browser, either make web sockets, or poll the server with the required frequency for new data.

A
Armenian Radio, 2015-01-09
@gbg

Can be done directly from the browser

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question