dr-spangle's picture
Feb 14, 2014
2275 views
Reputation: 12
+1
-50 likes
-1

iButton integration

I've been working on using a magnetic iButton/Dallas reader with my SambaPOS setup for login, and possibly Magnetic Swipe card as well, I'm actually doing okay with setting it up I think.

They both emulate a keyboard and have programmable prefix and suffix values, so I can set up a user with a pin code of whatever the iButton reads as, and can then set the suffix to contain a carriage return, and then I place it on the reader and it logs straight in.

However the logoff is more complex, when the iButton is removed from the reader, it prints 16 zeros and a newline, so my idea was to make a rule that detects when 16zeros are entered, and that triggers an action which will log the user off, however I have 2 problems: 1)I can't make the rule detect when things are typed whereever, (I can make it detect when the zeros are typed in the Number pad on the ticket screen,and fire an action, but I can't detect it typed whereever) 2)I can't make an action that logs the user out, currently have an action called 'iButton - Logout' which just displays a message saying 'logout' to confirm my rule works, but I can't see a way to make an action which logs out?

3)Another problem I have is with the Magnetic stripe card login, I was going to set it the same way as the iButton login, which works, but the pin limit is set to 20, where the Magnetic Stripe Cards read in 36 numbers or so (The one I tested [A shell loyalty card] did, at least) This one should be a simple fix, right? just change some config variable to allow longer pins?

4)Is there any way to switch user without logging out and in? so that if someone's logged in with their iButton, another user (such as an admin) can take it off and login with theirs, I guess the taking off the previous would fire a 16 zeros message which would cause the user to logout (when issue 1 and 2 are fixed), returning to the login screen where the other user places their dallas key on to login. But if we have non-magnetic dallas keys, can I make it so a code is entered and it will logout of one user and into another?

 

 

switch user

We have already answers to
841 questions
E-Posta Facebook Twitter RSS Skype
Telefon (212) 252 0634