Keyboard, barcode scanner or RFID

General questions about NeoBook

Moderator: Neosoft Support

Locked
User avatar
ebear
Posts: 270
Joined: Wed Jan 18, 2012 3:12 am
Location: Vrchlabi - Czech republic
Contact:

Keyboard, barcode scanner or RFID

Post by ebear »

Hello All,

Is there any way to find out if the input came from a keyboard or other USB device (barcode scanner, RFID scanner etc).

Best regards,

Eric Beerhorst
http://www.lunarsoftware.eu - Lunar Software ERP database Development. Manufacturing processes, Document management, QMS, Stock management. Standalone solutions or connected to Helios Orange and other ERP systems.
Neosoft Support
NeoSoft Team
Posts: 5628
Joined: Thu Mar 31, 2005 10:48 pm
Location: Oregon, USA
Contact:

Re: Keyboard, barcode scanner or RFID

Post by Neosoft Support »

The barcode scanners that I've seen all send data through the keyboard buffer. They can be physically attached between the keyboard and the PC or plugged into a USB port. The USB version often uses a device driver to route data through the keyboard buffer. In both cases software sees the data as coming from the keyboard. I'm not sure there is any way to detect the actual source of the data.
NeoSoft Support
User avatar
ebear
Posts: 270
Joined: Wed Jan 18, 2012 3:12 am
Location: Vrchlabi - Czech republic
Contact:

Re: Keyboard, barcode scanner or RFID

Post by ebear »

Hello Dave,

Yes, like you describe is exactly what I mean, find out the source of the keyboard input. Let see maybe someone comes up with a good idea.

Thanks,

Eric
http://www.lunarsoftware.eu - Lunar Software ERP database Development. Manufacturing processes, Document management, QMS, Stock management. Standalone solutions or connected to Helios Orange and other ERP systems.
User avatar
dec
Posts: 1663
Joined: Wed Nov 16, 2005 12:48 am
Location: Spain
Contact:

Re: Keyboard, barcode scanner or RFID

Post by dec »

Hello,

Taking a look this not appear an easy task and to be honest I don't know if can work at all as a NeoBook plugin. Reading this SO article I arrive in this other one which apparently do more or less what you wanted. This last article shown two things to me: the npHook plugin can't help us here, because the used API do not provide the appropiate information. The second thing I learn is a possible way to try it using other Windows API's, however, I really don't know if this can work or not.

To be honest (based on my experience) I think that we can enter in problems if try to use the appropiate API from a NeoBook plugin. On the other hand, searching for information about Delphi and "GetRawInputHeader" (one of the functions we need) surprisingly we can't found information on Google... ANY information... nothing at all. And only 14 results about this function in Google... (I never view something similar). Maybe another mate can tell us another possible way to try what you wanted, since the way I discover (in principle) appear to be problematic and difficult... and need to be made, of course...

Is possible that you can found a workaround or just another way to do what you wanted, due to this difficult things. ;)
.
Enhance your NeoBook applications!
.
58 plugins, 1131 actions and 233 samples
.
NeoPlugins website: www.neoplugins.com
.
User avatar
ebear
Posts: 270
Joined: Wed Jan 18, 2012 3:12 am
Location: Vrchlabi - Czech republic
Contact:

Re: Keyboard, barcode scanner or RFID

Post by ebear »

Hello David,

I have to make something fail prove (or dummy proof :lol: ). I will do input via keyboard (QTY, a note etc), scan barcodes, and use RFID cards.
For this I have to make sure that the input goes in the right "TextEntry", the users are absolutely no PC specialists. In my case I have the same problem as Nicholas http://nicholas.piasecki.name/blog/2009 ... -winforms/.
If there is any possibility to do this with a plug-in, I will have a small budget to pay for this plug-in. But I think it could also be interesting for other NB developers....

You could also think on a more wider usability: USB webcams, scanners etc.

Best regards,

Eric
http://www.lunarsoftware.eu - Lunar Software ERP database Development. Manufacturing processes, Document management, QMS, Stock management. Standalone solutions or connected to Helios Orange and other ERP systems.
User avatar
dec
Posts: 1663
Joined: Wed Nov 16, 2005 12:48 am
Location: Spain
Contact:

Re: Keyboard, barcode scanner or RFID

Post by dec »

Hello,

The problem(s) is I am not an expert in this Windows API, for the first time Google do not offer any result or help, the only code found is C# and not Delphi, I think this API can cause problems using it from a NeoBook plugin and last but no least probably this can take several hours just to discover that finally we can't continue and lots of hours if finally we can try to implement it.

I am not talking about other things are easy and this not, all the plugins requires their work, but this possible plugin do not have a very good feel from the beginning due to the above reasons.

I am sorry Eric.
.
Enhance your NeoBook applications!
.
58 plugins, 1131 actions and 233 samples
.
NeoPlugins website: www.neoplugins.com
.
User avatar
dec
Posts: 1663
Joined: Wed Nov 16, 2005 12:48 am
Location: Spain
Contact:

Re: Keyboard, barcode scanner or RFID

Post by dec »

Hello,

Ok. Taking a look into the question I found that even when we can implement the appropiate Windows API (I do not try this at all) and suposing this can work well, I don't know how we can use it for our purposes. Let me to explain. The API I refer intercepts the user input and probably can determine if such input come from a keyboard or other device. BUT, what we can do with this information? Just to set in a boolean variable that you can looking for? And what to do with this information? In other words, if the input come from a keyboard, what you need to do or better said what you can do? And what need to do if the input come from another device?

This means that probably you not only need to know if the input come from a keyboard or other device, but you need the input (characters) information from the plugin as well. And in few words this complicated the things a little more. Eric, are you tried with the NeoBookKB plugin, which allows you to "lock" the Keyboard? Can this help you in some way?
.
Enhance your NeoBook applications!
.
58 plugins, 1131 actions and 233 samples
.
NeoPlugins website: www.neoplugins.com
.
User avatar
domino
Posts: 275
Joined: Sat Apr 02, 2005 7:11 am
Location: Notts UK

Re: Keyboard, barcode scanner or RFID

Post by domino »

I have made a couple of NB apps for barcode readers and RFID - but not at the same time...
But from memory the digits from a barcode and from an RFID tag are different in character length (for example) - so could the scan go to a temp file and matched against something then passed back to the appropriate text box?
David de Argentina
Posts: 1596
Joined: Mon Apr 04, 2005 4:13 pm
Location: Buenos Aires, Argentina
Contact:

Re: Keyboard, barcode scanner or RFID

Post by David de Argentina »

I had developed a plugin for an specific barcode scanner:

viewtopic.php?f=3&t=18442

As i remember, barcodes has the capability to set the exit character (usually [#13])

If you change this settings in your barcode scanner, you could identify what device had done the input.

Supose you set the exit character to [#9]
Into the actions of the inputbox, at "text changed" tab, you could check what kind of input were done.
if lastkey is character 9, input were from barcode scanner
if lastkey is another character, input were from keyboard
and so on..

My 0,01
David de Argentina
User avatar
ebear
Posts: 270
Joined: Wed Jan 18, 2012 3:12 am
Location: Vrchlabi - Czech republic
Contact:

Re: Keyboard, barcode scanner or RFID

Post by ebear »

Hello All,

First of all thanks a lot for all your kind reactions. Sorry I react as no, but you know a hard day :shock: at work and no time to react :P

David E; I took an hour or so to look trough your reactions and the included links, I understand the problem and I thought it would be easier.
I also tried to use the NeoBookKB plugin, but this locks all the "keyboard like" input thus also the input of the RIFD and bar-code scanner, so this is not a solution :cry:

Domino; the problem with your idea is that the output of the RFID tags we use and the bar-codes are very similar for example:
this is the output of one of the RFID tags: 0002608826
this is the output of a RFID card: 0005179471
And this is a Barcode: 0006557891

You see the problem....

David de A (there are two Davids :lol: ); Your idea for the bar-code scanner is good, as I can use a prefix or a suffix, but in the RFID scanners we use I don't have this option. This makes for me impossible to monitor the differences between manual keyboard input (Bar-code is for example not readable) and RFID input.

My problem is not solved yet but this is not that important, I will find out some kind of way around. But I thought maybe it opens a way to do more with several USB device inputs.
Next to this I archived already a HW/SW solution for working with the RS-232 port (using the GT plugin) to get input of a ESD (anti static) tester.
And I have more Ideas to use Neobook for example production testing / monitoring applications, but everything hangs with input of external (USB / RS232) devices.
But for this aren't many Plugins available as I know (GT plugin is also already dropped I think).

Again thanks and have a good day / evening.

Eric
http://www.lunarsoftware.eu - Lunar Software ERP database Development. Manufacturing processes, Document management, QMS, Stock management. Standalone solutions or connected to Helios Orange and other ERP systems.
Locked