Reading RFID using C
I get a RFID read/writer recently, the interface is rs232,i connect it to my PC's com1,
I read the included source and find it very difficult...
because they are all written using c + + and are GUI,
that is so hard for me because i'm learing C only.
Really no way .I want to read card numbers and data in the c console ..is there any possible easier way for me?
I don' need to make a GUI.
and the card is ISO4443A.
Thank you so much for answering !
You mean there is no function with a name like "readcard" anywhere?
Or anything that appears to connect to a serial port?
A decent code editor with wildcard / regular expression searches makes this quite easy to do.
You might not be able to write C++, but C++ and C are sufficiently similar that you should be able to get some idea of what it is doing, even if you don't know the detail.
Being able to take code in other languages and adapt to your own use is a skill worth having.
yes...there are function like that, but they are totally out of my expectation..i can't handle it
Originally Posted by Salem
i had read some books about Microcontroller(8051) before this prohecr, because the communication with it is not that difficult.
like setting TxD...RxD..etc, but now i get a finished products,i don't know what component inside.
actually i don't know how to get start..
especially i don't understand the formatting of C++ style...
Take the serial port knowledge you gained working on the uC and apply it here... The serial port doesn't work any differently now than it did then.
What you need to do is capture some packets from it and learn how to decode their contents.
It's even likely that someplace in that C++ code there's a struct you can copy to C and overlay on the received packets to get the data out.
Without any code and questions related to the posted code, we would only be guessing about what you don't understand. So you might think about posting small sections of the code that you don't understand and asking specific questions.
Also understand that most people on this site do not have your unspecified hardware or software. So you will have to provide links to the documentation for your hardware and software. The RS232 specification specifies the voltage and timing specifications but does not specify the commands required to initialize and talk to your hardware, this should be provided by the hardware manufacturer.
The C++ guys may be able to help you convert the interface to a simpler console C display of the read card data.
Have you posted that in the C++ forum?
i have been trying..but there are many classes and header files.
Originally Posted by CommonTater
i will try my best to understand what they mean.
Presumably, you downloaded this mass of C++ code from somewhere on the web?
Thank for your advice!
Originally Posted by jimblumberg
I try to post a part of code and more informations for your reference.
NO, that comes with the device.
Originally Posted by Salem
it provides checking connection ,reading and writing function, no other further usage.
no...i may do that if i really no ideas at the end.
Originally Posted by Adak
But I bet they have a website right?
I think you missed my point... Get the thing connected and talking on your port before you worry about anything else... Scan a few tabs and even if it displays garbage, you are one step closer to your goal.
Originally Posted by anthonyung
Sometimes these things surprise you and communicate in plain text... The first bar code scanner I worked on nearly put me on the floor when the text on the screen was exactly what was printed under the barcode... The mass comment was "Naaaa, that's just too easy..."