Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Citrix/terminal services stops receiving USB scanners output

Status
Not open for further replies.

HAbramowski

Programmer
Mar 27, 2008
7
US
I don’t think this needs a coding solution, though I am willing to implement one. I believe this problem needs the knowledge of an “OPOS device” person and or a Citrix / Terminal Services guru. Maybe someone who’s experienced the problem of an usb scanner device not being ‘seen’ by the citrix server and got it resolved.

The GOAL:
I need to be able to disable and enable the USB scanners laser beam whenever an error message or question dialog box appears in our VB6 application. The scanner is the LS2208 formerly from SYMBOL, now Motorola. I tried to use Microsoft’s WMI but that turned out to be a dead end. (We are running XP on the desktops and XPe on the thin clients.)

The solution I found was to use an ActiveX control provided by Motorola. A drivers installation program gave us documentation and sample code along with scanner.ocx and stiopos.dll . This gave me coding ability to enable and disable the LS2208. However one of the conditions was that the scanner had to be put into "USB OPOS Hand-held" mode. Until now, we had been operating in "HID KEYBOARD EMULATION" mode.

The PROBLEM:
To make a long story not so long, the coding changes worked while we testing it as a locally running app; and then failed entirely when we ran this same application via citrix neighborhood. When we put the LS2208 into "USB OPOS Hand-held" mode, the device is no longer seen by citrix/Terminal services. I know this is the case and not that its something in my app because I used motorola’s TESTSCAN.exe program to determine where in the process the data was failing to reach the citrix server.

TESTSCAN tests any scanner that can work with the scanner.ocx control. (recall that The barcode scanner has to be put into "USB OPOS Hand-held" mode for it to work with scanner.ocx) When run on the local drive of either a desktop or a thin client, this test program could communicate with “STI_USBSCANNER” and receive the scanners output. When we ran this as a citrix application, we didn’t get as far as test a scan. We could not “OPEN STI_USBSCANNER”. The test program tells us this service object cannot be found.

We could go back to "HID KEYBOARD EMULATION" mode to allow the USB scanner to communicate again. Unfortunately in "HID KEYBOARD EMULATION" mode, the ocx control cant communicate with the scanner. So the problem appears to me as :
what do we need to do , so that a LS2208 in "USB OPOS Hand-held" mode is recognized by the citrix server as the clients OPOS scanner device?

I have googled, dogpiled, searched, every possible combination of keywords and I dont see this problem addressed. I am fairly certain that this problem ISNT one that needs a coding solution. I am sure that this is a matter of configuration either at the client end or the server end of the citrix/Terminal services. However I am more than willing to implement a coding solution if necessary.

So, anyone out there familiar with this situation?

Thanks
Harry
PS: I do have more info - in changes I witnessed in the DEVICE MANAGER window – but I’ll put that in a reply. This is long enough to read already

 
More info for those who like mysteries:

I did some experimenting and looked at what the "Device Manager" had to say about my attached LS2208. Then completely by accident, I left the DM window open and scanned the LS2208 into the other mode. And I watched the Device Manager tree close itself up, refresh TWICE and then reopen with a new list under the HUMAN INTERFACE DEVICES category.

So starting this process again from the beginning, this is what my experimentation shows:

with nothing plugged in the usb ports of the thinclient - the device manager shows NO Human IDs. I plug in my LS2208 barcode scanner and a single entry appears within the HUMAN INTERFACE DEVICES category. This is while the LS2208 is operating in "HID KEYBOARD EMULATION" mode; the scanner communicates with local or remote applications without any trouble.
The single item is listed as a "USB Human interface device"
looking at its drivers properties I see that this provides HidUsb service, its enumerator is USB and its INSTANCE ID is
[bUSB\VID_05E0&PID_1200\S/N:2CF66B5C6C73494DA53C0D4E96FA27AF_REV:NBRMIAAS3[/b]


Now I scan the special barcode that puts this device into its "USB OPOS Handheld" Mode. The HID category now has TWO ENTRIES. The entry that existed before is there. But its INSTANCE ID PROPERTY has changed value! That instance id above is now this!

USB\VID_05E0&PID_1300\S/N:2CF66B5C6C73494DA53C0D4E96FA27AF_REV:NBRMIAAS8

notice the PID is now 1300 and at the end its a s8 and not an s3

That new 2nd entry into the HID category, this is listed as an HID-compliant device. this is its instance ID:

HID\VID_05E0&PID_1300\6&750D171&0&0000

And what IS NO LONGER LISTED IS A Device with a PRODUCT ID (PID) of 1200 – and that device ID is the one that is successful with the scanner.ocx

SO here are my questions:
1. Where on this client machine ( my XP registry?, an ini file ? ) is the linkage that connects “STI_USBSCANNER” with
the entry USB\VID_05E0&PID_1300\S/N:2CF66B5C6C73494DA53C0D4E96FA27AF_REV:NBRMIAAS8

2. Why wont the citrix server see the “STI_USBSCANNER” device while desktops and thinclients both see this device?
or in other words - what about this change in the HID listing isnt compatible with the citrix/Termincal services normal rediretion of the clients USB device's output?

3. Is there any registry trickery or citrix/terminal services trickery I can implement so that the Device that IS SEEN BY CITRIX –
USB\VID_05E0&PID_1200\S/N:2CF66B5C6C73494DA53C0D4E96FA27AF_REV:NBRMIAAS3
– is associated with either
USB\VID_05E0&PID_1300\S/N:2CF66B5C6C73494DA53C0D4E96FA27AF_REV:NBRMIAAS8
– And/or with
– “STI_USBSCANNER” ?

 
Harry:

We are developing custom VB software for the Symbol products for a non-POS application, but have one initial major problem; the "scanner.ocx" file provided by Symbol/Motorola refuses to be registered. We ran their installation utility with no success, then tried to manually register the control and it failed. How did you get it to load? We are using control version 3.24.0, just downloaded from their site.

Regsvr32 reports:

LoadLibrary("scanner.ocx") failed - Attempt to access invalid address.

Their sample VB program also doesn't load, and their demo EXE's (TestScan.exe and VBprofiler.exe) won't run either, which I guess makes some sense.

Once we get the scanner control loaded and operational, we may be able to provide some assistance to you with your problem.

Regards,

Frank Lewis
SpeedFoundry Inc.
 
Well Frank, lets run through the basics on this:
1. Are you working on XP clients? Because all I have stated applies ONLY to XP or XPe

2. Have you tried deleting/replacing the scanner.ocx file? I have experienced 'mystery problems' like you mention with other files and the problem was as simple as a bad download corrupted the file.

3. I know there are at least 2 versions of scanner.ocx and stiopos.dll and there might even be 3. They are always bundled together in an install exe or cab so its easy enough to use them correctly - but PERHAPS where one pair isnt helping you, the next pair will? (you can tell the different pairs by file sizes and file dates.)

And thats all I can offer you on your current problem.

Harry
PS: Turns out that the "answer" to my problem is this: Citrix CANNOT redirect ANY USB device unless its in "keyboard emulation mode". Which to me, a programmer, is saying "Citrix cannot redirect USB devices".

If you want to make some quick (if not easy) money, write a driver that helps CITRIX resolve this USB issue.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top