Source language: Translate to:

Detection of input from a specific USB port

Using NeoBook to control external hardware and devices.

Moderator: Neosoft Support

Detection of input from a specific USB port

Postby ebear » Mon Sep 08, 2014 11:08 am

Hello All,

I asked this question already before but I didn't find a really answer so I decided to try it again, as we have some people together with hardware experience.

Okay my problem...

I have an application where input is done via keyboard/mouse combination and next to this also input from a barcode terminal is done. (barcode scanner with numeric keyboard)
Now I need to differ the input done by keyboard/mouse from the input done by the barcode terminal, so I need to find out from which USB port the input came from.

So something like this:
Input from keyboard USB port is detected,
goto page XXX,
setvar "inputFromKeyboard" "1",
focus textentry,
fill text entry with keyboard buffer.
Next keyboard input Var "inputFromKeyboard" = 1, don't change page etc...

Input from Barcode scanner USB port is detected
goto page YYY,
setvar "inputFromKeyboard" "0",
focus textentry,
fill text entry with barcode terminal buffer.
Next barcode terminal input, Var "inputFromKeyboard" = 0, don't change page etc...

In sort input from keyboard has to be done in page XXX, input from barcode terminal has to be done in page YYY.

Has anyone already done something like this???

Thanks for your reactions and 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
ebear
 
Posts: 270
Joined: Wed Jan 18, 2012 3:12 am
Location: Vrchlabi - Czech republic

Re: Detection of input from a specific USB port

Postby dec » Tue Sep 09, 2014 1:52 am

Hello Eric,

From my knowledge (not very much in this field, to be honest) it's not possible to determine from which device the input come. This is because finally all the devices uses the same software API provided by the operating system. Of course I can be wrong and some other mate can share here their knowledge, but, probably you need to search for another possible way to diferenciate between device inputs. :(
.
Enhance your NeoBook applications!
.
57 plugins, 1113 actions and 230 samples
.
NeoPlugins website: www.neoplugins.com
.
User avatar
dec
 
Posts: 1663
Joined: Wed Nov 16, 2005 12:48 am
Location: Spain

Re: Detection of input from a specific USB port

Postby dpayer » Tue Sep 09, 2014 6:48 am

Won't the input from the scanner always have the same amount of characters to it (if you are scanning a particular type of barcode). Could you measure the length of the input to determine if it meets that qualification?
David Payer
Des Moines, Iowa
USA
User avatar
dpayer
 
Posts: 1380
Joined: Mon Apr 11, 2005 5:55 am
Location: Iowa - USA

Re: Detection of input from a specific USB port

Postby dpayer » Tue Sep 09, 2014 6:48 am

Won't the input from the scanner always have the same amount of characters to it (if you are scanning a particular type of barcode). Could you measure the length of the input to determine if it meets that qualification?
David Payer
Des Moines, Iowa
USA
User avatar
dpayer
 
Posts: 1380
Joined: Mon Apr 11, 2005 5:55 am
Location: Iowa - USA

Re: Detection of input from a specific USB port

Postby ebear » Fri Sep 12, 2014 1:59 pm

Hello Dpayer,

It isn't only a barcode scanner, it has a keyboard which makes it possible to input a number (qty for example) and send it to the base station.

In short I scan a barcode this will be send to the base station > Qty input Textentry will be set in focus, via the barcode terminal I type the qty, press enter and this number will be also send to the base station.

My problem is that the PC used as base station also is used for other functions, and the person in the stock with the terminal cannot simple check if the right function is active.

So Scan and send barcode to the basestation... Neobook application will detect that the input is from the barcode terminal and the right "page" will be selected and the input is made in the right text entries.

Personally I have the idea that there is no solution for this problem????

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
ebear
 
Posts: 270
Joined: Wed Jan 18, 2012 3:12 am
Location: Vrchlabi - Czech republic

Re: Detection of input from a specific USB port

Postby David de Argentina » Fri Sep 12, 2014 9:00 pm

Hi Eric,

Almost all barcode scanners can be setted using a prefix or escape characters.

You can use this special characters to determine what device produces the input characters.

Check the manual of your barcode scanner to learn setup correctly.

My 0.01

David de Argentina
User avatar
David de Argentina
 
Posts: 1553
Joined: Mon Apr 04, 2005 4:13 pm
Location: Buenos Aires, Argentina

Re: Detection of input from a specific USB port

Postby DaveJ » Mon Sep 15, 2014 3:11 pm

Hi Eric,
If you can set a prefix character on the barcode scanner, set it to something you might not use such as "^" and create a keyboard hook using the free plugin http://www.neosoftware.com/software/NeoBookKB.exe
When the keyboard hook sees this character it can run a subroutine that sets the keyboard focus to a predefined text box.
One line does it
Code: Select all
kbAddHotKey "Shift+6" "text_focus"


Makes it very easy

Dave J
DaveJ
 
Posts: 90
Joined: Tue Dec 30, 2008 11:06 am

Re: Detection of input from a specific USB port

Postby ebear » Sun Sep 21, 2014 6:05 pm

Hello All,

Thanks for you reactions, I'm a little late to say thanks because I was on a business trip.

I see several suggestions to try next week I will go trough it and will let know if I found a working solution.

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
ebear
 
Posts: 270
Joined: Wed Jan 18, 2012 3:12 am
Location: Vrchlabi - Czech republic


Return to Neobook and Hardware Control

Who is online

Users browsing this forum: No registered users and 1 guest