Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

reaction very slow #14

Open
dieterQBIT opened this issue Jan 3, 2022 · 9 comments
Open

reaction very slow #14

dieterQBIT opened this issue Jan 3, 2022 · 9 comments

Comments

@dieterQBIT
Copy link

I'm having a hard time using the events. Every time I set engine.TraceEvents = true, the program is running slow as hell, including the EIDTestApp you created.

As soon I put it to false I can get to work to read a card, but as soon I switch a card it's over.

What am I doing wrong? I'm using the latest version.

@dieterQBIT
Copy link
Author

I noticed I might be in an endless loop of CardEvent.ReadersChange but I don't know why. I'm not doing anything. My real cardreader is not even connected.

@perevoznyk
Copy link
Owner

It could be hardware-related problem.

In code of event activation

private void ActivateCardEventsTracing()
       {
           engine.CardInserted += new EventHandler<CardEventArgs>(engine_CardInserted);
           engine.CardRemoved += new EventHandler<CardEventArgs>(engine_CardRemoved);
           engine.ReadersListChanged += new EventHandler(engine_ReadersListChanged);
           engine.TraceHardwareEvents = true;
           engine.TraceServiceEvents = true;
           engine.TraceEvents = true;
       }

change engine.TraceHardwareEvents = false;
You can also try engine.TraceServiceEvents = false;

This would stop triggering reactions on card readers list change. It is possible that your PC / laptop has built-in card reader for another type of cards, for example SD card reader. But all types of card readers use the same Windows API and sometime it may lead to such result.

@dieterQBIT
Copy link
Author

I was thinking in the same direction. Strange thing is, my colleagues have the exact same laptop (DELL Latidude 5590 on W11) and I'm the only having this problem.
However, engine.TraceHardwareEvents = false; did the trick, tnx!

@perevoznyk
Copy link
Owner

@dieterQBIT Has your laptop SIM card slot or SD card reader built-in?

@dieterQBIT
Copy link
Author

Yes, there is a SD-card reader built-in. I've also noticed Windows Hello is also recognized as a card device with a card.
But as said, my colleague has exact the same setup and he didn't have the issue.

@WesleyHendrickx
Copy link

It's related to windows Hello.

I encountered the same issue and it even depends on how Windows Hello 4 Business is "activated". I've seen a situation where on 2 exact the same pc configurations one had the issue and another didn't.

In fact the virtual card related to Windows hello causes an error from a slot event which in turn causes yet another slotevent and the library keeps on looping in these slotevents.

We solved it by completely ignoring the Windows Hello virtual cards... Both on the listreaders as on the Removed and Inserted events...

@stevenvanrossem
Copy link

We also encountered the issue on some Windows PCs joined in an Azure domain.
Windows creates some kind of virtual smartcard reader named 'windows hello for business' (not visible via device manager, but still visible via the swelio listReaders function).
We could also solve the issue by ignoring this virtual card reader (by the cardreader index) in all events in the callbackhandler...
Maybe it is possible to detect 'valid' card readers some other way?

@perevoznyk
Copy link
Owner

When loading the list of the readers I skipped now Hello reader and think this can resolve the problem. Can someone test it, please?

@timmessi87
Copy link

We've updates to version 29 and the problem still occurs...
We've disabled TraceHardWareEvents and then everything works.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants