GithubHelp home page GithubHelp logo

br-automation-com / rfid-dotnet Goto Github PK

View Code? Open in Web Editor NEW
6.0 5.0 2.0 102 KB

Sample project for accessing B&R RFID reader with Visual Studio

License: MIT License

C# 100.00%
rfid br-automation dotnet

rfid-dotnet's Introduction

Table of Contents

Introduction

This is a sample project for using the B&R RFID reader with Visual Studio. The application starts as system try icon and reads the RFID data and send the information as key strokes. This can be used to enter the RFID data as password in any Windows application. The reader will be detected as serial device by scanning the serial COM ports.

The application can be configured with the INI file that is located in the directory 'C:\Program Files (x86)\BrAutomation\B&R RFID Reader Setup'

Section Parameter Default Description
CHK AutoConnect TRUE Automatically search and connect to the RFID reader on start up.
CHK SendBallon TRUE Show a ballon text with the RFID data when a new key is detected.
CHK SendKeys TRUE Send the RFID key data as key strokes.
CHK SendKeysEnter TRUE Finish the key stroke information with an enter key.
RFID KeyMinLength 15 Minimum length of the key. All keys shorter than this will be considered as false reading.
RFID RefreshTimer 500 (ms) The RFID data is update with the refresh timer.
RFID ResponseTimeout 200 (ms) The reader must respond within this time.

Requirements

  • B&R RFID reader 5E9000.29
  • B&R RFID reader 5E9010.29
  • B&R RFID reader 5E9030.29

Downloads

Here is a list of setup files that can be installed:

Revision History

Version 1.3

  • 5E9030.29 Fixed false reading could cause program to crash

Version 1.2

  • 5E9030.29 Added more log details and exceptions

Version 1.1

  • 5E9030.29 Fixed null reference exception on timeout handler

Version 0.1

  • First public release

rfid-dotnet's People

Contributors

stephan1827 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

Forkers

nick2474

rfid-dotnet's Issues

Null reference exception on timeout handler

I've noticed that very often I get a null reference exception in the timeout handler, since the timer is disposed before in the disconnect() method.

`
internal void TimeoutTimer_Elapsed(object state)
{
Debug.WriteLine(DateTime.Now + " " + DateTime.Now.Millisecond + " Timeout timer");

        _retrys++;
        if (_retrys > 10)
        {
            _connected = false;
            try
            {
                disconnect();
            }
            catch (Exception ex)
            {
            }
            if (OnException != null) OnException(excResponseTimeout);

        }
        TimeoutTimer.Change(Timeout.Infinite, 0);
    }

`

I don't understand why I get a timeout so often. I've set it to 250 ms, is it ok for a 5E9030?

thank you.

Errors when executing the .exe

I have got a first error when executing the projet, "Unhandled exception has occurred in your application (...) Length cannot be less than zero :
unhandledException
The error file with more explanation :
error.txt

And than, I guess it is related, when I click on Connect, I have a new fault :
"Failed because 'PortName' cannot be set while the port is open'
FailedPortOpen

While I have a B&R RFID Reader, with the driver installed. I also managed to communicate and read a RFID Card with it through PuTTy, so the Reader and the port are OK.
Maybe I need to install something else ? The PanelPC is on Windows 7.

Thank you for your help, your project is already very nice.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.