The Tournament Director Forums

Main => Help Me => Topic started by: Linker_Split on May 21, 2013, 09:10:50 PM

Title: RFID Mifare 1K and TD
Post by: Linker_Split on May 21, 2013, 09:10:50 PM
Hello guys,
I really need your help now.
I bought an ACR122 contactless smart card reader.
It comes with RFID Mifare 1k cards
The software is prettysimple to use, it basically got a "READ" "WRITE" buttons (LEGGI-SCRIVI):
(http://img836.imageshack.us/img836/8207/img1jyq.jpg)
It also got an auto-read off/on (Auto lettura off/on)
Now it doesn't allow me to configure ANY keys!
also, it's installed via USB, I tried using TWedge... but I don't know which port is!
Any help on this?
Title: Re: RFID Mifare 1K and TD
Post by: Linker_Split on May 22, 2013, 10:47:50 AM
News

Ok, i contacted the DEVs behind this program,
they tested in Win7 and it was working, since they edited the program for my purpose to be like this:
(http://imageshack.us/a/img835/60/newuq.png)

But I'm running TD in win8 64x, and I modified hotkey for addplayer to be "B" letter, still it doesn't work.
Corey, what could be?

If I try the program (ACR122 RW) with notepad, when I put my card on the reader, notepad first writes "B" then the card number, so i guess it works
Title: Re: RFID Mifare 1K and TD
Post by: Linker_Split on May 23, 2013, 10:58:04 AM
News:
Seems that with main program window open, hotkey doesn't work.
I set B as "add player" hotkey, then I manually pressed it with clock screen on second monitor amd program on first monitor, nothing happened.
But when I closed the main program, hotkey worked (manually pressed)
Card reader program even if emulates the B keypressed, still doesn't work...
HEEEELPPPPPP
Title: Re: RFID Mifare 1K and TD
Post by: Corey Cooper on May 23, 2013, 11:34:54 AM
News:
Seems that with main program window open, hotkey doesn't work.
I set B as "add player" hotkey, then I manually pressed it with clock screen on second monitor amd program on first monitor, nothing happened.
But when I closed the main program, hotkey worked (manually pressed)

Does "Main program window" refer to the Settings window?  That's what your description sounds like.  So, manually (no card reader) pressing a hotkey works with the clock window open but NOT if the Settings window is open.  Is that right?

This might be the expected behavior.  Because the Settings window has input fields (depending on which tab is selected), only a specific set of hotkeys will work when the Settings window is open.  For example, the function keys (F1 through F12) work because they have no other meaning when typing into an input field.  But other hotkeys, like "x", don't work.  You wouldn't want the Bust Players Out dialog to open when you are typing in your tournament description as "The X-Games of Poker".  Some tabs have no input fields, so it *could* be OK for other hotkeys, like "x", to work on those tabs.  This can be changed on the Preferences tab, Behavior section, "Allow hotkeys on all Settings tabs that do not have inputs".

Now, as far as why the TD doesn't detect the reader pressing the "B" key I honestly cannot say.  The TD has only one way to detect hotkeys, so if the reader simulating a keypress doesn't trigger anything in the TD, there's little I can do about it unfortunately.  Out of curiosity, what happens when you run a card through the reader while an input field in the TD has focus?  For example, click on the Notes or Description field on the Game tab and run your card through.  Do you see the "correct" input as you did in Notepad?
Title: Re: RFID Mifare 1K and TD
Post by: Linker_Split on May 23, 2013, 12:51:57 PM
Does "Main program window" refer to the Settings window?  That's what your description sounds like.  So, manually (no card reader) pressing a hotkey works with the clock window open but NOT if the Settings window is open.  Is that right?
Is, that's right, but now I tried with some keys like H, G, and they work, so I guess it's like you said, some work some don't.

Now, as far as why the TD doesn't detect the reader pressing the "B" key I honestly cannot say.  The TD has only one way to detect hotkeys, so if the reader simulating a keypress doesn't trigger anything in the TD, there's little I can do about it unfortunately. 

Which is the only way? When running the card reader program with notepad, if I run a card through the reader, it automatically type the desired hotkey written in the program.
So if I set F1 to be the key pressed, t writes "F1" on the notepad.

Out of curiosity, what happens when you run a card through the reader while an input field in the TD has focus?  For example, click on the Notes or Description field on the Game tab and run your card through.  Do you see the "correct" input as you did in Notepad?
If I run the reader with TD's input field open, it writes the key inserted in the card reader program.
Title: Re: RFID Mifare 1K and TD
Post by: Linker_Split on May 24, 2013, 08:20:45 AM
Corey, the programmers contacted me.
They said that they created the program on Windows XP 32bit, language C# with .Net Framework 4 and the function used to send keys is SendKeys.
They also tried InputSimulator (https://inputsimulator.codeplex.com/) external library but with no success.
I don't know what to do now... :(

#EDIT
it works on windows XP SP3!
I tested the two programs in windows XP, when I insert the card in the card reader, the "add player" dialog pop ups and select the desired player.
This doesn't work in Windows 8 and 7 (both 32 and 64bit version)
Title: Re: RFID Mifare 1K and TD
Post by: Magic_fubu on May 24, 2013, 04:45:13 PM
Have you tried to use compatibility mode on the Win7 or Win8 computers? Doesn't always work, but sometimes if you run programs in compatibility mode, they'll work right...
Title: Re: RFID Mifare 1K and TD
Post by: Linker_Split on May 24, 2013, 11:06:22 PM
Have you tried to use compatibility mode on the Win7 or Win8 computers? Doesn't always work, but sometimes if you run programs in compatibility mode, they'll work right...
nope I didn't try it, I think I'll give it a shot!
Anyway, seems that only TD doesn't work with this program...
Title: Re: RFID Mifare 1K and TD
Post by: Linker_Split on May 26, 2013, 11:43:41 AM
Corey, so there'sno way to fix this?
Title: Re: RFID Mifare 1K and TD
Post by: Corey Cooper on May 27, 2013, 09:43:51 PM
Sorry, I honestly cannot say.  As I mentioned before, the TD has only one way of listening for hotkeys (it relies on IE to deliver key press events), so I can't imagine that even if we could determine what the incompatibility was that there was anything I could do from the TD to alleviate it.

There are several key events: key down, key press, and key up.  The TD relies on the key down event for hotkeys.  It's possible the driver for your card reader is generating, for example, only the key press event.  Or no events.  It could be something as simple as making sure that after closing the Settings window you click on the Game window before scanning the card.  Or it could be something else entirely.
Title: Re: RFID Mifare 1K and TD
Post by: Linker_Split on May 28, 2013, 04:32:58 PM
Sorry, I honestly cannot say.  As I mentioned before, the TD has only one way of listening for hotkeys (it relies on IE to deliver key press events), so I can't imagine that even if we could determine what the incompatibility was that there was anything I could do from the TD to alleviate it.

There are several key events: key down, key press, and key up.  The TD relies on the key down event for hotkeys.  It's possible the driver for your card reader is generating, for example, only the key press event.  Or no events.  It could be something as simple as making sure that after closing the Settings window you click on the Game window before scanning the card.  Or it could be something else entirely.

Then why it worked in XP?
Title: Re: RFID Mifare 1K and TD
Post by: Corey Cooper on May 28, 2013, 05:10:43 PM
I have no idea.

But the TD certainly doesn't do anything different based on operating system.
Title: Re: RFID Mifare 1K and TD
Post by: Linker_Split on May 28, 2013, 10:44:44 PM
I have no idea.

But the TD certainly doesn't do anything different based on operating system.
Thank you Corey.
If devs will tell me anything more, I'll tell you.
Otherwise I will have to uninstall win 8 and go back to xp
Title: Re: RFID Mifare 1K and TD
Post by: Corey Cooper on May 29, 2013, 01:37:11 PM
Perhaps it was the version of IE and not Windows?  Not that it will matter too much, because if it doesn't work in IE10, well, you can't run any earlier versions of IE on Windows 8...
Title: Re: RFID Mifare 1K and TD
Post by: Linker_Split on May 31, 2013, 08:39:28 AM
Hi Corey,
Devs told me that with the card reader software they don't simulates key pressed or key down or key up, they only send data from keyboard.
Title: Re: RFID Mifare 1K and TD
Post by: Corey Cooper on May 31, 2013, 02:33:53 PM
... which could be the problem, I honestly don't know.  The TD can't "read data from the keyboard", it can only respond to specific events that Internet Explorer generates.  Namely "key pressed", "key up", and "key down".  How Windows translates your card reader's "SendKeys" to IE's events is a mystery to me.
Title: Re: RFID Mifare 1K and TD
Post by: Linker_Split on June 02, 2013, 01:15:36 PM
... which could be the problem, I honestly don't know.  The TD can't "read data from the keyboard", it can only respond to specific events that Internet Explorer generates.  Namely "key pressed", "key up", and "key down".  How Windows translates your card reader's "SendKeys" to IE's events is a mystery to me.
Ok, but if I set for example the hotkey "CTRL+SHIFT+P" in the card reader software, which is the "IE’s Private Browsing Mode", when I insert the card, IE opens the window.
It's doesn't work for the layout of the TD.
Why, if it's IE based?
Title: Re: RFID Mifare 1K and TD
Post by: Corey Cooper on June 03, 2013, 01:47:33 PM
I don't know.  IE clearly gets the key event.  Maybe it's not forwarding it on to the currently loaded page?  Seriously, I don't know.

Web pages (and the TD, which is related), can register for key events on different parts of the page.  Whether or not the press of an actual key results in an event depends on which part of the page has focus.  Events filter "up", so parts of the page that contain other parts of the page will also "receive" those events.  For example, take an HTML <table> that contains a button.  When the button is clicked (other event types work the same way as key events), the button will receive an event, and so will the table in which it is contained.  The TD listens for events at the top-most level, so that key events that happen anywhere on the page will be received.  So, while I guess it's possible that "focus" has something to do with it, it shouldn't since the TD should get all events.  Or, as I mentioned before, perhaps only the "key pressed" event is being generated by "SendKeys", but the TD relies on the "key down" event.
Title: Re: RFID Mifare 1K and TD
Post by: Corey Cooper on June 03, 2013, 02:47:28 PM
I tried sending keys to the TD using a simple Windows script that utilizes the SendKeys method.  It seemed to work fine for me.  I sent "^a" (^ is SendKeys shorthand for the Ctrl key) and the Add Players to Tournament dialog pops open.
Title: Re: RFID Mifare 1K and TD
Post by: Linker_Split on June 05, 2013, 08:40:53 AM
I tried sending keys to the TD using a simple Windows script that utilizes the SendKeys method.  It seemed to work fine for me.  I sent "^a" (^ is SendKeys shorthand for the Ctrl key) and the Add Players to Tournament dialog pops open.
Can you please send me the script so I can send it to the devs?
Title: Re: RFID Mifare 1K and TD
Post by: Corey Cooper on June 05, 2013, 02:25:57 PM
I've PM'd the script to you.

One other thing that occurred to me: I've received a few (maybe 3) reports of hotkeys not working until the user clicks the mouse button in the Game window.  The Game window appears to otherwise have focus, but for some reason it doesn't respond to hotkeys until clicked.  Someone just reported they have to right-click in the Game window first.  No idea what might be happening, but it might be something for you to try.  If I recall correctly, past hotkey issues like this turned out to be 3rd party software of one form or another (malicious or not), and were cleared up by removing software or re-installing Windows.

If hotkeys work for you, but just not when initiated via the scanner then this may not be the same issue, but I thought I'd mention it.
Title: Re: RFID Mifare 1K and TD
Post by: Corey Cooper on June 05, 2013, 04:43:37 PM
Just a guess, but do you have the "Suppress Windows screen saver" preference enabled?
Title: Re: RFID Mifare 1K and TD
Post by: Linker_Split on June 06, 2013, 10:11:48 AM
Just a guess, but do you have the "Suppress Windows screen saver" preference enabled?
No I had it disabled.
Now I enabled it, and I will test it this evening with the scanner.
Thank you for the script Corey
Title: Re: RFID Mifare 1K and TD
Post by: Corey Cooper on June 06, 2013, 11:43:24 AM
Don't enable it.  If it were enabled, it's possible it could explain the issue.  There's actually a slight bug, well, more of an unintended side-effect, in that when the screen saver suppressor activates the TD's window, it activates the hidden window that runs the clock instead of the main Game window.  It still has the intended effect of suppressing the Windows screen saver, but when this happens hotkeys will appear to be broken because the Game window has lost focus (so Windows is sending your keystrokes to a different window).
Title: Re: RFID Mifare 1K and TD
Post by: Corey Cooper on June 07, 2013, 03:58:22 PM
Once again just a thought, but perhaps it's related to this: http://www.thetournamentdirector.net/forums/index.php?topic=4374.0

It's kind of a long shot, but I guess you never know.
Title: Re: RFID Mifare 1K and TD
Post by: virtual930 on June 14, 2013, 11:29:02 PM
Linker_Split
Have you tried running the  ACR122 RW software in admin mode?

I use a bar code scanner and AutoHotkey to enter in and bust players. It worked fine on my XP machine, but on my win 7 & 8 machines it would not work until I ran AutoHotkey in admin mode.
Title: Re: RFID Mifare 1K and TD
Post by: Linker_Split on June 17, 2013, 04:20:59 AM
Linker_Split
Have you tried running the  ACR122 RW software in admin mode?

I use a bar code scanner and AutoHotkey to enter in and bust players. It worked fine on my XP machine, but on my win 7 & 8 machines it would not work until I ran AutoHotkey in admin mode.

I will try it, thank you!
Title: Re: RFID Mifare 1K and TD
Post by: Linker_Split on June 18, 2013, 09:55:58 AM
BIG NEWS:
it works!

I opened the ACR122u software in admin mode... and now it works...
very big thank you!
Now it seems it recognizes only numbers as hotkey, so I set 0 as "add player".

If I have other problem Ill PM you Corey!
Thank you again virtual930 for pointing me the "admin mode" thing
Title: Re: RFID Mifare 1K and TD
Post by: Magic_fubu on June 18, 2013, 07:18:55 PM
Of all the times that I've had issues with programs, every time I've been told "admin mode". Never worked for me... lol... Glad to hear that you've got it working with it though!