It can't be that hard. I remember doing a test and on a Windows
machine you can open COM1: using the normal java file stuff. On unix
it would be the same; open /dev/ttywhatever. On the other hand, if
you need to change the baud rate, parity, etc. I have no clue.
I was looking in to this a while ago and posted a query on a local
mailing list and someone just asked me about my progress; here's my
response, which might have some useful information in it:
I ended up not doing anything; the people who would have used it nixed
the idea.
On the other hand, after investigating it I did find out that it looks
like it's very easy to do. The Cal cards use a standard magnetic
stripe format which is readable by all the usual readers you can get.
There are several tracks on cards with a magnetic strip and the Cal
card is only using one of them, so you may have to program the reader
to read only that track, or maybe it will send you only its data since
it's the only active one. You can also program the reader to do stuff
for you so that your software has less to do. But since the data is
so short and simple I'm not sure I see the need for this.
The other thing someone pointed out to me is that the Cal card also
has the student/staff id on the front in bar code. The only thing
that's on the magnetic stripe is the student/staff id, so it's
functionally equivalent. So you could also use a bar code scanner,
which could be easier since people can just wave their card in front
of it and no need to mount a reader.
If you do a google search for magnetic stripe readers you'll get a
ton of hits, so there are many choices.