Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie

Some help needed please

Options
  • 20-01-2013 6:45pm
    #1
    Registered Users Posts: 3,227 ✭✭✭


    Ok, I have been given a RFID reader that I need to integrate into a asset management system as part of a project, The project is based around using this device to open barriers etc (The bit Im supposed to do )

    However the reader is of an older variety and has a serial connection which I can connect too and a USB port that refuses to work with any version of windows past Windows 2000, I have contacted the manufacturer and they tell me they stopped support for the drivers back then and now recommend that newer systems use the serial connection.

    With the system comes a general demo software and SDK files to make your own software. Problem is I'm a mechanical engineer and most of my programming ability is limited to C++ through a GUI ( Labview in this case ) so I dont understand the coding world. I do intend getting involved in the programming world shortly but at the moment I'm lost.:confused:

    Would somebody who is in the know mind having a look at the SDK file I received and advise me the best way to produce a basic program that will allow me to:

    Turn on the device
    Change the various settings etc
    Set it to read the tags
    Handle the information received from the RFID tags

    I understand the whole command structure thats printed on the manual but Im not sure how to send the data through the serial port to the device.

    Here is a link to the SDK files:

    http://www62.zippyshare.com/v/81206009/file.html

    Any help would be greatly appreciated, and if someone has time to do up something that works Id be willing to compensate them for their time.


Comments

  • Registered Users Posts: 3,227 ✭✭✭darragh o meara


    Anybody??


  • Registered Users Posts: 23,212 ✭✭✭✭Tom Dunne


    Can you post up the make/model/manufacturer of the RFID reader?

    Also, if there is a link to the manufacturer's website, that would be great.

    I know absolutely nothing about RFID readers (nor C++ for that matter), but I do have an interest in them for student projects, so I have been doing a bit of reading around.

    My initial guess is that you need to send commands to the RFID reader over a COM port, I think that would give you a starting point. Sending them via C++ is probably reasonably straight forward, but knowing what these commands are is why you need the make/model number.


  • Registered Users Posts: 3,227 ✭✭✭darragh o meara


    Tom Dunne wrote: »
    Can you post up the make/model/manufacturer of the RFID reader?

    Also, if there is a link to the manufacturer's website, that would be great.

    Make: Gaorfid
    Model: 216002
    Link to manufacturer : http://www.gaorfid.com

    By the way the codes are in a PDF in the sdk folder, it's just getting them to the reader is my problem in a reasonable fashion, ie. not having to look up each code and its expected reply. A button to send the "Start reading" command something to indicate its on is what I need.


  • Closed Accounts Posts: 8,015 ✭✭✭CreepingDeath


    Make: Gaorfid
    Model: 216002
    Link to manufacturer : http://www.gaorfid.com

    By the way the codes are in a PDF in the sdk folder, it's just getting them to the reader is my problem in a reasonable fashion, ie. not having to look up each code and its expected reply. A button to send the "Start reading" command something to indicate its on is what I need.

    WARNING : Web Attack page

    I used the search page in Gaorfid to search for "216002" got a reported web attack....


  • Registered Users Posts: 3,227 ✭✭✭darragh o meara


    WARNING : Web Attack page

    I used the search page in Gaorfid to search for "216002" got a reported web attack....

    I am very sorry. I have no control over their webpage but have visited it on a number of occasions.


  • Advertisement
  • Registered Users Posts: 1,182 ✭✭✭Beef


    I used to do a fair bit of development (through Progress OpenEdge and VB) using the serial port. Mainly digital weighing scales and printers which were controlled from the software we wrote. Probably something similar to what you are at here I would think but we communicated directly with the devices and did not use an API, not that that should make much difference. We used to use a microsoft control (mscomm32.ocx) to connect and handle our serial requests and responses. It's 5 or 6 years since I've looked at anything like that though.


  • Registered Users Posts: 3,227 ✭✭✭darragh o meara


    Beef wrote: »
    I used to do a fair bit of development (through Progress OpenEdge and VB) using the serial port. Mainly digital weighing scales and printers which were controlled from the software we wrote. Probably something similar to what you are at here I would think but we communicated directly with the devices and did not use an API, not that that should make much difference. We used to use a microsoft control (mscomm32.ocx) to connect and handle our serial requests and responses. It's 5 or 6 years since I've looked at anything like that though.

    Yeah it's old tech alright. Many thanks for that insight. Ill get going with some research in the morning. Really need to get this device up and running ASAP so hopefully seething you've mentioned will get me on the right track.


  • Registered Users Posts: 2,426 ✭✭✭ressem


    The 3 essential files for your purpose are
    function.h

    which is the header file defining how to talk to
    Reader.lib
    Reader.dll

    The very basic way to start using this is to create a Win32 Console Application in Visual C++.
    Copy these 3 files into the project directory using windows explorer.

    Add the existing function.h into the "header files".
    Add the Reader.lib as a dependency under Project> Properties > Configuration Properties > Linker > Input > Additional Dependencies > Type in Reader.lib

    The project creation wizard will have created a .cpp file with the same name as the project. e.g. myprojectname.cpp.

    Within this, added the code
    #include "function.h"
    
    with the other includes at the top of the file

    In the section labeled
    // TODO: code your application's behavior here.

    Start off with
    	    // RFID API described in 216002 API v1.0.0
                HANDLE hComPort;
                char com_port[8]= "COM1";
                int nLibRetCode = 0;  
                unsigned short baudratecode=4;  // 0: 9600 bps 1: 19200 bps 4: 115200 bps 
    								            
                if(CommOpen(&hComPort,com_port)==0){
                    nLibRetCode = SetBaudRate (hComPort, baudratecode);
                    if (nLibRetCode==0){
                        
                    }
                    else{// failed to set baud rate
    
                    }
                    CommClose(hComPort);
                }
                else {
                    // CommOpen Failed
                }
    


  • Registered Users Posts: 3,227 ✭✭✭darragh o meara


    ressem wrote: »
    The 3 essential files for your purpose are
    function.h

    which is the header file defining how to talk to
    Reader.lib
    Reader.dll

    The very basic way to start using this is to create a Win32 Console Application in Visual C++.
    Copy these 3 files into the project directory using windows explorer.

    Add the existing function.h into the "header files".
    Add the Reader.lib as a dependency under Project> Properties > Configuration Properties > Linker > Input > Additional Dependencies > Type in Reader.lib

    The project creation wizard will have created a .cpp file with the same name as the project. e.g. myprojectname.cpp.

    Within this, added the code
    #include "function.h"
    
    with the other includes at the top of the file

    In the section labeled
    // TODO: code your application's behavior here.

    Start off with
    
    	    // RFID API described in 216002 API v1.0.0
                HANDLE hComPort;
                char com_port[8]= "COM1";
                int nLibRetCode = 0;  
                unsigned short baudratecode=4;  // 0: 9600 bps 1: 19200 bps 4: 115200 bps 
    								            
                if(CommOpen(&hComPort,com_port)==0){
                    nLibRetCode = SetBaudRate (hComPort, baudratecode);
                    if (nLibRetCode==0){
                        
                    }
                    else{// failed to set baud rate
    
                    }
                    CommClose(hComPort);
                }
                else {
                    // CommOpen Failed
                }
    

    Wow that's great. Ill get going with that. Many thanks.


  • Registered Users Posts: 1,182 ✭✭✭Beef


    Oh and also - some things to keep in mind when working with the COM port.

    We used to use HyperTerminal (it comes with windows XP) to test connection settings to our external devices. You can also use this to issue commands to the device and get a response if you have the commands to hand. You will need to have things such as baud rate, data bits, parity, stop bits and flow control all exactly the same on both sides of the connection (i.e. the physical device and your software settings) in order to handshake correctly. You're probably wide to this but just in case... :)


  • Advertisement
  • Registered Users Posts: 3,227 ✭✭✭darragh o meara


    Beef wrote: »
    Oh and also - some things to keep in mind when working with the COM port.

    We used to use HyperTerminal (it comes with windows XP) to test connection settings to our external devices. You can also use this to issue commands to the device and get a response if you have the commands to hand. You will need to have things such as baud rate, data bits, parity, stop bits and flow control all exactly the same on both sides of the connection (i.e. the physical device and your software settings) in order to handshake correctly. You're probably wide to this but just in case... :)

    I tried to use Hyperterminal today but couldnt actually input anything with the keyboard, Is there something Im missing? I could get the terminal to connect to com 1 which the unit is connected through and I have configured the settings to what I need but I cant seem to input anything.


  • Registered Users Posts: 1,182 ✭✭✭Beef


    I know you've said that the settings are correct but are you 100% sure? The only time I had this problem from memory is if the settings don't match up, or if it was a dodgy cable. Other than that I don't know why it would not work. I'd defo check the settings though if you're sure the cable is ok. Did you buy the cable or make it?

    [edit]
    You could try to echo characters typed locally - go to file-properties for your saved connection and into ASCII setup. Turn on "echo typed characters locally". From memory though, I don't think you should need to do this but I may be wrong...


  • Registered Users Posts: 3,227 ✭✭✭darragh o meara


    Beef wrote: »
    I know you've said that the settings are correct but are you 100% sure? The only time I had this problem from memory is if the settings don't match up, or if it was a dodgy cable. Other than that I don't know why it would not work. I'd defo check the settings though if you're sure the cable is ok. Did you buy the cable or make it?

    [edit]
    You could try to echo characters typed locally - go to file-properties for your saved connection and into ASCII setup. Turn on "echo typed characters locally". From memory though, I don't think you should need to do this but I may be wrong...

    I have a demo package for the reader that will connect and talk to it using the same settings. I've written a labview programme that I'm hoping will work.

    In regards to hyper terminal, should I be able to just type in a command into the programme?


Advertisement