Reading RFID using C

This is a discussion on Reading RFID using C within the C Programming forums, part of the General Programming Boards category; hi! I get a RFID read/writer recently, the interface is rs232,i connect it to my PC's com1, I read the ...

  1. #1
    Registered User
    Join Date
    Sep 2010
    Posts
    41

    Question Reading RFID using C

    hi!
    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 !
    Last edited by anthonyung; 03-04-2011 at 06:48 AM.

  2. #2
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    32,855
    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.
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.
    I support http://www.ukip.org/ as the first necessary step to a free Europe.

  3. #3
    Registered User
    Join Date
    Sep 2010
    Posts
    41
    Quote Originally Posted by Salem View Post
    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
    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..

  4. #4
    Registered User
    Join Date
    Sep 2010
    Posts
    41
    especially i don't understand the formatting of C++ style...

  5. #5
    Registered User
    Join Date
    Sep 2010
    Posts
    41
    really need help plx

  6. #6
    Banned
    Join Date
    Aug 2010
    Location
    Ontario Canada
    Posts
    9,547
    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.

  7. #7
    Registered User
    Join Date
    May 2010
    Posts
    2,919
    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.


    Jim

  8. #8
    Registered User
    Join Date
    Sep 2006
    Posts
    8,868
    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?

  9. #9
    Registered User
    Join Date
    Sep 2010
    Posts
    41
    Quote Originally Posted by CommonTater View Post
    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.
    i have been trying..but there are many classes and header files.
    i will try my best to understand what they mean.
    thank you
    Last edited by anthonyung; 03-04-2011 at 11:33 AM.

  10. #10
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    32,855
    Presumably, you downloaded this mass of C++ code from somewhere on the web?
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.
    I support http://www.ukip.org/ as the first necessary step to a free Europe.

  11. #11
    Registered User
    Join Date
    Sep 2010
    Posts
    41
    Quote Originally Posted by jimblumberg View Post
    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.


    Jim
    Thank for your advice!
    I try to post a part of code and more informations for your reference.
    Thank again.

  12. #12
    Registered User
    Join Date
    Sep 2010
    Posts
    41
    Quote Originally Posted by Salem View Post
    Presumably, you downloaded this mass of C++ code from somewhere on the web?
    NO, that comes with the device.
    it provides checking connection ,reading and writing function, no other further usage.
    Last edited by anthonyung; 03-04-2011 at 11:47 AM.

  13. #13
    Registered User
    Join Date
    Sep 2010
    Posts
    41
    Quote Originally Posted by Adak View Post
    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?
    no...i may do that if i really no ideas at the end.

  14. #14
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    32,855
    But I bet they have a website right?
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.
    I support http://www.ukip.org/ as the first necessary step to a free Europe.

  15. #15
    Banned
    Join Date
    Aug 2010
    Location
    Ontario Canada
    Posts
    9,547
    Quote Originally Posted by anthonyung View Post
    i have been trying..but there are many classes and header files.
    i will try my best to understand what they mean.
    thank you
    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.

    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..."
    Last edited by CommonTater; 03-04-2011 at 11:53 AM.

Page 1 of 3 123 LastLast
Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Replies: 7
    Last Post: 02-02-2009, 07:27 AM
  2. Resetting a ifstream object after reading the whole file
    By Zeeshan in forum C++ Programming
    Replies: 5
    Last Post: 03-31-2008, 09:03 AM
  3. Replies: 2
    Last Post: 01-28-2008, 03:07 AM
  4. help with reading from stream
    By movl0x1 in forum C Programming
    Replies: 7
    Last Post: 05-31-2007, 11:36 PM
  5. problems reading data into an array and printing output
    By serino78 in forum C Programming
    Replies: 4
    Last Post: 04-28-2003, 09:39 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21