Link to home
Start Free TrialLog in
Avatar of Steve Tinsley
Steve TinsleyFlag for United Kingdom of Great Britain and Northern Ireland

asked on

How to program RFID reader to post data via HTTP

I am looking at building a system for use at an exhibition where all guests will check in at each stand with an RFID wrist band. I want to post the data to a webserver database.

I have come across this reasonable priced reader:  
iDTRONIC USB Desktop Reader EVO - HF Multitag

I need a kick in the right direction when using SDKs/DLLs etcs as I get a bit lossed.

Can someone help my starting me in the right direction?

I am happy to program a simple PHP get request and INSERT the data into a mySQL database.

Any advice would be great!!!!!!

Many Thanks

Steve Tinsley
ASKER CERTIFIED SOLUTION
Avatar of Graham N.
Graham N.
Flag of United Arab Emirates image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Steve Tinsley

ASKER

Thanks for the solution Graham.
I am a little conserned about the reliability of the system.
The reader could have people queing up to check in at the stand.

I suppose for speed I would use Ajax to submit data.

Is there faster and more reliable way of doing this?
We have used the HTML/PHP scenario in a multitude of environments, including a Point of Sale environment.

What will determine the speed will be the connection between the PC's that are grabbing the data and server. If that is over the Internet then you may face problems depending on the Internet connection.

If however you have the PCs locally networked at the event, and the server in the same local network, then speed will not be an issue.

Depending on how big the event is, and the budget you have, you could set up the registration PCs locally networked to a local server handling the registrations, and the local server then uploads the registrations in batch to a remote server.

The reliability of the HTML form and back-end PHP script is far greater than attempting to write something in C/C++ (or any of the visual platforms) becuase there is less to go wrong!

Using AJAX would not be advisable, and wouldn't help speed wise, the page "reload" after POST will ensure the field comes back in to focus immediately.

We have one installation that is using exactly this type of scenario where there are 24 PCs locally networked to a small local server running Apache/MySQL handling overhead RFID scanners reading car mounted RFID tags. This system typcially handles around 45 scan + post per second.
How do you deal with 2 scans within 1 second??
i.e.....
Chip 1 is scanned and submitted (may take 1.5 second to submit and reload back to input page)
Chip 2 is scanned during that 1.5 second. The RFID scanner outputs the characters (like a keyboard would) to no where.

User doesn't know their input hasn't submitted.

We miss Chip 2's input.....
Have you also any thoughts on readers to use?
It only needs to be short range (1cm or so).
I think you have missed that there are multiple scanners operating in the environment I described above - each PC has a scanner attached - thus 24 PCs and 24 scanners. As the entire process I described is "automated" - in that there is no human involvement - the scan and post takes place in less than a second.

What I was attempting to highlight for you is that the actual scan and post can be "processed" easily and quickly.

Introducing the "human" element will obviously affect the process, and it will depened on how many PCs (plus scanner) with human operator you have planned for your event.

As for which scanner you use, it all depends upon your available budget.
I understand its automated...
But we all know SOMETIMES an html post can take 1 second (even when the webserver&database is local.)

What happens if the same scanner catches 2 rfid chips within 1 second? Is one chip not recorded?

ALSO: I assume the input screen is just a very basic html page with just 1 text box..
Which browser do you use?
In the automated scenario we are not using a browser - we have a C++ routine running. However, in any case, the scanned tag is placed in the keyboard buffer, and the limitation is purely the size of that buffer. The C++ routine simply looks for a keyboard input terminated by CR/LF and loops the POST. The OS handles the keyboard buffer.

In a local environment, a simple insertion in to a MySQL databse (regardless of its size) is unlikely to exceed 1 second, reading back that inserted data would be a different matter.

In your scenario, you will have someone sitting at a PC using either a handheld or surface mounted scanner. In this case the scan + post will take approximately 1 to 1.5 seconds excluding the "human" aspect.

Where we have adopted "scanning" techniques (barcode, MSR and RFID) we have usually recommended Internet Explorer - purely because the scanners are easier to attach to Windows based PCs due to supplied drivers.  

The HTML form does not use a TEXTAREA but a normal TEXT <input> field - this is so that the CR/LF at the end of the scan forces the FORM to SUBMIT (your FORM should not have a SUBMIT button).
My process needs to be automated as well. The scanners will be on each exhibition stand unman. People will walk onto the stand can scan in. No data will need to be fed-back, we are just recording how many people visit each stand.

Would you still use an html page? I guess I would hide a laptop behind the exhibition stand and just have the scanner on view.
If I understand correctly then, what you are trying to do is "track" people as they move around the exhibition. As they enter a stand, the RFID tag is scanned to log that they entered the stand.

If you were to use scanners that are capable of reading tags at a distance (which is the normal route for an automated scenario) then you will be likely to have situations were the same tag is repeatedly read and recorded, possibly even a situation where one person stops in front of the reader and causes a continual loop.

There would be no easy way to prevent such a situation from happening, without "human" intervention of course.

Thus you would really need to use proximity based scanners, that will require the wearer to physically place the tag within 1cm or 2cm of the scanner. In turn that will require that the wearer has some incentive (or reason) to do so.

Assuming you are going for the latter, then rather than rely on a local network, each scanner could run on a PC (laptop) in a standalone mode, capturing the data that at the end of the event could be processed in batch at a central point.

If you have the budget available, then Touch Screens with the reader attached to it, and a carefully designed HTML page with FORM, would be more likely to attract the attention of the wearer of the tag, and in turn encoorage them to use it.
Yes we are going to use proximity scanners but the data does need to be recorded to a central database straight away so we can query during the event.

Just to clarify, the way I think this may work is....
- USB proximity scanner attached to a hidden un-maned laptop
- Laptop has open web form on IE with 1 textbox and the cursor forced to it.
- When the chip is scanned the characters are placed in the text box automatically and the CR/LF submits the form.
- The PHP script inserts the data to the database
- The browser returns to the blank textbox input screen with the cursor in the textbox.

Do you think this method will work OK?

Lets also assume the don't need an incentive to scan and everyone does it.
Correct, the basics you listed above will work.

When the tag is read before the page reloads, the data will be in the keyboard buffer and thus populate the form when it reloads and start the process off again.
OHHH! I See.... I didnt understand that bit about the keyboard buffer.
So whilst the page is posting chip 1 and chip 2 comes along, the id from chip2 will be stored in the buffer untill there is somewhere to put it...

Can you see any problems I might have with this system????

Thanks so much for the help!
Can you see any problems I might have with this system????

There will be problems for sure, but none of them "game over" type problems.

I would advise against hiding the laptop - or else - set the laptops up so that you can access them remotely to make sure they are working and have not hung up.

You will also need to ensure you have some error handling in place on your back-end scripts so that the HTML page is loaded even if the back-end rejects the tag data.

You should obtain a scanner and a couple of tags as soon as possible and experiment with your solution so that you can fine tune it well before the "live" use.
As an extra thought, instead of laptops you might be better to use "headless" minature PCs - meaning small form factor PCs running without screen/keyboard etc, just the scanners.

They can be accessed remotely (over your local network) to start/stop - and there is less chance of them being interferred with.

We regularly use Atom based Zotac small form factor PCs running embedded Windows XP pro.
FANTASTIC ANSWERS. VERY HELPFUL!