Link to home
Start Free TrialLog in
Avatar of kaosmadness
kaosmadness

asked on

Can I get a linux system to listen for data on a serial port and then validate it?

Hi!

We have a very ancient Parking system running on an NT server. We encode our guests keys for their hotel room on magnetic key cards with a series of strings of data like 00000000555500000120000130000201100000120000014000002011. Previously, we would encode their room keys and then go on another machine to encode their parking system key. The machine that encode the parking keys in dead and the software is no longer supported.  BUT, the server that communicates with the gates and tells them that a key is valid is still working. I am not sure I wanna do anything with that.

Is there any program that I can use to listed to the gates like their server those which I can have look at the data being read which is basically 0s and room number 0s arrival date 0s departure and reply back asking them to open?

If not then I will even settle for a program that can tell if anything is written on a specific track and reply to open.

Any ideas would be use full!

Thanks
Avatar of venloft
venloft

Hi,

You may archive your goal by using some serial port connection libraries, and write your rutine for your particular use, hope the following links could help you or be a starting point

libraries for:

PHP http://www.phpclasses.org/package/3679-PHP-Communicate-with-a-serial-port.html

Perl http://search.cpan.org/~bbirth/Win32-SerialPort-0.22/lib/Win32/SerialPort.pm

Phyton http://sourceforge.net/projects/pyserial/

C++  http://www.comptechdoc.org/os/linux/programming/c/linux_pgcserial.html
Avatar of kaosmadness

ASKER

uhmmm. Thanks. I think it might take me a while since I don't know c or python. Maybe someone can give me a hint on a simple script that would set the com port at a certain setting, open/begin listening and reply a predefined answer to all queries. The first part would have been great if it could make sense of the hotel room key information but at  this time we are kinda in a bind because even if we pay to purchase a new parking system it will take a while to install. My temporary solution has been to clone a valid parking card's mag stripe encode the room information on another track. Thanks for the info though!!
ASKER CERTIFIED SOLUTION
Avatar of roundel35
roundel35
Flag of United Kingdom of Great Britain and Northern Ireland 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
Thanks for pinging me on the right direction! I finally got it to work!!!
Glad to be of assistance!