Require help accessing CF RFid Reader in Compact Framework

  • Thread starter Thread starter r.polding
  • Start date Start date
R

r.polding

Hi,

I've recently started a project developing an application for a PDA that
reads RFID tags (tags that emit a radio signal containing a unique id
number, and that can be picked up by a reader). I have been supplied
with a reader and tags but unfortunately very little information on how
to actually program it. All I've been told is:

This reader has a standard CF interface. To get the bits into your PC or
PDA, you must use the same part of your development system as for
reading other data from a CF card. The meaning of the bits you can find
in John's e-mail. Please do not forget that different processors might
need different versions.

The email they're referring to contains the following information:


Data format for reading the tags is as follows:
STX(1BYTE), RFID_ID(4BYTE) totally 5 ASCII characters
STX is 0x02h
RFID_ID include 4 bytes, representing a 2 bytes unsigned integer,
such as ID=10811, the hexadecimal expression will be 0x2Ah, 0x3Bh
while it can be expressed as 4 bytes ASCII characters: 2, A, 3, B.
Therefore, the data PC received for a tag with ID=10811 is :
Expression in ASCII : STX 2 A 3 B
Expression in hexadecimal: 0x02h 0x32h 0x41h 0x33h 0x42h
Starting with 0X02h, the following 4 bytes represent an ID number.

Can anyone please help as I cannot understand this. I need to be able to
read a value into a variable, using VB.NET, but have no idea how to do this.

Thanks for your time.

Robert Polding
The University of Sheffield
 
If you have to read off the CF bus this is not going to happen in VB. Is it
possible? Yes, I can think of how to make it happen, but it's going to be
really complex and you have to understand hardware and bus architecture.
I'd still do it in C. Tell whover supplied the hardware that you need a
driver or it just isn't going to happen.
 
If you have to read off the CF bus this is not going to happen in VB. Is it
possible? Yes, I can think of how to make it happen, but it's going to be
really complex and you have to understand hardware and bus architecture.
I'd still do it in C. Tell whover supplied the hardware that you need a
driver or it just isn't going to happen.

Thanks for the reply. Do you mean in normal C or would this be possible
in C#/C++ (i.e. in VS)? We've contacted the manufacturer and are waiting
for a response regarding a driver.

Robert Polding
The University of Sheffield.
 
If there's no driver, then you need to access the hardware directly. That
is best done in C or C++, though it is possible in C#. If you don't know
how to do it in C, then even considering C# would be foolish, as it's
actually going to be harder.

You also will need to know some specifics on the hardware (like the
addresses for PCMCIA) though if you know the processor in the device, you
can probably get that from the processor data sheet.

I've done this type of work before (got data from a camera hooked up to the
CF port as a parallel bus) and without having some hardware tools (logic
analyzer) maybe a CF breakout adapter, solid info on the hardware, and some
experience on how all this stuff works, you've got a very difficult path
ahead. If you don't have all this, and the OEM doesn't have a driver, it
would be well worth asking them how much they want to write one for you.
 
Hi,

This is a serial protocol, and it is straight forward to decode (I have
examples of similar in my book), What your vendor has to furnish you is the
port number (almost certainly 4), and the speed (almost certainly 9600 bps).
You can use the SerialPort object in VS2005, or download either CFSerialIO
from my homepage or use the OpenNETCF.org serial object to read the data.

If you have specific implementation questions, you can reach me by email and
I'll try to help.

--
Richard Grier, MVP
Hard & Software
Author of Visual Basic Programmer's Guide to Serial Communications, Fourth
Edition,
ISBN 1-890422-28-2 (391 pages, includes CD-ROM). July 2004, Revised March
2006.
See www.hardandsoftware.net for details and contact information.
 
Hi,

VB is fine. I use it 95% of the time.

Dick

--
Richard Grier, MVP
Hard & Software
Author of Visual Basic Programmer's Guide to Serial Communications, Fourth
Edition,
ISBN 1-890422-28-2 (391 pages, includes CD-ROM). July 2004, Revised March
2006.
See www.hardandsoftware.net for details and contact information.
 
Chris,

The only RFID readers that I have seen are simple serial port devices. They
plug into the Compact Flash port (I suspect they are built around Socket's
OEM serial product).

Dick

--
Richard Grier, MVP
Hard & Software
Author of Visual Basic Programmer's Guide to Serial Communications, Fourth
Edition,
ISBN 1-890422-28-2 (391 pages, includes CD-ROM). July 2004, Revised March
2006.
See www.hardandsoftware.net for details and contact information.
 
Thanks for this reply. I'll be in touch if I need any assistance.

Thanks to Chris also for the input in this.

Robert Polding
The University of Sheffield
 
Back
Top