Git Product home page Git Product logo

eid's People

Contributors

egelke avatar typesafe avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

eid's Issues

New Eid Cards throw exceptions

Hi,

I would like to use your Eid package to get data from inserted eid card under Windows but for new eid cards, I have the following error :
System.AggregateException: Une ou plusieurs erreurs se sont produites. ---> System.InvalidOperationException: Unknown Document Type: 32
à Egelke.Eid.Client.Model.TLV.ToDocType(Byte[] value)
à Egelke.Eid.Client.Model.Identity..ctor(Byte[] file)
à Egelke.Eid.Client.EidCard.get_Identity()
à TestEidReadingFedict.Form1.Readers_CardInsert(Object sender, CardEventArgs e)
à Egelke.Eid.Client.Readers.OnCardInsert(Card card)
à Egelke.Eid.Client.Readers.DetectChanges()

Could you tell me what I can do ?

Thank you,
Best Regards,

Nicolas Giannone

Linux environment

It works perfect in the windows environment, thanks again!
How can we run this library in the Linux environment?

Address

Hello

I see this library has got an Address class, but I can't seem to find on how to read the address?

Receiving SCARD_E_SERVICE_STOPPED error with build-in card readers

Hi there,

Love the library!

We seem to struggle with an issue that is hard to reproduce, as it behaves differently on each system and with each card reader.
I have a HP ZBook with a build in E-ID card reader.

Basically, what happens is the following

  • Insert card
  • Read card
  • Remove card
  • Crash

And with crash I mean, the exception in Readers.cs line 112 is being hit and the task is in an invalid state, which prevents subsequent cards from being read.

The return value in that particular case is 0x8010001E which says SCARD_E_SERVICE_STOPPED.
Dug up some documentation on the web and found out that this link has the same issue ( https://ludovicrousseau.blogspot.com/2021/12/windows-pcsc-and-scardeservicestopped.html ).

if (retVal == 0x8010000A) continue; //timeout if (retVal != 0) { OnStateChange(retVal); continue; //throw new InvalidOperationException("Failed to update the status: 0x" + retVal.ToString("X")); }

What I did for testing purposes is throw an event with the Exception included ( ExceptionOccurred ) to the outside world instead of interrupting the task, so that my caller can dispose the Readers.cs and instantiate a new one.

protected virtual void OnStateChange(uint state) => StateChanged?.Invoke(this, state);

This is example code of how we implemented the "hack"

`private void CreateReader()
{
    _readers = new Readers(ReaderScope.User);
    _readers.CardInsert += Readers_CardInsert;
    _readers.StateChanged += ReadersOnStateChanged;
    _readers.StartListen();
}`

`private void ReadersOnStateChanged(object? sender, uint e)
{
    DisposeReader();
    CreateReader();
}`

While this method works but it feels a bit dirty and hacky.

Would love some guidance on how to proceed next.

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.